diff --git a/backend/pom.xml b/backend/pom.xml index da32c40..e7503c6 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -27,14 +27,10 @@ org.springframework.bootspring-boot-starter-aop org.mybatis.spring.bootmybatis-spring-boot-starter${mybatis.version} org.postgresqlpostgresql${postgresql.version} - - org.duckdbduckdb_jdbc1.1.3 io.jsonwebtokenjjwt-api${jjwt.version} io.jsonwebtokenjjwt-impl${jjwt.version}runtime io.jsonwebtokenjjwt-jackson${jjwt.version}runtime org.springdocspringdoc-openapi-starter-webmvc-ui${springdoc.version} - - dev.samstevens.totptotp1.7.1 org.projectlomboklomboktrue org.springframework.bootspring-boot-starter-webflux org.springframework.bootspring-boot-starter-websocket diff --git a/backend/src/main/java/com/zioinfo/mall/admin/AdminController.java b/backend/src/main/java/com/zioinfo/mall/admin/AdminController.java index bb431da..c9c3710 100644 --- a/backend/src/main/java/com/zioinfo/mall/admin/AdminController.java +++ b/backend/src/main/java/com/zioinfo/mall/admin/AdminController.java @@ -56,12 +56,6 @@ public class AdminController { return ApiResponse.ok(userService.resetPassword(id, req.password())); } - /** 관리자 OTP 초기화(사용자 관리 화면 버튼) — 대상 OTP 시크릿 NULL → 다음 로그인 시 QR 재등록. */ - @PostMapping("/users/{id}/otp-reset") - public ApiResponse otpReset(@PathVariable Long id) { - return ApiResponse.ok(userService.otpReset(id)); - } - @DeleteMapping("/users/{id}") public ApiResponse deleteUser(@PathVariable Long id, Authentication auth) { String currentUsername = auth != null ? auth.getName() : null; diff --git a/backend/src/main/java/com/zioinfo/mall/admin/AdminUserService.java b/backend/src/main/java/com/zioinfo/mall/admin/AdminUserService.java index 6ca5c51..32d508c 100644 --- a/backend/src/main/java/com/zioinfo/mall/admin/AdminUserService.java +++ b/backend/src/main/java/com/zioinfo/mall/admin/AdminUserService.java @@ -83,14 +83,6 @@ public class AdminUserService { return UserDto.from(user); } - /** 관리자 OTP 초기화: 대상 사용자 시크릿·확정 플래그 폐기 → 다음 로그인 시 QR 재등록 유도. */ - public UserDto otpReset(Long id) { - MallUser user = require(id); - mapper.clearOtp(id); - auditService.log("USER_OTP_RESET", user.getUsername(), "OTP 초기화(재등록 유도)"); - return UserDto.from(user); - } - public void delete(Long id, String currentUsername) { MallUser user = require(id); if (user.getUsername().equals(currentUsername)) { diff --git a/backend/src/main/java/com/zioinfo/mall/admin/mapper/AdminUserMapper.java b/backend/src/main/java/com/zioinfo/mall/admin/mapper/AdminUserMapper.java index a0fddba..e937b7c 100644 --- a/backend/src/main/java/com/zioinfo/mall/admin/mapper/AdminUserMapper.java +++ b/backend/src/main/java/com/zioinfo/mall/admin/mapper/AdminUserMapper.java @@ -22,9 +22,6 @@ public interface AdminUserMapper { int updatePassword(@Param("id") Long id, @Param("passwordHash") String passwordHash); - /** 관리자 OTP 초기화: 시크릿 폐기 + otp_enabled=false → 다음 로그인 시 QR 재등록 유도. */ - int clearOtp(@Param("id") Long id); - int deleteById(@Param("id") Long id); int countAdmins(); diff --git a/backend/src/main/java/com/zioinfo/mall/ai/MallAiService.java b/backend/src/main/java/com/zioinfo/mall/ai/MallAiService.java index ff3a880..57d5d05 100644 --- a/backend/src/main/java/com/zioinfo/mall/ai/MallAiService.java +++ b/backend/src/main/java/com/zioinfo/mall/ai/MallAiService.java @@ -1,7 +1,5 @@ package com.zioinfo.mall.ai; -import com.zioinfo.mall.ai.service.AiTextRouter; -import com.zioinfo.mall.common.ai.TextAiClient.GenResult; import com.zioinfo.mall.inventory.mapper.StoreInventoryMapper; import com.zioinfo.mall.product.MallProduct; import com.zioinfo.mall.product.mapper.ProductMapper; @@ -24,20 +22,11 @@ import java.util.*; @RequiredArgsConstructor public class MallAiService { - private final AiTextRouter aiRouter; // provider 라우팅(Claude↔Ollama) + infer 로그. 실패 시 아래 Java 폴백. + private final OllamaClient ollama; private final ProductMapper productMapper; private final ReviewMapper reviewMapper; private final StoreInventoryMapper storeInventoryMapper; - /** - * 선택된 provider(Claude/Ollama)로 텍스트 생성. degraded/빈응답이면 빈 문자열 반환 → - * 각 기능의 기존 결정론적 Java 폴백이 그대로 동작(무회귀). - */ - private String aiGenerate(String prompt) { - GenResult r = aiRouter.generate(prompt); - return (r != null && !r.degraded() && r.text() != null) ? r.text() : ""; - } - /** 1. 상품 추천 — 행사/키워드 기반. AI 실패 시 인기/평점 폴백. */ public List recommend(String occasion, String keyword, int limit) { List pool = productMapper.search(null, keyword, "ON_SALE", occasion, null, null, "sales", 30, 0); @@ -48,7 +37,7 @@ public class MallAiService { String prompt = "You are a florist recommender. From this catalog: [" + names + "]. " + "Recommend up to " + limit + " bouquets for occasion='" + (occasion == null ? "any" : occasion) + "' keyword='" + (keyword == null ? "" : keyword) + "'. Reply ONLY product names comma-separated."; - String ai = aiGenerate(prompt); + String ai = ollama.generate(prompt); if (ai != null && !ai.isBlank()) { List ordered = reorderByAi(pool, ai); if (!ordered.isEmpty()) return ordered.subList(0, Math.min(limit, ordered.size())); @@ -69,7 +58,7 @@ public class MallAiService { } String prompt = "Summarize these flower bouquet reviews in 2 concise sentences (pros/cons):\n" + String.join("\n", contents); - String ai = aiGenerate(prompt); + String ai = ollama.generate(prompt); if (ai != null && !ai.isBlank()) { out.put("summary", ai); out.put("source", "ollama"); @@ -100,7 +89,7 @@ public class MallAiService { public String csAutoReply(String subject, String content) { String prompt = "You are a polite flower-shop customer support agent. Write a short helpful reply (<=4 sentences) to:\n" + "Subject: " + subject + "\nMessage: " + content; - String ai = aiGenerate(prompt); + String ai = ollama.generate(prompt); if (ai != null && !ai.isBlank()) return ai; return "Thank you for reaching out about \"" + subject + "\". We're sorry for any inconvenience. " + "Our team is reviewing your request and will follow up shortly. " @@ -132,7 +121,7 @@ public class MallAiService { } String prompt = "Compose a creative 'Daily Standard' bouquet name and 1-line description using surplus flowers: [" + String.join(", ", surplus) + "]. Reply as: NAME | DESCRIPTION."; - String ai = aiGenerate(prompt); + String ai = ollama.generate(prompt); if (ai != null && !ai.isBlank()) { out.put("bouquet", ai); out.put("source", "ollama"); @@ -176,7 +165,7 @@ public class MallAiService { String prompt = "Write 3 short flower-card messages for occasion='" + occasion + "' tone='" + (tone == null ? "warm" : tone) + "' recipient='" + (recipient == null ? "" : recipient) + "'. One per line, no numbering."; - String ai = aiGenerate(prompt); + String ai = ollama.generate(prompt); if (ai != null && !ai.isBlank()) { List lines = new ArrayList<>(); for (String l : ai.split("\n")) { diff --git a/backend/src/main/java/com/zioinfo/mall/ai/OllamaClient.java b/backend/src/main/java/com/zioinfo/mall/ai/OllamaClient.java index b7965ac..aa7a671 100644 --- a/backend/src/main/java/com/zioinfo/mall/ai/OllamaClient.java +++ b/backend/src/main/java/com/zioinfo/mall/ai/OllamaClient.java @@ -30,33 +30,20 @@ public class OllamaClient { this.model = model; } - /** 기본 모델(guardia.ollama-text-model)로 생성. 실패 시 빈 문자열. */ - public String generate(String prompt) { - return generateText(prompt, model); - } - - /** - * 지정 모델로 평문 생성(AiTextRouter 의 Ollama 경로·Claude 폴백 공용 진입점). - * - * 모델 미지정 시 서버 기본(guardia.ollama-text-model). localhost Ollama 만 호출하며, - * 장애/오프라인/타임아웃 시 예외 없이 빈 문자열 반환(호출자가 폴백 수행). [GUARDiA-MALL] - */ @SuppressWarnings("unchecked") - public String generateText(String prompt, String reqModel) { - if (prompt == null || prompt.isBlank()) return ""; - String useModel = (reqModel == null || reqModel.isBlank()) ? model : reqModel.trim(); + public String generate(String prompt) { try { - Map body = Map.of("model", useModel, "prompt", prompt, "stream", false); + Map body = Map.of("model", model, "prompt", prompt, "stream", false); Map res = builder.baseUrl(ollamaUrl).build() .post().uri("/api/generate").bodyValue(body) .retrieve().bodyToMono(Map.class) - .timeout(Duration.ofSeconds(120)) + .timeout(Duration.ofSeconds(30)) .map(m -> (Map) m).block(); if (res == null) return ""; Object r = res.get("response"); return r == null ? "" : String.valueOf(r).trim(); } catch (Exception e) { - log.warn("Ollama 일시 불가 — Java 폴백 사용: {}", e.getClass().getSimpleName()); + log.warn("Ollama 일시 불가 — Java 폴백 사용: {}", e.getMessage()); return ""; } } diff --git a/backend/src/main/java/com/zioinfo/mall/auth/AuthController.java b/backend/src/main/java/com/zioinfo/mall/auth/AuthController.java index 2ce0188..7f9b501 100644 --- a/backend/src/main/java/com/zioinfo/mall/auth/AuthController.java +++ b/backend/src/main/java/com/zioinfo/mall/auth/AuthController.java @@ -1,56 +1,28 @@ package com.zioinfo.mall.auth; -import com.zioinfo.mall.auth.dto.ChangePasswordRequest; -import com.zioinfo.mall.auth.dto.OtpConfirmRequest; -import com.zioinfo.mall.auth.dto.OtpSetupResponse; -import com.zioinfo.mall.auth.dto.OtpVerifyRequest; import com.zioinfo.mall.common.ApiResponse; -import com.zioinfo.mall.uiws.auth.OtpAuthService; -import com.zioinfo.mall.uiws.auth.TwoFactorService; -import com.zioinfo.mall.uiws.common.UiwsApiException; -import com.zioinfo.mall.uiws.common.UiwsErrorCode; -import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; import java.util.Map; -/** - * GUARDiA Mall 인증 컨트롤러. - * - /login: 고객(USER)·2FA off → { token }. 운영(ADMIN/MANAGER)+2FA on → { twofa:"true", verifyToken, step, maskedEmail }. - * - /verify: (UIWS 2FA 이식) verify-token + 인증코드 → access 발급. 운영 로그인 2단계 완료용. - * 기존 고객 클라이언트(token 응답)는 형태 보존 → 쇼핑 로그인 회귀 0. - */ @RestController @RequestMapping("/api/mall/auth") @RequiredArgsConstructor public class AuthController { private final AuthService authService; - private final TwoFactorService twoFactorService; - private final OtpAuthService otpAuthService; - private final JwtUtil jwtUtil; @PostMapping("/login") public ApiResponse> login(@RequestBody LoginRequest req) { - return ApiResponse.ok(authService.login(req.username(), req.password())); + String token = authService.login(req.username(), req.password()); + return ApiResponse.ok(Map.of("token", token, "type", "Bearer")); } @PostMapping("/register") public ApiResponse> register(@RequestBody RegisterRequest req) { - return ApiResponse.ok(authService.register(req.username(), req.password(), req.displayName())); - } - - /** UIWS 2FA 이식: 운영 로그인 2차 인증 코드 검증(이메일) → access 발급. */ - @PostMapping("/verify") - public ApiResponse> verify(@RequestBody VerifyRequest req) { - return ApiResponse.ok(twoFactorService.verify(req.verifyToken(), req.code())); - } - - /** TOTP 이식: 운영 로그인 2단계 6자리 검증 → access/refresh 발급(최초 로그인이면 등록 확정). */ - @PostMapping("/verify-otp") - public ApiResponse> verifyOtp(@Valid @RequestBody OtpVerifyRequest req) { - return ApiResponse.ok(otpAuthService.verifyOtp(req.verifyToken(), req.code())); + String token = authService.register(req.username(), req.password(), req.displayName()); + return ApiResponse.ok(Map.of("token", token, "type", "Bearer")); } @GetMapping("/me") @@ -59,51 +31,6 @@ public class AuthController { return ApiResponse.ok(authService.me(token)); } - // ── 마이페이지: OTP 등록/재설정/해제 + 비밀번호 변경 (본인, access 토큰 필요) ────────── - // /api/mall/auth/** 는 permitAll 이라 필터 인증이 없으므로 여기서 access 토큰을 명시 검증. - - /** 마이페이지 OTP 등록/재설정 시작 → { secret, otpAuthUri, qrImage }(이 응답에서만 시크릿/QR 노출). */ - @PostMapping("/otp/setup") - public ApiResponse otpSetup(@RequestHeader("Authorization") String header) { - return ApiResponse.ok(otpAuthService.setup(requireUser(header))); - } - - /** 마이페이지 OTP 확인·활성화(앱 6자리 코드). */ - @PostMapping("/otp/confirm") - public ApiResponse> otpConfirm(@RequestHeader("Authorization") String header, - @Valid @RequestBody OtpConfirmRequest req) { - otpAuthService.confirm(requireUser(header), req.code()); - return ApiResponse.ok(Map.of("result", "ok")); - } - - /** 마이페이지 OTP 해제. */ - @PostMapping("/otp/disable") - public ApiResponse> otpDisable(@RequestHeader("Authorization") String header) { - otpAuthService.disable(requireUser(header)); - return ApiResponse.ok(Map.of("result", "ok")); - } - - /** 마이페이지 비밀번호 변경(현재 비번 검증 + BCrypt). 새 비번은 응답/로그 미포함. */ - @PostMapping("/change-password") - public ApiResponse> changePassword(@RequestHeader("Authorization") String header, - @Valid @RequestBody ChangePasswordRequest req) { - authService.changePassword(requireUser(header), req); - return ApiResponse.ok(Map.of("result", "ok")); - } - - /** - * Authorization 헤더에서 인증 사용자를 해석한다. verify-token(2fa 단계용)은 거부. - * (/api/mall/auth/** 는 permitAll 이라 필터 인증이 없으므로 여기서 access 토큰을 명시 검증.) - */ - private String requireUser(String header) { - String token = header == null ? "" : header.replace("Bearer ", "").trim(); - if (token.isEmpty() || jwtUtil.isVerifyToken(token) || !jwtUtil.isValid(token)) { - throw new UiwsApiException(UiwsErrorCode.UNAUTHORIZED); - } - return jwtUtil.getUsername(token); - } - record LoginRequest(String username, String password) {} record RegisterRequest(String username, String password, String displayName) {} - record VerifyRequest(String verifyToken, String code) {} } diff --git a/backend/src/main/java/com/zioinfo/mall/auth/AuthService.java b/backend/src/main/java/com/zioinfo/mall/auth/AuthService.java index fcced02..6ff2d28 100644 --- a/backend/src/main/java/com/zioinfo/mall/auth/AuthService.java +++ b/backend/src/main/java/com/zioinfo/mall/auth/AuthService.java @@ -1,121 +1,33 @@ package com.zioinfo.mall.auth; -import com.zioinfo.mall.admin.AuditService; -import com.zioinfo.mall.auth.dto.AuthHelperResult; -import com.zioinfo.mall.auth.dto.ChangePasswordRequest; -import com.zioinfo.mall.auth.dto.FindIdRequest; -import com.zioinfo.mall.auth.dto.FindIdResponse; -import com.zioinfo.mall.auth.dto.ResetPasswordRequest; -import com.zioinfo.mall.auth.dto.SignupRequest; import com.zioinfo.mall.auth.mapper.UserMapper; -import com.zioinfo.mall.uiws.auth.OtpAuthService; -import com.zioinfo.mall.uiws.auth.TwoFactorService; -import com.zioinfo.mall.uiws.common.UiwsApiException; -import com.zioinfo.mall.uiws.common.UiwsErrorCode; -import com.zioinfo.mall.uiws.common.mail.MailSender; import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import java.security.SecureRandom; import java.util.Map; -/** - * GUARDiA Mall 인증 서비스. - * - * ★ 고객/운영 분리: Mall 은 {@code mall_account} 단일 테이블/단일 로그인이지만 역할로 구분된다. - * - * 고객(USER) — 쇼핑 로그인: 2FA 미적용(기존 단일 JWT 흐름 그대로, 회귀 0). - * 운영(ADMIN/MANAGER) — 관리자/매장 로그인: UIWS 2FA 레이어 적용(verify-token + 이메일코드 + 실패잠금). - * - * 2FA 전역 토글({@code mall.uiws.auth.twofa-enabled})이 off 면 운영 로그인도 단일 JWT(회귀 0). - */ -@Slf4j @Service @RequiredArgsConstructor public class AuthService { - private static final SecureRandom RANDOM = new SecureRandom(); - /** 임시 비밀번호 문자셋(혼동 문자 0/O/1/l/I 제외). */ - private static final String TMP_PW_CHARS = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789@#$%"; - private final UserMapper userMapper; private final PasswordEncoder passwordEncoder; private final JwtUtil jwtUtil; - private final TwoFactorService twoFactorService; - private final OtpAuthService otpAuthService; - private final MailSender mailSender; - private final AuditService auditService; - /** 운영(2FA 대상) 역할 여부 — 고객(USER)은 제외. */ - private static boolean isOperationsRole(String role) { - return "ADMIN".equalsIgnoreCase(role) || "MANAGER".equalsIgnoreCase(role); - } - - /** - * 1차 로그인. - * @return 고객 또는 2FA off: { token, type, twofa:"false" } - * 운영 + 2FA on : { twofa:"true", verifyToken, step:"EMAIL", maskedEmail } - */ - public Map login(String username, String password) { + public String login(String username, String password) { MallUser user = userMapper.findByUsername(username); - - // 잠금 우선 차단(존재하는 운영 계정에 한해 — 존재 여부 누설 최소화) - if (user != null && isOperationsRole(user.getRole()) && twoFactorService.isLocked(user)) { - throw new UiwsApiException(UiwsErrorCode.ACCOUNT_LOCKED); - } if (user == null || !user.isActive()) { throw new RuntimeException("ERR-AUTH-001: 존재하지 않거나 비활성 계정"); } - // 회원가입 승인 게이트(로그인 보조 이식): signup 으로 가입한 운영자(approved=false)는 비번 일치 전 차단. - // approved 가 NULL(기존 계정/고객 register 흐름)이면 게이트 미적용 → 회귀 0. - if (isOperationsRole(user.getRole()) && Boolean.FALSE.equals(user.getApproved())) { - throw new RuntimeException("ERR-AUTH-003: 승인 대기 중인 계정입니다. 관리자 승인 후 이용 가능합니다."); - } - - boolean opsRole = isOperationsRole(user.getRole()); - // 2단계 인증 대상: 운영(ADMIN/MANAGER) 로그인만. OTP(TOTP) 우선, 없으면 이메일코드. - boolean otpTarget = otpAuthService.isEnabled() && opsRole; - boolean emailTarget = twoFactorService.isEnabled() && opsRole; - if (!passwordEncoder.matches(password, user.getPasswordHash())) { - // 운영 + 2FA(OTP 또는 이메일) 활성 시 실패 누적/잠금. 고객/비활성 시 기존 동작(메시지만) 유지. - if (otpTarget || emailTarget) { - twoFactorService.recordLoginFailure(username); - MallUser after = userMapper.findByUsername(username); - if (after != null && Boolean.TRUE.equals(after.getLocked())) { - throw new UiwsApiException(UiwsErrorCode.ACCOUNT_LOCKED); - } - } throw new RuntimeException("ERR-AUTH-002: 비밀번호 불일치"); } - - // 비밀번호 검증 통과 — 2단계 우선순위: OTP > 이메일코드 > 단일 로그인 - if (otpTarget) { - // { twofa:true, verifyToken, verifyMethod:(OTP|OTP_SETUP), secret?, otpAuthUri?, qrImage? } - return otpAuthService.beginOtp(user); - } - if (emailTarget) { - Map step1 = twoFactorService.beginTwoFactor(user); - return Map.of( - "twofa", "true", - "verifyToken", step1.get("verifyToken"), - "step", step1.get("step"), - "maskedEmail", step1.getOrDefault("maskedEmail", "")); - } - - // 고객(USER) 또는 2FA 비활성 — 기존 단일 로그인 흐름(회귀 0) - if (opsRole) { - userMapper.resetLoginFail(username); - } - String token = jwtUtil.generate(username, user.getRole()); - return Map.of("twofa", "false", "token", token, "type", "Bearer"); + return jwtUtil.generate(username, user.getRole()); } - /** 고객 셀프 회원가입 — 항상 USER 역할로 생성(2FA 미적용 대상). */ - public Map register(String username, String password, String displayName) { + /** 고객 셀프 회원가입 — 항상 USER 역할로 생성. */ + public String register(String username, String password, String displayName) { if (username == null || username.isBlank() || password == null || password.isBlank()) { throw new IllegalArgumentException("ERR-AUTH-400: username/password 필수"); } @@ -129,8 +41,7 @@ public class AuthService { user.setDisplayName(displayName == null || displayName.isBlank() ? username : displayName); user.setActive(true); userMapper.insert(user); - String token = jwtUtil.generate(username, "USER"); - return Map.of("twofa", "false", "token", token, "type", "Bearer"); + return jwtUtil.generate(username, "USER"); } public Map me(String token) { @@ -138,122 +49,4 @@ public class AuthService { String role = jwtUtil.getRole(token); return Map.of("username", username, "role", role); } - - /** - * 마이페이지 비밀번호 변경(현재 비밀번호 검증 + BCrypt 저장). UIWS changePassword 미러. - * 현재 비번 불일치 → PASSWORD_MISMATCH, 기존과 동일 → PASSWORD_SAME_AS_OLD. - * 새 비밀번호 평문은 로그/응답/감사에 절대 기록하지 않는다(보안 불변규칙). - */ - @Transactional - public void changePassword(String username, ChangePasswordRequest req) { - MallUser user = userMapper.findByUsername(username); - if (user == null) { - throw new UiwsApiException(UiwsErrorCode.USER_NOT_FOUND); - } - if (!passwordEncoder.matches(req.currentPassword(), user.getPasswordHash())) { - throw new UiwsApiException(UiwsErrorCode.PASSWORD_MISMATCH); - } - if (passwordEncoder.matches(req.newPassword(), user.getPasswordHash())) { - throw new UiwsApiException(UiwsErrorCode.PASSWORD_SAME_AS_OLD); - } - userMapper.updatePasswordByUsername(username, passwordEncoder.encode(req.newPassword())); - auditService.log(username, "PASSWORD_CHANGE", username, "본인 비밀번호 변경"); - } - - // ── 로그인 보조 이식: 회원가입 / 아이디찾기 / 비밀번호 초기화 ─────────────────── - // 대상: Mall 관리자/운영자 계정(mall_account, ADMIN/MANAGER). 고객(USER) register 흐름과 분리. - - /** - * 운영자 회원가입(승인 대기). username/email 중복 검사 후 approved=false·role=MANAGER 로 INSERT. - * 비밀번호는 BCrypt 저장. 승인 전까지 로그인 차단(login 의 승인 게이트). - */ - @Transactional - public AuthHelperResult signup(SignupRequest req) { - if (req.username() == null || req.username().isBlank() - || req.password() == null || req.password().length() < 4 - || req.email() == null || req.email().isBlank()) { - return new AuthHelperResult(false, "아이디·비밀번호(4자 이상)·이메일은 필수입니다."); - } - if (userMapper.countByUsername(req.username()) > 0) { - return new AuthHelperResult(false, "이미 사용 중인 아이디입니다."); - } - if (userMapper.countByEmail(req.email()) > 0) { - return new AuthHelperResult(false, "이미 등록된 이메일입니다."); - } - MallUser u = new MallUser(); - u.setUsername(req.username()); - u.setPasswordHash(passwordEncoder.encode(req.password())); - u.setDisplayName(req.displayName() != null && !req.displayName().isBlank() - ? req.displayName() : req.username()); - u.setEmail(req.email()); - userMapper.signup(u); - log.info("[auth-helper] signup pending approval: username={}", req.username()); - return new AuthHelperResult(true, "가입 신청이 접수되었습니다. 관리자 승인 후 로그인할 수 있습니다."); - } - - /** - * 아이디 찾기: 표시명+이메일 동시 일치 운영자 1건 조회. username 은 부분 마스킹 후 반환. - * 미발견 시 found=false(원문 username 절대 미노출). - */ - public FindIdResponse findId(FindIdRequest req) { - if (req.displayName() == null || req.displayName().isBlank() - || req.email() == null || req.email().isBlank()) { - return new FindIdResponse(false, ""); - } - MallUser u = userMapper.findByDisplayNameAndEmail(req.displayName(), req.email()); - if (u == null) { - return new FindIdResponse(false, ""); - } - return new FindIdResponse(true, maskUsername(u.getUsername())); - } - - /** - * 비밀번호 초기화: username+email 일치 검증 → 임시비번 생성·BCrypt 저장·잠금/실패카운트 해제. - * 임시비번은 메일(미설정 시 LogMailSender 로그)로만 전달. API 응답·로그 메시지에 비번 미노출. - * 대상 미존재여도 success=true(계정 열거 방지). - */ - @Transactional - public AuthHelperResult resetPassword(ResetPasswordRequest req) { - final String okMsg = "임시 비밀번호를 등록된 이메일로 발송했습니다. 메일을 확인하세요."; - if (req.username() == null || req.username().isBlank() - || req.email() == null || req.email().isBlank()) { - return new AuthHelperResult(false, "아이디와 이메일을 모두 입력하세요."); - } - MallUser u = userMapper.findByUsernameAndEmail(req.username(), req.email()); - if (u == null) { - // 존재 여부 누설 방지 — 동일 성공 메시지 반환(실제 발송 없음). - log.info("[auth-helper] reset-password no match (suppressed): username={}", req.username()); - return new AuthHelperResult(true, okMsg); - } - String tempPw = generateTempPassword(); - userMapper.updatePasswordHash(req.username(), passwordEncoder.encode(tempPw)); - - String subject = "[GUARDiA Mall] 임시 비밀번호 안내"; - String body = String.format( - "안녕하세요 %s 님,\n임시 비밀번호는 [%s] 입니다.\n로그인 후 즉시 비밀번호를 변경하세요.", - u.getDisplayName() != null ? u.getDisplayName() : u.getUsername(), tempPw); - // 메일 본문에만 임시비번 포함. mailSender 미설정 환경은 LogMailSender 폴백(서버 로그). - mailSender.send(u.getEmail(), subject, body); - log.info("[auth-helper] reset-password issued temp pw (sent via mail/log): username={}", req.username()); - return new AuthHelperResult(true, okMsg); - } - - private static String generateTempPassword() { - StringBuilder sb = new StringBuilder(10); - for (int i = 0; i < 10; i++) { - sb.append(TMP_PW_CHARS.charAt(RANDOM.nextInt(TMP_PW_CHARS.length()))); - } - return sb.toString(); - } - - /** username 부분 마스킹: 앞 2자만 노출(예: admin → ad***). 2자 이하는 첫 글자만. */ - private static String maskUsername(String username) { - if (username == null || username.isBlank()) { - return ""; - } - if (username.length() <= 2) { - return username.charAt(0) + "*"; - } - return username.substring(0, 2) + "*".repeat(Math.max(1, username.length() - 2)); - } } diff --git a/backend/src/main/java/com/zioinfo/mall/auth/JwtFilter.java b/backend/src/main/java/com/zioinfo/mall/auth/JwtFilter.java index 9efbf4d..5e80909 100644 --- a/backend/src/main/java/com/zioinfo/mall/auth/JwtFilter.java +++ b/backend/src/main/java/com/zioinfo/mall/auth/JwtFilter.java @@ -26,10 +26,7 @@ public class JwtFilter extends OncePerRequestFilter { String header = req.getHeader("Authorization"); if (header != null && header.startsWith("Bearer ")) { String token = header.substring(7); - // 보안(UIWS 2FA): purpose=2fa verify-token 은 access 토큰이 아니다. - // 동일 서명키라 isValid()는 통과하므로 차단하지 않으면 2차 인증 전 보호 API 접근(2FA 우회)이 가능. - // → verify-token 은 인증 컨텍스트를 세우지 않고 무시한다(/api/mall/auth/verify 에서만 사용). - if (jwtUtil.isValid(token) && !jwtUtil.isVerifyToken(token)) { + if (jwtUtil.isValid(token)) { String username = jwtUtil.getUsername(token); String role = jwtUtil.getRole(token); var auth = new UsernamePasswordAuthenticationToken( diff --git a/backend/src/main/java/com/zioinfo/mall/auth/JwtUtil.java b/backend/src/main/java/com/zioinfo/mall/auth/JwtUtil.java index 205c635..24e5d94 100644 --- a/backend/src/main/java/com/zioinfo/mall/auth/JwtUtil.java +++ b/backend/src/main/java/com/zioinfo/mall/auth/JwtUtil.java @@ -34,47 +34,6 @@ public class JwtUtil { .compact(); } - /** - * UIWS 2FA 이식: 1차 로그인 통과 후 발급하는 단기 verify-token. - * purpose=2fa 클레임으로 access 토큰과 구분(verify-token 으로는 보호 API 접근 불가). - */ - public String generateVerifyToken(String username, long validitySeconds) { - return Jwts.builder() - .subject(username) - .claim("purpose", "2fa") - .issuedAt(new Date()) - .expiration(new Date(System.currentTimeMillis() + validitySeconds * 1000L)) - .signWith(key()) - .compact(); - } - - /** verify-token 검증 후 username 반환. 유효하지 않거나 purpose!=2fa 면 null. */ - public String parseVerifyTokenUsername(String token) { - try { - Claims c = parse(token); - if (!"2fa".equals(c.get("purpose", String.class))) { - return null; - } - return c.getSubject(); - } catch (JwtException | IllegalArgumentException e) { - log.debug("verify-token 검증 실패: {}", e.getMessage()); - return null; - } - } - - /** - * 보안: 토큰이 2FA verify-token(purpose=2fa)인지 판별. - * JwtFilter 가 access 토큰만 인증 컨텍스트로 인정하도록 verify-token 을 걸러내는 데 사용. - * verify-token 은 access 와 동일 서명키라 isValid() 는 통과 → 반드시 별도 차단(2FA 우회 방지). - */ - public boolean isVerifyToken(String token) { - try { - return "2fa".equals(parse(token).get("purpose", String.class)); - } catch (JwtException | IllegalArgumentException e) { - return false; - } - } - public Claims parse(String token) { return Jwts.parser().verifyWith(key()).build() .parseSignedClaims(token).getPayload(); diff --git a/backend/src/main/java/com/zioinfo/mall/auth/MallUser.java b/backend/src/main/java/com/zioinfo/mall/auth/MallUser.java index 125d46d..1ee29f5 100644 --- a/backend/src/main/java/com/zioinfo/mall/auth/MallUser.java +++ b/backend/src/main/java/com/zioinfo/mall/auth/MallUser.java @@ -3,7 +3,7 @@ package com.zioinfo.mall.auth; import lombok.Data; import java.time.LocalDateTime; -/** 계정 (mall_account). 역할: ADMIN/MANAGER(운영) · USER(고객). */ +/** 계정 (mall_account). 역할: ADMIN/MANAGER/USER(고객). */ @Data public class MallUser { private Long id; @@ -13,28 +13,4 @@ public class MallUser { private String displayName; private boolean active; private LocalDateTime createdAt; - - // ── UIWS 2FA 이식 컬럼 (mall_account ALTER, db/91_uiws_port.sql) ─────────────── - // 2FA는 운영(ADMIN/MANAGER) 로그인에만 적용 — 고객(USER) 쇼핑 로그인은 회귀 0. - /** 2FA 발송 대상 이메일(원본 mall_account 미보유 → 91_uiws_port.sql 에서 추가). */ - private String email; - /** 이메일 인증코드(6자리). 발급 후 verify 단계에서 검증. API 응답에는 절대 미포함. */ - private String emailVerifyCode; - /** 인증코드 만료시각. */ - private LocalDateTime emailVerifyExpire; - /** 로그인 실패 누적 횟수(기본 0). max-login-fail 도달 시 locked. */ - private Integer loginFailCount; - /** 계정 잠금 여부(기본 false). */ - private Boolean locked; - /** TOTP 시크릿(UIWS OTP 경로). 등록 확정 전 보류 시크릿도 여기 저장. API 응답에 절대 미포함. */ - private String otpSecret; - /** OTP 등록 확정 여부(기본 false). 최초 로그인 verify 성공 시 true 로 확정(멱등). */ - private Boolean otpEnabled; - - // ── 로그인 보조 이식 컬럼 (mall_account ALTER, db/91_uiws_port.sql) ─────────────── - /** - * 회원가입 승인 게이트. signup 으로 가입한 운영자 계정은 false → 승인 전 로그인 차단. - * 기존 계정/고객(USER)은 NULL → login 게이트는 FALSE(명시적 미승인)만 차단(회귀 0). - */ - private Boolean approved; } diff --git a/backend/src/main/java/com/zioinfo/mall/auth/mapper/UserMapper.java b/backend/src/main/java/com/zioinfo/mall/auth/mapper/UserMapper.java index e838e28..c21ae8a 100644 --- a/backend/src/main/java/com/zioinfo/mall/auth/mapper/UserMapper.java +++ b/backend/src/main/java/com/zioinfo/mall/auth/mapper/UserMapper.java @@ -3,14 +3,7 @@ package com.zioinfo.mall.auth.mapper; import com.zioinfo.mall.auth.MallUser; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Update; -import java.time.LocalDateTime; - -/** - * 계정 매퍼. findByUsername/insert/countByUsername 는 UserMapper.xml 에 정의(2FA 컬럼 포함 resultMap). - * UIWS 2FA 이식 UPDATE 5종은 어노테이션으로 추가 — XML 중복 정의 없음(빈 등록 충돌 회피). - */ @Mapper public interface UserMapper { @@ -19,81 +12,4 @@ public interface UserMapper { int insert(MallUser user); int countByUsername(@Param("username") String username); - - // ── UIWS 2FA 이식: 실패 카운트/잠금/인증코드 갱신 (멱등 UPDATE) ─────────────── - - /** 로그인 성공 시 실패 카운트 초기화. */ - @Update("UPDATE mall_account SET login_fail_count = 0 WHERE username = #{username}") - int resetLoginFail(@Param("username") String username); - - /** 로그인 실패 누적(+1) 및 임계 도달 시 잠금. */ - @Update(""" - UPDATE mall_account - SET login_fail_count = COALESCE(login_fail_count, 0) + 1, - locked = (COALESCE(login_fail_count, 0) + 1 >= #{maxFail}) - WHERE username = #{username} - """) - int incrementLoginFail(@Param("username") String username, @Param("maxFail") int maxFail); - - /** 1차 통과 시 이메일 인증코드/만료 저장(verify 단계에서 검증). */ - @Update(""" - UPDATE mall_account - SET email_verify_code = #{code}, email_verify_expire = #{expire}, login_fail_count = 0 - WHERE username = #{username} - """) - int saveEmailCode(@Param("username") String username, - @Param("code") String code, - @Param("expire") LocalDateTime expire); - - /** 2차 검증 성공 시 코드 폐기. */ - @Update("UPDATE mall_account SET email_verify_code = NULL, email_verify_expire = NULL WHERE username = #{username}") - int clearEmailCode(@Param("username") String username); - - /** 관리자 잠금 해제(실패 카운트/잠금 초기화). */ - @Update("UPDATE mall_account SET locked = false, login_fail_count = 0 WHERE username = #{username}") - int unlock(@Param("username") String username); - - // ── admin 재시드 / 마이페이지 비밀번호 변경: password_hash 만 갱신(부수효과 없음) ──────── - - /** username 기준 BCrypt 해시 갱신(잠금/실패카운트 무영향). AdminPasswordSeeder·changePassword 공용. */ - @Update("UPDATE mall_account SET password_hash = #{passwordHash} WHERE username = #{username}") - int updatePasswordByUsername(@Param("username") String username, - @Param("passwordHash") String passwordHash); - - // ── TOTP(OTP 2차 인증) 이식 (멱등 UPDATE) ──────────────────────────────────── - - /** 보류 시크릿 저장(등록 확정 전). otp_enabled 은 건드리지 않는다(verify/confirm 에서 확정). */ - @Update("UPDATE mall_account SET otp_secret = #{secret} WHERE username = #{username}") - int updateOtpSecret(@Param("username") String username, @Param("secret") String secret); - - /** 등록 확정: otp_enabled=true (시크릿은 유지). */ - @Update("UPDATE mall_account SET otp_enabled = true WHERE username = #{username}") - int enableOtp(@Param("username") String username); - - /** 해제/초기화: 시크릿 폐기 + otp_enabled=false. (마이페이지 해제) */ - @Update("UPDATE mall_account SET otp_secret = NULL, otp_enabled = false WHERE username = #{username}") - int disableOtp(@Param("username") String username); - - // ── 로그인 보조 이식: 회원가입 / 아이디찾기 / 비밀번호 초기화 (UserMapper.xml) ─────── - - /** email 존재 여부(회원가입 중복 검사 — 운영자 계정 한정). */ - int countByEmail(@Param("email") String email); - - /** - * 운영자 회원가입(승인 대기). role=MANAGER·is_active=true·approved=false 고정. - * 관리자 화면에서 승인 전까지 로그인 차단. - */ - int signup(MallUser user); - - /** 아이디찾기: 표시명(display_name)+이메일 일치 운영자 1건. */ - MallUser findByDisplayNameAndEmail(@Param("displayName") String displayName, - @Param("email") String email); - - /** 비밀번호 초기화 대상 검증: username+email 동시 일치 운영자 1건. */ - MallUser findByUsernameAndEmail(@Param("username") String username, - @Param("email") String email); - - /** 임시 비밀번호 적용 + 잠금/실패카운트 해제(초기화 시). */ - int updatePasswordHash(@Param("username") String username, - @Param("passwordHash") String passwordHash); } diff --git a/backend/src/main/java/com/zioinfo/mall/config/SecurityConfig.java b/backend/src/main/java/com/zioinfo/mall/config/SecurityConfig.java index 12ce60f..4fff1e2 100644 --- a/backend/src/main/java/com/zioinfo/mall/config/SecurityConfig.java +++ b/backend/src/main/java/com/zioinfo/mall/config/SecurityConfig.java @@ -71,10 +71,6 @@ public class SecurityConfig { .requestMatchers("/api/admin/audit").hasAnyRole("ADMIN", "MANAGER") .requestMatchers(HttpMethod.GET, "/api/admin/settings").hasAnyRole("ADMIN", "MANAGER") .requestMatchers("/api/admin/settings/**").hasRole("ADMIN") - // AI 플랫폼(LLM provider) 설정 — ADMIN 전용(조회/갱신/연결테스트) - .requestMatchers("/api/admin/ai-config/**", "/api/admin/ai-config").hasRole("ADMIN") - // AI 답변 피드백 수집(로컬 DuckDB + 중앙 rag 전달) — 인증 사용자 - .requestMatchers(HttpMethod.POST, "/api/ai/feedback").authenticated() // 운영 분석 — MANAGER 이상 .requestMatchers("/api/mall/analytics/**").hasAnyRole("ADMIN", "MANAGER") .requestMatchers("/api/mall/settlement/**").hasAnyRole("ADMIN", "MANAGER") @@ -85,14 +81,8 @@ public class SecurityConfig { "/api/mall/promotion/**", "/api/mall/inventory/**").hasAnyRole("ADMIN", "MANAGER") .requestMatchers(HttpMethod.DELETE, "/api/mall/product/**", "/api/mall/category/**", "/api/mall/promotion/**", "/api/mall/inventory/**").hasAnyRole("ADMIN", "MANAGER") - // 최신 AI 기법(중앙 guardia-rag) — 운영 의사결정·토글 변경은 MANAGER+ (추천/피드백/토글조회는 인증 사용자) - .requestMatchers(HttpMethod.POST, "/api/mall/rag/demand-plan").hasAnyRole("ADMIN", "MANAGER") - .requestMatchers(HttpMethod.PUT, "/api/mall/rag/toggles/**").hasAnyRole("ADMIN", "MANAGER") - // 그 외 mall API (장바구니·주문·결제·배송·찜·CS·회원·AI·RAG 추천/피드백/토글조회) — 인증 사용자 + // 그 외 mall API (장바구니·주문·결제·배송·찜·CS·회원·AI) — 인증 사용자 .requestMatchers("/api/mall/**").authenticated() - // UIWS system(권한관리) 이식: 공개 룩업(부서/거래처 트리)은 무인증, 시스템관리 API 는 운영자(ADMIN/MANAGER) - .requestMatchers("/api/public/**").permitAll() - .requestMatchers("/api/system/**").hasAnyRole("ADMIN", "MANAGER") // 나머지 모든 API/WS/Actuator는 인증 (아래 SPA permit 보다 먼저 — API 노출 방지) .requestMatchers("/api/**", "/ws/**", "/actuator/**").authenticated() // 스토어프론트 SPA 딥링크(/app·/cart·/events·/category·/product·/checkout·/mypage·/orders·/search 등) diff --git a/backend/src/main/java/com/zioinfo/mall/member/MemberController.java b/backend/src/main/java/com/zioinfo/mall/member/MemberController.java index e3cf1e0..88d43cf 100644 --- a/backend/src/main/java/com/zioinfo/mall/member/MemberController.java +++ b/backend/src/main/java/com/zioinfo/mall/member/MemberController.java @@ -5,12 +5,10 @@ import com.zioinfo.mall.integration.CrmClient; import com.zioinfo.mall.integration.ItsmSecuritySanitizer; import com.zioinfo.mall.member.mapper.MemberMapper; import lombok.RequiredArgsConstructor; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.core.Authentication; import org.springframework.web.bind.annotation.*; import java.util.LinkedHashMap; -import java.util.List; import java.util.Map; /** 회원 API — /api/mall/member. 본인 프로필 + CRM 인사이트 연계(새니타이즈). */ @@ -34,27 +32,6 @@ public class MemberController { return ApiResponse.ok(mapper.findByUsername(auth.getName())); } - /** - * 관리자 회원 목록/검색 — MANAGER+ 전용. - * - * 보안 불변: 이메일·전화번호는 매퍼에서 마스킹된 값만, 상세 주소는 비포함(MallMemberSummary). - * 주문수·누적결제액 집계 동반. 키워드(아이디/이름)·등급 필터 지원. - */ - @GetMapping("/admin") - @PreAuthorize("hasAnyRole('ADMIN','MANAGER')") - public ApiResponse> adminList( - @RequestParam(required = false) String keyword, - @RequestParam(required = false) String tier, - @RequestParam(defaultValue = "100") int limit) { - int safeLimit = (limit <= 0 || limit > 500) ? 100 : limit; - List items = mapper.adminList(keyword, tier, safeLimit); - int total = mapper.countAdminList(keyword, tier); - Map out = new LinkedHashMap<>(); - out.put("items", items); - out.put("total", total); - return ApiResponse.ok(out); - } - /** CRM 고객 인사이트(구매 성향) — 응답은 ItsmSecuritySanitizer로 정제. */ @GetMapping("/me/insight") public ApiResponse> insight(Authentication auth) { diff --git a/backend/src/main/java/com/zioinfo/mall/member/mapper/MemberMapper.java b/backend/src/main/java/com/zioinfo/mall/member/mapper/MemberMapper.java index 30ceac8..b0d8f86 100644 --- a/backend/src/main/java/com/zioinfo/mall/member/mapper/MemberMapper.java +++ b/backend/src/main/java/com/zioinfo/mall/member/mapper/MemberMapper.java @@ -1,21 +1,11 @@ package com.zioinfo.mall.member.mapper; import com.zioinfo.mall.member.MallMember; -import com.zioinfo.mall.member.MallMemberSummary; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import java.util.List; - @Mapper public interface MemberMapper { MallMember findByUsername(@Param("username") String username); int upsert(MallMember m); - - /** 관리자 회원 목록(검색·등급 필터). 주문수/매출 집계 포함, PII 비노출. */ - List adminList(@Param("keyword") String keyword, - @Param("tier") String tier, - @Param("limit") int limit); - - int countAdminList(@Param("keyword") String keyword, @Param("tier") String tier); } diff --git a/backend/src/main/java/com/zioinfo/mall/subscription/SubscriptionController.java b/backend/src/main/java/com/zioinfo/mall/subscription/SubscriptionController.java index 5a8b4ac..5760da9 100644 --- a/backend/src/main/java/com/zioinfo/mall/subscription/SubscriptionController.java +++ b/backend/src/main/java/com/zioinfo/mall/subscription/SubscriptionController.java @@ -47,33 +47,11 @@ public class SubscriptionController { if (s == null || !s.getOwner().equals(auth.getName())) { throw new RuntimeException("ERR-SUB-403: 본인 구독만 변경할 수 있습니다"); } - mapper.updateStatus(id, normalizeStatus(req.get("status"))); + String to = req.getOrDefault("status", "ACTIVE").toUpperCase(); + mapper.updateStatus(id, to); return ApiResponse.ok(mapper.findById(id)); } - /** - * 관리자 구독 상태 변경(일시정지/재개/취소) — MANAGER+ 전용. 소유자 제한 없음. - */ - @PutMapping("/admin/{id}/status") - @PreAuthorize("hasAnyRole('ADMIN','MANAGER')") - public ApiResponse adminStatus(@PathVariable Long id, @RequestBody Map req) { - MallSubscription s = mapper.findById(id); - if (s == null) { - throw new RuntimeException("ERR-SUB-404: 구독을 찾을 수 없습니다"); - } - mapper.updateStatus(id, normalizeStatus(req.get("status"))); - return ApiResponse.ok(mapper.findById(id)); - } - - /** 허용 상태(ACTIVE/PAUSED/CANCELLED)만 통과. */ - private String normalizeStatus(String raw) { - String to = raw == null ? "ACTIVE" : raw.toUpperCase(); - if (!to.equals("ACTIVE") && !to.equals("PAUSED") && !to.equals("CANCELLED")) { - throw new IllegalArgumentException("ERR-SUB-400: 허용되지 않는 상태입니다"); - } - return to; - } - private LocalDate nextDate(String freq) { LocalDate base = LocalDate.now(); if ("MONTHLY".equalsIgnoreCase(freq)) return base.plusMonths(1); diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index a0595f7..393865a 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -8,20 +8,12 @@ spring: username: ${DB_USER:mall_user} password: ${DB_PASS:mall_pass2026} driver-class-name: org.postgresql.Driver - # UIWS 이식: 부팅 시 91_uiws_port.sql(업무 9테이블 + mall_account 2FA ALTER) 멱등 적용. - # 전부 IF NOT EXISTS / ADD COLUMN IF NOT EXISTS / ON CONFLICT DO NOTHING → mode:always 재실행 안전. - # schema.sql 은 deploy_server 가 psql 로 별도 적용(비멱등 시드 충돌 회피 위해 여기 미포함). - sql: - init: - mode: ${SQL_INIT_MODE:always} - schema-locations: classpath:db/91_uiws_port.sql,classpath:db/92_uiws_system.sql,classpath:db/93_auth_otp.sql,classpath:db/104_seed_ai_config.sql - continue-on-error: true servlet: multipart: max-file-size: 20MB max-request-size: 20MB mybatis: - mapper-locations: classpath:mapper/**/*.xml # ** : 하위 mapper/uiws/*.xml(UIWS 이식) 포함 + mapper-locations: classpath:mapper/*.xml configuration: map-underscore-to-camel-case: true log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl @@ -42,34 +34,13 @@ mall: provider: ${MALL_SMS_PROVIDER:mock} # mock | twilio email: provider: ${MALL_EMAIL_PROVIDER:mock} # mock | sendgrid - # ── UIWS 이식: 2FA(운영 로그인) + 첨부 업로드 설정 (mall.uiws.*) ────────────── - uiws: - auth: - twofa-enabled: ${UIWS_2FA:true} # off=운영 로그인도 단일 JWT(회귀 0). 고객(USER)은 항상 미적용. - verify-token-validity-seconds: 300 # 1차 통과 후 verify-token 5분 - email-code-validity-seconds: 300 # 이메일 인증코드 5분 - max-login-fail: 5 # 실패 5회 시 운영 계정 잠금 - mail: - mode: ${UIWS_MAIL_MODE:log} # LogMailSender 폴백(외부 API 0). smtp 는 설정 시만. - upload: - upload-dir: ${UIWS_UPLOAD_DIR:./uploads/uiws} guardia: itsm-url: ${ITSM_URL:http://localhost:9001} erp-url: ${ERP_URL:http://localhost:8003} crm-url: ${CRM_URL:http://localhost:8004} ocr-url: ${OCR_URL:http://localhost:8005} ollama-url: ${OLLAMA_URL:http://localhost:11434} - ollama-text-model: ${OLLAMA_TEXT_MODEL:llama3.2:1b} - # 로컬 임베디드 DuckDB 학습 저장소 파일(솔루션 격리). 경로 미가용/드라이버 부재 시 자동 비활성(no-op). - mall: - learning: - duckdb-path: ${MALL_LEARNING_DUCKDB:/opt/guardia-mall/data/mall_learning.duckdb} - # 중앙 guardia-rag(온프레미스 전용) — 최신 AI 기법 경유. 미가용 시 Mall 로컬 폴백(degraded) - rag: - base-url: ${RAG_URL:http://127.0.0.1:8020} - timeout-ms: ${RAG_TIMEOUT_MS:120000} - enabled: ${RAG_ENABLED:true} - solution: mall + ollama-text-model: ${OLLAMA_TEXT_MODEL:llama3} crypto: secret: ${CRYPTO_SECRET:guardia-mall-aes-256-gcm-master-key-2026-zioinfo} jwt: diff --git a/backend/src/main/resources/db/schema.sql b/backend/src/main/resources/db/schema.sql index e73723d..e8783cf 100644 --- a/backend/src/main/resources/db/schema.sql +++ b/backend/src/main/resources/db/schema.sql @@ -47,20 +47,7 @@ INSERT INTO mall_setting (key, value) VALUES ('hours_saturday','Sat 9:00 AM - 4:00 PM'), ('hours_sunday','Sun 9:00 AM - 12:00 PM'), ('payment_provider','mock'),('tax_provider','mock'),('address_provider','mock'), -('sms_provider','mock'),('email_provider','mock'), --- 최신 AI 기법(중앙 guardia-rag) 토글 — 무거운 기법(graphrag·rerank·tool_use·stream)은 서버 RAM 제약상 기본 off -('rag.enabled','true'), -('rag.retrieval_mode','vector'), -('rag.rerank','false'), -('rag.graphrag','false'), -('rag.tool_use','false'), -('rag.structured','true'), -('rag.stream','false'), -('rag.top_k','6'), -('rag.agent_max_steps','4'), -('rag.faithfulness_threshold','0.5'), -('rag.temperature','0.2'), -('rag.generation_model','llama3.2:1b') +('sms_provider','mock'),('email_provider','mock') ON CONFLICT (key) DO NOTHING; CREATE TABLE IF NOT EXISTS mall_ai_result ( diff --git a/backend/src/main/resources/mapper/AdminUserMapper.xml b/backend/src/main/resources/mapper/AdminUserMapper.xml index 37a801c..0279811 100644 --- a/backend/src/main/resources/mapper/AdminUserMapper.xml +++ b/backend/src/main/resources/mapper/AdminUserMapper.xml @@ -32,7 +32,6 @@ UPDATE mall_account SET role = #{role} WHERE id = #{id} UPDATE mall_account SET is_active = #{active} WHERE id = #{id} UPDATE mall_account SET password_hash = #{passwordHash} WHERE id = #{id} - UPDATE mall_account SET otp_secret = NULL, otp_enabled = false WHERE id = #{id} DELETE FROM mall_account WHERE id = #{id} diff --git a/backend/src/main/resources/mapper/MemberMapper.xml b/backend/src/main/resources/mapper/MemberMapper.xml index a6e7e01..9430eb6 100644 --- a/backend/src/main/resources/mapper/MemberMapper.xml +++ b/backend/src/main/resources/mapper/MemberMapper.xml @@ -11,44 +11,4 @@ display_name = EXCLUDED.display_name, email = EXCLUDED.email, phone = EXCLUDED.phone, default_zip = EXCLUDED.default_zip, default_address = EXCLUDED.default_address - - - - - - AND (m.username ILIKE '%' || #{keyword} || '%' OR m.display_name ILIKE '%' || #{keyword} || '%') - - AND m.tier = #{tier} - - - - - SELECT - m.id, m.username, m.display_name AS displayName, - CASE WHEN m.email IS NULL OR m.email = '' THEN NULL - WHEN POSITION('@' IN m.email) > 2 - THEN SUBSTRING(m.email FROM 1 FOR 2) || '***' || SUBSTRING(m.email FROM POSITION('@' IN m.email)) - ELSE '***' || SUBSTRING(m.email FROM POSITION('@' IN m.email)) END AS emailMasked, - CASE WHEN m.phone IS NULL OR LENGTH(m.phone) < 4 THEN NULL - ELSE '***-****-' || SUBSTRING(m.phone FROM LENGTH(m.phone) - 3) END AS phoneMasked, - m.default_zip AS defaultZip, m.tier, m.created_at AS createdAt, - COALESCE(o.order_count, 0) AS orderCount, - COALESCE(o.total_spent, 0) AS totalSpent - FROM mall_member m - LEFT JOIN ( - SELECT owner, COUNT(*) AS order_count, SUM(COALESCE(pay_amount, total_amount, 0)) AS total_spent - FROM mall_order WHERE status NOT IN ('CANCELLED','REFUNDED','FAILED') GROUP BY owner - ) o ON o.owner = m.username - - ORDER BY m.created_at DESC - LIMIT #{limit} - - - - SELECT COUNT(*) FROM mall_member m - diff --git a/backend/src/main/resources/mapper/UserMapper.xml b/backend/src/main/resources/mapper/UserMapper.xml index 6982967..a9d98da 100644 --- a/backend/src/main/resources/mapper/UserMapper.xml +++ b/backend/src/main/resources/mapper/UserMapper.xml @@ -11,21 +11,10 @@ - - - - - - - - - - - SELECT id, username, password_hash, role, display_name, is_active, created_at, - email, email_verify_code, email_verify_expire, login_fail_count, locked, otp_secret, otp_enabled, approved + SELECT id, username, password_hash, role, display_name, is_active, created_at FROM mall_account WHERE username = #{username} @@ -40,42 +29,4 @@ SELECT COUNT(*) FROM mall_account WHERE username = #{username} - - - - SELECT COUNT(*) FROM mall_account WHERE email = #{email} - - - - - INSERT INTO mall_account (username, password_hash, display_name, role, email, - is_active, approved, login_fail_count, locked) - VALUES (#{username}, #{passwordHash}, #{displayName}, 'MANAGER', #{email}, - true, false, 0, false) - - - - SELECT id, username, password_hash, role, display_name, is_active, created_at, - email, email_verify_code, email_verify_expire, login_fail_count, locked, otp_secret, otp_enabled, approved - FROM mall_account - WHERE display_name = #{displayName} AND email = #{email} - ORDER BY id - LIMIT 1 - - - - SELECT id, username, password_hash, role, display_name, is_active, created_at, - email, email_verify_code, email_verify_expire, login_fail_count, locked, otp_secret, otp_enabled, approved - FROM mall_account - WHERE username = #{username} AND email = #{email} - - - - - UPDATE mall_account - SET password_hash = #{passwordHash}, locked = false, login_fail_count = 0 - WHERE username = #{username} - - diff --git a/backend/src/main/resources/static/assets/index-BzL8NSpt.css b/backend/src/main/resources/static/assets/index-BzL8NSpt.css new file mode 100644 index 0000000..c3c6ffa --- /dev/null +++ b/backend/src/main/resources/static/assets/index-BzL8NSpt.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.-bottom-24{bottom:-6rem}.-bottom-6{bottom:-1.5rem}.-bottom-\[1px\]{bottom:-1px}.-left-20{left:-5rem}.-right-1{right:-.25rem}.-right-16{right:-4rem}.-top-1{top:-.25rem}.-top-20{top:-5rem}.bottom-0{bottom:0}.bottom-7{bottom:1.75rem}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-5{right:1.25rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.top-5{top:1.25rem}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-\[1\]{z-index:1}.z-\[2\]{z-index:2}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.m-auto{margin:auto}.mx-auto{margin-left:auto;margin-right:auto}.-mt-0\.5{margin-top:-.125rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-7{margin-bottom:1.75rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[4\/5\]{aspect-ratio:4/5}.aspect-\[5\/4\]{aspect-ratio:5/4}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-44{height:11rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-9{height:2.25rem}.h-\[18px\]{height:18px}.h-\[2px\]{height:2px}.h-\[72px\]{height:72px}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:8rem}.min-h-\[78vh\]{min-height:78vh}.min-h-screen{min-height:100vh}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-32{width:8rem}.w-44{width:11rem}.w-48{width:12rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[360px\]{width:360px}.w-auto{width:auto}.w-full{width:100%}.min-w-\[18px\]{min-width:18px}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes heartbeat{0%,to{transform:scale(1)}30%{transform:scale(1.3)}60%{transform:scale(.95)}}.animate-heartbeat{animation:heartbeat .6s ease-in-out}.cursor-not-allowed{cursor:not-allowed}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.gap-8{gap:2rem}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-20>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-blush-100\/60>:not([hidden])~:not([hidden]){border-color:#fbe8ef99}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.75rem}.rounded-4xl{border-radius:2.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-amber-400\/30{border-color:#fbbf244d}.border-amber-500\/30{border-color:#f59e0b4d}.border-bloom{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.border-blush-100{--tw-border-opacity: 1;border-color:rgb(251 232 239 / var(--tw-border-opacity, 1))}.border-blush-100\/60{border-color:#fbe8ef99}.border-blush-100\/70{border-color:#fbe8efb3}.border-blush-400{--tw-border-opacity: 1;border-color:rgb(224 122 156 / var(--tw-border-opacity, 1))}.border-blush-50{--tw-border-opacity: 1;border-color:rgb(253 244 247 / var(--tw-border-opacity, 1))}.border-blush-500{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.border-brand{--tw-border-opacity: 1;border-color:rgb(0 160 200 / var(--tw-border-opacity, 1))}.border-cream\/10{border-color:#fdfaf51a}.border-edge{--tw-border-opacity: 1;border-color:rgb(38 48 74 / var(--tw-border-opacity, 1))}.border-edge\/50{border-color:#26304a80}.border-emerald-500\/30{border-color:#10b9814d}.border-rose-500\/30{border-color:#f43f5e4d}.border-sky-500\/30{border-color:#0ea5e94d}.border-slate-300\/30{border-color:#cbd5e14d}.border-slate-500\/30{border-color:#64748b4d}.border-slate-600\/30{border-color:#4755694d}.border-violet-500\/30{border-color:#8b5cf64d}.border-white\/70{border-color:#ffffffb3}.bg-amber-400\/15{background-color:#fbbf2426}.bg-amber-500\/15{background-color:#f59e0b26}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-bloom{--tw-bg-opacity: 1;background-color:rgb(208 90 130 / var(--tw-bg-opacity, 1))}.bg-blush-50{--tw-bg-opacity: 1;background-color:rgb(253 244 247 / var(--tw-bg-opacity, 1))}.bg-blush-500{--tw-bg-opacity: 1;background-color:rgb(208 90 130 / var(--tw-bg-opacity, 1))}.bg-brand{--tw-bg-opacity: 1;background-color:rgb(0 160 200 / var(--tw-bg-opacity, 1))}.bg-brand2{--tw-bg-opacity: 1;background-color:rgb(0 90 140 / var(--tw-bg-opacity, 1))}.bg-card{--tw-bg-opacity: 1;background-color:rgb(26 34 52 / var(--tw-bg-opacity, 1))}.bg-card\/60{background-color:#1a223499}.bg-cream{--tw-bg-opacity: 1;background-color:rgb(253 250 245 / var(--tw-bg-opacity, 1))}.bg-cream\/10{background-color:#fdfaf51a}.bg-cream\/90{background-color:#fdfaf5e6}.bg-emerald-500\/15{background-color:#10b98126}.bg-gold{--tw-bg-opacity: 1;background-color:rgb(196 163 90 / var(--tw-bg-opacity, 1))}.bg-ink{--tw-bg-opacity: 1;background-color:rgb(11 15 23 / var(--tw-bg-opacity, 1))}.bg-ivory{--tw-bg-opacity: 1;background-color:rgb(251 246 238 / var(--tw-bg-opacity, 1))}.bg-leaf\/10{background-color:#4e6e431a}.bg-panel{--tw-bg-opacity: 1;background-color:rgb(19 25 39 / var(--tw-bg-opacity, 1))}.bg-petal{--tw-bg-opacity: 1;background-color:rgb(251 232 239 / var(--tw-bg-opacity, 1))}.bg-rose-500\/15{background-color:#f43f5e26}.bg-sage-700{--tw-bg-opacity: 1;background-color:rgb(64 88 55 / var(--tw-bg-opacity, 1))}.bg-sage-800{--tw-bg-opacity: 1;background-color:rgb(54 72 47 / var(--tw-bg-opacity, 1))}.bg-sky-500\/15{background-color:#0ea5e926}.bg-slate-300\/20{background-color:#cbd5e133}.bg-slate-500\/15{background-color:#64748b26}.bg-slate-600\/20{background-color:#47556933}.bg-transparent{background-color:transparent}.bg-violet-500\/15{background-color:#8b5cf626}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/15{background-color:#ffffff26}.bg-white\/45{background-color:#ffffff73}.bg-white\/60{background-color:#fff9}.bg-white\/70{background-color:#ffffffb3}.bg-white\/85{background-color:#ffffffd9}.bg-white\/90{background-color:#ffffffe6}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from: #fbbf24 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 191 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bloom2{--tw-gradient-from: #993456 var(--tw-gradient-from-position);--tw-gradient-to: rgb(153 52 86 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-100{--tw-gradient-from: #fbe8ef var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 232 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-50{--tw-gradient-from: #fdf4f7 var(--tw-gradient-from-position);--tw-gradient-to: rgb(253 244 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-900\/10{--tw-gradient-from: rgb(107 42 65 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-900\/70{--tw-gradient-from: rgb(107 42 65 / .7) var(--tw-gradient-from-position);--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-900\/75{--tw-gradient-from: rgb(107 42 65 / .75) var(--tw-gradient-from-position);--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-sage-700{--tw-gradient-from: #405837 var(--tw-gradient-from-position);--tw-gradient-to: rgb(64 88 55 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-sage-900\/40{--tw-gradient-from: rgb(46 61 41 / .4) var(--tw-gradient-from-position);--tw-gradient-to: rgb(46 61 41 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-300{--tw-gradient-from: #cbd5e1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(203 213 225 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-400{--tw-gradient-from: #94a3b8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(148 163 184 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500{--tw-gradient-from: #8b5cf6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-blush-900\/20{--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(107 42 65 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blush-900\/40{--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(107 42 65 / .4) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cream{--tw-gradient-to: rgb(253 250 245 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #fdfaf5 var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-amber-500{--tw-gradient-to: #f59e0b var(--tw-gradient-to-position)}.to-bloom{--tw-gradient-to: #d05a82 var(--tw-gradient-to-position)}.to-fuchsia-500{--tw-gradient-to: #d946ef var(--tw-gradient-to-position)}.to-ivory{--tw-gradient-to: #fbf6ee var(--tw-gradient-to-position)}.to-sage-100{--tw-gradient-to: #e6ede2 var(--tw-gradient-to-position)}.to-sage-50{--tw-gradient-to: #f4f7f3 var(--tw-gradient-to-position)}.to-sage-800{--tw-gradient-to: #36482f var(--tw-gradient-to-position)}.to-slate-400{--tw-gradient-to: #94a3b8 var(--tw-gradient-to-position)}.to-slate-500{--tw-gradient-to: #64748b var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-14{padding-top:3.5rem;padding-bottom:3.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1\.5{padding-bottom:.375rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.text-\[20px\]{font-size:20px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-\[1\.05\]{line-height:1.05}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[0\.12em\]{letter-spacing:.12em}.tracking-\[0\.25em\]{letter-spacing:.25em}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-\[0\.35em\]{letter-spacing:.35em}.tracking-\[0\.3em\]{letter-spacing:.3em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#3c4043\]{--tw-text-opacity: 1;color:rgb(60 64 67 / var(--tw-text-opacity, 1))}.text-\[\#43343a\]{--tw-text-opacity: 1;color:rgb(67 52 58 / var(--tw-text-opacity, 1))}.text-\[\#5a474d\]{--tw-text-opacity: 1;color:rgb(90 71 77 / var(--tw-text-opacity, 1))}.text-\[\#6b5258\]{--tw-text-opacity: 1;color:rgb(107 82 88 / var(--tw-text-opacity, 1))}.text-\[\#8a7077\]{--tw-text-opacity: 1;color:rgb(138 112 119 / var(--tw-text-opacity, 1))}.text-\[\#a08a90\]{--tw-text-opacity: 1;color:rgb(160 138 144 / var(--tw-text-opacity, 1))}.text-\[\#e6edf6\]{--tw-text-opacity: 1;color:rgb(230 237 246 / var(--tw-text-opacity, 1))}.text-accent{--tw-text-opacity: 1;color:rgb(61 220 151 / var(--tw-text-opacity, 1))}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-bloom{--tw-text-opacity: 1;color:rgb(208 90 130 / var(--tw-text-opacity, 1))}.text-bloom\/30{color:#d05a824d}.text-bloom\/40{color:#d05a8266}.text-bloom2{--tw-text-opacity: 1;color:rgb(153 52 86 / var(--tw-text-opacity, 1))}.text-blush-200{--tw-text-opacity: 1;color:rgb(246 205 218 / var(--tw-text-opacity, 1))}.text-blush-200\/40{color:#f6cdda66}.text-blush-300{--tw-text-opacity: 1;color:rgb(238 167 190 / var(--tw-text-opacity, 1))}.text-blush-400{--tw-text-opacity: 1;color:rgb(224 122 156 / var(--tw-text-opacity, 1))}.text-blush-500{--tw-text-opacity: 1;color:rgb(208 90 130 / var(--tw-text-opacity, 1))}.text-blush-600{--tw-text-opacity: 1;color:rgb(184 67 107 / var(--tw-text-opacity, 1))}.text-blush-700{--tw-text-opacity: 1;color:rgb(153 52 86 / var(--tw-text-opacity, 1))}.text-blush-900{--tw-text-opacity: 1;color:rgb(107 42 65 / var(--tw-text-opacity, 1))}.text-brand{--tw-text-opacity: 1;color:rgb(0 160 200 / var(--tw-text-opacity, 1))}.text-cream\/50{color:#fdfaf580}.text-cream\/60{color:#fdfaf599}.text-cream\/70{color:#fdfaf5b3}.text-cream\/75{color:#fdfaf5bf}.text-cream\/80{color:#fdfaf5cc}.text-cream\/85{color:#fdfaf5d9}.text-cream\/90{color:#fdfaf5e6}.text-cream\/95{color:#fdfaf5f2}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-gold{--tw-text-opacity: 1;color:rgb(196 163 90 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-ink{--tw-text-opacity: 1;color:rgb(11 15 23 / var(--tw-text-opacity, 1))}.text-leaf{--tw-text-opacity: 1;color:rgb(78 110 67 / var(--tw-text-opacity, 1))}.text-rose-400{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.text-sage-200{--tw-text-opacity: 1;color:rgb(205 221 198 / var(--tw-text-opacity, 1))}.text-sage-300{--tw-text-opacity: 1;color:rgb(168 195 158 / var(--tw-text-opacity, 1))}.text-sage-300\/40{color:#a8c39e66}.text-sage-600{--tw-text-opacity: 1;color:rgb(78 110 67 / var(--tw-text-opacity, 1))}.text-sage-700{--tw-text-opacity: 1;color:rgb(64 88 55 / var(--tw-text-opacity, 1))}.text-sage-800{--tw-text-opacity: 1;color:rgb(54 72 47 / var(--tw-text-opacity, 1))}.text-sky-400{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-violet-300{--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/20{color:#fff3}.text-white\/70{color:#ffffffb3}.text-white\/85{color:#ffffffd9}.line-through{text-decoration-line:line-through}.underline-offset-2{text-underline-offset:2px}.accent-bloom{accent-color:#d05a82}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-bloom{--tw-shadow: 0 20px 60px -18px rgba(153,52,86,.3);--tw-shadow-colored: 0 20px 60px -18px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-petal{--tw-shadow: 0 10px 40px -12px rgba(208,90,130,.25);--tw-shadow-colored: 0 10px 40px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-soft{--tw-shadow: 0 8px 30px -10px rgba(110,80,90,.18);--tw-shadow-colored: 0 8px 30px -10px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-bloom{--tw-shadow-color: #d05a82;--tw-shadow: var(--tw-shadow-colored)}.shadow-petal{--tw-shadow-color: #fbe8ef;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}:root{--blush: #d05a82;--blush-deep: #993456;--sage: #4e6e43;--cream: #fdfaf5;--gold: #c4a35a}body{margin:0;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:#43343a;background:var(--cream);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}*{box-sizing:border-box}html.lang-ko body,html.lang-ko .admin-shell,html.lang-ko input,html.lang-ko textarea,html.lang-ko select,html.lang-ko button,html.lang-ko p,html.lang-ko span,html.lang-ko a,html.lang-ko li,html.lang-ko td,html.lang-ko th,html.lang-ko label,html.lang-ko h1,html.lang-ko h2,html.lang-ko h3,html.lang-ko h4{font-family:Malgun Gothic,맑은 고딕,Apple SD Gothic Neo,Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}html.lang-ko .font-display{font-family:Cormorant Garamond,Malgun Gothic,맑은 고딕,Georgia,serif}html.lang-ko .font-serif{font-family:Playfair Display,Malgun Gothic,맑은 고딕,Georgia,serif}.admin-shell{color-scheme:dark;background:#0b0f17;color:#e6edf6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.font-display{font-family:Cormorant Garamond,Georgia,serif}.font-serif{font-family:Playfair Display,Georgia,serif}html{scroll-behavior:smooth}::-moz-selection{background:#d05a822e}::selection{background:#d05a822e}.botanical-divider{display:flex;align-items:center;justify-content:center;gap:.75rem;color:#a8c39e}.botanical-divider:before,.botanical-divider:after{content:"";height:1px;flex:1;max-width:7rem;background:linear-gradient(to var(--dir, right),transparent,rgba(168,195,158,.7))}.botanical-divider:before{--dir: left}.petal-layer{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;pointer-events:none;z-index:0}.petal{position:absolute;top:-8vh;border-radius:50% 0 50% 50%;background:radial-gradient(circle at 30% 30%,#eea7bef2,#d05a828c);opacity:0;will-change:transform,opacity;animation:petalfall linear infinite}.petal.sage{background:radial-gradient(circle at 30% 30%,#a8c39ee6,#648a5680)}.petal.cream{background:radial-gradient(circle at 30% 30%,#fdf6eef2,#c4a35a66)}.zoom-frame{overflow:hidden}.zoom-frame img{transition:transform .9s cubic-bezier(.22,1,.36,1)}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}.petal-layer{display:none}}.thin-scroll::-webkit-scrollbar{height:6px}.thin-scroll::-webkit-scrollbar-thumb{background:#d05a8240;border-radius:999px}.placeholder\:text-blush-300::-moz-placeholder{--tw-text-opacity: 1;color:rgb(238 167 190 / var(--tw-text-opacity, 1))}.placeholder\:text-blush-300::placeholder{--tw-text-opacity: 1;color:rgb(238 167 190 / var(--tw-text-opacity, 1))}.focus-within\:border-bloom:focus-within{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.hover\:border-bloom:hover{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.hover\:border-blush-300:hover{--tw-border-opacity: 1;border-color:rgb(238 167 190 / var(--tw-border-opacity, 1))}.hover\:bg-bloom2:hover{--tw-bg-opacity: 1;background-color:rgb(153 52 86 / var(--tw-bg-opacity, 1))}.hover\:bg-blush-100:hover{--tw-bg-opacity: 1;background-color:rgb(251 232 239 / var(--tw-bg-opacity, 1))}.hover\:bg-blush-50:hover{--tw-bg-opacity: 1;background-color:rgb(253 244 247 / var(--tw-bg-opacity, 1))}.hover\:bg-blush-600:hover{--tw-bg-opacity: 1;background-color:rgb(184 67 107 / var(--tw-bg-opacity, 1))}.hover\:bg-brand\/90:hover{background-color:#00a0c8e6}.hover\:bg-card\/60:hover{background-color:#1a223499}.hover\:bg-cream:hover{--tw-bg-opacity: 1;background-color:rgb(253 250 245 / var(--tw-bg-opacity, 1))}.hover\:bg-panel\/50:hover{background-color:#13192780}.hover\:bg-petal:hover{--tw-bg-opacity: 1;background-color:rgb(251 232 239 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/30:hover{background-color:#ffffff4d}.hover\:bg-white\/70:hover{background-color:#ffffffb3}.hover\:text-bloom:hover,.hover\:text-blush-500:hover{--tw-text-opacity: 1;color:rgb(208 90 130 / var(--tw-text-opacity, 1))}.hover\:text-blush-600:hover{--tw-text-opacity: 1;color:rgb(184 67 107 / var(--tw-text-opacity, 1))}.hover\:text-blush-700:hover{--tw-text-opacity: 1;color:rgb(153 52 86 / var(--tw-text-opacity, 1))}.hover\:text-brand:hover{--tw-text-opacity: 1;color:rgb(0 160 200 / var(--tw-text-opacity, 1))}.hover\:text-cream\/80:hover{color:#fdfaf5cc}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-bloom:hover{--tw-shadow: 0 20px 60px -18px rgba(153,52,86,.3);--tw-shadow-colored: 0 20px 60px -18px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-shadow-color: #d05a82;--tw-shadow: var(--tw-shadow-colored)}.focus\:border-bloom:focus{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.focus\:border-blush-300:focus{--tw-border-opacity: 1;border-color:rgb(238 167 190 / var(--tw-border-opacity, 1))}.focus\:border-blush-400:focus{--tw-border-opacity: 1;border-color:rgb(224 122 156 / var(--tw-border-opacity, 1))}.focus\:border-brand:focus{--tw-border-opacity: 1;border-color:rgb(0 160 200 / var(--tw-border-opacity, 1))}.disabled\:opacity-60:disabled{opacity:.6}.group:hover .group-hover\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:gap-2{gap:.5rem}.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width: 640px){.sm\:flex{display:flex}.sm\:flex-row{flex-direction:row}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:.75rem}}@media (min-width: 768px){.md\:left-5{left:1.25rem}.md\:right-5{right:1.25rem}.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:block{display:block}.md\:flex{display:flex}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[200px_1fr\]{grid-template-columns:200px 1fr}.md\:flex-row{flex-direction:row}.md\:p-10{padding:2.5rem}.md\:p-12{padding:3rem}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}.md\:text-6xl{font-size:3.75rem;line-height:1}}@media (min-width: 1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}} diff --git a/backend/src/main/resources/static/assets/index-CUN395kM.js b/backend/src/main/resources/static/assets/index-CUN395kM.js new file mode 100644 index 0000000..f0e4756 --- /dev/null +++ b/backend/src/main/resources/static/assets/index-CUN395kM.js @@ -0,0 +1,489 @@ +var wA=e=>{throw TypeError(e)};var Qg=(e,t,n)=>t.has(e)||wA("Cannot "+n);var R=(e,t,n)=>(Qg(e,t,"read from private field"),n?n.call(e):t.get(e)),ce=(e,t,n)=>t.has(e)?wA("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ee=(e,t,n,r)=>(Qg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Oe=(e,t,n)=>(Qg(e,t,"access private method"),n);var rh=(e,t,n,r)=>({set _(a){ee(e,t,a,n)},get _(){return R(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var ah=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $P={exports:{}},xy={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var az=Symbol.for("react.transitional.element"),iz=Symbol.for("react.fragment");function kP(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:az,type:e,key:r,ref:t!==void 0?t:null,props:n}}xy.Fragment=iz;xy.jsx=kP;xy.jsxs=kP;$P.exports=xy;var u=$P.exports,LP={exports:{}},be={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var aS=Symbol.for("react.transitional.element"),sz=Symbol.for("react.portal"),oz=Symbol.for("react.fragment"),lz=Symbol.for("react.strict_mode"),cz=Symbol.for("react.profiler"),uz=Symbol.for("react.consumer"),fz=Symbol.for("react.context"),dz=Symbol.for("react.forward_ref"),hz=Symbol.for("react.suspense"),pz=Symbol.for("react.memo"),zP=Symbol.for("react.lazy"),mz=Symbol.for("react.activity"),jA=Symbol.iterator;function yz(e){return e===null||typeof e!="object"?null:(e=jA&&e[jA]||e["@@iterator"],typeof e=="function"?e:null)}var IP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},BP=Object.assign,UP={};function Oc(e,t,n){this.props=e,this.context=t,this.refs=UP,this.updater=n||IP}Oc.prototype.isReactComponent={};Oc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Oc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function FP(){}FP.prototype=Oc.prototype;function iS(e,t,n){this.props=e,this.context=t,this.refs=UP,this.updater=n||IP}var sS=iS.prototype=new FP;sS.constructor=iS;BP(sS,Oc.prototype);sS.isPureReactComponent=!0;var AA=Array.isArray;function Fb(){}var at={H:null,A:null,T:null,S:null},VP=Object.prototype.hasOwnProperty;function oS(e,t,n){var r=n.ref;return{$$typeof:aS,type:e,key:t,ref:r!==void 0?r:null,props:n}}function gz(e,t){return oS(e.type,t,e.props)}function lS(e){return typeof e=="object"&&e!==null&&e.$$typeof===aS}function vz(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var OA=/\/+/g;function Zg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?vz(""+e.key):t.toString(36)}function bz(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Fb,Fb):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Bo(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case aS:case sz:s=!0;break;case zP:return s=e._init,Bo(s(e._payload),t,n,r,a)}}if(s)return a=a(e),s=r===""?"."+Zg(e,0):r,AA(a)?(n="",s!=null&&(n=s.replace(OA,"$&/")+"/"),Bo(a,t,n,"",function(c){return c})):a!=null&&(lS(a)&&(a=gz(a,n+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(OA,"$&/")+"/")+s)),t.push(a)),1;s=0;var o=r===""?".":r+":";if(AA(e))for(var l=0;l>>1,H=P[F];if(0>>1;Fa(te,I))Za(ye,te)?(P[F]=ye,P[Z]=I,F=Z):(P[F]=te,P[q]=I,F=q);else if(Za(ye,I))P[F]=ye,P[Z]=I,F=Z;else break e}}return k}function a(P,k){var I=P.sortIndex-k.sortIndex;return I!==0?I:P.id-k.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],c=[],f=1,d=null,h=3,p=!1,m=!1,g=!1,b=!1,y=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function w(P){for(var k=n(c);k!==null;){if(k.callback===null)r(c);else if(k.startTime<=P)r(c),k.sortIndex=k.expirationTime,t(l,k);else break;k=n(c)}}function S(P){if(g=!1,w(P),!m)if(n(l)!==null)m=!0,j||(j=!0,C());else{var k=n(c);k!==null&&$(S,k.startTime-P)}}var j=!1,O=-1,E=5,T=-1;function N(){return b?!0:!(e.unstable_now()-TP&&N());){var F=d.callback;if(typeof F=="function"){d.callback=null,h=d.priorityLevel;var H=F(d.expirationTime<=P);if(P=e.unstable_now(),typeof H=="function"){d.callback=H,w(P),k=!0;break t}d===n(l)&&r(l),w(P)}else r(l);d=n(l)}if(d!==null)k=!0;else{var Y=n(c);Y!==null&&$(S,Y.startTime-P),k=!1}}break e}finally{d=null,h=I,p=!1}k=void 0}}finally{k?C():j=!1}}}var C;if(typeof x=="function")C=function(){x(M)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,D=L.port2;L.port1.onmessage=M,C=function(){D.postMessage(null)}}else C=function(){y(M,0)};function $(P,k){O=y(function(){P(e.unstable_now())},k)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125F?(P.sortIndex=I,t(c,P),n(l)===null&&P===n(c)&&(g?(v(O),O=-1):g=!0,$(S,I-F))):(P.sortIndex=H,t(l,P),m||p||(m=!0,j||(j=!0,C()))),P},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(P){var k=h;return function(){var I=h;h=k;try{return P.apply(this,arguments)}finally{h=I}}}})(KP);qP.exports=KP;var wz=qP.exports,GP={exports:{}},vn={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var jz=A;function YP(e){var t="https://react.dev/errors/"+e;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(XP)}catch(e){console.error(e)}}XP(),GP.exports=vn;var Ez=GP.exports;/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var kt=wz,WP=A,Tz=Ez;function U(e){var t="https://react.dev/errors/"+e;if(1Ho||(e.current=Yb[Ho],Yb[Ho]=null,Ho--)}function Ze(e,t){Ho++,Yb[Ho]=e.current,e.current=t}var na=ua(null),cf=ua(null),ki=ua(null),wp=ua(null);function jp(e,t){switch(Ze(ki,t),Ze(cf,e),Ze(na,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?D2(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=D2(t),e=wD(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}qt(na),Ze(na,e)}function kl(){qt(na),qt(cf),qt(ki)}function Xb(e){e.memoizedState!==null&&Ze(wp,e);var t=na.current,n=wD(t,e.type);t!==n&&(Ze(cf,e),Ze(na,n))}function Ap(e){cf.current===e&&(qt(na),qt(cf)),wp.current===e&&(qt(wp),xf._currentValue=Fs)}var Jg,CA;function ps(e){if(Jg===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jg=t&&t[1]||"",CA=-1)":-1a||l[r]!==c[a]){var f=` +`+l[r].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=r&&0<=a);break}}}finally{ev=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ps(n):""}function Mz(e,t){switch(e.tag){case 26:case 27:case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return e.child!==t&&t!==null?ps("Suspense Fallback"):ps("Suspense");case 19:return ps("SuspenseList");case 0:case 15:return tv(e.type,!1);case 11:return tv(e.type.render,!1);case 1:return tv(e.type,!0);case 31:return ps("Activity");default:return""}}function _A(e){try{var t="",n=null;do t+=Mz(e,n),n=e,e=e.return;while(e);return t}catch(r){return` +Error generating stack: `+r.message+` +`+r.stack}}var Wb=Object.prototype.hasOwnProperty,fS=kt.unstable_scheduleCallback,nv=kt.unstable_cancelCallback,Rz=kt.unstable_shouldYield,Dz=kt.unstable_requestPaint,qn=kt.unstable_now,$z=kt.unstable_getCurrentPriorityLevel,rM=kt.unstable_ImmediatePriority,aM=kt.unstable_UserBlockingPriority,Op=kt.unstable_NormalPriority,kz=kt.unstable_LowPriority,iM=kt.unstable_IdlePriority,Lz=kt.log,zz=kt.unstable_setDisableYieldValue,wd=null,Kn=null;function Ci(e){if(typeof Lz=="function"&&zz(e),Kn&&typeof Kn.setStrictMode=="function")try{Kn.setStrictMode(wd,e)}catch{}}var Gn=Math.clz32?Math.clz32:Uz,Iz=Math.log,Bz=Math.LN2;function Uz(e){return e>>>=0,e===0?32:31-(Iz(e)/Bz|0)|0}var oh=256,lh=262144,ch=4194304;function ms(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function jy(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var a=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~i,r!==0?a=ms(r):(s&=o,s!==0?a=ms(s):n||(n=o&~e,n!==0&&(a=ms(n))))):(o=r&~i,o!==0?a=ms(o):s!==0?a=ms(s):n||(n=r&~e,n!==0&&(a=ms(n)))),a===0?0:t!==0&&t!==a&&!(t&i)&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function jd(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fz(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sM(){var e=ch;return ch<<=1,!(ch&62914560)&&(ch=4194304),e}function rv(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ad(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Vz(e,t,n,r,a,i){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Xz=/[\n"\\]/g;function fr(e){return e.replace(Xz,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Jb(e,t,n,r,a,i,s,o){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+lr(t)):e.value!==""+lr(t)&&(e.value=""+lr(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?e0(e,s,lr(t)):n!=null?e0(e,s,lr(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+lr(o):e.removeAttribute("name")}function mM(e,t,n,r,a,i,s,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Zb(e);return}n=n!=null?""+lr(n):"",t=t!=null?""+lr(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Zb(e)}function e0(e,t,n){t==="number"&&Ep(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function dl(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),n0=!1;if(Ha)try{var eu={};Object.defineProperty(eu,"passive",{get:function(){n0=!0}}),window.addEventListener("test",eu,eu),window.removeEventListener("test",eu,eu)}catch{n0=!1}var _i=null,gS=null,Qh=null;function xM(){if(Qh)return Qh;var e,t=gS,n=t.length,r,a="value"in _i?_i.value:_i.textContent,i=a.length;for(e=0;e=Du),UA=" ",FA=!1;function wM(e,t){switch(e){case"keyup":return jI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Go=!1;function OI(e,t){switch(e){case"compositionend":return jM(t);case"keypress":return t.which!==32?null:(FA=!0,UA);case"textInput":return e=t.data,e===UA&&FA?null:e;default:return null}}function EI(e,t){if(Go)return e==="compositionend"||!bS&&wM(e,t)?(e=xM(),Qh=gS=_i=null,Go=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=GA(n)}}function TM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?TM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function NM(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ep(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ep(e.document)}return t}function xS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var DI=Ha&&"documentMode"in document&&11>=document.documentMode,Yo=null,r0=null,ku=null,a0=!1;function XA(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;a0||Yo==null||Yo!==Ep(r)||(r=Yo,"selectionStart"in r&&xS(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ku&&df(ku,r)||(ku=r,r=Hp(r0,"onSelect"),0>=s,a-=s,Yr=1<<32-Gn(t)+a|n<E?(T=O,O=null):T=O.sibling;var N=h(y,O,x[E],w);if(N===null){O===null&&(O=T);break}e&&O&&N.alternate===null&&t(y,O),v=i(N,v,E),j===null?S=N:j.sibling=N,j=N,O=T}if(E===x.length)return n(y,O),Ce&&Oa(y,E),S;if(O===null){for(;EE?(T=O,O=null):T=O.sibling;var M=h(y,O,N.value,w);if(M===null){O===null&&(O=T);break}e&&O&&M.alternate===null&&t(y,O),v=i(M,v,E),j===null?S=M:j.sibling=M,j=M,O=T}if(N.done)return n(y,O),Ce&&Oa(y,E),S;if(O===null){for(;!N.done;E++,N=x.next())N=d(y,N.value,w),N!==null&&(v=i(N,v,E),j===null?S=N:j.sibling=N,j=N);return Ce&&Oa(y,E),S}for(O=r(O);!N.done;E++,N=x.next())N=p(O,y,E,N.value,w),N!==null&&(e&&N.alternate!==null&&O.delete(N.key===null?E:N.key),v=i(N,v,E),j===null?S=N:j.sibling=N,j=N);return e&&O.forEach(function(C){return t(y,C)}),Ce&&Oa(y,E),S}function b(y,v,x,w){if(typeof x=="object"&&x!==null&&x.type===Vo&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case sh:e:{for(var S=x.key;v!==null;){if(v.key===S){if(S=x.type,S===Vo){if(v.tag===7){n(y,v.sibling),w=a(v,x.props.children),w.return=y,y=w;break e}}else if(v.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===hi&&ys(S)===v.type){n(y,v.sibling),w=a(v,x.props),nu(w,x),w.return=y,y=w;break e}n(y,v);break}else t(y,v);v=v.sibling}x.type===Vo?(w=Vs(x.props.children,y.mode,w,x.key),w.return=y,y=w):(w=Jh(x.type,x.key,x.props,null,y.mode,w),nu(w,x),w.return=y,y=w)}return s(y);case wu:e:{for(S=x.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){n(y,v.sibling),w=a(v,x.children||[]),w.return=y,y=w;break e}else{n(y,v);break}else t(y,v);v=v.sibling}w=dv(x,y.mode,w),w.return=y,y=w}return s(y);case hi:return x=ys(x),b(y,v,x,w)}if(ju(x))return m(y,v,x,w);if(Jc(x)){if(S=Jc(x),typeof S!="function")throw Error(U(150));return x=S.call(x),g(y,v,x,w)}if(typeof x.then=="function")return b(y,v,hh(x),w);if(x.$$typeof===Ca)return b(y,v,dh(y,x),w);ph(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,v!==null&&v.tag===6?(n(y,v.sibling),w=a(v,x),w.return=y,y=w):(n(y,v),w=fv(x,y.mode,w),w.return=y,y=w),s(y)):n(y,v)}return function(y,v,x,w){try{mf=0;var S=b(y,v,x,w);return ml=null,S}catch(O){if(O===Cc||O===Cy)throw O;var j=Fn(29,O,null,y.mode);return j.lanes=w,j.return=y,j}finally{}}}var eo=VM(!0),HM=VM(!1),pi=!1;function CS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function f0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function zi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ii(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Me&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Np(e),$M(e,null,n),t}return Ny(e,r,t,n),Np(e)}function zu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lM(e,n)}}function pv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var d0=!1;function Iu(){if(d0){var e=pl;if(e!==null)throw e}}function Bu(e,t,n,r){d0=!1;var a=e.updateQueue;pi=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var l=o,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==s&&(o===null?f.firstBaseUpdate=c:o.next=c,f.lastBaseUpdate=l))}if(i!==null){var d=a.baseState;s=0,f=c=l=null,o=i;do{var h=o.lane&-536870913,p=h!==o.lane;if(p?(Te&h)===h:(r&h)===h){h!==0&&h===Il&&(d0=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,g=o;h=t;var b=n;switch(g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(b,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,h=typeof m=="function"?m.call(b,d,h):m,h==null)break e;d=it({},d,h);break e;case 2:pi=!0}}h=o.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=a.callbacks,p===null?a.callbacks=[h]:p.push(h))}else p={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(c=f=p,l=d):f=f.next=p,s|=h;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);f===null&&(l=d),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=f,i===null&&(a.shared.lanes=0),Zi|=s,e.lanes=s,e.memoizedState=d}}function qM(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function KM(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ei?i:8;var s=he.T,o={};he.T=o,FS(e,!1,t,n);try{var l=a(),c=he.S;if(c!==null&&c(o,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var f=VI(l,r);Uu(e,t,f,Yn(e))}else Uu(e,t,r,Yn(e))}catch(d){Uu(e,t,{then:function(){},status:"rejected",reason:d},Yn())}finally{De.p=i,s!==null&&o.types!==null&&(s.types=o.types),he.T=s}}function XI(){}function g0(e,t,n,r){if(e.tag!==5)throw Error(U(476));var a=gR(e).queue;yR(e,a,t,Fs,n===null?XI:function(){return vR(e),n(r)})}function gR(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Fs,baseState:Fs,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:Fs},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vR(e){var t=gR(e);t.next===null&&(t=e.alternate.memoizedState),Uu(e,t.next.queue,{},Yn())}function US(){return en(xf)}function bR(){return wt().memoizedState}function xR(){return wt().memoizedState}function WI(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Yn();e=zi(n);var r=Ii(t,e,n);r!==null&&(Nn(r,t,n),zu(r,t,n)),t={cache:ES()},e.payload=t;return}t=t.return}}function QI(e,t,n){var r=Yn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ry(e)?wR(t,n):(n=wS(e,t,n,r),n!==null&&(Nn(n,e,r),jR(n,t,r)))}function SR(e,t,n){var r=Yn();Uu(e,t,n,r)}function Uu(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ry(e))wR(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,o=i(s,n);if(a.hasEagerState=!0,a.eagerState=o,Qn(o,s))return Ny(e,t,a,0),Ye===null&&Ty(),!1}catch{}finally{}if(n=wS(e,t,a,r),n!==null)return Nn(n,e,r),jR(n,t,r),!0}return!1}function FS(e,t,n,r){if(r={lane:2,revertLane:QS(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ry(e)){if(t)throw Error(U(479))}else t=wS(e,n,r,2),t!==null&&Nn(t,e,2)}function Ry(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function wR(e,t){yl=Dp=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function jR(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lM(e,n)}}var gf={readContext:en,use:Py,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};gf.useEffectEvent=pt;var AR={readContext:en,use:Py,useCallback:function(e,t){return fn().memoizedState=[e,t===void 0?null:t],e},useContext:en,useEffect:u2,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,np(4194308,4,fR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return np(4194308,4,e,t)},useInsertionEffect:function(e,t){np(4,2,e,t)},useMemo:function(e,t){var n=fn();t=t===void 0?null:t;var r=e();if(to){Ci(!0);try{e()}finally{Ci(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=fn();if(n!==void 0){var a=n(t);if(to){Ci(!0);try{n(t)}finally{Ci(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=QI.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=fn();return e={current:e},t.memoizedState=e},useState:function(e){e=m0(e);var t=e.queue,n=SR.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:IS,useDeferredValue:function(e,t){var n=fn();return BS(n,e,t)},useTransition:function(){var e=m0(!1);return e=yR.bind(null,xe,e.queue,!0,!1),fn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=xe,a=fn();if(Ce){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ye===null)throw Error(U(349));Te&127||QM(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,u2(JM.bind(null,r,i,e),[e]),r.flags|=2048,Ul(9,{destroy:void 0},ZM.bind(null,r,i,n,t),null),n},useId:function(){var e=fn(),t=Ye.identifierPrefix;if(Ce){var n=Xr,r=Yr;n=(r&~(1<<32-Gn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=$p++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?s.createElement(a,{is:r.is}):s.createElement(a)}}i[Qt]=t,i[_n]=r;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)i.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(tn(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ga(t)}}return et(t),wv(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ga(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(e=ki.current,_o(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Zt,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Qt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||SD(e.nodeValue,n)),e||Wi(t,!0)}else e=qp(e).createTextNode(r),e[Qt]=t,t.stateNode=e}return et(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=_o(t),n!==null){if(e===null){if(!r)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[Qt]=t}else Zs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;et(t),e=!1}else n=hv(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Un(t),t):(Un(t),null);if(t.flags&128)throw Error(U(558))}return et(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=_o(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(U(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(U(317));a[Qt]=t}else Zs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;et(t),a=!1}else a=hv(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Un(t),t):(Un(t),null)}return Un(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),mh(t,t.updateQueue),et(t),null);case 4:return kl(),e===null&&ZS(t.stateNode.containerInfo),et(t),null;case 10:return La(t.type),et(t),null;case 19:if(qt(xt),r=t.memoizedState,r===null)return et(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)ru(r,!1);else{if(vt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Rp(e),i!==null){for(t.flags|=128,ru(r,!1),e=i.updateQueue,t.updateQueue=e,mh(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)kM(n,e),n=n.sibling;return Ze(xt,xt.current&1|2),Ce&&Oa(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&qn()>Ip&&(t.flags|=128,a=!0,ru(r,!1),t.lanes=4194304)}else{if(!a)if(e=Rp(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,mh(t,e),ru(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Ce)return et(t),null}else 2*qn()-r.renderingStartTime>Ip&&n!==536870912&&(t.flags|=128,a=!0,ru(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=qn(),e.sibling=null,n=xt.current,Ze(xt,a?n&1|2:n&1),Ce&&Oa(t,r.treeForkCount),e):(et(t),null);case 22:case 23:return Un(t),_S(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),n=t.updateQueue,n!==null&&mh(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&qt(Hs),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),La(Tt),et(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function nB(e,t){switch(OS(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return La(Tt),kl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ap(t),null;case 31:if(t.memoizedState!==null){if(Un(t),t.alternate===null)throw Error(U(340));Zs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Un(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Zs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qt(xt),null;case 4:return kl(),null;case 10:return La(t.type),null;case 22:case 23:return Un(t),_S(),e!==null&&qt(Hs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return La(Tt),null;case 25:return null;default:return null}}function kR(e,t){switch(OS(t),t.tag){case 3:La(Tt),kl();break;case 26:case 27:case 5:Ap(t);break;case 4:kl();break;case 31:t.memoizedState!==null&&Un(t);break;case 13:Un(t);break;case 19:qt(xt);break;case 10:La(t.type);break;case 22:case 23:Un(t),_S(),e!==null&&qt(Hs);break;case 24:La(Tt)}}function Cd(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,s=n.inst;r=i(),s.destroy=r}n=n.next}while(n!==a)}}catch(o){Ue(t,t.return,o)}}function Qi(e,t,n){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var i=a.next;r=i;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(o!==void 0){s.destroy=void 0,a=t;var l=n,c=o;try{c()}catch(f){Ue(a,l,f)}}}r=r.next}while(r!==i)}}catch(f){Ue(t,t.return,f)}}function LR(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{KM(t,n)}catch(r){Ue(e,e.return,r)}}}function zR(e,t,n){n.props=no(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Ue(e,t,r)}}function Fu(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(a){Ue(e,t,a)}}function Wr(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){Ue(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Ue(e,t,a)}else n.current=null}function IR(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Ue(e,e.return,a)}}function jv(e,t,n){try{var r=e.stateNode;AB(r,e.type,n,t),r[_n]=t}catch(a){Ue(e,e.return,a)}}function BR(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ts(e.type)||e.tag===4}function Av(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||BR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ts(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function w0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_a));else if(r!==4&&(r===27&&ts(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(w0(e,t,n),e=e.sibling;e!==null;)w0(e,t,n),e=e.sibling}function zp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ts(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(zp(e,t,n),e=e.sibling;e!==null;)zp(e,t,n),e=e.sibling}function UR(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);tn(t,r,n),t[Qt]=e,t[_n]=n}catch(i){Ue(e,e.return,i)}}var Na=!1,Et=!1,Ov=!1,j2=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function rB(e,t){if(e=e.containerInfo,C0=Xp,e=NM(e),xS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,o=-1,l=-1,c=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==n||a!==0&&d.nodeType!==3||(o=s+a),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===a&&(o=s),h===i&&++f===r&&(l=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(_0={focusedElem:e,selectionRange:n},Xp=!1,Ft=t;Ft!==null;)if(t=Ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ft=e;else for(;Ft!==null;){switch(t=Ft,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),tn(i,r,n),i[Qt]=e,Vt(i),r=i;break e;case"link":var s=V2("link","href",a).get(r+(n.href||""));if(s){for(var o=0;ob&&(s=b,b=g,g=s);var y=YA(o,g),v=YA(o,b);if(y&&v&&(p.rangeCount!==1||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var x=d.createRange();x.setStart(y.node,y.offset),p.removeAllRanges(),g>b?(p.addRange(x),p.extend(v.node,v.offset)):(x.setEnd(v.node,v.offset),p.addRange(x))}}}}for(d=[],p=o;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;on?32:n,he.T=null,n=O0,O0=null;var i=Ui,s=za;if(Dt=0,Vl=Ui=null,za=0,Me&6)throw Error(U(331));var o=Me;if(Me|=4,ZR(i.current),XR(i,i.current,s,n),Me=o,_d(0,!1),Kn&&typeof Kn.onPostCommitFiberRoot=="function")try{Kn.onPostCommitFiberRoot(wd,i)}catch{}return!0}finally{De.p=a,he.T=r,hD(e,t)}}function T2(e,t,n){t=dr(n,t),t=b0(e.stateNode,t,2),e=Ii(e,t,2),e!==null&&(Ad(e,2),fa(e))}function Ue(e,t,n){if(e.tag===3)T2(e,e,n);else for(;t!==null;){if(t.tag===3){T2(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Bi===null||!Bi.has(r))){e=dr(n,e),n=CR(2),r=Ii(t,n,2),r!==null&&(_R(n,r,t,e),Ad(r,2),fa(r));break}}t=t.return}}function Tv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new sB;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(YS=!0,a.add(n),e=fB.bind(null,e,t,n),t.then(e,e))}function fB(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ye===e&&(Te&n)===n&&(vt===4||vt===3&&(Te&62914560)===Te&&300>qn()-Dy?!(Me&2)&&Hl(e,0):XS|=n,Fl===Te&&(Fl=0)),fa(e)}function mD(e,t){t===0&&(t=sM()),e=vo(e,t),e!==null&&(Ad(e,t),fa(e))}function dB(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),mD(e,n)}function hB(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(U(314))}r!==null&&r.delete(t),mD(e,n)}function pB(e,t){return fS(e,t)}var Fp=null,Fo=null,T0=!1,Vp=!1,Nv=!1,Ri=0;function fa(e){e!==Fo&&e.next===null&&(Fo===null?Fp=Fo=e:Fo=Fo.next=e),Vp=!0,T0||(T0=!0,yB())}function _d(e,t){if(!Nv&&Vp){Nv=!0;do for(var n=!1,r=Fp;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var s=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-Gn(42|e)+1)-1,i&=a&~(s&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,N2(r,i))}else i=Te,i=jy(r,r===Ye?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||jd(r,i)||(n=!0,N2(r,i));r=r.next}while(n);Nv=!1}}function mB(){yD()}function yD(){Vp=T0=!1;var e=0;Ri!==0&&EB()&&(e=Ri);for(var t=qn(),n=null,r=Fp;r!==null;){var a=r.next,i=gD(r,t);i===0?(r.next=null,n===null?Fp=a:n.next=a,a===null&&(Fo=n)):(n=r,(e!==0||i&3)&&(Vp=!0)),r=a}Dt!==0&&Dt!==5||_d(e),Ri!==0&&(Ri=0)}function gD(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0o)break;var f=l.transferSize,d=l.initiatorType;f&&R2(d)&&(l=l.responseEnd,s+=f*(l"u"?null:document;function ED(e,t,n){var r=Pc;if(r&&typeof t=="string"&&t){var a=fr(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),B2.has(a)||(B2.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),tn(t,"link",e),Vt(t),r.head.appendChild(t)))}}function $B(e){ei.D(e),ED("dns-prefetch",e,null)}function kB(e,t){ei.C(e,t),ED("preconnect",e,t)}function LB(e,t,n){ei.L(e,t,n);var r=Pc;if(r&&e&&t){var a='link[rel="preload"][as="'+fr(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+fr(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+fr(n.imageSizes)+'"]')):a+='[href="'+fr(e)+'"]';var i=a;switch(t){case"style":i=ql(e);break;case"script":i=Mc(e)}vr.has(i)||(e=it({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),vr.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(Pd(i))||t==="script"&&r.querySelector(Md(i))||(t=r.createElement("link"),tn(t,"link",e),Vt(t),r.head.appendChild(t)))}}function zB(e,t){ei.m(e,t);var n=Pc;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+fr(r)+'"][href="'+fr(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Mc(e)}if(!vr.has(i)&&(e=it({rel:"modulepreload",href:e},t),vr.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Md(i)))return}r=n.createElement("link"),tn(r,"link",e),Vt(r),n.head.appendChild(r)}}}function IB(e,t,n){ei.S(e,t,n);var r=Pc;if(r&&e){var a=fl(r).hoistableStyles,i=ql(e);t=t||"default";var s=a.get(i);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(Pd(i)))o.loading=5;else{e=it({rel:"stylesheet",href:e,"data-precedence":t},n),(n=vr.get(i))&&JS(e,n);var l=s=r.createElement("link");Vt(l),tn(l,"link",e),l._p=new Promise(function(c,f){l.onload=c,l.onerror=f}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,sp(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},a.set(i,s)}}}function BB(e,t){ei.X(e,t);var n=Pc;if(n&&e){var r=fl(n).hoistableScripts,a=Mc(e),i=r.get(a);i||(i=n.querySelector(Md(a)),i||(e=it({src:e,async:!0},t),(t=vr.get(a))&&ew(e,t),i=n.createElement("script"),Vt(i),tn(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function UB(e,t){ei.M(e,t);var n=Pc;if(n&&e){var r=fl(n).hoistableScripts,a=Mc(e),i=r.get(a);i||(i=n.querySelector(Md(a)),i||(e=it({src:e,async:!0,type:"module"},t),(t=vr.get(a))&&ew(e,t),i=n.createElement("script"),Vt(i),tn(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function U2(e,t,n,r){var a=(a=ki.current)?Kp(a):null;if(!a)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=ql(n.href),n=fl(a).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ql(n.href);var i=fl(a).hoistableStyles,s=i.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=a.querySelector(Pd(e)))&&!i._p&&(s.instance=i,s.state.loading=5),vr.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vr.set(e,n),i||FB(a,e,n,s.state))),t&&r===null)throw Error(U(528,""));return s}if(t&&r!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Mc(n),n=fl(a).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function ql(e){return'href="'+fr(e)+'"'}function Pd(e){return'link[rel="stylesheet"]['+e+"]"}function TD(e){return it({},e,{"data-precedence":e.precedence,precedence:null})}function FB(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),tn(t,"link",n),Vt(t),e.head.appendChild(t))}function Mc(e){return'[src="'+fr(e)+'"]'}function Md(e){return"script[async]"+e}function F2(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+fr(n.href)+'"]');if(r)return t.instance=r,Vt(r),r;var a=it({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Vt(r),tn(r,"style",a),sp(r,n.precedence,e),t.instance=r;case"stylesheet":a=ql(n.href);var i=e.querySelector(Pd(a));if(i)return t.state.loading|=4,t.instance=i,Vt(i),i;r=TD(n),(a=vr.get(a))&&JS(r,a),i=(e.ownerDocument||e).createElement("link"),Vt(i);var s=i;return s._p=new Promise(function(o,l){s.onload=o,s.onerror=l}),tn(i,"link",r),t.state.loading|=4,sp(i,n.precedence,e),t.instance=i;case"script":return i=Mc(n.src),(a=e.querySelector(Md(i)))?(t.instance=a,Vt(a),a):(r=n,(a=vr.get(i))&&(r=it({},n),ew(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),Vt(a),tn(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,sp(r,n.precedence,e));return t.instance}function sp(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,s=0;s title"):null)}function VB(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ND(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function HB(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=ql(r.href),i=t.querySelector(Pd(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Gp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Vt(i);return}i=t.ownerDocument||t,r=TD(r),(a=vr.get(a))&&JS(r,a),i=i.createElement("link"),Vt(i);var s=i;s._p=new Promise(function(o,l){s.onload=o,s.onerror=l}),tn(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Gp.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Dv=0;function qB(e,t){return e.stylesheets&&e.count===0&&lp(e,e.stylesheets),0Dv?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function Gp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yp=null;function lp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yp=new Map,t.forEach(KB,e),Yp=null,Gp.call(e))}function KB(e,t){if(!(t.state.loading&4)){var n=Yp.get(e);if(n)var r=n.get(null);else{n=new Map,Yp.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kD)}catch(e){console.error(e)}}kD(),HP.exports=Sy;var e8=HP.exports;const t8=Ie(e8);var Rd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Rs,Si,jl,OP,n8=(OP=class extends Rd{constructor(){super();ce(this,Rs);ce(this,Si);ce(this,jl);ee(this,jl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,Si)||this.setEventListener(R(this,jl))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Si))==null||t.call(this),ee(this,Si,void 0))}setEventListener(t){var n;ee(this,jl,t),(n=R(this,Si))==null||n.call(this),ee(this,Si,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){R(this,Rs)!==t&&(ee(this,Rs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof R(this,Rs)=="boolean"?R(this,Rs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Rs=new WeakMap,Si=new WeakMap,jl=new WeakMap,OP),iw=new n8,r8={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},wi,rS,EP,a8=(EP=class{constructor(){ce(this,wi,r8);ce(this,rS,!1)}setTimeoutProvider(e){ee(this,wi,e)}setTimeout(e,t){return R(this,wi).setTimeout(e,t)}clearTimeout(e){R(this,wi).clearTimeout(e)}setInterval(e,t){return R(this,wi).setInterval(e,t)}clearInterval(e){R(this,wi).clearInterval(e)}},wi=new WeakMap,rS=new WeakMap,EP),As=new a8;function i8(e){setTimeout(e,0)}var s8=typeof window>"u"||"Deno"in globalThis;function En(){}function o8(e,t){return typeof e=="function"?e(t):e}function z0(e){return typeof e=="number"&&e>=0&&e!==1/0}function LD(e,t){return Math.max(e+(t||0)-Date.now(),0)}function qi(e,t){return typeof e=="function"?e(t):e}function In(e,t){return typeof e=="function"?e(t):e}function Q2(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:s,stale:o}=e;if(s){if(r){if(t.queryHash!==sw(s,t.options))return!1}else if(!Af(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function Z2(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(jf(t.options.mutationKey)!==jf(i))return!1}else if(!Af(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function sw(e,t){return((t==null?void 0:t.queryKeyHashFn)||jf)(e)}function jf(e){return JSON.stringify(e,(t,n)=>B0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Af(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Af(e[n],t[n])):!1}var l8=Object.prototype.hasOwnProperty;function zD(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=J2(e)&&J2(t);if(!r&&!(B0(e)&&B0(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),o=s.length,l=r?new Array(o):{};let c=0;for(let f=0;f{As.setTimeout(t,e)})}function U0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?zD(e,t):t}function u8(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function f8(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ow=Symbol();function ID(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ow?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function BD(e,t){return typeof e=="function"?e(...t):!!e}function d8(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var Of=(()=>{let e=()=>s8;return{isServer(){return e()},setIsServer(t){e=t}}})();function F0(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var h8=i8;function p8(){let e=[],t=0,n=o=>{o()},r=o=>{o()},a=h8;const i=o=>{t?e.push(o):a(()=>{n(o)})},s=()=>{const o=e;e=[],o.length&&a(()=>{r(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{a=o}}}var Wt=p8(),Al,ji,Ol,TP,m8=(TP=class extends Rd{constructor(){super();ce(this,Al,!0);ce(this,ji);ce(this,Ol);ee(this,Ol,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){R(this,ji)||this.setEventListener(R(this,Ol))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,ji))==null||t.call(this),ee(this,ji,void 0))}setEventListener(t){var n;ee(this,Ol,t),(n=R(this,ji))==null||n.call(this),ee(this,ji,t(this.setOnline.bind(this)))}setOnline(t){R(this,Al)!==t&&(ee(this,Al,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return R(this,Al)}},Al=new WeakMap,ji=new WeakMap,Ol=new WeakMap,TP),Qp=new m8;function y8(e){return Math.min(1e3*2**e,3e4)}function UD(e){return(e??"online")==="online"?Qp.isOnline():!0}var V0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function FD(e){let t=!1,n=0,r;const a=F0(),i=()=>a.status!=="pending",s=g=>{var b;if(!i()){const y=new V0(g);h(y),(b=e.onCancel)==null||b.call(e,y)}},o=()=>{t=!0},l=()=>{t=!1},c=()=>iw.isFocused()&&(e.networkMode==="always"||Qp.isOnline())&&e.canRun(),f=()=>UD(e.networkMode)&&e.canRun(),d=g=>{i()||(r==null||r(),a.resolve(g))},h=g=>{i()||(r==null||r(),a.reject(g))},p=()=>new Promise(g=>{var b;r=y=>{(i()||c())&&g(y)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;r=void 0,i()||(g=e.onContinue)==null||g.call(e)}),m=()=>{if(i())return;let g;const b=n===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(d).catch(y=>{var j;if(i())return;const v=e.retry??(Of.isServer()?0:3),x=e.retryDelay??y8,w=typeof x=="function"?x(n,y):x,S=v===!0||typeof v=="number"&&nc()?void 0:p()).then(()=>{t?h(y):m()})})};return{promise:a,status:()=>a.status,cancel:s,continue:()=>(r==null||r(),a),cancelRetry:o,continueRetry:l,canStart:f,start:()=>(f()?m():p().then(m),a)}}var Ds,NP,VD=(NP=class{constructor(){ce(this,Ds)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),z0(this.gcTime)&&ee(this,Ds,As.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Of.isServer()?1/0:5*60*1e3))}clearGcTimeout(){R(this,Ds)!==void 0&&(As.clearTimeout(R(this,Ds)),ee(this,Ds,void 0))}},Ds=new WeakMap,NP);function g8(e){return{onFetch:(t,n)=>{var f,d,h,p,m;const r=t.options,a=(h=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((m=t.state.data)==null?void 0:m.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const b=x=>{d8(x,()=>t.signal,()=>g=!0)},y=ID(t.options,t.fetchOptions),v=async(x,w,S)=>{if(g)return Promise.reject(t.signal.reason);if(w==null&&x.pages.length)return Promise.resolve(x);const O=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:w,direction:S?"backward":"forward",meta:t.options.meta};return b(M),M})(),E=await y(O),{maxPages:T}=t.options,N=S?f8:u8;return{pages:N(x.pages,E,T),pageParams:N(x.pageParams,w,T)}};if(a&&i.length){const x=a==="backward",w=x?v8:tO,S={pages:i,pageParams:s},j=w(r,S);o=await v(S,j,x)}else{const x=e??i.length;do{const w=l===0?s[0]??r.initialPageParam:tO(r,o);if(l>0&&w==null)break;o=await v(o,w),l++}while(l{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function tO(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function v8(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var El,$s,Tl,sr,ks,It,yd,Ls,zn,HD,ja,CP,b8=(CP=class extends VD{constructor(t){super();ce(this,zn);ce(this,El);ce(this,$s);ce(this,Tl);ce(this,sr);ce(this,ks);ce(this,It);ce(this,yd);ce(this,Ls);ee(this,Ls,!1),ee(this,yd,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,ks,t.client),ee(this,sr,R(this,ks).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,$s,rO(this.options)),this.state=t.state??R(this,$s),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return R(this,El)}get promise(){var t;return(t=R(this,It))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,yd),...t},t!=null&&t._type&&ee(this,El,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=rO(this.options);n.data!==void 0&&(this.setState(nO(n.data,n.dataUpdatedAt)),ee(this,$s,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,sr).remove(this)}setData(t,n){const r=U0(this.state.data,t,this.options);return Oe(this,zn,ja).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Oe(this,zn,ja).call(this,{type:"setState",state:t})}cancel(t){var r,a;const n=(r=R(this,It))==null?void 0:r.promise;return(a=R(this,It))==null||a.cancel(t),n?n.then(En).catch(En):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return R(this,$s)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>In(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ow||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>qi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!LD(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,It))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,It))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,sr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(R(this,It)&&(R(this,Ls)||Oe(this,zn,HD).call(this)?R(this,It).cancel({revert:!0}):R(this,It).cancelRetry()),this.scheduleGc()),R(this,sr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Oe(this,zn,ja).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,d,h,p,m,g,b,y,v,x;if(this.state.fetchStatus!=="idle"&&((c=R(this,It))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,It))return R(this,It).continueRetry(),R(this,It).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(S=>S.options.queryFn);w&&this.setOptions(w.options)}const r=new AbortController,a=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(ee(this,Ls,!0),r.signal)})},i=()=>{const w=ID(this.options,n),j=(()=>{const O={client:R(this,ks),queryKey:this.queryKey,meta:this.meta};return a(O),O})();return ee(this,Ls,!1),this.options.persister?this.options.persister(w,j,this):w(j)},o=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:R(this,ks),state:this.state,fetchFn:i};return a(w),w})(),l=R(this,El)==="infinite"?g8(this.options.pages):this.options.behavior;l==null||l.onFetch(o,this),ee(this,Tl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Oe(this,zn,ja).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),ee(this,It,FD({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:w=>{w instanceof V0&&w.revert&&this.setState({...R(this,Tl),fetchStatus:"idle"}),r.abort()},onFail:(w,S)=>{Oe(this,zn,ja).call(this,{type:"failed",failureCount:w,error:S})},onPause:()=>{Oe(this,zn,ja).call(this,{type:"pause"})},onContinue:()=>{Oe(this,zn,ja).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const w=await R(this,It).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(p=(h=R(this,sr).config).onSuccess)==null||p.call(h,w,this),(g=(m=R(this,sr).config).onSettled)==null||g.call(m,w,this.state.error,this),w}catch(w){if(w instanceof V0){if(w.silent)return R(this,It).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Oe(this,zn,ja).call(this,{type:"error",error:w}),(y=(b=R(this,sr).config).onError)==null||y.call(b,w,this),(x=(v=R(this,sr).config).onSettled)==null||x.call(v,this.state.data,w,this),w}finally{this.scheduleGc()}}},El=new WeakMap,$s=new WeakMap,Tl=new WeakMap,sr=new WeakMap,ks=new WeakMap,It=new WeakMap,yd=new WeakMap,Ls=new WeakMap,zn=new WeakSet,HD=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ja=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...qD(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...nO(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,Tl,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Wt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,sr).notify({query:this,type:"updated",action:t})})},CP);function qD(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:UD(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function rO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var jn,Ne,gd,un,zs,Nl,Ea,Ai,vd,Cl,_l,Is,Bs,Oi,Pl,ze,Tu,H0,q0,K0,G0,Y0,X0,W0,KD,_P,x8=(_P=class extends Rd{constructor(t,n){super();ce(this,ze);ce(this,jn);ce(this,Ne);ce(this,gd);ce(this,un);ce(this,zs);ce(this,Nl);ce(this,Ea);ce(this,Ai);ce(this,vd);ce(this,Cl);ce(this,_l);ce(this,Is);ce(this,Bs);ce(this,Oi);ce(this,Pl,new Set);this.options=n,ee(this,jn,t),ee(this,Ai,null),ee(this,Ea,F0()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Ne).addObserver(this),aO(R(this,Ne),this.options)?Oe(this,ze,Tu).call(this):this.updateResult(),Oe(this,ze,G0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Q0(R(this,Ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Q0(R(this,Ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Oe(this,ze,Y0).call(this),Oe(this,ze,X0).call(this),R(this,Ne).removeObserver(this)}setOptions(t){const n=this.options,r=R(this,Ne);if(this.options=R(this,jn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof In(this.options.enabled,R(this,Ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Oe(this,ze,W0).call(this),R(this,Ne).setOptions(this.options),n._defaulted&&!I0(this.options,n)&&R(this,jn).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Ne),observer:this});const a=this.hasListeners();a&&iO(R(this,Ne),r,this.options,n)&&Oe(this,ze,Tu).call(this),this.updateResult(),a&&(R(this,Ne)!==r||In(this.options.enabled,R(this,Ne))!==In(n.enabled,R(this,Ne))||qi(this.options.staleTime,R(this,Ne))!==qi(n.staleTime,R(this,Ne)))&&Oe(this,ze,H0).call(this);const i=Oe(this,ze,q0).call(this);a&&(R(this,Ne)!==r||In(this.options.enabled,R(this,Ne))!==In(n.enabled,R(this,Ne))||i!==R(this,Oi))&&Oe(this,ze,K0).call(this,i)}getOptimisticResult(t){const n=R(this,jn).getQueryCache().build(R(this,jn),t),r=this.createResult(n,t);return w8(this,r)&&(ee(this,un,r),ee(this,Nl,this.options),ee(this,zs,R(this,Ne).state)),r}getCurrentResult(){return R(this,un)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,Ea).status==="pending"&&R(this,Ea).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){R(this,Pl).add(t)}getCurrentQuery(){return R(this,Ne)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=R(this,jn).defaultQueryOptions(t),r=R(this,jn).getQueryCache().build(R(this,jn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Oe(this,ze,Tu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,un)))}createResult(t,n){var T;const r=R(this,Ne),a=this.options,i=R(this,un),s=R(this,zs),o=R(this,Nl),c=t!==r?t.state:R(this,gd),{state:f}=t;let d={...f},h=!1,p;if(n._optimisticResults){const N=this.hasListeners(),M=!N&&aO(t,n),C=N&&iO(t,r,n,a);(M||C)&&(d={...d,...qD(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:b}=d;p=d.data;let y=!1;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let N;i!=null&&i.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(N=i.data,y=!0):N=typeof n.placeholderData=="function"?n.placeholderData((T=R(this,_l))==null?void 0:T.state.data,R(this,_l)):n.placeholderData,N!==void 0&&(b="success",p=U0(i==null?void 0:i.data,N,n),h=!0)}if(n.select&&p!==void 0&&!y)if(i&&p===(s==null?void 0:s.data)&&n.select===R(this,vd))p=R(this,Cl);else try{ee(this,vd,n.select),p=n.select(p),p=U0(i==null?void 0:i.data,p,n),ee(this,Cl,p),ee(this,Ai,null)}catch(N){ee(this,Ai,N)}R(this,Ai)&&(m=R(this,Ai),p=R(this,Cl),g=Date.now(),b="error");const v=d.fetchStatus==="fetching",x=b==="pending",w=b==="error",S=x&&v,j=p!==void 0,E={status:b,fetchStatus:d.fetchStatus,isPending:x,isSuccess:b==="success",isError:w,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:w&&!j,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&j,isStale:lw(t,n),refetch:this.refetch,promise:R(this,Ea),isEnabled:In(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const N=E.data!==void 0,M=E.status==="error"&&!N,C=$=>{M?$.reject(E.error):N&&$.resolve(E.data)},L=()=>{const $=ee(this,Ea,E.promise=F0());C($)},D=R(this,Ea);switch(D.status){case"pending":t.queryHash===r.queryHash&&C(D);break;case"fulfilled":(M||E.data!==D.value)&&L();break;case"rejected":(!M||E.error!==D.reason)&&L();break}}return E}updateResult(){const t=R(this,un),n=this.createResult(R(this,Ne),this.options);if(ee(this,zs,R(this,Ne).state),ee(this,Nl,this.options),R(this,zs).data!==void 0&&ee(this,_l,R(this,Ne)),I0(n,t))return;ee(this,un,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!R(this,Pl).size)return!0;const s=new Set(i??R(this,Pl));return this.options.throwOnError&&s.add("error"),Object.keys(R(this,un)).some(o=>{const l=o;return R(this,un)[l]!==t[l]&&s.has(l)})};Oe(this,ze,KD).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Oe(this,ze,G0).call(this)}},jn=new WeakMap,Ne=new WeakMap,gd=new WeakMap,un=new WeakMap,zs=new WeakMap,Nl=new WeakMap,Ea=new WeakMap,Ai=new WeakMap,vd=new WeakMap,Cl=new WeakMap,_l=new WeakMap,Is=new WeakMap,Bs=new WeakMap,Oi=new WeakMap,Pl=new WeakMap,ze=new WeakSet,Tu=function(t){Oe(this,ze,W0).call(this);let n=R(this,Ne).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(En)),n},H0=function(){Oe(this,ze,Y0).call(this);const t=qi(this.options.staleTime,R(this,Ne));if(Of.isServer()||R(this,un).isStale||!z0(t))return;const r=LD(R(this,un).dataUpdatedAt,t)+1;ee(this,Is,As.setTimeout(()=>{R(this,un).isStale||this.updateResult()},r))},q0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Ne)):this.options.refetchInterval)??!1},K0=function(t){Oe(this,ze,X0).call(this),ee(this,Oi,t),!(Of.isServer()||In(this.options.enabled,R(this,Ne))===!1||!z0(R(this,Oi))||R(this,Oi)===0)&&ee(this,Bs,As.setInterval(()=>{(this.options.refetchIntervalInBackground||iw.isFocused())&&Oe(this,ze,Tu).call(this)},R(this,Oi)))},G0=function(){Oe(this,ze,H0).call(this),Oe(this,ze,K0).call(this,Oe(this,ze,q0).call(this))},Y0=function(){R(this,Is)!==void 0&&(As.clearTimeout(R(this,Is)),ee(this,Is,void 0))},X0=function(){R(this,Bs)!==void 0&&(As.clearInterval(R(this,Bs)),ee(this,Bs,void 0))},W0=function(){const t=R(this,jn).getQueryCache().build(R(this,jn),this.options);if(t===R(this,Ne))return;const n=R(this,Ne);ee(this,Ne,t),ee(this,gd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},KD=function(t){Wt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(R(this,un))}),R(this,jn).getQueryCache().notify({query:R(this,Ne),type:"observerResultsUpdated"})})},_P);function S8(e,t){return In(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&In(t.retryOnMount,e)===!1)}function aO(e,t){return S8(e,t)||e.state.data!==void 0&&Q0(e,t,t.refetchOnMount)}function Q0(e,t,n){if(In(t.enabled,e)!==!1&&qi(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&lw(e,t)}return!1}function iO(e,t,n,r){return(e!==t||In(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&lw(e,n)}function lw(e,t){return In(t.enabled,e)!==!1&&e.isStaleByTime(qi(t.staleTime,e))}function w8(e,t){return!I0(e.getCurrentResult(),t)}var bd,Hr,an,Us,qr,ci,PP,j8=(PP=class extends VD{constructor(t){super();ce(this,qr);ce(this,bd);ce(this,Hr);ce(this,an);ce(this,Us);ee(this,bd,t.client),this.mutationId=t.mutationId,ee(this,an,t.mutationCache),ee(this,Hr,[]),this.state=t.state||A8(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,Hr).includes(t)||(R(this,Hr).push(t),this.clearGcTimeout(),R(this,an).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,Hr,R(this,Hr).filter(n=>n!==t)),this.scheduleGc(),R(this,an).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,Hr).length||(this.state.status==="pending"?this.scheduleGc():R(this,an).remove(this))}continue(){var t;return((t=R(this,Us))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,l,c,f,d,h,p,m,g,b,y,v,x,w,S,j,O;const n=()=>{Oe(this,qr,ci).call(this,{type:"continue"})},r={client:R(this,bd),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Us,FD({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(E,T)=>{Oe(this,qr,ci).call(this,{type:"failed",failureCount:E,error:T})},onPause:()=>{Oe(this,qr,ci).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,an).canRun(this)}));const a=this.state.status==="pending",i=!R(this,Us).canStart();try{if(a)n();else{Oe(this,qr,ci).call(this,{type:"pending",variables:t,isPaused:i}),R(this,an).config.onMutate&&await R(this,an).config.onMutate(t,this,r);const T=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,r));T!==this.state.context&&Oe(this,qr,ci).call(this,{type:"pending",context:T,variables:t,isPaused:i})}const E=await R(this,Us).start();return await((c=(l=R(this,an).config).onSuccess)==null?void 0:c.call(l,E,t,this.state.context,this,r)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,E,t,this.state.context,r)),await((p=(h=R(this,an).config).onSettled)==null?void 0:p.call(h,E,null,this.state.variables,this.state.context,this,r)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,E,null,t,this.state.context,r)),Oe(this,qr,ci).call(this,{type:"success",data:E}),E}catch(E){try{await((y=(b=R(this,an).config).onError)==null?void 0:y.call(b,E,t,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((x=(v=this.options).onError)==null?void 0:x.call(v,E,t,this.state.context,r))}catch(T){Promise.reject(T)}try{await((S=(w=R(this,an).config).onSettled)==null?void 0:S.call(w,void 0,E,this.state.variables,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((O=(j=this.options).onSettled)==null?void 0:O.call(j,void 0,E,t,this.state.context,r))}catch(T){Promise.reject(T)}throw Oe(this,qr,ci).call(this,{type:"error",error:E}),E}finally{R(this,an).runNext(this)}}},bd=new WeakMap,Hr=new WeakMap,an=new WeakMap,Us=new WeakMap,qr=new WeakSet,ci=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Wt.batch(()=>{R(this,Hr).forEach(r=>{r.onMutationUpdate(t)}),R(this,an).notify({mutation:this,type:"updated",action:t})})},PP);function A8(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ta,_r,xd,MP,O8=(MP=class extends Rd{constructor(t={}){super();ce(this,Ta);ce(this,_r);ce(this,xd);this.config=t,ee(this,Ta,new Set),ee(this,_r,new Map),ee(this,xd,0)}build(t,n,r){const a=new j8({client:t,mutationCache:this,mutationId:++rh(this,xd)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){R(this,Ta).add(t);const n=Sh(t);if(typeof n=="string"){const r=R(this,_r).get(n);r?r.push(t):R(this,_r).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Ta).delete(t)){const n=Sh(t);if(typeof n=="string"){const r=R(this,_r).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&R(this,_r).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Sh(t);if(typeof n=="string"){const r=R(this,_r).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=Sh(t);if(typeof n=="string"){const a=(r=R(this,_r).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wt.batch(()=>{R(this,Ta).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Ta).clear(),R(this,_r).clear()})}getAll(){return Array.from(R(this,Ta))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Z2(n,r))}findAll(t={}){return this.getAll().filter(n=>Z2(t,n))}notify(t){Wt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Wt.batch(()=>Promise.all(t.map(n=>n.continue().catch(En))))}},Ta=new WeakMap,_r=new WeakMap,xd=new WeakMap,MP);function Sh(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Kr,RP,E8=(RP=class extends Rd{constructor(t={}){super();ce(this,Kr);this.config=t,ee(this,Kr,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??sw(a,n);let s=this.get(i);return s||(s=new b8({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){R(this,Kr).has(t.queryHash)||(R(this,Kr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=R(this,Kr).get(t.queryHash);n&&(t.destroy(),n===t&&R(this,Kr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,Kr).get(t)}getAll(){return[...R(this,Kr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Q2(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Q2(t,r)):n}notify(t){Wt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kr=new WeakMap,RP),mt,Ei,Ti,Ml,Rl,Ni,Dl,$l,DP,T8=(DP=class{constructor(e={}){ce(this,mt);ce(this,Ei);ce(this,Ti);ce(this,Ml);ce(this,Rl);ce(this,Ni);ce(this,Dl);ce(this,$l);ee(this,mt,e.queryCache||new E8),ee(this,Ei,e.mutationCache||new O8),ee(this,Ti,e.defaultOptions||{}),ee(this,Ml,new Map),ee(this,Rl,new Map),ee(this,Ni,0)}mount(){rh(this,Ni)._++,R(this,Ni)===1&&(ee(this,Dl,iw.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,mt).onFocus())})),ee(this,$l,Qp.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,mt).onOnline())})))}unmount(){var e,t;rh(this,Ni)._--,R(this,Ni)===0&&((e=R(this,Dl))==null||e.call(this),ee(this,Dl,void 0),(t=R(this,$l))==null||t.call(this),ee(this,$l,void 0))}isFetching(e){return R(this,mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,Ei).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,mt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=R(this,mt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(qi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return R(this,mt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=R(this,mt).get(r.queryHash),i=a==null?void 0:a.state.data,s=o8(t,i);if(s!==void 0)return R(this,mt).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Wt.batch(()=>R(this,mt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,mt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=R(this,mt);Wt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=R(this,mt);return Wt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Wt.batch(()=>R(this,mt).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(En).catch(En)}invalidateQueries(e,t={}){return Wt.batch(()=>(R(this,mt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Wt.batch(()=>R(this,mt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(En)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(En)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=R(this,mt).build(this,t);return n.isStaleByTime(qi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(En).catch(En)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(En).catch(En)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Qp.isOnline()?R(this,Ei).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,mt)}getMutationCache(){return R(this,Ei)}getDefaultOptions(){return R(this,Ti)}setDefaultOptions(e){ee(this,Ti,e)}setQueryDefaults(e,t){R(this,Ml).set(jf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,Ml).values()],n={};return t.forEach(r=>{Af(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){R(this,Rl).set(jf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,Rl).values()],n={};return t.forEach(r=>{Af(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,Ti).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sw(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ow&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,Ti).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,mt).clear(),R(this,Ei).clear()}},mt=new WeakMap,Ei=new WeakMap,Ti=new WeakMap,Ml=new WeakMap,Rl=new WeakMap,Ni=new WeakMap,Dl=new WeakMap,$l=new WeakMap,DP),GD=A.createContext(void 0),nn=e=>{const t=A.useContext(GD);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},N8=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(GD.Provider,{value:e,children:t})),YD=A.createContext(!1),C8=()=>A.useContext(YD);YD.Provider;function _8(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var P8=A.createContext(_8()),M8=()=>A.useContext(P8),R8=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?BD(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},D8=e=>{A.useEffect(()=>{e.clearReset()},[e])},$8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||BD(n,[e.error,r])),k8=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},L8=(e,t)=>e.isLoading&&e.isFetching&&!t,z8=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,sO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function I8(e,t,n){var p,m,g,b;const r=C8(),a=M8(),i=nn(),s=i.defaultQueryOptions(e);(m=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||m.call(p,s);const o=i.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=r?"isRestoring":l?"optimistic":void 0,k8(s),R8(s,a,o),D8(a);const c=!i.getQueryCache().get(s.queryHash),[f]=A.useState(()=>new t(i,s)),d=f.getOptimisticResult(s),h=!r&&l;if(A.useSyncExternalStore(A.useCallback(y=>{const v=h?f.subscribe(Wt.batchCalls(y)):En;return f.updateResult(),v},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),A.useEffect(()=>{f.setOptions(s)},[s,f]),z8(s,d))throw sO(s,f,a);if($8({result:d,errorResetBoundary:a,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((b=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||b.call(g,s,d),s.experimental_prefetchInRender&&!Of.isServer()&&L8(d,r)){const y=c?sO(s,f,a):o==null?void 0:o.promise;y==null||y.catch(En).finally(()=>{f.updateResult()})}return s.notifyOnChangeProps?d:f.trackResult(d)}function se(e,t){return I8(e,x8)}/** + * react-router v7.17.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */var oO="popstate";function lO(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function B8(e={}){function t(r,a){var c;let i=(c=a.state)==null?void 0:c.masked,{pathname:s,search:o,hash:l}=i||r.location;return Z0("",{pathname:s,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Ef(a)}return F8(t,n,null,e)}function ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function br(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function U8(){return Math.random().toString(36).substring(2,10)}function cO(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Z0(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Rc(t):t,state:n,key:t&&t.key||r||U8(),mask:a}}function Ef({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Rc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function F8(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,s=a.history,o="POP",l=null,c=f();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function f(){return(s.state||{idx:null}).idx}function d(){o="POP";let b=f(),y=b==null?null:b-c;c=b,l&&l({action:o,location:g.location,delta:y})}function h(b,y){o="PUSH";let v=lO(b)?b:Z0(g.location,b,y);c=f()+1;let x=cO(v,c),w=g.createHref(v.mask||v);try{s.pushState(x,"",w)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;a.location.assign(w)}i&&l&&l({action:o,location:g.location,delta:1})}function p(b,y){o="REPLACE";let v=lO(b)?b:Z0(g.location,b,y);c=f();let x=cO(v,c),w=g.createHref(v.mask||v);s.replaceState(x,"",w),i&&l&&l({action:o,location:g.location,delta:0})}function m(b){return V8(a,b)}let g={get action(){return o},get location(){return e(a,s)},listen(b){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(oO,d),l=b,()=>{a.removeEventListener(oO,d),l=null}},createHref(b){return t(a,b)},createURL:m,encodeLocation(b){let y=m(b);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(b){return s.go(b)}};return g}function V8(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),ut(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ef(t);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function XD(e,t,n="/"){return H8(e,t,n,!1)}function H8(e,t,n,r,a){let i=typeof t=="string"?Rc(t):t,s=Xa(i.pathname||"/",n);if(s==null)return null;let o=q8(e),l=null,c=rU(s);for(let f=0;l==null&&f{let f={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&l)return;ut(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=$r([r,f.relativePath]),h=n.concat(f);s.children&&s.children.length>0&&(ut(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),WD(s.children,t,h,d,l)),!(s.path==null&&!s.index)&&t.push({path:d,score:J8(d,s.index),routesMeta:h})};return e.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let c of QD(s.path))i(s,o,!0,c)}),t}function QD(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let s=QD(r.join("/")),o=[];return o.push(...s.map(l=>l===""?i:[i,l].join("/"))),a&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function K8(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:eU(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var G8=/^:[\w-]+$/,Y8=3,X8=2,W8=1,Q8=10,Z8=-2,uO=e=>e==="*";function J8(e,t){let n=e.split("/"),r=n.length;return n.some(uO)&&(r+=Z8),t&&(r+=X8),n.filter(a=>!uO(a)).reduce((a,i)=>a+(G8.test(i)?Y8:i===""?W8:Q8),r)}function eU(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function tU(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",s=[];for(let o=0;o{if(f==="*"){let m=o[h]||"";s=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const p=o[h];return d&&!p?c[f]=void 0:c[f]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:e}}function nU(e,t=!1,n=!0){br(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l,c,f)=>{if(r.push({paramName:o,isOptional:l!=null}),l){let d=f.charAt(c+s.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function rU(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return br(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Xa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var aU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function iU(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Rc(e):e,i;return n?(n=ZD(n),n.startsWith("/")?i=fO(n.substring(1),"/"):i=fO(n,t)):i=t,{pathname:i,search:lU(r),hash:cU(a)}}function fO(e,t){let n=Jp(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function $v(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function sU(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function cw(e){let t=sU(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Iy(e,t,n,r=!1){let a;typeof e=="string"?a=Rc(e):(a={...e},ut(!a.pathname||!a.pathname.includes("?"),$v("?","pathname","search",a)),ut(!a.pathname||!a.pathname.includes("#"),$v("#","pathname","hash",a)),ut(!a.search||!a.search.includes("#"),$v("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,o;if(s==null)o=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;a.pathname=h.join("/")}o=d>=0?t[d]:"/"}let l=iU(a,o),c=s&&s!=="/"&&s.endsWith("/"),f=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}var ZD=e=>e.replace(/\/\/+/g,"/"),$r=e=>ZD(e.join("/")),Jp=e=>e.replace(/\/+$/,""),oU=e=>Jp(e).replace(/^\/*/,"/"),lU=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cU=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,uU=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function fU(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function dU(e){let t=e.map(n=>n.route.path).filter(Boolean);return $r(t)||"/"}var JD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function e$(e,t){let n=e;if(typeof n!="string"||!aU.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(JD)try{let i=new URL(window.location.href),s=n.startsWith("//")?new URL(i.protocol+n):new URL(n),o=Xa(s.pathname,t);s.origin===i.origin&&o!=null?n=o+s.search+s.hash:a=!0}catch{br(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var t$=["POST","PUT","PATCH","DELETE"];new Set(t$);var hU=["GET",...t$];new Set(hU);var Dc=A.createContext(null);Dc.displayName="DataRouter";var By=A.createContext(null);By.displayName="DataRouterState";var n$=A.createContext(!1);function pU(){return A.useContext(n$)}var r$=A.createContext({isTransitioning:!1});r$.displayName="ViewTransition";var mU=A.createContext(new Map);mU.displayName="Fetchers";var yU=A.createContext(null);yU.displayName="Await";var er=A.createContext(null);er.displayName="Navigation";var Dd=A.createContext(null);Dd.displayName="Location";var wr=A.createContext({outlet:null,matches:[],isDataRoute:!1});wr.displayName="Route";var uw=A.createContext(null);uw.displayName="RouteError";var a$="REACT_ROUTER_ERROR",gU="REDIRECT",vU="ROUTE_ERROR_RESPONSE";function bU(e){if(e.startsWith(`${a$}:${gU}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function xU(e){if(e.startsWith(`${a$}:${vU}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new uU(t.status,t.statusText,t.data)}catch{}}function SU(e,{relative:t}={}){ut($c(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=A.useContext(er),{hash:a,pathname:i,search:s}=$d(e,{relative:t}),o=i;return n!=="/"&&(o=i==="/"?n:$r([n,i])),r.createHref({pathname:o,search:s,hash:a})}function $c(){return A.useContext(Dd)!=null}function jr(){return ut($c(),"useLocation() may be used only in the context of a component."),A.useContext(Dd).location}var i$="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function s$(e){A.useContext(er).static||A.useLayoutEffect(e)}function Kt(){let{isDataRoute:e}=A.useContext(wr);return e?kU():wU()}function wU(){ut($c(),"useNavigate() may be used only in the context of a component.");let e=A.useContext(Dc),{basename:t,navigator:n}=A.useContext(er),{matches:r}=A.useContext(wr),{pathname:a}=jr(),i=JSON.stringify(cw(r)),s=A.useRef(!1);return s$(()=>{s.current=!0}),A.useCallback((l,c={})=>{if(br(s.current,i$),!s.current)return;if(typeof l=="number"){n.go(l);return}let f=Iy(l,JSON.parse(i),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:$r([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,i,a,e])}var jU=A.createContext(null);function AU(e){let t=A.useContext(wr).outlet;return A.useMemo(()=>t&&A.createElement(jU.Provider,{value:e},t),[t,e])}function o$(){let{matches:e}=A.useContext(wr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function $d(e,{relative:t}={}){let{matches:n}=A.useContext(wr),{pathname:r}=jr(),a=JSON.stringify(cw(n));return A.useMemo(()=>Iy(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function OU(e,t){return l$(e,t)}function l$(e,t,n){var b;ut($c(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=A.useContext(er),{matches:a}=A.useContext(wr),i=a[a.length-1],s=i?i.params:{},o=i?i.pathname:"/",l=i?i.pathnameBase:"/",c=i&&i.route;{let y=c&&c.path||"";u$(o,!c||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${o}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let f=jr(),d;if(t){let y=typeof t=="string"?Rc(t):t;ut(l==="/"||((b=y.pathname)==null?void 0:b.startsWith(l)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=f;let h=d.pathname||"/",p=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let m=n&&n.state.matches.length?n.state.matches.map(y=>Object.assign(y,{route:n.manifest[y.route.id]||y.route})):XD(e,{pathname:p});br(c||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),br(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let g=_U(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:$r([l,r.encodeLocation?r.encodeLocation(y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:$r([l,r.encodeLocation?r.encodeLocation(y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),a,n);return t&&g?A.createElement(Dd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},g):g}function EU(){let e=$U(),t=fU(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:i},"ErrorBoundary")," or"," ",A.createElement("code",{style:i},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),n?A.createElement("pre",{style:a},n):null,s)}var TU=A.createElement(EU,null),c$=class extends A.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=xU(e.digest);n&&(e=n)}let t=e!==void 0?A.createElement(wr.Provider,{value:this.props.routeContext},A.createElement(uw.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?A.createElement(NU,{error:e},t):t}};c$.contextType=n$;var kv=new WeakMap;function NU({children:e,error:t}){let{basename:n}=A.useContext(er);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=bU(t.digest);if(r){let a=kv.get(t);if(a)throw a;let i=e$(r.location,n);if(JD&&!kv.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw kv.set(t,s),s}return A.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function CU({routeContext:e,match:t,children:n}){let r=A.useContext(Dc);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(wr.Provider,{value:e},n)}function _U(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let f=a.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);ut(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let s=!1,o=-1;if(n&&r){s=r.renderFallback;for(let f=0;f=0?a=a.slice(0,o+1):a=[a[0]];break}}}}let l=n==null?void 0:n.onError,c=r&&l?(f,d)=>{var h,p;l(f,{location:r.location,params:((p=(h=r.matches)==null?void 0:h[0])==null?void 0:p.params)??{},pattern:dU(r.matches),errorInfo:d})}:void 0;return a.reduceRight((f,d,h)=>{let p,m=!1,g=null,b=null;r&&(p=i&&d.route.id?i[d.route.id]:void 0,g=d.route.errorElement||TU,s&&(o<0&&h===0?(u$("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,b=null):o===h&&(m=!0,b=d.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,h+1)),v=()=>{let x;return p?x=g:m?x=b:d.route.Component?x=A.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=f,A.createElement(CU,{match:d,routeContext:{outlet:f,matches:y,isDataRoute:r!=null},children:x})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?A.createElement(c$,{location:r.location,revalidation:r.revalidation,component:g,error:p,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:c}):v()},null)}function fw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function PU(e){let t=A.useContext(Dc);return ut(t,fw(e)),t}function MU(e){let t=A.useContext(By);return ut(t,fw(e)),t}function RU(e){let t=A.useContext(wr);return ut(t,fw(e)),t}function dw(e){let t=RU(e),n=t.matches[t.matches.length-1];return ut(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function DU(){return dw("useRouteId")}function $U(){var r;let e=A.useContext(uw),t=MU("useRouteError"),n=dw("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function kU(){let{router:e}=PU("useNavigate"),t=dw("useNavigate"),n=A.useRef(!1);return s$(()=>{n.current=!0}),A.useCallback(async(a,i={})=>{br(n.current,i$),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var dO={};function u$(e,t,n){!t&&!dO[e]&&(dO[e]=!0,br(!1,n))}A.memo(LU);function LU({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:i}){return l$(e,void 0,{manifest:t,state:r,isStatic:a,onError:i})}function em({to:e,replace:t,state:n,relative:r}){ut($c()," may be used only in the context of a component.");let{static:a}=A.useContext(er);br(!a," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:i}=A.useContext(wr),{pathname:s}=jr(),o=Kt(),l=Iy(e,cw(i),s,r==="path"),c=JSON.stringify(l);return A.useEffect(()=>{o(JSON.parse(c),{replace:t,state:n,relative:r})},[o,c,r,t,n]),null}function f$(e){return AU(e.context)}function Se(e){ut(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function zU({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,useTransitions:s}){ut(!$c(),"You cannot render a inside another . You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=A.useMemo(()=>({basename:o,navigator:a,static:i,useTransitions:s,future:{}}),[o,a,i,s]);typeof n=="string"&&(n=Rc(n));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:p="default",mask:m}=n,g=A.useMemo(()=>{let b=Xa(c,o);return b==null?null:{location:{pathname:b,search:f,hash:d,state:h,key:p,mask:m},navigationType:r}},[o,c,f,d,h,p,r,m]);return br(g!=null,` is not able to match the URL "${c}${f}${d}" because it does not start with the basename, so the won't render anything.`),g==null?null:A.createElement(er.Provider,{value:l},A.createElement(Dd.Provider,{children:t,value:g}))}function IU({children:e,location:t}){return OU(J0(e),t)}function J0(e,t=[]){let n=[];return A.Children.forEach(e,(r,a)=>{if(!A.isValidElement(r))return;let i=[...t,a];if(r.type===A.Fragment){n.push.apply(n,J0(r.props.children,i));return}ut(r.type===Se,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),ut(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=J0(r.props.children,i)),n.push(s)}),n}var up="get",fp="application/x-www-form-urlencoded";function Uy(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function BU(e){return Uy(e)&&e.tagName.toLowerCase()==="button"}function UU(e){return Uy(e)&&e.tagName.toLowerCase()==="form"}function FU(e){return Uy(e)&&e.tagName.toLowerCase()==="input"}function VU(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HU(e,t){return e.button===0&&(!t||t==="_self")&&!VU(e)}function ex(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function qU(e,t){let n=ex(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var wh=null;function KU(){if(wh===null)try{new FormData(document.createElement("form"),0),wh=!1}catch{wh=!0}return wh}var GU=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lv(e){return e!=null&&!GU.has(e)?(br(!1,`"${e}" is not a valid \`encType\` for \`\`/\`\` and will default to "${fp}"`),null):e}function YU(e,t){let n,r,a,i,s;if(UU(e)){let o=e.getAttribute("action");r=o?Xa(o,t):null,n=e.getAttribute("method")||up,a=Lv(e.getAttribute("enctype"))||fp,i=new FormData(e)}else if(BU(e)||FU(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a or without a ');let l=e.getAttribute("formaction")||o.getAttribute("action");if(r=l?Xa(l,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||up,a=Lv(e.getAttribute("formenctype"))||Lv(o.getAttribute("enctype"))||fp,i=new FormData(o,e),!KU()){let{name:c,type:f,value:d}=e;if(f==="image"){let h=c?`${c}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else c&&i.append(c,d)}}else{if(Uy(e))throw new Error('Cannot submit element that is not , , or ');n=up,r=null,a=fp,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function hw(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function d$(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&Xa(a.pathname,t)==="/"?a.pathname=`${Jp(t)}/_root.${r}`:a.pathname=`${Jp(a.pathname)}.${r}`,a}async function XU(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function WU(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function QU(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await XU(i,n);return s.links?s.links():[]}return[]}));return t7(r.flat(1).filter(WU).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function hO(e,t,n,r,a,i){let s=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,o=(l,c)=>{var f;return n[c].pathname!==l.pathname||((f=n[c].route.path)==null?void 0:f.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,c)=>s(l,c)||o(l,c)):i==="data"?t.filter((l,c)=>{var d;let f=r.routes[l.route.id];if(!f||!f.hasLoader)return!1;if(s(l,c)||o(l,c))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function ZU(e,t,{includeHydrateFallback:n}={}){return JU(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function JU(e){return[...new Set(e)]}function e7(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function t7(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(e7(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function pw(){let e=A.useContext(Dc);return hw(e,"You must render this element inside a element"),e}function n7(){let e=A.useContext(By);return hw(e,"You must render this element inside a element"),e}var mw=A.createContext(void 0);mw.displayName="FrameworkContext";function yw(){let e=A.useContext(mw);return hw(e,"You must render this element inside a element"),e}function r7(e,t){let n=A.useContext(mw),[r,a]=A.useState(!1),[i,s]=A.useState(!1),{onFocus:o,onBlur:l,onMouseEnter:c,onMouseLeave:f,onTouchStart:d}=t,h=A.useRef(null);A.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let g=y=>{y.forEach(v=>{s(v.isIntersecting)})},b=new IntersectionObserver(g,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),A.useEffect(()=>{if(r){let g=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(g)}}},[r]);let p=()=>{a(!0)},m=()=>{a(!1),s(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:su(o,p),onBlur:su(l,m),onMouseEnter:su(c,p),onMouseLeave:su(f,m),onTouchStart:su(d,p)}]:[!1,h,{}]}function su(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function a7({page:e,...t}){let n=pU(),{router:r}=pw(),a=A.useMemo(()=>XD(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?A.createElement(s7,{page:e,matches:a,...t}):A.createElement(o7,{page:e,matches:a,...t}):null}function i7(e){let{manifest:t,routeModules:n}=yw(),[r,a]=A.useState([]);return A.useEffect(()=>{let i=!1;return QU(e,t,n).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,n]),r}function s7({page:e,matches:t,...n}){let r=jr(),{future:a}=yw(),{basename:i}=pw(),s=A.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let o=d$(e,i,a.v8_trailingSlashAwareDataRequests,"rsc"),l=!1,c=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?l=!0:c.push(f.route.id);return l&&c.length>0&&o.searchParams.set("_routes",c.join(",")),[o.pathname+o.search]},[i,a.v8_trailingSlashAwareDataRequests,e,r,t]);return A.createElement(A.Fragment,null,s.map(o=>A.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...n})))}function o7({page:e,matches:t,...n}){let r=jr(),{future:a,manifest:i,routeModules:s}=yw(),{basename:o}=pw(),{loaderData:l,matches:c}=n7(),f=A.useMemo(()=>hO(e,t,c,i,r,"data"),[e,t,c,i,r]),d=A.useMemo(()=>hO(e,t,c,i,r,"assets"),[e,t,c,i,r]),h=A.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,b=!1;if(t.forEach(v=>{var w;let x=i.routes[v.route.id];!x||!x.hasLoader||(!f.some(S=>S.route.id===v.route.id)&&v.route.id in l&&((w=s[v.route.id])!=null&&w.shouldRevalidate)||x.hasClientLoader?b=!0:g.add(v.route.id))}),g.size===0)return[];let y=d$(e,o,a.v8_trailingSlashAwareDataRequests,"data");return b&&g.size>0&&y.searchParams.set("_routes",t.filter(v=>g.has(v.route.id)).map(v=>v.route.id).join(",")),[y.pathname+y.search]},[o,a.v8_trailingSlashAwareDataRequests,l,r,i,f,t,e,s]),p=A.useMemo(()=>ZU(d,i),[d,i]),m=i7(d);return A.createElement(A.Fragment,null,h.map(g=>A.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),p.map(g=>A.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),m.map(({key:g,link:b})=>A.createElement("link",{key:g,nonce:n.nonce,...b,crossOrigin:b.crossOrigin??n.crossOrigin})))}function l7(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var c7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{c7&&(window.__reactRouterVersion="7.17.0")}catch{}function u7({basename:e,children:t,useTransitions:n,window:r}){let a=A.useRef();a.current==null&&(a.current=B8({window:r,v5Compat:!0}));let i=a.current,[s,o]=A.useState({action:i.action,location:i.location}),l=A.useCallback(c=>{n===!1?o(c):A.startTransition(()=>o(c))},[n]);return A.useLayoutEffect(()=>i.listen(l),[i,l]),A.createElement(zU,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,useTransitions:n})}var h$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Le=A.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:i,replace:s,mask:o,state:l,target:c,to:f,preventScrollReset:d,viewTransition:h,defaultShouldRevalidate:p,...m},g){let{basename:b,navigator:y,useTransitions:v}=A.useContext(er),x=typeof f=="string"&&h$.test(f),w=e$(f,b);f=w.to;let S=SU(f,{relative:a}),j=jr(),O=null;if(o){let $=Iy(o,[],j.mask?j.mask.pathname:"/",!0);b!=="/"&&($.pathname=$.pathname==="/"?b:$r([b,$.pathname])),O=y.createHref($)}let[E,T,N]=r7(r,m),M=h7(f,{replace:s,mask:o,state:l,target:c,preventScrollReset:d,relative:a,viewTransition:h,defaultShouldRevalidate:p,useTransitions:v});function C($){t&&t($),$.defaultPrevented||M($)}let L=!(w.isExternal||i),D=A.createElement("a",{...m,...N,href:(L?O:void 0)||w.absoluteURL||S,onClick:L?C:t,ref:l7(g,T),target:c,"data-discover":!x&&n==="render"?"true":void 0});return E&&!x?A.createElement(A.Fragment,null,D,A.createElement(a7,{page:S})):D});Le.displayName="Link";var tx=A.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:i,to:s,viewTransition:o,children:l,...c},f){let d=$d(s,{relative:c.relative}),h=jr(),p=A.useContext(By),{navigator:m,basename:g}=A.useContext(er),b=p!=null&&v7(d)&&o===!0,y=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=h.pathname,x=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(v=v.toLowerCase(),x=x?x.toLowerCase():null,y=y.toLowerCase()),x&&g&&(x=Xa(x,g)||x);const w=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let S=v===y||!a&&v.startsWith(y)&&v.charAt(w)==="/",j=x!=null&&(x===y||!a&&x.startsWith(y)&&x.charAt(y.length)==="/"),O={isActive:S,isPending:j,isTransitioning:b},E=S?t:void 0,T;typeof r=="function"?T=r(O):T=[r,S?"active":null,j?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let N=typeof i=="function"?i(O):i;return A.createElement(Le,{...c,"aria-current":E,className:T,ref:f,style:N,to:s,viewTransition:o},typeof l=="function"?l(O):l)});tx.displayName="NavLink";var f7=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:s=up,action:o,onSubmit:l,relative:c,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h,...p},m)=>{let{useTransitions:g}=A.useContext(er),b=y7(),y=g7(o,{relative:c}),v=s.toLowerCase()==="get"?"get":"post",x=typeof o=="string"&&h$.test(o),w=S=>{if(l&&l(S),S.defaultPrevented)return;S.preventDefault();let j=S.nativeEvent.submitter,O=(j==null?void 0:j.getAttribute("formmethod"))||s,E=()=>b(j||S.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:a,state:i,relative:c,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h});g&&n!==!1?A.startTransition(()=>E()):E()};return A.createElement("form",{ref:m,method:v,action:y,onSubmit:r?l:w,...p,"data-discover":!x&&e==="render"?"true":void 0})});f7.displayName="Form";function d7(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function p$(e){let t=A.useContext(Dc);return ut(t,d7(e)),t}function h7(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:o,defaultShouldRevalidate:l,useTransitions:c}={}){let f=Kt(),d=jr(),h=$d(e,{relative:s});return A.useCallback(p=>{if(HU(p,t)){p.preventDefault();let m=n!==void 0?n:Ef(d)===Ef(h),g=()=>f(e,{replace:m,mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:o,defaultShouldRevalidate:l});c?A.startTransition(()=>g()):g()}},[d,f,h,n,r,a,t,e,i,s,o,l,c])}function m$(e){br(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=A.useRef(ex(e)),n=A.useRef(!1),r=jr(),a=A.useMemo(()=>qU(r.search,n.current?null:t.current),[r.search]),i=Kt(),s=A.useCallback((o,l)=>{const c=ex(typeof o=="function"?o(new URLSearchParams(a)):o);n.current=!0,i("?"+c,l)},[i,a]);return[a,s]}var p7=0,m7=()=>`__${String(++p7)}__`;function y7(){let{router:e}=p$("useSubmit"),{basename:t}=A.useContext(er),n=DU(),r=e.fetch,a=e.navigate;return A.useCallback(async(i,s={})=>{let{action:o,method:l,encType:c,formData:f,body:d}=YU(i,t);if(s.navigate===!1){let h=s.fetcherKey||m7();await r(h,n,s.action||o,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:f,body:d,formMethod:s.method||l,formEncType:s.encType||c,flushSync:s.flushSync})}else await a(s.action||o,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:f,body:d,formMethod:s.method||l,formEncType:s.encType||c,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,a,t,n])}function g7(e,{relative:t}={}){let{basename:n}=A.useContext(er),r=A.useContext(wr);ut(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...$d(e||".",{relative:t})},s=jr();if(e==null){i.search=s.search;let o=new URLSearchParams(i.search),l=o.getAll("index");if(l.some(f=>f==="")){o.delete("index"),l.filter(d=>d).forEach(d=>o.append("index",d));let f=o.toString();i.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:$r([n,i.pathname])),Ef(i)}function v7(e,{relative:t}={}){let n=A.useContext(r$);ut(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=p$("useViewTransitionState"),a=$d(e,{relative:t});if(!n.isTransitioning)return!1;let i=Xa(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Xa(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Zp(a.pathname,s)!=null||Zp(a.pathname,i)!=null}const y$=A.createContext(null);function b7({children:e}){const[t,n]=A.useState(()=>localStorage.getItem("mall_zip")||""),[r,a]=A.useState(()=>{const m=localStorage.getItem("mall_store_id");return m?Number(m):null}),[i,s]=A.useState(()=>localStorage.getItem("mall_store_name")||""),[o,l]=A.useState(()=>localStorage.getItem("mall_token")),[c,f]=A.useState(0),d=(m,g,b)=>{n(m),a(g),s(b),localStorage.setItem("mall_zip",m),localStorage.setItem("mall_store_id",String(g)),localStorage.setItem("mall_store_name",b)},h=()=>{n(""),a(null),s(""),localStorage.removeItem("mall_zip"),localStorage.removeItem("mall_store_id"),localStorage.removeItem("mall_store_name")},p=m=>{l(m),m?localStorage.setItem("mall_token",m):localStorage.removeItem("mall_token")};return A.useEffect(()=>{const m=()=>l(localStorage.getItem("mall_token"));return window.addEventListener("storage",m),()=>window.removeEventListener("storage",m)},[]),u.jsx(y$.Provider,{value:{zip:t,storeId:r,storeName:i,setZone:d,clearZone:h,custToken:o,setCustToken:p,cartCount:c,setCartCount:f},children:e})}const bn=()=>A.useContext(y$),Ee=e=>`$${(Number(e)||0).toFixed(2)}`,gw=A.createContext({});function kc(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const Fy=A.createContext(null),Vy=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class x7 extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function S7({children:e,isPresent:t}){const n=A.useId(),r=A.useRef(null),a=A.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=A.useContext(Vy);return A.useInsertionEffect(()=>{const{width:s,height:o,top:l,left:c}=a.current;if(t||!r.current||!s||!o)return;r.current.dataset.motionPopId=n;const f=document.createElement("style");return i&&(f.nonce=i),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${s}px !important; + height: ${o}px !important; + top: ${l}px !important; + left: ${c}px !important; + } + `),()=>{document.head.removeChild(f)}},[t]),u.jsx(x7,{isPresent:t,childRef:r,sizeRef:a,children:A.cloneElement(e,{ref:r})})}const w7=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:i,mode:s})=>{const o=kc(j7),l=A.useId(),c=A.useCallback(d=>{o.set(d,!0);for(const h of o.values())if(!h)return;r&&r()},[o,r]),f=A.useMemo(()=>({id:l,initial:t,isPresent:n,custom:a,onExitComplete:c,register:d=>(o.set(d,!1),()=>o.delete(d))}),i?[Math.random(),c]:[n,c]);return A.useMemo(()=>{o.forEach((d,h)=>o.set(h,!1))},[n]),A.useEffect(()=>{!n&&!o.size&&r&&r()},[n]),s==="popLayout"&&(e=u.jsx(S7,{isPresent:n,children:e})),u.jsx(Fy.Provider,{value:f,children:e})};function j7(){return new Map}function g$(e=!0){const t=A.useContext(Fy);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,i=A.useId();A.useEffect(()=>{e&&a(i)},[e]);const s=A.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const jh=e=>e.key||"";function pO(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const vw=typeof window<"u",Hy=vw?A.useLayoutEffect:A.useEffect,nx=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:i="sync",propagate:s=!1})=>{const[o,l]=g$(s),c=A.useMemo(()=>pO(e),[e]),f=s&&!o?[]:c.map(jh),d=A.useRef(!0),h=A.useRef(c),p=kc(()=>new Map),[m,g]=A.useState(c),[b,y]=A.useState(c);Hy(()=>{d.current=!1,h.current=c;for(let w=0;w{const S=jh(w),j=s&&!o?!1:c===b||f.includes(S),O=()=>{if(p.has(S))p.set(S,!0);else return;let E=!0;p.forEach(T=>{T||(E=!1)}),E&&(x==null||x(),y(h.current),s&&(l==null||l()),r&&r())};return u.jsx(w7,{isPresent:j,initial:!d.current||n?void 0:!1,custom:j?void 0:t,presenceAffectsLayout:a,mode:i,onExitComplete:j?void 0:O,children:w},S)})})},yn=e=>e;let A7=yn,v$=yn;function bw(e){let t;return()=>(t===void 0&&(t=e()),t)}const ro=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ia=e=>e*1e3,Ba=e=>e/1e3,O7={useManualTiming:!1};function E7(e){let t=new Set,n=new Set,r=!1,a=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function o(c){i.has(c)&&(l.schedule(c),e()),c(s)}const l={schedule:(c,f=!1,d=!1)=>{const p=d&&r?t:n;return f&&i.add(c),p.has(c)||p.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(s=c,r){a=!0;return}r=!0,[t,n]=[n,t],t.forEach(o),t.clear(),r=!1,a&&(a=!1,l.process(c))}};return l}const Ah=["read","resolveKeyframes","update","preRender","render","postRender"],T7=40;function b$(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Ah.reduce((y,v)=>(y[v]=E7(i),y),{}),{read:o,resolveKeyframes:l,update:c,preRender:f,render:d,postRender:h}=s,p=()=>{const y=performance.now();n=!1,a.delta=r?1e3/60:Math.max(Math.min(y-a.timestamp,T7),1),a.timestamp=y,a.isProcessing=!0,o.process(a),l.process(a),c.process(a),f.process(a),d.process(a),h.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,a.isProcessing||e(p)};return{schedule:Ah.reduce((y,v)=>{const x=s[v];return y[v]=(w,S=!1,j=!1)=>(n||m(),x.schedule(w,S,j)),y},{}),cancel:y=>{for(let v=0;vmO[e].some(n=>!!t[n])};function N7(e){for(const t in e)Gl[t]={...Gl[t],...e[t]}}const C7=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function tm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||C7.has(e)}let S$=e=>!tm(e);function _7(e){e&&(S$=t=>t.startsWith("on")?!tm(t):e(t))}try{_7(require("@emotion/is-prop-valid").default)}catch{}function P7(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(S$(a)||n===!0&&tm(a)||!t&&!tm(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function M7(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}const qy=A.createContext({});function Tf(e){return typeof e=="string"||Array.isArray(e)}function Ky(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const xw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sw=["initial",...xw];function Gy(e){return Ky(e.animate)||Sw.some(t=>Tf(e[t]))}function w$(e){return!!(Gy(e)||e.variants)}function R7(e,t){if(Gy(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Tf(n)?n:void 0,animate:Tf(r)?r:void 0}}return e.inherit!==!1?t:{}}function D7(e){const{initial:t,animate:n}=R7(e,A.useContext(qy));return A.useMemo(()=>({initial:t,animate:n}),[yO(t),yO(n)])}function yO(e){return Array.isArray(e)?e.join(" "):e}const $7=Symbol.for("motionComponentSymbol");function tl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function k7(e,t,n){return A.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):tl(n)&&(n.current=r))},[t])}const ww=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),L7="framerAppearId",j$="data-"+ww(L7),{schedule:jw}=b$(queueMicrotask,!1),A$=A.createContext({});function z7(e,t,n,r,a){var i,s;const{visualElement:o}=A.useContext(qy),l=A.useContext(x$),c=A.useContext(Fy),f=A.useContext(Vy).reducedMotion,d=A.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f}));const h=d.current,p=A.useContext(A$);h&&!h.projection&&a&&(h.type==="html"||h.type==="svg")&&I7(d.current,n,a,p);const m=A.useRef(!1);A.useInsertionEffect(()=>{h&&m.current&&h.update(n,c)});const g=n[j$],b=A.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,g)));return Hy(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),jw.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),A.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),b.current=!1))}),h}function I7(e,t,n,r){const{layoutId:a,layout:i,drag:s,dragConstraints:o,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:O$(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!s||o&&tl(o),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function O$(e){if(e)return e.options.allowProjection!==!1?e.projection:O$(e.parent)}function B7({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){var i,s;e&&N7(e);function o(c,f){let d;const h={...A.useContext(Vy),...c,layoutId:U7(c)},{isStatic:p}=h,m=D7(c),g=r(c,p);if(!p&&vw){F7();const b=V7(h);d=b.MeasureLayout,m.visualElement=z7(a,g,h,t,b.ProjectionNode)}return u.jsxs(qy.Provider,{value:m,children:[d&&m.visualElement?u.jsx(d,{visualElement:m.visualElement,...h}):null,n(a,c,k7(g,m.visualElement,f),g,p,m.visualElement)]})}o.displayName=`motion.${typeof a=="string"?a:`create(${(s=(i=a.displayName)!==null&&i!==void 0?i:a.name)!==null&&s!==void 0?s:""})`}`;const l=A.forwardRef(o);return l[$7]=a,l}function U7({layoutId:e}){const t=A.useContext(gw).id;return t&&e!==void 0?t+"-"+e:e}function F7(e,t){A.useContext(x$).strict}function V7(e){const{drag:t,layout:n}=Gl;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const H7=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Aw(e){return typeof e!="string"||e.includes("-")?!1:!!(H7.indexOf(e)>-1||/[A-Z]/u.test(e))}function gO(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ow(e,t,n,r){if(typeof t=="function"){const[a,i]=gO(r);t=t(n!==void 0?n:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=gO(r);t=t(n!==void 0?n:e.custom,a,i)}return t}const rx=e=>Array.isArray(e),q7=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),K7=e=>rx(e)?e[e.length-1]||0:e,cn=e=>!!(e&&e.getVelocity);function dp(e){const t=cn(e)?e.get():e;return q7(t)?t.toValue():t}function G7({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,a,i){const s={latestValues:Y7(r,a,i,e),renderState:t()};return n&&(s.onMount=o=>n({props:r,current:o,...s}),s.onUpdate=o=>n(o)),s}const E$=e=>(t,n)=>{const r=A.useContext(qy),a=A.useContext(Fy),i=()=>G7(e,t,r,a);return n?i():kc(i)};function Y7(e,t,n,r){const a={},i=r(e,{});for(const h in i)a[h]=dp(i[h]);let{initial:s,animate:o}=e;const l=Gy(e),c=w$(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),o===void 0&&(o=t.animate));let f=n?n.initial===!1:!1;f=f||s===!1;const d=f?o:s;if(d&&typeof d!="boolean"&&!Ky(d)){const h=Array.isArray(d)?d:[d];for(let p=0;pt=>typeof t=="string"&&t.startsWith(e),N$=T$("--"),X7=T$("var(--"),Ew=e=>X7(e)?W7.test(e.split("/*")[0].trim()):!1,W7=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,C$=(e,t)=>t&&typeof e=="number"?t.transform(e):e,la=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Nf={...zc,transform:e=>la(0,1,e)},Oh={...zc,default:1},kd=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ui=kd("deg"),ra=kd("%"),fe=kd("px"),Q7=kd("vh"),Z7=kd("vw"),vO={...ra,parse:e=>ra.parse(e)/100,transform:e=>ra.transform(e*100)},J7={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,backgroundPositionX:fe,backgroundPositionY:fe},eF={rotate:ui,rotateX:ui,rotateY:ui,rotateZ:ui,scale:Oh,scaleX:Oh,scaleY:Oh,scaleZ:Oh,skew:ui,skewX:ui,skewY:ui,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:Nf,originX:vO,originY:vO,originZ:fe},bO={...zc,transform:Math.round},Tw={...J7,...eF,zIndex:bO,size:fe,fillOpacity:Nf,strokeOpacity:Nf,numOctaves:bO},tF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nF=Lc.length;function rF(e,t,n){let r="",a=!0;for(let i=0;i({style:{},transform:{},transformOrigin:{},vars:{}}),_$=()=>({..._w(),attrs:{}}),Pw=e=>typeof e=="string"&&e.toLowerCase()==="svg";function P$(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const M$=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function R$(e,t,n,r){P$(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(M$.has(a)?a:ww(a),t.attrs[a])}const nm={};function lF(e){Object.assign(nm,e)}function D$(e,{layout:t,layoutId:n}){return xo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!nm[e]||e==="opacity")}function Mw(e,t,n){var r;const{style:a}=e,i={};for(const s in a)(cn(a[s])||t.style&&cn(t.style[s])||D$(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=a[s]);return i}function $$(e,t,n){const r=Mw(e,t,n);for(const a in e)if(cn(e[a])||cn(t[a])){const i=Lc.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=e[a]}return r}function cF(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const SO=["x","y","width","height","cx","cy","r"],uF={useVisualState:E$({scrapeMotionValuesFromProps:$$,createRenderState:_$,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:a})=>{if(!n)return;let i=!!e.drag;if(!i){for(const o in a)if(xo.has(o)){i=!0;break}}if(!i)return;let s=!t;if(t)for(let o=0;o{cF(n,r),Re.render(()=>{Cw(r,a,Pw(n.tagName),e.transformTemplate),R$(n,r)})})}})},fF={useVisualState:E$({scrapeMotionValuesFromProps:Mw,createRenderState:_w})};function k$(e,t,n){for(const r in t)!cn(t[r])&&!D$(r,n)&&(e[r]=t[r])}function dF({transformTemplate:e},t){return A.useMemo(()=>{const n=_w();return Nw(n,t,e),Object.assign({},n.vars,n.style)},[t])}function hF(e,t){const n=e.style||{},r={};return k$(r,n,e),Object.assign(r,dF(e,t)),r}function pF(e,t){const n={},r=hF(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function mF(e,t,n,r){const a=A.useMemo(()=>{const i=_$();return Cw(i,t,Pw(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};k$(i,e.style,e),a.style={...i,...a.style}}return a}function yF(e=!1){return(n,r,a,{latestValues:i},s)=>{const l=(Aw(n)?mF:pF)(r,i,s,n),c=P7(r,typeof n=="string",e),f=n!==A.Fragment?{...c,...l,ref:a}:{},{children:d}=r,h=A.useMemo(()=>cn(d)?d.get():d,[d]);return A.createElement(n,{...f,children:h})}}function gF(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const s={...Aw(r)?uF:fF,preloadedFeatures:e,useRender:yF(a),createVisualElement:t,Component:r};return B7(s)}}function L$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rwindow.ScrollTimeline!==void 0);class vF{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(z$()&&a.attachTimeline)return a.attachTimeline(t);if(typeof n=="function")return n(a)});return()=>{r.forEach((a,i)=>{a&&a(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class bF extends vF{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Rw(e,t){return e?e[t]||e.default||e:void 0}const ax=2e4;function I$(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=ax?1/0:t}function Dw(e){return typeof e=="function"}function wO(e,t){e.timeline=t,e.onfinish=null}const $w=e=>Array.isArray(e)&&typeof e[0]=="number",xF={linearEasing:void 0};function SF(e,t){const n=bw(e);return()=>{var r;return(r=xF[t])!==null&&r!==void 0?r:n()}}const rm=SF(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),B$=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let i=0;i`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ix={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nu([0,.65,.55,1]),circOut:Nu([.55,0,1,.45]),backIn:Nu([.31,.01,.66,-.59]),backOut:Nu([.33,1.53,.69,.99])};function F$(e,t){if(e)return typeof e=="function"&&rm()?B$(e,t):$w(e)?Nu(e):Array.isArray(e)?e.map(n=>F$(n,t)||ix.easeOut):ix[e]}const Cr={x:!1,y:!1};function V$(){return Cr.x||Cr.y}function H$(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let a=document;const i=(r=void 0)!==null&&r!==void 0?r:a.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function q$(e,t){const n=H$(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function jO(e){return t=>{t.pointerType==="touch"||V$()||e(t)}}function wF(e,t,n={}){const[r,a,i]=q$(e,n),s=jO(o=>{const{target:l}=o,c=t(o);if(typeof c!="function"||!l)return;const f=jO(d=>{c(d),l.removeEventListener("pointerleave",f)});l.addEventListener("pointerleave",f,a)});return r.forEach(o=>{o.addEventListener("pointerenter",s,a)}),i}const K$=(e,t)=>t?e===t?!0:K$(e,t.parentElement):!1,kw=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,jF=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function AF(e){return jF.has(e.tagName)||e.tabIndex!==-1}const Cu=new WeakSet;function AO(e){return t=>{t.key==="Enter"&&e(t)}}function Iv(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const OF=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=AO(()=>{if(Cu.has(n))return;Iv(n,"down");const a=AO(()=>{Iv(n,"up")}),i=()=>Iv(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function OO(e){return kw(e)&&!V$()}function EF(e,t,n={}){const[r,a,i]=q$(e,n),s=o=>{const l=o.currentTarget;if(!OO(o)||Cu.has(l))return;Cu.add(l);const c=t(o),f=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),!(!OO(p)||!Cu.has(l))&&(Cu.delete(l),typeof c=="function"&&c(p,{success:m}))},d=p=>{f(p,n.useGlobalTarget||K$(l,p.target))},h=p=>{f(p,!1)};window.addEventListener("pointerup",d,a),window.addEventListener("pointercancel",h,a)};return r.forEach(o=>{!AF(o)&&o.getAttribute("tabindex")===null&&(o.tabIndex=0),(n.useGlobalTarget?window:o).addEventListener("pointerdown",s,a),o.addEventListener("focus",c=>OF(c,a),a)}),i}function TF(e){return e==="x"||e==="y"?Cr[e]?null:(Cr[e]=!0,()=>{Cr[e]=!1}):Cr.x||Cr.y?null:(Cr.x=Cr.y=!0,()=>{Cr.x=Cr.y=!1})}const G$=new Set(["width","height","top","left","right","bottom",...Lc]);let hp;function NF(){hp=void 0}const aa={now:()=>(hp===void 0&&aa.set(Bt.isProcessing||O7.useManualTiming?Bt.timestamp:performance.now()),hp),set:e=>{hp=e,queueMicrotask(NF)}};function Lw(e,t){e.indexOf(t)===-1&&e.push(t)}function zw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Iw{constructor(){this.subscriptions=[]}add(t){return Lw(this.subscriptions,t),()=>zw(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e)),Gu={current:void 0};class _F{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{const i=aa.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=aa.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=CF(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Iw);const r=this.events[t].add(n);return t==="change"?()=>{r(),Re.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Gu.current&&Gu.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=aa.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>EO)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,EO);return Bw(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qr(e,t){return new _F(e,t)}function PF(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qr(n))}function MF(e,t){const n=Yy(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const s in i){const o=K7(i[s]);PF(e,s,o)}}function RF(e){return!!(cn(e)&&e.add)}function sx(e,t){const n=e.getValue("willChange");if(RF(n))return n.add(t)}function Y$(e){return e.props[j$]}const X$=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,DF=1e-7,$F=12;function kF(e,t,n,r,a){let i,s,o=0;do s=t+(n-t)/2,i=X$(s,r,a)-e,i>0?n=s:t=s;while(Math.abs(i)>DF&&++o<$F);return s}function Ld(e,t,n,r){if(e===t&&n===r)return yn;const a=i=>kF(i,0,1,e,n);return i=>i===0||i===1?i:X$(a(i),t,r)}const W$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Q$=e=>t=>1-e(1-t),Z$=Ld(.33,1.53,.69,.99),Uw=Q$(Z$),J$=W$(Uw),e3=e=>(e*=2)<1?.5*Uw(e):.5*(2-Math.pow(2,-10*(e-1))),Fw=e=>1-Math.sin(Math.acos(e)),t3=Q$(Fw),n3=W$(Fw),r3=e=>/^0[^.\s]+$/u.test(e);function LF(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||r3(e):!0}const Yu=e=>Math.round(e*1e5)/1e5,Vw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zF(e){return e==null}const IF=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hw=(e,t)=>n=>!!(typeof n=="string"&&IF.test(n)&&n.startsWith(e)||t&&!zF(n)&&Object.prototype.hasOwnProperty.call(n,t)),a3=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,i,s,o]=r.match(Vw);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},BF=e=>la(0,255,e),Bv={...zc,transform:e=>Math.round(BF(e))},Os={test:Hw("rgb","red"),parse:a3("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Bv.transform(e)+", "+Bv.transform(t)+", "+Bv.transform(n)+", "+Yu(Nf.transform(r))+")"};function UF(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const ox={test:Hw("#"),parse:UF,transform:Os.transform},nl={test:Hw("hsl","hue"),parse:a3("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ra.transform(Yu(t))+", "+ra.transform(Yu(n))+", "+Yu(Nf.transform(r))+")"},sn={test:e=>Os.test(e)||ox.test(e)||nl.test(e),parse:e=>Os.test(e)?Os.parse(e):nl.test(e)?nl.parse(e):ox.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Os.transform(e):nl.transform(e)},FF=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function VF(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vw))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(FF))===null||n===void 0?void 0:n.length)||0)>0}const i3="number",s3="color",HF="var",qF="var(",TO="${}",KF=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Cf(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(KF,l=>(sn.test(l)?(r.color.push(i),a.push(s3),n.push(sn.parse(l))):l.startsWith(qF)?(r.var.push(i),a.push(HF),n.push(l)):(r.number.push(i),a.push(i3),n.push(parseFloat(l))),++i,TO)).split(TO);return{values:n,split:o,indexes:r,types:a}}function o3(e){return Cf(e).values}function l3(e){const{split:t,types:n}=Cf(e),r=t.length;return a=>{let i="";for(let s=0;stypeof e=="number"?0:e;function YF(e){const t=o3(e);return l3(e)(t.map(GF))}const Ji={test:VF,parse:o3,createTransformer:l3,getAnimatableNone:YF},XF=new Set(["brightness","contrast","saturate","opacity"]);function WF(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vw)||[];if(!r)return e;const a=n.replace(r,"");let i=XF.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+a+")"}const QF=/\b([a-z-]*)\(.*?\)/gu,lx={...Ji,getAnimatableNone:e=>{const t=e.match(QF);return t?t.map(WF).join(" "):e}},ZF={...Tw,color:sn,backgroundColor:sn,outlineColor:sn,fill:sn,stroke:sn,borderColor:sn,borderTopColor:sn,borderRightColor:sn,borderBottomColor:sn,borderLeftColor:sn,filter:lx,WebkitFilter:lx},qw=e=>ZF[e];function c3(e,t){let n=qw(e);return n!==lx&&(n=Ji),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const JF=new Set(["auto","none","0"]);function eV(e,t,n){let r=0,a;for(;re===zc||e===fe,CO=(e,t)=>parseFloat(e.split(", ")[t]),_O=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const a=r.match(/^matrix3d\((.+)\)$/u);if(a)return CO(a[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?CO(i[1],e):0}},tV=new Set(["x","y","z"]),nV=Lc.filter(e=>!tV.has(e));function rV(e){const t=[];return nV.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Yl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:_O(4,13),y:_O(5,14)};Yl.translateX=Yl.x;Yl.translateY=Yl.y;const Gs=new Set;let cx=!1,ux=!1;function u3(){if(ux){const e=Array.from(Gs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=rV(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([i,s])=>{var o;(o=r.getValue(i))===null||o===void 0||o.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ux=!1,cx=!1,Gs.forEach(e=>e.complete()),Gs.clear()}function f3(){Gs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ux=!0)})}function aV(){f3(),u3()}class Kw{constructor(t,n,r,a,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Gs.add(this),cx||(cx=!0,Re.read(f3),Re.resolveKeyframes(u3))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;for(let i=0;i/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),iV=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sV(e){const t=iV.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function h3(e,t,n=1){const[r,a]=sV(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return d3(s)?parseFloat(s):s}return Ew(a)?h3(a,t,n+1):a}const p3=e=>t=>t.test(e),oV={test:e=>e==="auto",parse:e=>e},m3=[zc,fe,ra,ui,Z7,Q7,oV],PO=e=>m3.find(p3(e));class y3 extends Kw{constructor(t,n,r,a,i){super(t,n,r,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const MO=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ji.test(e)||e==="0")&&!e.startsWith("url("));function lV(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function Xy(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(uV),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const fV=40;class g3{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=aa.now(),this.options={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:i,repeatType:s,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>fV?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&aV(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=aa.now(),this.hasAttemptedResolve=!0;const{name:r,type:a,velocity:i,delay:s,onComplete:o,onUpdate:l,isGenerator:c}=this.options;if(!c&&!cV(t,r,a,i))if(s)this.options.duration=0;else{l&&l(Xy(t,this.options,n)),o&&o(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ht=(e,t,n)=>e+(t-e)*n;function Uv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function dV({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,i=0,s=0;if(!t)a=i=s=n;else{const o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;a=Uv(l,o,e+1/3),i=Uv(l,o,e),s=Uv(l,o,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function am(e,t){return n=>n>0?t:e}const Fv=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},hV=[ox,Os,nl],pV=e=>hV.find(t=>t.test(e));function RO(e){const t=pV(e);if(!t)return!1;let n=t.parse(e);return t===nl&&(n=dV(n)),n}const DO=(e,t)=>{const n=RO(e),r=RO(t);if(!n||!r)return am(e,t);const a={...n};return i=>(a.red=Fv(n.red,r.red,i),a.green=Fv(n.green,r.green,i),a.blue=Fv(n.blue,r.blue,i),a.alpha=ht(n.alpha,r.alpha,i),Os.transform(a))},mV=(e,t)=>n=>t(e(n)),zd=(...e)=>e.reduce(mV),fx=new Set(["none","hidden"]);function yV(e,t){return fx.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gV(e,t){return n=>ht(e,t,n)}function Gw(e){return typeof e=="number"?gV:typeof e=="string"?Ew(e)?am:sn.test(e)?DO:xV:Array.isArray(e)?v3:typeof e=="object"?sn.test(e)?DO:vV:am}function v3(e,t){const n=[...e],r=n.length,a=e.map((i,s)=>Gw(i)(i,t[s]));return i=>{for(let s=0;s{for(const i in r)n[i]=r[i](a);return n}}function bV(e,t){var n;const r=[],a={color:0,var:0,number:0};for(let i=0;i{const n=Ji.createTransformer(t),r=Cf(e),a=Cf(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?fx.has(e)&&!a.values.length||fx.has(t)&&!r.values.length?yV(e,t):zd(v3(bV(r,a),a.values),n):am(e,t)};function b3(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ht(e,t,n):Gw(e)(e,t)}const SV=5;function x3(e,t,n){const r=Math.max(t-SV,0);return Bw(n-e(r),t-r)}const yt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Vv=.001;function wV({duration:e=yt.duration,bounce:t=yt.bounce,velocity:n=yt.velocity,mass:r=yt.mass}){let a,i,s=1-t;s=la(yt.minDamping,yt.maxDamping,s),e=la(yt.minDuration,yt.maxDuration,Ba(e)),s<1?(a=c=>{const f=c*s,d=f*e,h=f-n,p=dx(c,s),m=Math.exp(-d);return Vv-h/p*m},i=c=>{const d=c*s*e,h=d*n+n,p=Math.pow(s,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=dx(Math.pow(c,2),s);return(-a(c)+Vv>0?-1:1)*((h-p)*m)/g}):(a=c=>{const f=Math.exp(-c*e),d=(c-n)*e+1;return-Vv+f*d},i=c=>{const f=Math.exp(-c*e),d=(n-c)*(e*e);return f*d});const o=5/e,l=AV(a,i,o);if(e=Ia(e),isNaN(l))return{stiffness:yt.stiffness,damping:yt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const jV=12;function AV(e,t,n){let r=n;for(let a=1;ae[n]!==void 0)}function TV(e){let t={velocity:yt.velocity,stiffness:yt.stiffness,damping:yt.damping,mass:yt.mass,isResolvedFromDuration:!1,...e};if(!$O(e,EV)&&$O(e,OV))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,i=2*la(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:yt.mass,stiffness:a,damping:i}}else{const n=wV(e);t={...t,...n,mass:yt.mass},t.isResolvedFromDuration=!0}return t}function S3(e=yt.visualDuration,t=yt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:l,damping:c,mass:f,duration:d,velocity:h,isResolvedFromDuration:p}=TV({...n,velocity:-Ba(n.velocity||0)}),m=h||0,g=c/(2*Math.sqrt(l*f)),b=s-i,y=Ba(Math.sqrt(l/f)),v=Math.abs(b)<5;r||(r=v?yt.restSpeed.granular:yt.restSpeed.default),a||(a=v?yt.restDelta.granular:yt.restDelta.default);let x;if(g<1){const S=dx(y,g);x=j=>{const O=Math.exp(-g*y*j);return s-O*((m+g*y*b)/S*Math.sin(S*j)+b*Math.cos(S*j))}}else if(g===1)x=S=>s-Math.exp(-y*S)*(b+(m+y*b)*S);else{const S=y*Math.sqrt(g*g-1);x=j=>{const O=Math.exp(-g*y*j),E=Math.min(S*j,300);return s-O*((m+g*y*b)*Math.sinh(E)+S*b*Math.cosh(E))/S}}const w={calculatedDuration:p&&d||null,next:S=>{const j=x(S);if(p)o.done=S>=d;else{let O=0;g<1&&(O=S===0?Ia(m):x3(x,S,j));const E=Math.abs(O)<=r,T=Math.abs(s-j)<=a;o.done=E&&T}return o.value=o.done?s:j,o},toString:()=>{const S=Math.min(I$(w),ax),j=B$(O=>w.next(S*O).value,S,30);return S+"ms "+j}};return w}function kO({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:l,restDelta:c=.5,restSpeed:f}){const d=e[0],h={done:!1,value:d},p=E=>o!==void 0&&El,m=E=>o===void 0?l:l===void 0||Math.abs(o-E)-g*Math.exp(-E/r),x=E=>y+v(E),w=E=>{const T=v(E),N=x(E);h.done=Math.abs(T)<=c,h.value=h.done?y:N};let S,j;const O=E=>{p(h.value)&&(S=E,j=S3({keyframes:[h.value,m(h.value)],velocity:x3(x,E,h.value),damping:a,stiffness:i,restDelta:c,restSpeed:f}))};return O(0),{calculatedDuration:null,next:E=>{let T=!1;return!j&&S===void 0&&(T=!0,w(E),O(E)),S!==void 0&&E>=S?j.next(E-S):(!T&&w(E),h)}}}const NV=Ld(.42,0,1,1),CV=Ld(0,0,.58,1),w3=Ld(.42,0,.58,1),_V=e=>Array.isArray(e)&&typeof e[0]!="number",PV={linear:yn,easeIn:NV,easeInOut:w3,easeOut:CV,circIn:Fw,circInOut:n3,circOut:t3,backIn:Uw,backInOut:J$,backOut:Z$,anticipate:e3},LO=e=>{if($w(e)){v$(e.length===4);const[t,n,r,a]=e;return Ld(t,n,r,a)}else if(typeof e=="string")return PV[e];return e};function MV(e,t,n){const r=[],a=n||b3,i=e.length-1;for(let s=0;st[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=MV(t,r,a),l=o.length,c=f=>{if(s&&f1)for(;dc(la(e[0],e[i-1],f)):c}function RV(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=ro(0,t,r);e.push(ht(n,1,a))}}function j3(e){const t=[0];return RV(t,e.length-1),t}function DV(e,t){return e.map(n=>n*t)}function $V(e,t){return e.map(()=>t||w3).splice(0,e.length-1)}function im({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=_V(r)?r.map(LO):LO(r),i={done:!1,value:t[0]},s=DV(n&&n.length===t.length?n:j3(t),e),o=Yw(s,t,{ease:Array.isArray(a)?a:$V(t,a)});return{calculatedDuration:e,next:l=>(i.value=o(l),i.done=l>=e,i)}}const kV=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Re.update(t,!0),stop:()=>Lr(t),now:()=>Bt.isProcessing?Bt.timestamp:aa.now()}},LV={decay:kO,inertia:kO,tween:im,keyframes:im,spring:S3},zV=e=>e/100;class Xw extends g3{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:a,keyframes:i}=this.options,s=(a==null?void 0:a.KeyframeResolver)||Kw,o=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new s(i,o,n,r,a),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=this.options,o=Dw(n)?n:LV[n]||im;let l,c;o!==im&&typeof t[0]!="number"&&(l=zd(zV,b3(t[0],t[1])),t=[0,100]);const f=o({...this.options,keyframes:t});i==="mirror"&&(c=o({...this.options,keyframes:[...t].reverse(),velocity:-s})),f.calculatedDuration===null&&(f.calculatedDuration=I$(f));const{calculatedDuration:d}=f,h=d+a,p=h*(r+1)-a;return{generator:f,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:E}=this.options;return{done:!0,value:E[E.length-1]}}const{finalKeyframe:a,generator:i,mirroredGenerator:s,mapPercentToKeyframes:o,keyframes:l,calculatedDuration:c,totalDuration:f,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:p,repeatType:m,repeatDelay:g,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>f;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let x=this.currentTime,w=i;if(p){const E=Math.min(this.currentTime,f)/d;let T=Math.floor(E),N=E%1;!N&&E>=1&&(N=1),N===1&&T--,T=Math.min(T,p+1),!!(T%2)&&(m==="reverse"?(N=1-N,g&&(N-=g/d)):m==="mirror"&&(w=s)),x=la(0,1,N)*d}const S=v?{done:!1,value:l[0]}:w.next(x);o&&(S.value=o(S.value));let{done:j}=S;!v&&c!==null&&(j=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return O&&a!==void 0&&(S.value=Xy(l,this.options,a)),b&&b(S.value),O&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Ba(t.calculatedDuration):0}get time(){return Ba(this.currentTime)}set time(t){t=Ia(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ba(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=kV,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const IV=new Set(["opacity","clipPath","filter","transform"]);function BV(e,t,n,{delay:r=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const f=F$(o,a);return Array.isArray(f)&&(c.easing=f),e.animate(c,{delay:r,duration:a,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const UV=bw(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sm=10,FV=2e4;function VV(e){return Dw(e.type)||e.type==="spring"||!U$(e.ease)}function HV(e,t){const n=new Xw({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const a=[];let i=0;for(;!r.done&&ithis.onKeyframesResolved(s,o),n,r,a),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:a,ease:i,type:s,motionValue:o,name:l,startTime:c}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof i=="string"&&rm()&&qV(i)&&(i=A3[i]),VV(this.options)){const{onComplete:d,onUpdate:h,motionValue:p,element:m,...g}=this.options,b=HV(t,g);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,a=b.times,i=b.ease,s="keyframes"}const f=BV(o.owner.current,l,t,{...this.options,duration:r,times:a,ease:i});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(wO(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:d}=this.options;o.set(Xy(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:a,type:s,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ba(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ba(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ia(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return yn;const{animation:r}=n;wO(r,t)}return yn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:a,type:i,ease:s,times:o}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:f,onComplete:d,element:h,...p}=this.options,m=new Xw({...p,keyframes:r,duration:a,type:i,ease:s,times:o,isGenerator:!0}),g=Ia(this.time);c.setWithVelocity(m.sample(g-sm).value,m.sample(g).value,sm)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:a,repeatType:i,damping:s,type:o}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return UV()&&r&&IV.has(r)&&!l&&!c&&!a&&i!=="mirror"&&s!==0&&o!=="inertia"}}const KV={type:"spring",stiffness:500,damping:25,restSpeed:10},GV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),YV={type:"keyframes",duration:.8},XV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WV=(e,{keyframes:t})=>t.length>2?YV:xo.has(e)?e.startsWith("scale")?GV(t[1]):KV:XV;function QV({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:l,elapsed:c,...f}){return!!Object.keys(f).length}const Ww=(e,t,n,r={},a,i)=>s=>{const o=Rw(r,e)||{},l=o.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Ia(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-c,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:a};QV(o)||(f={...f,...WV(e,f)}),f.duration&&(f.duration=Ia(f.duration)),f.repeatDelay&&(f.repeatDelay=Ia(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!i&&t.get()!==void 0){const h=Xy(f.keyframes,o);if(h!==void 0)return Re.update(()=>{f.onUpdate(h),f.onComplete()}),new bF([])}return!i&&zO.supports(f)?new zO(f):new Xw(f)};function ZV({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function O3(e,t,{delay:n=0,transitionOverride:r,type:a}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:o,...l}=t;r&&(s=r);const c=[],f=a&&e.animationState&&e.animationState.getState()[a];for(const d in l){const h=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),p=l[d];if(p===void 0||f&&ZV(f,d))continue;const m={delay:n,...Rw(s||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=Y$(e);if(y){const v=window.MotionHandoffAnimation(y,d,Re);v!==null&&(m.startTime=v,g=!0)}}sx(e,d),h.start(Ww(d,h,p,e.shouldReduceMotion&&G$.has(d)?{type:!1}:m,e,g));const b=h.animation;b&&c.push(b)}return o&&Promise.all(c).then(()=>{Re.update(()=>{o&&MF(e,o)})}),c}function hx(e,t,n={}){var r;const a=Yy(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(i=n.transitionOverride);const s=a?()=>Promise.all(O3(e,a,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:h}=i;return JV(e,t,f+c,d,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,f]=l==="beforeChildren"?[s,o]:[o,s];return c().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function JV(e,t,n=0,r=0,a=1,i){const s=[],o=(e.variantChildren.size-1)*r,l=a===1?(c=0)=>c*r:(c=0)=>o-c*r;return Array.from(e.variantChildren).sort(e9).forEach((c,f)=>{c.notify("AnimationStart",t),s.push(hx(c,t,{...i,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function e9(e,t){return e.sortNodePosition(t)}function t9(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(i=>hx(e,i,n));r=Promise.all(a)}else if(typeof t=="string")r=hx(e,t,n);else{const a=typeof t=="function"?Yy(e,t,n.custom):t;r=Promise.all(O3(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const n9=Sw.length;function E3(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?E3(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>t9(e,n,r)))}function s9(e){let t=i9(e),n=IO(),r=!0;const a=l=>(c,f)=>{var d;const h=Yy(e,f,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:p,transitionEnd:m,...g}=h;c={...c,...g,...m}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,f=E3(e.parent)||{},d=[],h=new Set;let p={},m=1/0;for(let b=0;bm&&w,T=!1;const N=Array.isArray(x)?x:[x];let M=N.reduce(a(y),{});S===!1&&(M={});const{prevResolvedValues:C={}}=v,L={...C,...M},D=k=>{E=!0,h.has(k)&&(T=!0,h.delete(k)),v.needsAnimating[k]=!0;const I=e.getValue(k);I&&(I.liveStyle=!1)};for(const k in L){const I=M[k],F=C[k];if(p.hasOwnProperty(k))continue;let H=!1;rx(I)&&rx(F)?H=!L$(I,F):H=I!==F,H?I!=null?D(k):h.add(k):I!==void 0&&h.has(k)?D(k):v.protectedKeys[k]=!0}v.prevProp=x,v.prevResolvedValues=M,v.isActive&&(p={...p,...M}),r&&e.blockInitialAnimation&&(E=!1),E&&(!(j&&O)||T)&&d.push(...N.map(k=>({animation:k,options:{type:y}})))}if(h.size){const b={};h.forEach(y=>{const v=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),b[y]=v??null}),d.push({animation:b})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function o(l,c){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=s(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:s,setActive:o,setAnimateFunction:i,getState:()=>n,reset:()=>{n=IO(),r=!0}}}function o9(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!L$(t,e):!1}function us(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function IO(){return{animate:us(!0),whileInView:us(),whileHover:us(),whileTap:us(),whileDrag:us(),whileFocus:us(),exit:us()}}class ns{constructor(t){this.isMounted=!1,this.node=t}update(){}}class l9 extends ns{constructor(t){super(t),t.animationState||(t.animationState=s9(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ky(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let c9=0;class u9 extends ns{constructor(){super(...arguments),this.id=c9++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const f9={animation:{Feature:l9},exit:{Feature:u9}};function _f(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Id(e){return{point:{x:e.pageX,y:e.pageY}}}const d9=e=>t=>kw(t)&&e(t,Id(t));function Xu(e,t,n,r){return _f(e,t,d9(n),r)}const BO=(e,t)=>Math.abs(e-t);function h9(e,t){const n=BO(e.x,t.x),r=BO(e.y,t.y);return Math.sqrt(n**2+r**2)}class T3{constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=qv(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=h9(d.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=d,{timestamp:g}=Bt;this.history.push({...m,timestamp:g});const{onStart:b,onMove:y}=this.handlers;h||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Hv(h,this.transformPagePoint),Re.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=qv(d.type==="pointercancel"?this.lastMoveEventInfo:Hv(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,b),m&&m(d,b)},!kw(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const s=Id(t),o=Hv(s,this.transformPagePoint),{point:l}=o,{timestamp:c}=Bt;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,qv(o,this.history)),this.removeListeners=zd(Xu(this.contextWindow,"pointermove",this.handlePointerMove),Xu(this.contextWindow,"pointerup",this.handlePointerUp),Xu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Lr(this.updatePoint)}}function Hv(e,t){return t?{point:t(e.point)}:e}function UO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qv({point:e},t){return{point:e,delta:UO(e,N3(t)),offset:UO(e,p9(t)),velocity:m9(t,.1)}}function p9(e){return e[0]}function N3(e){return e[e.length-1]}function m9(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=N3(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Ia(t)));)n--;if(!r)return{x:0,y:0};const i=Ba(a.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const C3=1e-4,y9=1-C3,g9=1+C3,_3=.01,v9=0-_3,b9=0+_3;function Jn(e){return e.max-e.min}function x9(e,t,n){return Math.abs(e-t)<=n}function FO(e,t,n,r=.5){e.origin=r,e.originPoint=ht(t.min,t.max,e.origin),e.scale=Jn(n)/Jn(t),e.translate=ht(n.min,n.max,e.origin)-e.originPoint,(e.scale>=y9&&e.scale<=g9||isNaN(e.scale))&&(e.scale=1),(e.translate>=v9&&e.translate<=b9||isNaN(e.translate))&&(e.translate=0)}function Wu(e,t,n,r){FO(e.x,t.x,n.x,r?r.originX:void 0),FO(e.y,t.y,n.y,r?r.originY:void 0)}function VO(e,t,n){e.min=n.min+t.min,e.max=e.min+Jn(t)}function S9(e,t,n){VO(e.x,t.x,n.x),VO(e.y,t.y,n.y)}function HO(e,t,n){e.min=t.min-n.min,e.max=e.min+Jn(t)}function Qu(e,t,n){HO(e.x,t.x,n.x),HO(e.y,t.y,n.y)}function w9(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ht(n,e,r.max):Math.min(e,n)),e}function qO(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function j9(e,{top:t,left:n,bottom:r,right:a}){return{x:qO(e.x,n,a),y:qO(e.y,t,r)}}function KO(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=ro(t.min,t.max-r,e.min):r>a&&(n=ro(e.min,e.max-a,t.min)),la(0,1,n)}function E9(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const px=.35;function T9(e=px){return e===!1?e=0:e===!0&&(e=px),{x:GO(e,"left","right"),y:GO(e,"top","bottom")}}function GO(e,t,n){return{min:YO(e,t),max:YO(e,n)}}function YO(e,t){return typeof e=="number"?e:e[t]||0}const XO=()=>({translate:0,scale:1,origin:0,originPoint:0}),rl=()=>({x:XO(),y:XO()}),WO=()=>({min:0,max:0}),bt=()=>({x:WO(),y:WO()});function ir(e){return[e("x"),e("y")]}function P3({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function N9({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function C9(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Kv(e){return e===void 0||e===1}function mx({scale:e,scaleX:t,scaleY:n}){return!Kv(e)||!Kv(t)||!Kv(n)}function vs(e){return mx(e)||M3(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function M3(e){return QO(e.x)||QO(e.y)}function QO(e){return e&&e!=="0%"}function om(e,t,n){const r=e-n,a=t*r;return n+a}function ZO(e,t,n,r,a){return a!==void 0&&(e=om(e,a,r)),om(e,n,r)+t}function yx(e,t=0,n=1,r,a){e.min=ZO(e.min,t,n,r,a),e.max=ZO(e.max,t,n,r,a)}function R3(e,{x:t,y:n}){yx(e.x,t.translate,t.scale,t.originPoint),yx(e.y,n.translate,n.scale,n.originPoint)}const JO=.999999999999,eE=1.0000000000001;function _9(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let i,s;for(let o=0;oJO&&(t.x=1),t.yJO&&(t.y=1)}function al(e,t){e.min=e.min+t,e.max=e.max+t}function tE(e,t,n,r,a=.5){const i=ht(e.min,e.max,a);yx(e,t,n,i,r)}function il(e,t){tE(e.x,t.x,t.scaleX,t.scale,t.originX),tE(e.y,t.y,t.scaleY,t.scale,t.originY)}function D3(e,t){return P3(C9(e.getBoundingClientRect(),t))}function P9(e,t,n){const r=D3(e,n),{scroll:a}=t;return a&&(al(r.x,a.offset.x),al(r.y,a.offset.y)),r}const $3=({current:e})=>e?e.ownerDocument.defaultView:null,M9=new WeakMap;class R9{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=bt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Id(f).point)},i=(f,d)=>{const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=TF(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ir(b=>{let y=this.getAxisMotionValue(b).get()||0;if(ra.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[b];x&&(y=Jn(x)*(parseFloat(y)/100))}}this.originPoint[b]=y}),m&&Re.postRender(()=>m(f,d)),sx(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(f,d)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=d;if(p&&this.currentDirection===null){this.currentDirection=D9(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),g&&g(f,d)},o=(f,d)=>this.stop(f,d),l=()=>ir(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new T3(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:o,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:$3(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&Re.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!Eh(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=w9(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&tl(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&a?this.constraints=j9(a.layoutBox,n):this.constraints=!1,this.elastic=T9(r),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&ir(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=E9(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tl(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=P9(r,a.root,this.visualElement.getTransformPagePoint());let s=A9(a.layout.layoutBox,i);if(n){const o=n(N9(s));this.hasMutatedConstraints=!!o,o&&(s=P3(o))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},c=ir(f=>{if(!Eh(f,n,this.currentDirection))return;let d=l&&l[f]||{};s&&(d={min:0,max:0});const h=a?200:1e6,p=a?40:1e7,m={type:"inertia",velocity:r?t[f]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(f,m)});return Promise.all(c).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return sx(this.visualElement,t),r.start(Ww(t,r,0,n,this.visualElement,!1))}stopAnimation(){ir(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ir(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ir(n=>{const{drag:r}=this.getProps();if(!Eh(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(n);if(a&&a.layout){const{min:s,max:o}=a.layout.layoutBox[n];i.set(t[n]-ht(s,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!tl(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};ir(s=>{const o=this.getAxisMotionValue(s);if(o&&this.constraints!==!1){const l=o.get();a[s]=O9({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ir(s=>{if(!Eh(s,t,null))return;const o=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];o.set(ht(l,c,a[s]))})}addListeners(){if(!this.visualElement.current)return;M9.set(this.visualElement,this);const t=this.visualElement.current,n=Xu(t,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();tl(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Re.read(r);const s=_f(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ir(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=l[f].translate,d.set(d.get()+l[f].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:s=px,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:i,dragElastic:s,dragMomentum:o}}}function Eh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function D9(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $9 extends ns{constructor(t){super(t),this.removeGroupControls=yn,this.removeListeners=yn,this.controls=new R9(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yn}unmount(){this.removeGroupControls(),this.removeListeners()}}const nE=e=>(t,n)=>{e&&Re.postRender(()=>e(t,n))};class k9 extends ns{constructor(){super(...arguments),this.removePointerDownListener=yn}onPointerDown(t){this.session=new T3(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$3(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:nE(t),onStart:nE(n),onMove:r,onEnd:(i,s)=>{delete this.session,a&&Re.postRender(()=>a(i,s))}}}mount(){this.removePointerDownListener=Xu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const pp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ou={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=rE(e,t.target.x),r=rE(e,t.target.y);return`${n}% ${r}%`}},L9={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=Ji.parse(e);if(a.length>5)return r;const i=Ji.createTransformer(e),s=typeof a[0]!="number"?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;a[0+s]/=o,a[1+s]/=l;const c=ht(o,l,.5);return typeof a[2+s]=="number"&&(a[2+s]/=c),typeof a[3+s]=="number"&&(a[3+s]/=c),i(a)}};class z9 extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:i}=t;lF(I9),i&&(n.group&&n.group.add(i),r&&r.register&&a&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),pp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,a||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Re.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),jw.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function k3(e){const[t,n]=g$(),r=A.useContext(gw);return u.jsx(z9,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(A$),isPresent:t,safeToRemove:n})}const I9={borderRadius:{...ou,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ou,borderTopRightRadius:ou,borderBottomLeftRadius:ou,borderBottomRightRadius:ou,boxShadow:L9};function B9(e,t,n){const r=cn(e)?e:Qr(e);return r.start(Ww("",r,t,n)),r.animation}function U9(e){return e instanceof SVGElement&&e.tagName!=="svg"}const F9=(e,t)=>e.depth-t.depth;class V9{constructor(){this.children=[],this.isDirty=!1}add(t){Lw(this.children,t),this.isDirty=!0}remove(t){zw(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(F9),this.isDirty=!1,this.children.forEach(t)}}function H9(e,t){const n=aa.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(Lr(r),e(i-t))};return Re.read(r,!0),()=>Lr(r)}const L3=["TopLeft","TopRight","BottomLeft","BottomRight"],q9=L3.length,aE=e=>typeof e=="string"?parseFloat(e):e,iE=e=>typeof e=="number"||fe.test(e);function K9(e,t,n,r,a,i){a?(e.opacity=ht(0,n.opacity!==void 0?n.opacity:1,G9(r)),e.opacityExit=ht(t.opacity!==void 0?t.opacity:1,0,Y9(r))):i&&(e.opacity=ht(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(ro(e,t,r))}function oE(e,t){e.min=t.min,e.max=t.max}function tr(e,t){oE(e.x,t.x),oE(e.y,t.y)}function lE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function cE(e,t,n,r,a){return e-=t,e=om(e,1/n,r),a!==void 0&&(e=om(e,1/a,r)),e}function X9(e,t=0,n=1,r=.5,a,i=e,s=e){if(ra.test(t)&&(t=parseFloat(t),t=ht(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=ht(i.min,i.max,r);e===i&&(o-=t),e.min=cE(e.min,t,n,o,a),e.max=cE(e.max,t,n,o,a)}function uE(e,t,[n,r,a],i,s){X9(e,t[n],t[r],t[a],t.scale,i,s)}const W9=["x","scaleX","originX"],Q9=["y","scaleY","originY"];function fE(e,t,n,r){uE(e.x,t,W9,n?n.x:void 0,r?r.x:void 0),uE(e.y,t,Q9,n?n.y:void 0,r?r.y:void 0)}function dE(e){return e.translate===0&&e.scale===1}function I3(e){return dE(e.x)&&dE(e.y)}function hE(e,t){return e.min===t.min&&e.max===t.max}function Z9(e,t){return hE(e.x,t.x)&&hE(e.y,t.y)}function pE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function B3(e,t){return pE(e.x,t.x)&&pE(e.y,t.y)}function mE(e){return Jn(e.x)/Jn(e.y)}function yE(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class J9{constructor(){this.members=[]}add(t){Lw(this.members,t),t.scheduleRender()}remove(t){if(zw(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function eH(e,t,n){let r="";const a=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((a||i||s)&&(r=`translate3d(${a}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:f,rotateX:d,rotateY:h,skewX:p,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const o=e.x.scale*t.x,l=e.y.scale*t.y;return(o!==1||l!==1)&&(r+=`scale(${o}, ${l})`),r||"none"}const bs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},_u=typeof window<"u"&&window.MotionDebug!==void 0,Gv=["","X","Y","Z"],tH={visibility:"hidden"},gE=1e3;let nH=0;function Yv(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function U3(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Y$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Re,!(a||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&U3(r)}function F3({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(s={},o=t==null?void 0:t()){this.id=nH++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,_u&&(bs.totalNodes=bs.resolvedTargetDeltas=bs.recalculatedProjection=0),this.nodes.forEach(iH),this.nodes.forEach(uH),this.nodes.forEach(fH),this.nodes.forEach(sH),_u&&window.MotionDebug.record(bs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=H9(h,250),pp.hasAnimatedSinceResize&&(pp.hasAnimatedSinceResize=!1,this.nodes.forEach(bE))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||f.getDefaultTransition()||yH,{onLayoutAnimationStart:b,onLayoutAnimationComplete:y}=f.getProps(),v=!this.targetLayout||!B3(this.targetLayout,m)||p,x=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const w={...Rw(g,"layout"),onPlay:b,onComplete:y};(f.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else h||bE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Lr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(dH),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&U3(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const S=w/1e3;xE(d.x,s.x,S),xE(d.y,s.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qu(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pH(this.relativeTarget,this.relativeTargetOrigin,h,S),x&&Z9(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=bt()),tr(x,this.relativeTarget)),g&&(this.animationValues=f,K9(f,c,this.latestValues,S,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Lr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Re.update(()=>{pp.hasAnimatedSinceResize=!0,this.currentAnimation=B9(0,gE,{...s,onUpdate:o=>{this.mixTargetDelta(o),s.onUpdate&&s.onUpdate(o)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:l,layout:c,latestValues:f}=s;if(!(!o||!l||!c)){if(this!==s&&this.layout&&c&&V3(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||bt();const d=Jn(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const h=Jn(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}tr(o,l),il(o,f),Wu(this.projectionDeltaWithTransform,this.layoutCorrected,o,f)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new J9),this.sharedNodes.get(s).add(o);const c=o.options.initialPromotionConfig;o.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const c={};l.z&&Yv("z",s,c,this.animationValues);for(let f=0;f{var o;return(o=s.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(vE),this.root.sharedNodes.clear()}}}function rH(e){e.updateLayout()}function aH(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?ir(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],p=Jn(h);h.min=r[d].min,h.max=h.min+p}):V3(i,n.layoutBox,r)&&ir(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],p=Jn(r[d]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const o=rl();Wu(o,r,n.layoutBox);const l=rl();s?Wu(l,e.applyTransform(a,!0),n.measuredBox):Wu(l,r,n.layoutBox);const c=!I3(o);let f=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:p}=d;if(h&&p){const m=bt();Qu(m,n.layoutBox,h.layoutBox);const g=bt();Qu(g,r,p.layoutBox),B3(m,g)||(f=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:o,hasLayoutChanged:c,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function iH(e){_u&&bs.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function sH(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function oH(e){e.clearSnapshot()}function vE(e){e.clearMeasurements()}function lH(e){e.isLayoutDirty=!1}function cH(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function bE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function uH(e){e.resolveTargetDelta()}function fH(e){e.calcProjection()}function dH(e){e.resetSkewAndRotation()}function hH(e){e.removeLeadSnapshot()}function xE(e,t,n){e.translate=ht(t.translate,0,n),e.scale=ht(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function SE(e,t,n,r){e.min=ht(t.min,n.min,r),e.max=ht(t.max,n.max,r)}function pH(e,t,n,r){SE(e.x,t.x,n.x,r),SE(e.y,t.y,n.y,r)}function mH(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yH={duration:.45,ease:[.4,0,.1,1]},wE=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),jE=wE("applewebkit/")&&!wE("chrome/")?Math.round:yn;function AE(e){e.min=jE(e.min),e.max=jE(e.max)}function gH(e){AE(e.x),AE(e.y)}function V3(e,t,n){return e==="position"||e==="preserve-aspect"&&!x9(mE(t),mE(n),.2)}function vH(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const bH=F3({attachResizeListener:(e,t)=>_f(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xv={current:void 0},H3=F3({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xv.current){const e=new bH({});e.mount(window),e.setOptions({layoutScroll:!0}),Xv.current=e}return Xv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),xH={pan:{Feature:k9},drag:{Feature:$9,ProjectionNode:H3,MeasureLayout:k3}};function OE(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,i=r[a];i&&Re.postRender(()=>i(t,Id(t)))}class SH extends ns{mount(){const{current:t}=this.node;t&&(this.unmount=wF(t,n=>(OE(this.node,n,"Start"),r=>OE(this.node,r,"End"))))}unmount(){}}class wH extends ns{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=zd(_f(this.node.current,"focus",()=>this.onFocus()),_f(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function EE(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),i=r[a];i&&Re.postRender(()=>i(t,Id(t)))}class jH extends ns{mount(){const{current:t}=this.node;t&&(this.unmount=EF(t,n=>(EE(this.node,n,"Start"),(r,{success:a})=>EE(this.node,r,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const gx=new WeakMap,Wv=new WeakMap,AH=e=>{const t=gx.get(e.target);t&&t(e)},OH=e=>{e.forEach(AH)};function EH({root:e,...t}){const n=e||document;Wv.has(n)||Wv.set(n,{});const r=Wv.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(OH,{root:e,...t})),r[a]}function TH(e,t,n){const r=EH(t);return gx.set(e,n),r.observe(e),()=>{gx.delete(e),r.unobserve(e)}}const NH={some:0,all:1};class CH extends ns{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:NH[a]},o=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),h=c?f:d;h&&h(l)};return TH(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_H(t,n))&&this.startObserver()}unmount(){}}function _H({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const PH={inView:{Feature:CH},tap:{Feature:jH},focus:{Feature:wH},hover:{Feature:SH}},MH={layout:{ProjectionNode:H3,MeasureLayout:k3}},lm={current:null},Qw={current:!1};function q3(){if(Qw.current=!0,!!vw)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>lm.current=e.matches;e.addListener(t),t()}else lm.current=!1}const RH=[...m3,sn,Ji],DH=e=>RH.find(p3(e)),TE=new WeakMap;function $H(e,t,n){for(const r in t){const a=t[r],i=n[r];if(cn(a))e.addValue(r,a);else if(cn(i))e.addValue(r,Qr(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=e.getStaticValue(r);e.addValue(r,Qr(s!==void 0?s:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const NE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class kH{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=aa.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),Qw.current||q3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:lm.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){TE.delete(this.current),this.projection&&this.projection.unmount(),Lr(this.notifyUpdate),Lr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=xo.has(t),a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Re.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Gl){const n=Gl[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):bt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Qr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(d3(a)||r3(a))?a=parseFloat(a):!DH(a)&&Ji.test(n)&&(a=c3(t,n)),this.setBaseTarget(t,cn(a)?a.get():a)),cn(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let a;if(typeof r=="string"||typeof r=="object"){const s=Ow(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(a=s[t])}if(r&&a!==void 0)return a;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!cn(i)?i:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Iw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class K3 extends kH{constructor(){super(...arguments),this.KeyframeResolver=y3}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;cn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function LH(e){return window.getComputedStyle(e)}class zH extends K3{constructor(){super(...arguments),this.type="html",this.renderInstance=P$}readValueFromInstance(t,n){if(xo.has(n)){const r=qw(n);return r&&r.default||0}else{const r=LH(t),a=(N$(n)?r.getPropertyValue(n):r[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return D3(t,n)}build(t,n,r){Nw(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Mw(t,n,r)}}class IH extends K3{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=bt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(xo.has(n)){const r=qw(n);return r&&r.default||0}return n=M$.has(n)?n:ww(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return $$(t,n,r)}build(t,n,r){Cw(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,a){R$(t,n,r,a)}mount(t){this.isSVGTag=Pw(t.tagName),super.mount(t)}}const BH=(e,t)=>Aw(e)?new IH(t):new zH(t,{allowProjection:e!==A.Fragment}),UH=gF({...f9,...PH,...xH,...MH},BH),Nt=M7(UH);function G3(e,t){let n;const r=()=>{const{currentTime:a}=t,s=(a===null?0:a.value)/100;n!==s&&e(s),n=s};return Re.update(r,!0),()=>Lr(r)}const mp=new WeakMap;let fi;function FH(e,t){if(t){const{inlineSize:n,blockSize:r}=t[0];return{width:n,height:r}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function VH({target:e,contentRect:t,borderBoxSize:n}){var r;(r=mp.get(e))===null||r===void 0||r.forEach(a=>{a({target:e,contentSize:t,get size(){return FH(e,n)}})})}function HH(e){e.forEach(VH)}function qH(){typeof ResizeObserver>"u"||(fi=new ResizeObserver(HH))}function KH(e,t){fi||qH();const n=H$(e);return n.forEach(r=>{let a=mp.get(r);a||(a=new Set,mp.set(r,a)),a.add(t),fi==null||fi.observe(r)}),()=>{n.forEach(r=>{const a=mp.get(r);a==null||a.delete(t),a!=null&&a.size||fi==null||fi.unobserve(r)})}}const yp=new Set;let Zu;function GH(){Zu=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};yp.forEach(n=>n(t))},window.addEventListener("resize",Zu)}function YH(e){return yp.add(e),Zu||GH(),()=>{yp.delete(e),!yp.size&&Zu&&(Zu=void 0)}}function XH(e,t){return typeof e=="function"?YH(e):KH(e,t)}const WH=50,CE=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),QH=()=>({time:0,x:CE(),y:CE()}),ZH={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function _E(e,t,n,r){const a=n[t],{length:i,position:s}=ZH[t],o=a.current,l=n.time;a.current=e[`scroll${s}`],a.scrollLength=e[`scroll${i}`]-e[`client${i}`],a.offset.length=0,a.offset[0]=0,a.offset[1]=a.scrollLength,a.progress=ro(0,a.scrollLength,a.current);const c=r-l;a.velocity=c>WH?0:Bw(a.current-o,c)}function JH(e,t,n){_E(e,"x",t,n),_E(e,"y",t,n),t.time=n}function eq(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const a=r.getBoundingClientRect();r=r.parentElement;const i=r.getBoundingClientRect();n.x+=a.left-i.left,n.y+=a.top-i.top}else if(r instanceof SVGGraphicsElement){const{x:a,y:i}=r.getBBox();n.x+=a,n.y+=i;let s=null,o=r.parentNode;for(;!s;)o.tagName==="svg"&&(s=o),o=r.parentNode;r=s}else break;return n}const vx={start:0,center:.5,end:1};function PE(e,t,n=0){let r=0;if(e in vx&&(e=vx[e]),typeof e=="string"){const a=parseFloat(e);e.endsWith("px")?r=a:e.endsWith("%")?e=a/100:e.endsWith("vw")?r=a/100*document.documentElement.clientWidth:e.endsWith("vh")?r=a/100*document.documentElement.clientHeight:e=a}return typeof e=="number"&&(r=t*e),n+r}const tq=[0,0];function nq(e,t,n,r){let a=Array.isArray(e)?e:tq,i=0,s=0;return typeof e=="number"?a=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?a=e.split(" "):a=[e,vx[e]?e:"0"]),i=PE(a[0],n,r),s=PE(a[1],t),i-s}const rq={All:[[0,0],[1,1]]},aq={x:0,y:0};function iq(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function sq(e,t,n){const{offset:r=rq.All}=n,{target:a=e,axis:i="y"}=n,s=i==="y"?"height":"width",o=a!==e?eq(a,e):aq,l=a===e?{width:e.scrollWidth,height:e.scrollHeight}:iq(a),c={width:e.clientWidth,height:e.clientHeight};t[i].offset.length=0;let f=!t[i].interpolate;const d=r.length;for(let h=0;hoq(e,r.target,n),update:a=>{JH(e,n,a),(r.offset||r.target)&&sq(e,n,r)},notify:()=>t(n)}}const lu=new WeakMap,ME=new WeakMap,Qv=new WeakMap,RE=e=>e===document.documentElement?window:e;function Zw(e,{container:t=document.documentElement,...n}={}){let r=Qv.get(t);r||(r=new Set,Qv.set(t,r));const a=QH(),i=lq(t,e,a,n);if(r.add(i),!lu.has(t)){const o=()=>{for(const h of r)h.measure()},l=()=>{for(const h of r)h.update(Bt.timestamp)},c=()=>{for(const h of r)h.notify()},f=()=>{Re.read(o,!1,!0),Re.read(l,!1,!0),Re.update(c,!1,!0)};lu.set(t,f);const d=RE(t);window.addEventListener("resize",f,{passive:!0}),t!==document.documentElement&&ME.set(t,XH(t,f)),d.addEventListener("scroll",f,{passive:!0})}const s=lu.get(t);return Re.read(s,!1,!0),()=>{var o;Lr(s);const l=Qv.get(t);if(!l||(l.delete(i),l.size))return;const c=lu.get(t);lu.delete(t),c&&(RE(t).removeEventListener("scroll",c),(o=ME.get(t))===null||o===void 0||o(),window.removeEventListener("resize",c))}}function cq({source:e,container:t,axis:n="y"}){e&&(t=e);const r={value:0},a=Zw(i=>{r.value=i[n].progress*100},{container:t,axis:n});return{currentTime:r,cancel:a}}const Zv=new Map;function Y3({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),Zv.has(t)||Zv.set(t,{});const r=Zv.get(t);return r[n]||(r[n]=z$()?new ScrollTimeline({source:t,axis:n}):cq({source:t,axis:n})),r[n]}function uq(e){return e.length===2}function X3(e){return e&&(e.target||e.offset)}function fq(e,t){return uq(e)||X3(t)?Zw(n=>{e(n[t.axis].progress,n)},t):G3(e,Y3(t))}function dq(e,t){if(e.flatten(),X3(t))return e.pause(),Zw(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=Y3(t);return e.attachTimeline?e.attachTimeline(n,r=>(r.pause(),G3(a=>{r.time=r.duration*a},n))):yn}}function hq(e,{axis:t="y",...n}={}){const r={axis:t,...n};return typeof e=="function"?fq(e,r):dq(e,r)}function DE(e,t){A7(!!(!t||t.current))}const pq=()=>({scrollX:Qr(0),scrollY:Qr(0),scrollXProgress:Qr(0),scrollYProgress:Qr(0)});function mq({container:e,target:t,layoutEffect:n=!0,...r}={}){const a=kc(pq);return(n?Hy:A.useEffect)(()=>(DE("target",t),DE("container",e),hq((s,{x:o,y:l})=>{a.scrollX.set(o.current),a.scrollXProgress.set(o.progress),a.scrollY.set(l.current),a.scrollYProgress.set(l.progress)},{...r,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0})),[e,t,JSON.stringify(r.offset)]),a}function yq(e){const t=kc(()=>Qr(e)),{isStatic:n}=A.useContext(Vy);if(n){const[,r]=A.useState(e);A.useEffect(()=>t.on("change",r),[])}return t}function W3(e,t){const n=yq(t()),r=()=>n.set(t());return r(),Hy(()=>{const a=()=>Re.preRender(r,!1,!0),i=e.map(s=>s.on("change",a));return()=>{i.forEach(s=>s()),Lr(r)}}),n}const gq=e=>e&&typeof e=="object"&&e.mix,vq=e=>gq(e)?e.mix:void 0;function bq(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],a=e[1+n],i=e[2+n],s=e[3+n],o=Yw(a,i,{mixer:vq(i[0]),...s});return t?o(r):o}function xq(e){Gu.current=[],e();const t=W3(Gu.current,e);return Gu.current=void 0,t}function Jv(e,t,n,r){if(typeof e=="function")return xq(e);const a=typeof t=="function"?t:bq(t,n,r);return Array.isArray(e)?$E(e,a):$E([e],([i])=>a(i))}function $E(e,t){const n=kc(()=>[]);return W3(e,()=>{n.length=0;const r=e.length;for(let a=0;atypeof e=="string",cu=()=>{let e,t;const n=new Promise((r,a)=>{e=r,t=a});return n.resolve=e,n.reject=t,n},kE=e=>e==null?"":String(e),Sq=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},wq=/###/g,LE=e=>e&&e.includes("###")?e.replace(wq,"."):e,zE=e=>!e||pe(e),Ju=(e,t,n)=>{const r=pe(t)?t.split("."):t;let a=0;for(;a{const{obj:r,k:a}=Ju(e,t,Object);if(r!==void 0||t.length===1){r[a]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),o=Ju(e,s,Object);for(;o.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),o=Ju(e,s,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${i}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${i}`]=n},jq=(e,t,n,r)=>{const{obj:a,k:i}=Ju(e,t,Object);a[i]=a[i]||[],a[i].push(n)},cm=(e,t)=>{const{obj:n,k:r}=Ju(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Aq=(e,t,n)=>{const r=cm(e,n);return r!==void 0?r:cm(t,n)},Q3=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?pe(e[r])||e[r]instanceof String||pe(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Q3(e[r],t[r],n):e[r]=t[r]);return e},xa=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Oq={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Eq=e=>pe(e)?e.replace(/[&<>"'\/]/g,t=>Oq[t]):e;class Tq{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Nq=[" ",",","?","!",";"],Cq=new Tq(20),_q=(e,t,n)=>{t=t||"",n=n||"";const r=Nq.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const a=Cq.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!a.test(e);if(!i){const s=e.indexOf(n);s>0&&!a.test(e.substring(0,s))&&(i=!0)}return i},bx=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let a=e;for(let i=0;ie==null?void 0:e.replace(/_/g,"-"),Pq={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class um{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Pq,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,a){return a&&!this.debug?null:(t=t.map(i=>pe(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),pe(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new um(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new um(this.logger,t)}}var Zr=new um;let Wy=class{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const a=this.observers[r].get(n)||0;this.observers[r].set(n,a+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...a)=>{n(...a),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([a,i])=>{for(let s=0;s{for(let s=0;s-1&&this.options.ns.splice(n,1)}getResource(t,n,r,a={}){var c,f;const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;t.includes(".")?o=t.split("."):(o=[t,n],r&&(Array.isArray(r)?o.push(...r):pe(r)&&i?o.push(...r.split(i)):o.push(r)));const l=cm(this.data,o);return!l&&!n&&!r&&t.includes(".")&&(t=o[0],n=o[1],r=o.slice(2).join(".")),l||!s||!pe(r)?l:bx((f=(c=this.data)==null?void 0:c[t])==null?void 0:f[n],r,i)}addResource(t,n,r,a,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let o=[t,n];r&&(o=o.concat(s?r.split(s):r)),t.includes(".")&&(o=t.split("."),a=n,n=o[1]),this.addNamespaces(n),IE(this.data,o,a),i.silent||this.emit("added",t,n,r,a)}addResources(t,n,r,a={silent:!1}){for(const i in r)(pe(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});a.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,a,i,s={silent:!1,skipCopy:!1}){let o=[t,n];t.includes(".")&&(o=t.split("."),a=r,r=n,n=o[1]),this.addNamespaces(n);let l=cm(this.data,o)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),a?Q3(l,r,i):l={...l,...r},IE(this.data,o,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(a=>n[a]&&Object.keys(n[a]).length>0)}toJSON(){return this.data}}var Z3={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,a){return e.forEach(i=>{var s;t=((s=this.processors[i])==null?void 0:s.process(t,n,r,a))??t}),t}};const J3=Symbol("i18next/PATH_KEY");function Mq(){const e=[],t=Object.create(null);let n;return t.get=(r,a)=>{var i;return(i=n==null?void 0:n.revoke)==null||i.call(n),a===J3?e:(e.push(a),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function vl(e,t){const{[J3]:n}=e(Mq()),r=(t==null?void 0:t.keySeparator)??".",a=(t==null?void 0:t.nsSeparator)??":",i=(t==null?void 0:t.enableSelector)==="strict";if(n.length>1&&a){const s=t==null?void 0:t.ns,o=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(o&&(i?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${a}${n.slice(1).join(r)}`}return n.join(r)}const eb=e=>!pe(e)&&typeof e!="boolean"&&typeof e!="number";class fm extends Wy{constructor(t,n={}){super(),Sq(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zr.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const a=this.resolve(t,r);if((a==null?void 0:a.res)===void 0)return!1;const i=eb(a.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!_q(t,r,a);if(s&&!o){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:pe(i)?[i]:i};const c=t.split(r);(r!==a||r===a&&this.options.ns.includes(c[0]))&&(i=c.shift()),t=c.join(a)}return{key:t,namespaces:pe(i)?[i]:i}}translate(t,n,r){let a=typeof n=="object"?{...n}:n;if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";typeof t=="function"&&(t=vl(t,{...this.options,...a})),Array.isArray(t)||(t=[String(t)]),t=t.map(L=>typeof L=="function"?vl(L,{...this.options,...a}):String(L));const i=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(t[t.length-1],a),c=l[l.length-1];let f=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const d=a.lng||this.language,h=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return h?i?{res:`${c}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:`${c}${f}${o}`:i?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:o;const p=this.resolve(t,a);let m=p==null?void 0:p.res;const g=(p==null?void 0:p.usedKey)||o,b=(p==null?void 0:p.exactUsedKey)||o,y=["[object Number]","[object Function]","[object RegExp]"],v=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,w=a.count!==void 0&&!pe(a.count),S=fm.hasDefaultValue(a),j=w?this.pluralResolver.getSuffix(d,a.count,a):"",O=a.ordinal&&w?this.pluralResolver.getSuffix(d,a.count,{ordinal:!1}):"",E=w&&!a.ordinal&&a.count===0,T=E&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${j}`]||a[`defaultValue${O}`]||a.defaultValue;let N=m;x&&!m&&S&&(N=T);const M=eb(N),C=Object.prototype.toString.apply(N);if(x&&N&&M&&!y.includes(C)&&!(pe(v)&&Array.isArray(N))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,N,{...a,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(p.res=L,p.usedParams=this.getUsedParamsDetails(a),p):L}if(s){const L=Array.isArray(N),D=L?[]:{},$=L?b:g;for(const P in N)if(Object.prototype.hasOwnProperty.call(N,P)){const k=`${$}${s}${P}`;S&&!m?D[P]=this.translate(k,{...a,defaultValue:eb(T)?T[P]:void 0,joinArrays:!1,ns:l}):D[P]=this.translate(k,{...a,joinArrays:!1,ns:l}),D[P]===k&&(D[P]=N[P])}m=D}}else if(x&&pe(v)&&Array.isArray(m))m=m.join(v),m&&(m=this.extendTranslation(m,t,a,r));else{let L=!1,D=!1;!this.isValidLookup(m)&&S&&(L=!0,m=T),this.isValidLookup(m)||(D=!0,m=o);const P=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:m,k=S&&T!==m&&this.options.updateMissing;if(D||L||k){if(this.logger.log(k?"updateKey":"missingKey",d,c,w&&!k?`${o}${this.pluralResolver.getSuffix(d,a.count,a)}`:o,k?T:m),s){const Y=this.resolve(o,{...a,keySeparator:!1});Y&&Y.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let I=[];const F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(let Y=0;Y{var ye;const Z=S&&te!==m?te:P;this.options.missingKeyHandler?this.options.missingKeyHandler(Y,c,q,Z,k,a):(ye=this.backendConnector)!=null&&ye.saveMissing&&this.backendConnector.saveMissing(Y,c,q,Z,k,a),this.emit("missingKey",Y,c,q,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?I.forEach(Y=>{const q=this.pluralResolver.getSuffixes(Y,a);E&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!q.includes(`${this.options.pluralSeparator}zero`)&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(te=>{H([Y],o+te,a[`defaultValue${te}`]||T)})}):H(I,o,T))}m=this.extendTranslation(m,t,a,p,r),D&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${c}${f}${o}`),(D||L)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${o}`:o,L?m:void 0,a))}return i?(p.res=m,p.usedParams=this.getUsedParamsDetails(a),p):m}extendTranslation(t,n,r,a,i){var l,c;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=pe(t)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(f){const p=t.match(this.interpolator.nestingRegexp);d=p&&p.length}let h=r.replace&&!pe(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||a.usedLng,r),f){const p=t.match(this.interpolator.nestingRegexp),m=p&&p.length;d(i==null?void 0:i[0])===p[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):this.translate(...p,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,o=pe(s)?[s]:s;return t!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(t=Z3.handle(o,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,a,i,s,o;return pe(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(l=>typeof l=="function"?vl(l,{...this.options,...n}):l)),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),f=c.key;a=f;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=n.count!==void 0&&!pe(n.count),p=h&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(pe(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(b=>{var y,v;this.isValidLookup(r)||(o=b,!this.checkedLoadedFor[`${g[0]}-${b}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((v=this.utils)!=null&&v.hasLoadedNamespace(o))&&(this.checkedLoadedFor[`${g[0]}-${b}`]=!0,this.logger.warn(`key "${a}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(x=>{var j;if(this.isValidLookup(r))return;s=x;const w=[f];if((j=this.i18nFormat)!=null&&j.addLookupKeys)this.i18nFormat.addLookupKeys(w,f,x,b,n);else{let O;h&&(O=this.pluralResolver.getSuffix(x,n.count,n));const E=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&O.startsWith(T)&&w.push(f+O.replace(T,this.options.pluralSeparator)),w.push(f+O),p&&w.push(f+E)),m){const N=`${f}${this.options.contextSeparator||"_"}${n.context}`;w.push(N),h&&(n.ordinal&&O.startsWith(T)&&w.push(N+O.replace(T,this.options.pluralSeparator)),w.push(N+O),p&&w.push(N+E))}}let S;for(;S=w.pop();)this.isValidLookup(r)||(i=S,r=this.getResource(x,b,S,n))}))})}),{res:r,usedKey:a,exactUsedKey:i,usedLng:s,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,a={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,a):this.resourceStore.getResource(t,n,r,a)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!pe(t.replace);let a=r?t.replace:t;if(r&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!r){a={...a};for(const i of n)delete a[i]}return a}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class UE{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zr.create("languageUtils")}getScriptPartFromCode(t){if(t=Pf(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Pf(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(pe(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const a=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const a=this.getScriptPartFromCode(r);if(this.isSupportedCode(a))return n=a;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),pe(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),a=[],i=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return pe(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):pe(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{a.includes(s)||i(this.formatLanguageCode(s))}),a}}const FE={zero:0,one:1,two:2,few:3,many:4,other:5},VE={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Rq{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Zr.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Pf(t==="dev"?"en":t),a=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:a});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:a})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),VE;if(!t.match(/-|_/))return VE;const l=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(l,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(a=>`${n}${a}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((a,i)=>FE[a]-FE[i]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,n,r={}){const a=this.getRule(t,r);return a?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const HE=(e,t,n,r=".",a=!0)=>{let i=Aq(e,t,n);return!i&&a&&pe(n)&&(i=bx(e,n,r),i===void 0&&(i=bx(t,n,r))),i},tb=e=>e.replace(/\$/g,"$$$$");class qE{constructor(t={}){var n;this.logger=Zr.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:a,prefix:i,prefixEscaped:s,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:f,unescapePrefix:d,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:b,maxReplaces:y,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:Eq,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=i?xa(i):s||"{{",this.suffix=o?xa(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":d?xa(d):"-",this.unescapeSuffix=this.unescapePrefix?"":f?xa(f):"",this.nestingPrefix=h?xa(h):p||xa("$t("),this.nestingSuffix=m?xa(m):g||xa(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=y||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,a){var p;let i,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=m=>{if(!m.includes(this.formatSeparator)){const v=HE(n,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...a,...n,interpolationkey:m}):v}const g=m.split(this.formatSeparator),b=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(HE(n,l,b,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...a,...n,interpolationkey:b})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const f=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((p=a==null?void 0:a.interpolation)==null?void 0:p.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>tb(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?tb(this.escape(m)):tb(m)}].forEach(m=>{for(o=0;i=m.regex.exec(t);){const g=i[1].trim();if(s=c(g),s===void 0)if(typeof f=="function"){const y=f(t,i,a);s=pe(y)?y:""}else if(a&&Object.prototype.hasOwnProperty.call(a,g))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else!pe(s)&&!this.useRawValueToEscape&&(s=kE(s));const b=m.safeValue(s);if(t=t.replace(i[0],b),d?(m.regex.lastIndex+=s.length,m.regex.lastIndex-=i[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,n,r={}){let a,i,s;const o=(l,c)=>{const f=this.nestingOptionsSeparator;if(!l.includes(f))return l;const d=l.split(new RegExp(`${xa(f)}[ ]*{`));let h=`{${d[1]}`;l=d[0],h=this.interpolate(h,s);const p=h.match(/'/g),m=h.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!m||((m==null?void 0:m.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),c&&(s={...c,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${f}${h}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,l};for(;a=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&!pe(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(c!==-1&&(l=a[1].slice(c).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),a[1]=a[1].slice(0,c)),i=n(o.call(this,a[1].trim(),s),s),i&&a[0]===t&&!pe(i))return i;pe(i)||(i=kE(i)),i||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),i=""),l.length&&(i=l.reduce((f,d)=>this.format(f,d,r.lng,{...r,interpolationkey:a[1].trim()}),i.trim())),t=t.replace(a[0],i),this.regexp.lastIndex=0}return t}}const Dq=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const a=r[1].slice(0,-1);t==="currency"&&!a.includes(":")?n.currency||(n.currency=a.trim()):t==="relativetime"&&!a.includes(":")?n.range||(n.range=a.trim()):a.split(";").forEach(s=>{if(s){const[o,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();n[f]||(n[f]=c),c==="false"&&(n[f]=!1),c==="true"&&(n[f]=!0),isNaN(c)||(n[f]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},KE=e=>{const t={};return(n,r,a)=>{let i=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(i={...i,[a.interpolationkey]:void 0});const s=r+JSON.stringify(i);let o=t[s];return o||(o=e(Pf(r),a),t[s]=o),o(n)}},$q=e=>(t,n,r)=>e(Pf(n),r)(t);class kq{constructor(t={}){this.logger=Zr.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?KE:$q;this.formats={number:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i});return o=>s.format(o)}),currency:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i,style:"currency"});return o=>s.format(o)}),datetime:r((a,i)=>{const s=new Intl.DateTimeFormat(a,{...i});return o=>s.format(o)}),relativetime:r((a,i)=>{const s=new Intl.RelativeTimeFormat(a,{...i});return o=>s.format(o,i.range||"day")}),list:r((a,i)=>{const s=new Intl.ListFormat(a,{...i});return o=>s.format(o)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=KE(n)}format(t,n,r,a={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&!i[0].includes(")")&&i.find(o=>o.includes(")"))){const o=i.findIndex(l=>l.includes(")"));i[0]=[i[0],...i.splice(1,o)].join(this.formatSeparator)}return i.reduce((o,l)=>{var d;const{formatName:c,formatOptions:f}=Dq(l);if(this.formats[c]){let h=o;try{const p=((d=a==null?void 0:a.formatParams)==null?void 0:d[a.interpolationkey])||{},m=p.locale||p.lng||a.locale||a.lng||r;h=this.formats[c](o,m,{...f,...a,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn(`there was no format function for ${c}`);return o},t)}}const Lq=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class zq extends Wy{constructor(t,n,r,a={}){var i,s;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=a,this.logger=Zr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(s=(i=this.backend)==null?void 0:i.init)==null||s.call(i,r,a.backend,a)}queueLoad(t,n,r,a){const i={},s={},o={},l={};return t.forEach(c=>{let f=!0;n.forEach(d=>{const h=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,f=!1,s[h]===void 0&&(s[h]=!0),i[h]===void 0&&(i[h]=!0),l[d]===void 0&&(l[d]=!0)))}),f||(o[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const a=t.split("|"),i=a[0],s=a[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const o={};this.queue.forEach(l=>{jq(l.loaded,[i],s),Lq(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const f=l.loaded[c];f.length&&f.forEach(d=>{o[c][d]===void 0&&(o[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r,a=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:a,wait:i,callback:s});return}this.readingCalls++;const o=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&f&&a{this.read(t,n,r,a+1,i*2,s)},i);return}s(c,f)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}return}return l(t,n,o)}prepareLoading(t,n,r={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();pe(t)&&(t=this.languageUtils.toResolveHierarchy(t)),pe(n)&&(n=[n]);const i=this.queueLoad(t,n,r,a);if(!i.toLoad.length)return i.pending.length||a(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),a=r[0],i=r[1];this.read(a,i,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${a} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${i} for language ${a}`,o),this.loaded(t,s,o)})}saveMissing(t,n,r,a,i,s={},o=()=>{}){var l,c,f,d,h;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((d=(f=this.services)==null?void 0:f.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((h=this.backend)!=null&&h.create){const p={...s,isUpdate:i},m=this.backend.create.bind(this.backend);if(m.length<6)try{let g;m.length===5?g=m(t,n,r,a,p):g=m(t,n,r,a),g&&typeof g.then=="function"?g.then(b=>o(null,b)).catch(o):o(null,g)}catch(g){o(g)}else m(t,n,r,a,o,p)}!t||!t[0]||this.store.addResource(t[0],n,r,a)}}}const nb=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),pe(e[1])&&(t.defaultValue=e[1]),pe(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),GE=e=>(pe(e.ns)&&(e.ns=[e.ns]),pe(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),pe(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Th=()=>{},Iq=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ef extends Wy{constructor(t={},n){if(super(),this.options=GE(t),this.services={},this.logger=Zr,this.modules={external:[]},Iq(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(pe(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=nb();this.options={...r,...this.options,...GE(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const a=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Zr.init(a(this.modules.logger),this.options):Zr.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=kq;const f=new UE(this.options);this.store=new BE(this.options.resources,this.options);const d=this.services;d.logger=Zr,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new Rq(f,{prepend:this.options.pluralSeparator}),c&&(d.formatter=a(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new qE(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new zq(a(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(d.languageDetector=a(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=a(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new fm(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Th),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...f)=>this.store[c](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...f)=>(this.store[c](...f),this)});const o=cu(),l=()=>{const c=(f,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(d),n(f,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(t,n=Th){var i,s;let r=n;const a=pe(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((a==null?void 0:a.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(d=>{d!=="cimode"&&(o.includes(d)||o.push(d))})};a?l(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>l(f)),(s=(i=this.options.preload)==null?void 0:i.forEach)==null||s.call(i,c=>l(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const a=cu();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Th),this.services.backendConnector.reload(t,n,i=>{a.resolve(),r(i)}),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Z3.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},i=(o,l)=>{l?this.isLanguageChangingTo===t&&(a(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(o,(...c)=>this.t(...c))},s=o=>{var f,d;!t&&!o&&this.services.languageDetector&&(o=[]);const l=pe(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(pe(o)?[o]:o);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),(d=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||d.call(f,c)),this.loadResources(c,h=>{i(h,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,a){const i=a==null?void 0:a.scopeNs,s=(o,l,...c)=>{let f;typeof l!="object"?f=this.options.overloadTranslationOptionHandler([o,l].concat(c)):f={...l},f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs;const d=f.ns!==void 0&&f.ns!==null;f.ns=f.ns||s.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||r||s.keyPrefix);const h={...this.options,...f};Array.isArray(i)&&!d&&(h.ns=i),typeof f.keyPrefix=="function"&&(f.keyPrefix=vl(f.keyPrefix,h));const p=this.options.keySeparator||".";let m;return f.keyPrefix&&Array.isArray(o)?m=o.map(g=>(typeof g=="function"&&(g=vl(g,h)),`${f.keyPrefix}${p}${g}`)):(typeof o=="function"&&(o=vl(o,h)),m=f.keyPrefix?`${f.keyPrefix}${p}${o}`:o),this.t(m,f)};return pe(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!a||s(i,t)))}loadNamespaces(t,n){const r=cu();return this.options.ns?(pe(t)&&(t=[t]),t.forEach(a=>{this.options.ns.includes(a)||this.options.ns.push(a)}),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=cu();pe(t)&&(t=[t]);const a=this.options.preload||[],i=t.filter(s=>!a.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=a.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var a,i;if(t||(t=this.resolvedLanguage||(((a=this.languages)==null?void 0:a.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const s=new Intl.Locale(t);if(s&&s.getTextInfo){const o=s.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new UE(nb());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new ef(t,n);return r.createInstance=ef.createInstance,r}cloneInstance(t={},n=Th){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const a={...this.options,...t,isClone:!0},i=new ef(a);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(o=>{i[o]=this[o]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((f,d)=>(f[d]={...l[c][d]},f),l[c]),l),{});i.store=new BE(o,a),i.services.resourceStore=i.store}if(t.interpolation){const l={...nb().interpolation,...this.options.interpolation,...t.interpolation},c={...a,interpolation:l};i.services.interpolator=new qE(c)}return i.translator=new fm(i.services,a),i.translator.on("*",(o,...l)=>{i.emit(o,...l)}),i.init(a,n),i.translator.options=a,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const rn=ef.createInstance();rn.createInstance;rn.dir;rn.init;rn.loadResources;rn.reloadResources;rn.use;rn.changeLanguage;rn.getFixedT;rn.t;rn.exists;rn.setDefaultNamespace;rn.hasLoadedNamespace;rn.loadNamespaces;rn.loadLanguages;const Bq=(e,t,n,r)=>{var i,s,o,l;const a=[n,{code:t,...r||{}}];if((s=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&s.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);ao(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(l=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&l.warn?e.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},YE={},xx=(e,t,n,r)=>{ao(n)&&YE[n]||(ao(n)&&(YE[n]=new Date),Bq(e,t,n,r))},ek=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Sx=(e,t,n)=>{e.loadNamespaces(t,ek(e,n))},XE=(e,t,n,r)=>{if(ao(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Sx(e,n,r);n.forEach(a=>{e.options.ns.indexOf(a)<0&&e.options.ns.push(a)}),e.loadLanguages(t,ek(e,r))},Uq=(e,t,n={})=>!t.languages||!t.languages.length?(xx(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!a(r.isLanguageChangingTo,e))return!1}}),ao=e=>typeof e=="string",Fq=e=>typeof e=="object"&&e!==null,Vq=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Hq={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},qq=e=>Hq[e],Kq=e=>e.replace(Vq,qq);let wx={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Kq,transDefaultProps:void 0};const Gq=(e={})=>{wx={...wx,...e}},Yq=()=>wx;let tk;const Xq=e=>{tk=e},Wq=()=>tk,Qq={type:"3rdParty",init(e){Gq(e.options.react),Xq(e)}},Zq=A.createContext();class Jq{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var nk={exports:{}},rk={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Xl=A;function eK(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tK=typeof Object.is=="function"?Object.is:eK,nK=Xl.useState,rK=Xl.useEffect,aK=Xl.useLayoutEffect,iK=Xl.useDebugValue;function sK(e,t){var n=t(),r=nK({inst:{value:n,getSnapshot:t}}),a=r[0].inst,i=r[1];return aK(function(){a.value=n,a.getSnapshot=t,rb(a)&&i({inst:a})},[e,n,t]),rK(function(){return rb(a)&&i({inst:a}),e(function(){rb(a)&&i({inst:a})})},[e]),iK(n),n}function rb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tK(e,n)}catch{return!0}}function oK(e,t){return t()}var lK=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oK:sK;rk.useSyncExternalStore=Xl.useSyncExternalStore!==void 0?Xl.useSyncExternalStore:lK;nk.exports=rk;var cK=nk.exports;const uK=(e,t)=>{if(ao(t))return t;if(Fq(t)&&ao(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const n=e[e.length-1];return typeof n=="function"?"":n}return e},fK={t:uK,ready:!1},dK=()=>()=>{},ni=(e,t={})=>{var T,N,M;const{i18n:n}=t,{i18n:r,defaultNS:a}=A.useContext(Zq)||{},i=n||r||Wq();i&&!i.reportNamespaces&&(i.reportNamespaces=new Jq),i||xx(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const s=A.useMemo(()=>{var C;return{...Yq(),...(C=i==null?void 0:i.options)==null?void 0:C.react,...t}},[i,t]),{useSuspense:o,keyPrefix:l}=s,c=a||((T=i==null?void 0:i.options)==null?void 0:T.defaultNS),f=ao(c)?[c]:c||["translation"],d=A.useMemo(()=>f,f);(M=(N=i==null?void 0:i.reportNamespaces)==null?void 0:N.addUsedNamespaces)==null||M.call(N,d);const h=A.useRef(0),p=A.useCallback(C=>{if(!i)return dK;const{bindI18n:L,bindI18nStore:D}=s,$=()=>{h.current+=1,C()};return L&&i.on(L,$),D&&i.store.on(D,$),()=>{L&&L.split(" ").forEach(P=>i.off(P,$)),D&&D.split(" ").forEach(P=>i.store.off(P,$))}},[i,s]),m=A.useRef(),g=A.useCallback(()=>{if(!i)return fK;const C=!!(i.isInitialized||i.initializedStoreOnce)&&d.every(I=>Uq(I,i,s)),L=t.lng||i.language,D=h.current,$=m.current;if($&&$.ready===C&&$.lng===L&&$.keyPrefix===l&&$.revision===D)return $;const k={t:i.getFixedT(L,s.nsMode==="fallback"?d:d[0],l,{scopeNs:d}),ready:C,lng:L,keyPrefix:l,revision:D};return m.current=k,k},[i,d,l,s,t.lng]),[b,y]=A.useState(0),{t:v,ready:x}=cK.useSyncExternalStore(p,g,g);A.useEffect(()=>{if(i&&!x&&!o){const C=()=>y(L=>L+1);t.lng?XE(i,t.lng,d,C):Sx(i,d,C)}},[i,t.lng,d,x,o,b]);const w=i||{},S=A.useRef(null),j=A.useRef(),O=C=>{const L=Object.getOwnPropertyDescriptors(C);L.__original&&delete L.__original;const D=Object.create(Object.getPrototypeOf(C),L);if(!Object.prototype.hasOwnProperty.call(D,"__original"))try{Object.defineProperty(D,"__original",{value:C,writable:!1,enumerable:!1,configurable:!1})}catch{}return D},E=A.useMemo(()=>{const C=w,L=C==null?void 0:C.language;let D=C;C&&(S.current&&S.current.__original===C?j.current!==L?(D=O(C),S.current=D,j.current=L):D=S.current:(D=O(C),S.current=D,j.current=L));const $=!x&&!o?(...k)=>(xx(i,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),v(...k)):v,P=[$,D,x];return P.t=$,P.i18n=D,P.ready=x,P},[v,w,x,w.resolvedLanguage,w.language,w.languages]);if(i&&o&&!x)throw new Promise(C=>{const L=()=>C();t.lng?XE(i,t.lng,d,L):Sx(i,d,L)});return E};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hK=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ak=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var pK={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mK=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...o},l)=>A.createElement("svg",{ref:l,...pK,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ak("lucide",a),...o},[...s.map(([c,f])=>A.createElement(c,f)),...Array.isArray(i)?i:[i]]));/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ae=(e,t)=>{const n=A.forwardRef(({className:r,...a},i)=>A.createElement(mK,{ref:i,iconNode:t,className:ak(`lucide-${hK(e)}`,r),...a}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ik=ae("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Es=ae("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jw=ae("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sk=ae("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ok=ae("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yK=ae("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lk=ae("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gK=ae("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pu=ae("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vK=ae("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bK=ae("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ck=ae("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uk=ae("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fk=ae("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WE=ae("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mf=ae("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xK=ae("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dk=ae("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hk=ae("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pk=ae("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ft=ae("Flower2",[["path",{d:"M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1",key:"3pnvol"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M12 10v12",key:"6ubwww"}],["path",{d:"M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z",key:"9hd38g"}],["path",{d:"M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z",key:"ufn41s"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mk=ae("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SK=ae("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wK=ae("HandHeart",[["path",{d:"M11 14h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 16",key:"1ifwr1"}],["path",{d:"m7 20 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"17abbs"}],["path",{d:"m2 15 6 6",key:"10dquu"}],["path",{d:"M19.5 8.5c.7-.7 1.5-1.6 1.5-2.7A2.73 2.73 0 0 0 16 4a2.78 2.78 0 0 0-5 1.8c0 1.2.8 2 1.5 2.8L16 12Z",key:"1h3036"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jK=ae("Headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rf=ae("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yk=ae("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const AK=ae("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ej=ae("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QE=ae("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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gk=ae("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dm=ae("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Df=ae("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vk=ae("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OK=ae("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZE=ae("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EK=ae("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tj=ae("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const TK=ae("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JE=ae("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nj=ae("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qy=ae("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bk=ae("ScrollText",[["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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rj=ae("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NK=ae("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xk=ae("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aj=ae("ShieldCheck",[["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",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ij=ae("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sj=ae("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CK=ae("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bl=ae("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xr=ae("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wa=ae("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bd=ae("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _K=ae("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PK=ae("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MK=ae("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const RK=ae("TriangleAlert",[["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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ud=ae("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sk=ae("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wk=ae("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jk=ae("Users",[["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"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);function Ak(e,t){return function(){return e.apply(t,arguments)}}const{toString:DK}=Object.prototype,{getPrototypeOf:Zy}=Object,{iterator:Jy,toStringTag:Ok}=Symbol,eg=(e=>t=>{const n=DK.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Br=e=>(e=e.toLowerCase(),t=>eg(t)===e),tg=e=>t=>typeof t===e,{isArray:io}=Array,Wl=tg("undefined");function Ic(e){return e!==null&&!Wl(e)&&e.constructor!==null&&!Wl(e.constructor)&&Cn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ek=Br("ArrayBuffer");function $K(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ek(e.buffer),t}const kK=tg("string"),Cn=tg("function"),Tk=tg("number"),Fd=e=>e!==null&&typeof e=="object",LK=e=>e===!0||e===!1,gp=e=>{if(eg(e)!=="object")return!1;const t=Zy(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ok in e)&&!(Jy in e)},zK=e=>{if(!Fd(e)||Ic(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},IK=Br("Date"),BK=Br("File"),UK=e=>!!(e&&typeof e.uri<"u"),FK=e=>e&&typeof e.getParts<"u",VK=Br("Blob"),HK=Br("FileList"),qK=e=>Fd(e)&&Cn(e.pipe);function KK(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const eT=KK(),tT=typeof eT.FormData<"u"?eT.FormData:void 0,GK=e=>{if(!e)return!1;if(tT&&e instanceof tT)return!0;const t=Zy(e);if(!t||t===Object.prototype||!Cn(e.append))return!1;const n=eg(e);return n==="formdata"||n==="object"&&Cn(e.toString)&&e.toString()==="[object FormData]"},YK=Br("URLSearchParams"),[XK,WK,QK,ZK]=["ReadableStream","Request","Response","Headers"].map(Br),JK=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vd(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),io(e))for(r=0,a=e.length;r0;)if(a=n[r],t===a.toLowerCase())return a;return null}const Ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ck=e=>!Wl(e)&&e!==Ts;function jx(...e){const{caseless:t,skipUndefined:n}=Ck(this)&&this||{},r={},a=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const o=t&&typeof s=="string"&&Nk(r,s)||s,l=Ax(r,o)?r[o]:void 0;gp(l)&&gp(i)?r[o]=jx(l,i):gp(i)?r[o]=jx({},i):io(i)?r[o]=i.slice():(!n||!Wl(i))&&(r[o]=i)};for(let i=0,s=e.length;i(Vd(t,(a,i)=>{n&&Cn(a)?Object.defineProperty(e,i,{__proto__:null,value:Ak(a,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),tG=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),nG=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},rG=(e,t,n,r)=>{let a,i,s;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!r||r(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=n!==!1&&Zy(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},aG=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},iG=e=>{if(!e)return null;if(io(e))return e;let t=e.length;if(!Tk(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sG=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zy(Uint8Array)),oG=(e,t)=>{const r=(e&&e[Jy]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},lG=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},cG=Br("HTMLFormElement"),uG=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),Ax=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),{propertyIsEnumerable:fG}=Object.prototype,dG=Br("RegExp"),_k=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Vd(n,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(r[i]=s||a)}),Object.defineProperties(e,r)},hG=e=>{_k(e,(t,n)=>{if(Cn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Cn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},pG=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return io(e)?r(e):r(String(e).split(t)),n},mG=()=>{},yG=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function gG(e){return!!(e&&Cn(e.append)&&e[Ok]==="FormData"&&e[Jy])}const vG=e=>{const t=new WeakSet,n=r=>{if(Fd(r)){if(t.has(r))return;if(Ic(r))return r;if(!("toJSON"in r)){t.add(r);const a=io(r)?[]:{};return Vd(r,(i,s)=>{const o=n(i);!Wl(o)&&(a[s]=o)}),t.delete(r),a}}return r};return n(e)},bG=Br("AsyncFunction"),xG=e=>e&&(Fd(e)||Cn(e))&&Cn(e.then)&&Cn(e.catch),Pk=((e,t)=>e?setImmediate:t?((n,r)=>(Ts.addEventListener("message",({source:a,data:i})=>{a===Ts&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Ts.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Cn(Ts.postMessage)),SG=typeof queueMicrotask<"u"?queueMicrotask.bind(Ts):typeof process<"u"&&process.nextTick||Pk,wG=e=>e!=null&&Cn(e[Jy]),z={isArray:io,isArrayBuffer:Ek,isBuffer:Ic,isFormData:GK,isArrayBufferView:$K,isString:kK,isNumber:Tk,isBoolean:LK,isObject:Fd,isPlainObject:gp,isEmptyObject:zK,isReadableStream:XK,isRequest:WK,isResponse:QK,isHeaders:ZK,isUndefined:Wl,isDate:IK,isFile:BK,isReactNativeBlob:UK,isReactNative:FK,isBlob:VK,isRegExp:dG,isFunction:Cn,isStream:qK,isURLSearchParams:YK,isTypedArray:sG,isFileList:HK,forEach:Vd,merge:jx,extend:eG,trim:JK,stripBOM:tG,inherits:nG,toFlatObject:rG,kindOf:eg,kindOfTest:Br,endsWith:aG,toArray:iG,forEachEntry:oG,matchAll:lG,isHTMLForm:cG,hasOwnProperty:Ax,hasOwnProp:Ax,reduceDescriptors:_k,freezeMethods:hG,toObjectSet:pG,toCamelCase:uG,noop:mG,toFiniteNumber:yG,findKey:Nk,global:Ts,isContextDefined:Ck,isSpecCompliantForm:gG,toJSONObject:vG,isAsyncFn:bG,isThenable:xG,setImmediate:Pk,asap:SG,isIterable:wG},jG=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),AG=e=>{const t={};let n,r,a;return e&&e.split(` +`).forEach(function(s){a=s.indexOf(":"),n=s.substring(0,a).trim().toLowerCase(),r=s.substring(a+1).trim(),!(!n||t[n]&&jG[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function OG(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const EG=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),TG=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function oj(e,t){return z.isArray(e)?e.map(n=>oj(n,t)):OG(String(e).replace(t,""))}const NG=e=>oj(e,EG),CG=e=>oj(e,TG);function Mk(e){const t=Object.create(null);return z.forEach(e.toJSON(),(n,r)=>{t[r]=CG(n)}),t}const nT=Symbol("internals");function uu(e){return e&&String(e).trim().toLowerCase()}function vp(e){return e===!1||e==null?e:z.isArray(e)?e.map(vp):NG(String(e))}function _G(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const PG=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ab(e,t,n,r,a){if(z.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!z.isString(t)){if(z.isString(r))return t.indexOf(r)!==-1;if(z.isRegExp(r))return r.test(t)}}function MG(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function RG(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(a,i,s){return this[r].call(this,t,a,i,s)},configurable:!0})})}let gn=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(o,l,c){const f=uu(l);if(!f)return;const d=z.findKey(a,f);(!d||a[d]===void 0||c===!0||c===void 0&&a[d]!==!1)&&(a[d||l]=vp(o))}const s=(o,l)=>z.forEach(o,(c,f)=>i(c,f,l));if(z.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(z.isString(t)&&(t=t.trim())&&!PG(t))s(AG(t),n);else if(z.isObject(t)&&z.isIterable(t)){let o={},l,c;for(const f of t){if(!z.isArray(f))throw new TypeError("Object iterator must return a key-value pair");o[c=f[0]]=(l=o[c])?z.isArray(l)?[...l,f[1]]:[l,f[1]]:f[1]}s(o,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=uu(t),t){const r=z.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return _G(a);if(z.isFunction(n))return n.call(this,a,r);if(z.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=uu(t),t){const r=z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ab(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(s){if(s=uu(s),s){const o=z.findKey(r,s);o&&(!n||ab(r,r[o],o,n))&&(delete r[o],a=!0)}}return z.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||ab(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return z.forEach(this,(a,i)=>{const s=z.findKey(r,i);if(s){n[s]=vp(a),delete n[i];return}const o=t?MG(i):String(i).trim();o!==i&&delete n[i],n[o]=vp(a),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return z.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&z.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[nT]=this[nT]={accessors:{}}).accessors,a=this.prototype;function i(s){const o=uu(s);r[o]||(RG(a,s),r[o]=!0)}return z.isArray(t)?t.forEach(i):i(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});z.freezeMethods(gn);const DG="[REDACTED ****]";function $G(e){if(z.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function kG(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],a=i=>{if(i===null||typeof i!="object"||z.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof gn&&(i=i.toJSON()),r.push(i);let s;if(z.isArray(i))s=[],i.forEach((o,l)=>{const c=a(o);z.isUndefined(c)||(s[l]=c)});else{if(!z.isPlainObject(i)&&$G(i))return r.pop(),i;s=Object.create(null);for(const[o,l]of Object.entries(i)){const c=n.has(o.toLowerCase())?DG:a(l);z.isUndefined(c)||(s[o]=c)}}return r.pop(),s};return a(e)}let re=class Rk extends Error{static from(t,n,r,a,i,s){const o=new Rk(t.message,n||t.code,r,a,i);return o.cause=t,o.name=t.name,t.status!=null&&o.status==null&&(o.status=t.status),s&&Object.assign(o,s),o}constructor(t,n,r,a,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&z.hasOwnProp(t,"redact")?t.redact:void 0,r=z.isArray(n)&&n.length>0?kG(t,n):z.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};re.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";re.ERR_BAD_OPTION="ERR_BAD_OPTION";re.ECONNABORTED="ECONNABORTED";re.ETIMEDOUT="ETIMEDOUT";re.ECONNREFUSED="ECONNREFUSED";re.ERR_NETWORK="ERR_NETWORK";re.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";re.ERR_DEPRECATED="ERR_DEPRECATED";re.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";re.ERR_BAD_REQUEST="ERR_BAD_REQUEST";re.ERR_CANCELED="ERR_CANCELED";re.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";re.ERR_INVALID_URL="ERR_INVALID_URL";re.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const LG=null;function Ox(e){return z.isPlainObject(e)||z.isArray(e)}function Dk(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function ib(e,t,n){return e?e.concat(t).map(function(a,i){return a=Dk(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function zG(e){return z.isArray(e)&&!e.some(Ox)}const IG=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function ng(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,y){return!z.isUndefined(y[b])});const r=n.metaTokens,a=n.visitor||d,i=n.dots,s=n.indexes,o=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,c=o&&z.isSpecCompliantForm(t);if(!z.isFunction(a))throw new TypeError("visitor must be a function");function f(g){if(g===null)return"";if(z.isDate(g))return g.toISOString();if(z.isBoolean(g))return g.toString();if(!c&&z.isBlob(g))throw new re("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(g)||z.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,b,y){let v=g;if(z.isReactNative(t)&&z.isReactNativeBlob(g))return t.append(ib(y,b,i),f(g)),!1;if(g&&!y&&typeof g=="object"){if(z.endsWith(b,"{}"))b=r?b:b.slice(0,-2),g=JSON.stringify(g);else if(z.isArray(g)&&zG(g)||(z.isFileList(g)||z.endsWith(b,"[]"))&&(v=z.toArray(g)))return b=Dk(b),v.forEach(function(w,S){!(z.isUndefined(w)||w===null)&&t.append(s===!0?ib([b],S,i):s===null?b:b+"[]",f(w))}),!1}return Ox(g)?!0:(t.append(ib(y,b,i),f(g)),!1)}const h=[],p=Object.assign(IG,{defaultVisitor:d,convertValue:f,isVisitable:Ox});function m(g,b,y=0){if(!z.isUndefined(g)){if(y>l)throw new re("Object is too deeply nested ("+y+" levels). Max depth: "+l,re.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(g)!==-1)throw new Error("Circular reference detected in "+b.join("."));h.push(g),z.forEach(g,function(x,w){(!(z.isUndefined(x)||x===null)&&a.call(t,x,z.isString(w)?w.trim():w,b,p))===!0&&m(x,b?b.concat(w):[w],y+1)}),h.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return m(e),t}function rT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function lj(e,t){this._pairs=[],e&&ng(e,this,t)}const $k=lj.prototype;$k.append=function(t,n){this._pairs.push([t,n])};$k.toString=function(t){const n=t?function(r){return t.call(this,r,rT)}:rT;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function BG(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function kk(e,t,n){if(!t)return e;const r=n&&n.encode||BG,a=z.isFunction(n)?{serialize:n}:n,i=a&&a.serialize;let s;if(i?s=i(t,a):s=z.isURLSearchParams(t)?t.toString():new lj(t,a).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class aT{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const cj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},UG=typeof URLSearchParams<"u"?URLSearchParams:lj,FG=typeof FormData<"u"?FormData:null,VG=typeof Blob<"u"?Blob:null,HG={isBrowser:!0,classes:{URLSearchParams:UG,FormData:FG,Blob:VG},protocols:["http","https","file","blob","url","data"]},uj=typeof window<"u"&&typeof document<"u",Ex=typeof navigator=="object"&&navigator||void 0,qG=uj&&(!Ex||["ReactNative","NativeScript","NS"].indexOf(Ex.product)<0),KG=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",GG=uj&&window.location.href||"http://localhost",YG=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:uj,hasStandardBrowserEnv:qG,hasStandardBrowserWebWorkerEnv:KG,navigator:Ex,origin:GG},Symbol.toStringTag,{value:"Module"})),Jt={...YG,...HG};function XG(e,t){return ng(e,new Jt.classes.URLSearchParams,{visitor:function(n,r,a,i){return Jt.isNode&&z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function WG(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function QG(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r=n.length;return s=!s&&z.isArray(a)?a.length:s,l?(z.hasOwnProp(a,s)?a[s]=z.isArray(a[s])?a[s].concat(r):[a[s],r]:a[s]=r,!o):((!z.hasOwnProp(a,s)||!z.isObject(a[s]))&&(a[s]=[]),t(n,r,a[s],i)&&z.isArray(a[s])&&(a[s]=QG(a[s])),!o)}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,(r,a)=>{t(WG(r),a,n,0)}),n}return null}const Mo=(e,t)=>e!=null&&z.hasOwnProp(e,t)?e[t]:void 0;function ZG(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Hd={transitional:cj,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=z.isObject(t);if(i&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return a?JSON.stringify(Lk(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){const l=Mo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return XG(t,l).toString();if((o=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=Mo(this,"env"),f=c&&c.FormData;return ng(o?{"files[]":t}:t,f&&new f,l)}}return i||a?(n.setContentType("application/json",!1),ZG(t)):t}],transformResponse:[function(t){const n=Mo(this,"transitional")||Hd.transitional,r=n&&n.forcedJSONParsing,a=Mo(this,"responseType"),i=a==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(r&&!a||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,Mo(this,"parseReviver"))}catch(l){if(o)throw l.name==="SyntaxError"?re.from(l,re.ERR_BAD_RESPONSE,this,null,Mo(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Jt.classes.FormData,Blob:Jt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch","query"],e=>{Hd.headers[e]={}});function sb(e,t){const n=this||Hd,r=t||n,a=gn.from(r.headers);let i=r.data;return z.forEach(e,function(o){i=o.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function zk(e){return!!(e&&e.__CANCEL__)}let qd=class extends re{constructor(t,n,r){super(t??"canceled",re.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ik(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new re("Request failed with status code "+n.status,n.status>=400&&n.status<500?re.ERR_BAD_REQUEST:re.ERR_BAD_RESPONSE,n.config,n.request,n))}function JG(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function eY(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),f=r[i];s||(s=c),n[a]=l,r[a]=c;let d=i,h=0;for(;d!==a;)h+=n[d++],d=d%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-s{n=f,a=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{const f=Date.now(),d=f-n;d>=r?s(c,f):(a=c,i||(i=setTimeout(()=>{i=null,s(a)},r-d)))},()=>a&&s(a)]}const hm=(e,t,n=3)=>{let r=0;const a=eY(50,250);return tY(i=>{if(!i||typeof i.loaded!="number")return;const s=i.loaded,o=i.lengthComputable?i.total:void 0,l=o!=null?Math.min(s,o):s,c=Math.max(0,l-r),f=a(c);r=Math.max(r,l);const d={loaded:l,total:o,progress:o?l/o:void 0,bytes:c,rate:f||void 0,estimated:f&&o?(o-l)/f:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(d)},n)},iT=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},sT=e=>(...t)=>z.asap(()=>e(...t)),nY=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,rY=Jt.hasStandardBrowserEnv?{write(e,t,n,r,a,i,s){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];z.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),z.isString(r)&&o.push(`path=${r}`),z.isString(a)&&o.push(`domain=${a}`),i===!0&&o.push("secure"),z.isString(s)&&o.push(`SameSite=${s}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof gn?{...e}:e;function so(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,f,d,h){return z.isPlainObject(c)&&z.isPlainObject(f)?z.merge.call({caseless:h},c,f):z.isPlainObject(f)?z.merge({},f):z.isArray(f)?f.slice():f}function a(c,f,d,h){if(z.isUndefined(f)){if(!z.isUndefined(c))return r(void 0,c,d,h)}else return r(c,f,d,h)}function i(c,f){if(!z.isUndefined(f))return r(void 0,f)}function s(c,f){if(z.isUndefined(f)){if(!z.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function o(c,f,d){if(z.hasOwnProp(t,d))return r(c,f);if(z.hasOwnProp(e,d))return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:o,headers:(c,f,d)=>a(oT(c),oT(f),d,!0)};return z.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const d=z.hasOwnProp(l,f)?l[f]:a,h=z.hasOwnProp(e,f)?e[f]:void 0,p=z.hasOwnProp(t,f)?t[f]:void 0,m=d(h,p,f);z.isUndefined(m)&&d!==o||(n[f]=m)}),n}const sY=["content-type","content-length"];function oY(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,a])=>{sY.includes(r.toLowerCase())&&e.set(r,a)})}const lY=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Uk(e){const t=so({},e),n=h=>z.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let a=n("withXSRFToken");const i=n("xsrfHeaderName"),s=n("xsrfCookieName");let o=n("headers");const l=n("auth"),c=n("baseURL"),f=n("allowAbsoluteUrls"),d=n("url");if(t.headers=o=gn.from(o),t.url=kk(Bk(c,d,f),n("params"),n("paramsSerializer")),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?lY(l.password):""))),z.isFormData(r)&&(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv||z.isReactNative(r)?o.setContentType(void 0):z.isFunction(r.getHeaders)&&oY(o,r.getHeaders(),n("formDataHeaderPolicy"))),Jt.hasStandardBrowserEnv&&(z.isFunction(a)&&(a=a(t)),a===!0||a==null&&nY(t.url))){const p=i&&s&&rY.read(s);p&&o.set(i,p)}return t}const cY=typeof XMLHttpRequest<"u",uY=cY&&function(e){return new Promise(function(n,r){const a=Uk(e);let i=a.data;const s=gn.from(a.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=a,f,d,h,p,m;function g(){p&&p(),m&&m(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(a.method.toUpperCase(),a.url,!0),b.timeout=a.timeout;function y(){if(!b)return;const x=gn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),S={data:!o||o==="text"||o==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:x,config:e,request:b};Ik(function(O){n(O),g()},function(O){r(O),g()},S),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(y)},b.onabort=function(){b&&(r(new re("Request aborted",re.ECONNABORTED,e,b)),g(),b=null)},b.onerror=function(w){const S=w&&w.message?w.message:"Network Error",j=new re(S,re.ERR_NETWORK,e,b);j.event=w||null,r(j),g(),b=null},b.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const S=a.transitional||cj;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),r(new re(w,S.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,b)),g(),b=null},i===void 0&&s.setContentType(null),"setRequestHeader"in b&&z.forEach(Mk(s),function(w,S){b.setRequestHeader(S,w)}),z.isUndefined(a.withCredentials)||(b.withCredentials=!!a.withCredentials),o&&o!=="json"&&(b.responseType=a.responseType),c&&([h,m]=hm(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,p]=hm(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(f=x=>{b&&(r(!x||x.type?new qd(null,e,b):x),b.abort(),g(),b=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const v=JG(a.url);if(v&&!Jt.protocols.includes(v)){r(new re("Unsupported protocol "+v+":",re.ERR_BAD_REQUEST,e));return}b.send(i||null)})},fY=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const a=function(l){if(!r){r=!0,s();const c=l instanceof Error?l:this.reason;n.abort(c instanceof re?c:new qd(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,a(new re(`timeout of ${t}ms exceeded`,re.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),e=null)};e.forEach(l=>l.addEventListener("abort",a));const{signal:o}=n;return o.unsubscribe=()=>z.asap(s),o},dY=function*(e,t){let n=e.byteLength;if(n{const a=hY(e,t);let i=0,s,o=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:f}=await a.next();if(c){o(),l.close();return}let d=f.byteLength;if(n){let h=i+=d;n(h)}l.enqueue(new Uint8Array(f))}catch(c){throw o(c),c}},cancel(l){return o(l),a.return()}},{highWaterMark:2})};function mY(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let s=r.length;const o=r.length;for(let p=0;p=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(s-=2,p+=2)}let l=0,c=o-1;const f=p=>p>=2&&r.charCodeAt(p-2)===37&&r.charCodeAt(p-1)===51&&(r.charCodeAt(p)===68||r.charCodeAt(p)===100);c>=0&&(r.charCodeAt(c)===61?(l++,c--):f(c)&&(l++,c-=3)),l===1&&c>=0&&(r.charCodeAt(c)===61||f(c))&&l++;const h=Math.floor(s/4)*3-(l||0);return h>0?h:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let i=0;for(let s=0,o=r.length;s=55296&&l<=56319&&s+1=56320&&c<=57343?(i+=4,s++):i+=3}else i+=3}return i}const fj="1.17.0",cT=64*1024,{isFunction:Nh}=z,yY=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),uT=e=>{if(!z.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},fT=(e,...t)=>{try{return!!e(...t)}catch{return!1}},gY=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},vY=e=>{const t=z.global!==void 0&&z.global!==null?z.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:i,Response:s}=e,o=a?Nh(a):typeof fetch=="function",l=Nh(i),c=Nh(s);if(!o)return!1;const f=o&&Nh(n),d=o&&(typeof r=="function"?(y=>v=>y.encode(v))(new r):async y=>new Uint8Array(await new i(y).arrayBuffer())),h=l&&f&&fT(()=>{let y=!1;const v=new i(Jt.origin,{body:new n,method:"POST",get duplex(){return y=!0,"half"}}),x=v.headers.has("Content-Type");return v.body!=null&&v.body.cancel(),y&&!x}),p=c&&f&&fT(()=>z.isReadableStream(new s("").body)),m={stream:p&&(y=>y.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!m[y]&&(m[y]=(v,x)=>{let w=v&&v[y];if(w)return w.call(v);throw new re(`Response type '${y}' is not supported`,re.ERR_NOT_SUPPORT,x)})});const g=async y=>{if(y==null)return 0;if(z.isBlob(y))return y.size;if(z.isSpecCompliantForm(y))return(await new i(Jt.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(z.isArrayBufferView(y)||z.isArrayBuffer(y))return y.byteLength;if(z.isURLSearchParams(y)&&(y=y+""),z.isString(y))return(await d(y)).byteLength},b=async(y,v)=>{const x=z.toFiniteNumber(y.getContentLength());return x??g(v)};return async y=>{let{url:v,method:x,data:w,signal:S,cancelToken:j,timeout:O,onDownloadProgress:E,onUploadProgress:T,responseType:N,headers:M,withCredentials:C="same-origin",fetchOptions:L,maxContentLength:D,maxBodyLength:$}=Uk(y);const P=z.isNumber(D)&&D>-1,k=z.isNumber($)&&$>-1,I=Z=>z.hasOwnProp(y,Z)?y[Z]:void 0;let F=a||fetch;N=N?(N+"").toLowerCase():"text";let H=fY([S,j&&j.toAbortSignal()],O),Y=null;const q=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let te;try{let Z;const ye=I("auth");if(ye){const X=ye.username||"",V=ye.password||"";Z={username:X,password:V}}if(gY(v)){const X=new URL(v,Jt.origin);if(!Z&&(X.username||X.password)){const V=uT(X.username),_e=uT(X.password);Z={username:V,password:_e}}(X.username||X.password)&&(X.username="",X.password="",v=X.href)}if(Z&&(M.delete("authorization"),M.set("Authorization","Basic "+btoa(yY((Z.username||"")+":"+(Z.password||""))))),P&&typeof v=="string"&&v.startsWith("data:")&&mY(v)>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y);if(k&&x!=="get"&&x!=="head"){const X=await b(M,w);if(typeof X=="number"&&isFinite(X)&&X>$)throw new re("Request body larger than maxBodyLength limit",re.ERR_BAD_REQUEST,y,Y)}if(T&&h&&x!=="get"&&x!=="head"&&(te=await b(M,w))!==0){let X=new i(v,{method:"POST",body:w,duplex:"half"}),V;if(z.isFormData(w)&&(V=X.headers.get("content-type"))&&M.setContentType(V),X.body){const[_e,ge]=iT(te,hm(sT(T)));w=lT(X.body,cT,_e,ge)}}z.isString(C)||(C=C?"include":"omit");const J=l&&"credentials"in i.prototype;if(z.isFormData(w)){const X=M.getContentType();X&&/^multipart\/form-data/i.test(X)&&!/boundary=/i.test(X)&&M.delete("content-type")}M.set("User-Agent","axios/"+fj,!1);const st={...L,signal:H,method:x.toUpperCase(),headers:Mk(M.normalize()),body:w,duplex:"half",credentials:J?C:void 0};Y=l&&new i(v,st);let Ve=await(l?F(Y,L):F(v,st));if(P){const X=z.toFiniteNumber(Ve.headers.get("content-length"));if(X!=null&&X>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y)}const G=p&&(N==="stream"||N==="response");if(p&&Ve.body&&(E||P||G&&q)){const X={};["status","statusText","headers"].forEach(dt=>{X[dt]=Ve[dt]});const V=z.toFiniteNumber(Ve.headers.get("content-length")),[_e,ge]=E&&iT(V,hm(sT(E),!0))||[];let Xe=0;const ot=dt=>{if(P&&(Xe=dt,Xe>D))throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y);_e&&_e(dt)};Ve=new s(lT(Ve.body,cT,ot,()=>{ge&&ge(),q&&q()}),X)}N=N||"text";let oe=await m[z.findKey(m,N)||"text"](Ve,y);if(P&&!p&&!G){let X;if(oe!=null&&(typeof oe.byteLength=="number"?X=oe.byteLength:typeof oe.size=="number"?X=oe.size:typeof oe=="string"&&(X=typeof r=="function"?new r().encode(oe).byteLength:oe.length)),typeof X=="number"&&X>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y)}return!G&&q&&q(),await new Promise((X,V)=>{Ik(X,V,{data:oe,headers:gn.from(Ve.headers),status:Ve.status,statusText:Ve.statusText,config:y,request:Y})})}catch(Z){if(q&&q(),H&&H.aborted&&H.reason instanceof re){const ye=H.reason;throw ye.config=y,Y&&(ye.request=Y),Z!==ye&&(ye.cause=Z),ye}throw Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)?Object.assign(new re("Network Error",re.ERR_NETWORK,y,Y,Z&&Z.response),{cause:Z.cause||Z}):re.from(Z,Z&&Z.code,y,Y,Z&&Z.response)}}},bY=new Map,Fk=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let s=i.length,o=s,l,c,f=bY;for(;o--;)l=i[o],c=f.get(l),c===void 0&&f.set(l,c=o?new Map:vY(t)),f=c;return c};Fk();const dj={http:LG,xhr:uY,fetch:{get:Fk}};z.forEach(dj,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const dT=e=>`- ${e}`,xY=e=>z.isFunction(e)||e===null||e===!1;function SY(e,t){e=z.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let s=0;s`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=n?s.length>1?`since : +`+s.map(dT).join(` +`):" "+dT(s[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return a}const Vk={getAdapter:SY,adapters:dj};function ob(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qd(null,e)}function hT(e){return ob(e),e.headers=gn.from(e.headers),e.data=sb.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vk.getAdapter(e.adapter||Hd.adapter,e)(e).then(function(r){ob(e),e.response=r;try{r.data=sb.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=gn.from(r.headers),r},function(r){if(!zk(r)&&(ob(e),r&&r.response)){e.response=r.response;try{r.response.data=sb.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=gn.from(r.response.headers)}return Promise.reject(r)})}const rg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rg[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pT={};rg.transitional=function(t,n,r){function a(i,s){return"[Axios v"+fj+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,o)=>{if(t===!1)throw new re(a(s," has been removed"+(n?" in "+n:"")),re.ERR_DEPRECATED);return n&&!pT[s]&&(pT[s]=!0,console.warn(a(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,o):!0}};rg.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function wY(e,t,n){if(typeof e!="object")throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],s=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(s){const o=e[i],l=o===void 0||s(o,i,e);if(l!==!0)throw new re("option "+i+" must be "+l,re.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new re("Unknown option "+i,re.ERR_BAD_OPTION)}}const bp={assertOptions:wY,validators:rg},wn=bp.validators;let Ys=class{constructor(t){this.defaults=t||{},this.interceptors={request:new aT,response:new aT}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=(()=>{if(!a.stack)return"";const s=a.stack.indexOf(` +`);return s===-1?"":a.stack.slice(s+1)})();try{if(!r.stack)r.stack=i;else if(i){const s=i.indexOf(` +`),o=s===-1?-1:i.indexOf(` +`,s+1),l=o===-1?"":i.slice(o+1);String(r.stack).endsWith(l)||(r.stack+=` +`+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=so(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&bp.assertOptions(r,{silentJSONParsing:wn.transitional(wn.boolean),forcedJSONParsing:wn.transitional(wn.boolean),clarifyTimeoutError:wn.transitional(wn.boolean),legacyInterceptorReqResOrdering:wn.transitional(wn.boolean),advertiseZstdAcceptEncoding:wn.transitional(wn.boolean)},!1),a!=null&&(z.isFunction(a)?n.paramsSerializer={serialize:a}:bp.assertOptions(a,{encode:wn.function,serialize:wn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),bp.assertOptions(n,{baseUrl:wn.spelling("baseURL"),withXsrfToken:wn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&z.merge(i.common,i[n.method]);i&&z.forEach(["delete","get","head","post","put","patch","query","common"],m=>{delete i[m]}),n.headers=gn.concat(s,i);const o=[];let l=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;l=l&&g.synchronous;const b=n.transitional||cj;b&&b.legacyInterceptorReqResOrdering?o.unshift(g.fulfilled,g.rejected):o.push(g.fulfilled,g.rejected)});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let f,d=0,h;if(!l){const m=[hT.bind(this),void 0];for(m.unshift(...o),m.push(...c),h=m.length,f=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const s=new Promise(o=>{r.subscribe(o),i=o}).then(a);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,o){r.reason||(r.reason=new qd(i,s,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Hk(function(a){t=a}),cancel:t}}};function AY(e){return function(n){return e.apply(null,n)}}function OY(e){return z.isObject(e)&&e.isAxiosError===!0}const Tx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Tx).forEach(([e,t])=>{Tx[t]=e});function qk(e){const t=new Ys(e),n=Ak(Ys.prototype.request,t);return z.extend(n,Ys.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return qk(so(e,a))},n}const jt=qk(Hd);jt.Axios=Ys;jt.CanceledError=qd;jt.CancelToken=jY;jt.isCancel=zk;jt.VERSION=fj;jt.toFormData=ng;jt.AxiosError=re;jt.Cancel=jt.CanceledError;jt.all=function(t){return Promise.all(t)};jt.spread=AY;jt.isAxiosError=OY;jt.mergeConfig=so;jt.AxiosHeaders=gn;jt.formToJSON=e=>Lk(z.isHTMLForm(e)?new FormData(e):e);jt.getAdapter=Vk.getAdapter;jt.HttpStatusCode=Tx;jt.default=jt;const{Axios:YAe,AxiosError:XAe,CanceledError:WAe,isCancel:QAe,CancelToken:ZAe,VERSION:JAe,all:e2e,Cancel:t2e,isAxiosError:n2e,spread:r2e,toFormData:a2e,AxiosHeaders:i2e,HttpStatusCode:s2e,formToJSON:o2e,getAdapter:l2e,mergeConfig:c2e,create:u2e}=jt,W=jt.create({baseURL:""}),Kk=()=>location.pathname.startsWith("/admin"),Gk=()=>Kk()?"mall_admin_token":"mall_token";W.interceptors.request.use(e=>{const t=localStorage.getItem(Gk());return t&&(e.headers.Authorization=`Bearer ${t}`),e});W.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem(Gk()),Kk()&&location.pathname!=="/admin/login"&&(location.href="/admin/login")),Promise.reject(e)});const Q=e=>e.then(t=>{var n;return(n=t.data)==null?void 0:n.data}),Yk=(e,t)=>W.post("/api/mall/auth/login",{username:e,password:t}),EY=(e,t,n)=>W.post("/api/mall/auth/register",{username:e,password:t,displayName:n}),Xk=()=>Q(W.get("/api/mall/auth/me")),So=(e=!0)=>Q(W.get(`/api/mall/store?activeOnly=${e}`)),TY=(e,t)=>Q(W.put(`/api/mall/store/${e}/active`,{active:t})),NY=e=>Q(W.get(`/api/mall/zone/lookup?zip=${encodeURIComponent(e)}`)),Ql=(e={})=>{const t=new URLSearchParams;return Object.entries(e).forEach(([n,r])=>{r!==void 0&&r!==""&&r!==null&&t.set(n,String(r))}),Q(W.get(`/api/mall/product?${t}`))},CY=e=>Q(W.get(`/api/mall/product/${e}`)),_Y=(e,t)=>Q(W.put(`/api/mall/product/${e}/status`,{status:t})),PY=()=>Q(W.get("/api/mall/category")),MY=e=>Q(W.get(`/api/mall/store-inventory/store/${e}`)),RY=(e,t,n)=>Q(W.put(`/api/mall/store-inventory/store/${e}/product/${t}/toggle`,{available:n})),DY=(e,t,n)=>Q(W.put(`/api/mall/store-inventory/store/${e}/product/${t}/adjust`,{delta:n})),$Y=(e,t)=>Q(W.get(`/api/mall/schedule/availability?storeId=${e}&date=${t}`)),Wk=()=>Q(W.get("/api/mall/schedule/holidays")),kY=e=>Q(W.post("/api/mall/schedule/holiday",e)),hj=()=>Q(W.get("/api/mall/cart")),LY=e=>Q(W.post("/api/mall/cart",e)),zY=(e,t)=>Q(W.put(`/api/mall/cart/${e}`,{quantity:t})),IY=e=>W.delete(`/api/mall/cart/${e}`),BY=(e="")=>Q(W.get(`/api/mall/order?status=${e}`)),UY=e=>Q(W.post("/api/mall/order/checkout",e)),Qk=(e,t)=>Q(W.put(`/api/mall/order/${e}/status`,{status:t})),FY=(e="",t=100)=>Q(W.get(`/api/mall/order/admin?status=${e}&limit=${t}`)),VY=e=>Q(W.post("/api/mall/payment",e)),HY=()=>Q(W.get("/api/mall/subscription")),qY=e=>Q(W.post("/api/mall/subscription",e)),mT=(e,t)=>Q(W.put(`/api/mall/subscription/${e}/status`,{status:t})),KY=()=>Q(W.get("/api/mall/subscription/admin")),GY=(e="",t="")=>{const n=new URLSearchParams;return e&&n.set("status",e),t&&n.set("storeId",t),Q(W.get(`/api/mall/transfer?${n}`))},YY=e=>Q(W.put(`/api/mall/transfer/${e}/approve`,{})),XY=e=>Q(W.put(`/api/mall/transfer/${e}/reject`,{})),WY=e=>Q(W.get(`/api/mall/review/product/${e}`)),QY=e=>Q(W.get(`/api/mall/review/product/${e}/stats`)),ZY=e=>Q(W.post("/api/mall/review",e)),JY=()=>Q(W.get("/api/mall/member/me")),eX=()=>Q(W.get("/api/mall/cs")),tX=e=>Q(W.post("/api/mall/cs",e)),nX=()=>Q(W.get("/api/mall/wishlist")),rX=e=>Q(W.post(`/api/mall/wishlist/${e}`,{})),aX=e=>W.delete(`/api/mall/wishlist/${e}`),iX=(e=1,t=500)=>Q(W.get(`/api/mall/analytics/dashboard?days=${e}&bigOrderThreshold=${t}`)),Zk=(e=7)=>Q(W.get(`/api/mall/analytics/store-sales?days=${e}`)),Jk=(e=14)=>Q(W.get(`/api/mall/analytics/trend?days=${e}`)),e5=(e=10)=>Q(W.get(`/api/mall/analytics/top-products?limit=${e}`)),sX=(e,t,n)=>Q(W.post("/api/mall/gateway/tax/quote",{amount:e,zip:t,state:n})),oX=(e,t)=>Q(W.post("/api/mall/gateway/address/verify",{address:e,zip:t})),lX=()=>Q(W.get("/api/mall/gateway/providers")),t5=(e="",t="",n=6)=>{const r=new URLSearchParams;return e&&r.set("occasion",e),t&&r.set("keyword",t),r.set("limit",String(n)),Q(W.get(`/api/mall/ai/recommend?${r}`))},cX=e=>Q(W.get(`/api/mall/ai/review-summary/${e}`)),n5=e=>Q(W.post("/api/mall/ai/nl-search",{query:e})),uX=(e,t,n)=>Q(W.post("/api/mall/ai/card-message",{occasion:e,tone:t,recipient:n})),fX=(e="valentine",t=14)=>Q(W.get(`/api/mall/ai/demand-forecast?season=${e}&days=${t}`)),dX=e=>Q(W.post("/api/mall/ai/transfer-recommend",{storeIds:e})),hX=()=>Q(W.get("/api/admin/users")),pX=e=>Q(W.post("/api/admin/users",e)),mX=(e,t)=>Q(W.put(`/api/admin/users/${e}/role`,{role:t})),yX=(e,t)=>Q(W.put(`/api/admin/users/${e}/active`,{active:t})),gX=(e,t)=>Q(W.put(`/api/admin/users/${e}/password`,{password:t})),vX=e=>W.delete(`/api/admin/users/${e}`),bX=(e="",t="",n=100)=>{const r=new URLSearchParams;return e&&r.set("action",e),t&&r.set("actor",t),r.set("limit",String(n)),Q(W.get(`/api/admin/audit?${r}`))},xX=()=>Q(W.get("/api/admin/settings")),SX=(e,t)=>Q(W.put(`/api/admin/settings/${encodeURIComponent(e)}`,{value:t})),wX=(e=!0)=>Q(W.get(`/api/mall/loyalty/tiers?activeOnly=${e}`)),jX=(e,t)=>Q(W.put(`/api/mall/loyalty/tiers/${e}`,t)),pj=()=>Q(W.get("/api/mall/loyalty/me")),AX=(e=100)=>Q(W.get(`/api/mall/loyalty/points/history?limit=${e}`)),OX=(e,t,n)=>Q(W.post("/api/mall/loyalty/points/adjust",{owner:e,points:t,reason:n})),EX=()=>Q(W.post("/api/mall/loyalty/recalc-all",{})),r5=(e=30)=>Q(W.get(`/api/mall/loyalty/analytics/by-tier?days=${e}`)),TX=(e="")=>Q(W.get(`/api/mall/event/ongoing${e?`?tier=${e}`:""}`)),NX=e=>Q(W.post(`/api/mall/event/${e}/join`,{})),CX=(e="",t="",n=!1)=>{const r=new URLSearchParams;return e&&r.set("status",e),t&&r.set("type",t),r.set("activeOnly",String(n)),Q(W.get(`/api/mall/event?${r}`))},_X=e=>Q(W.post("/api/mall/event",e)),PX=e=>Q(W.post(`/api/mall/event/${e}/publish`,{})),MX=e=>Q(W.post(`/api/mall/event/${e}/end`,{})),RX=e=>W.delete(`/api/mall/event/${e}`),DX=e=>Q(W.get(`/api/mall/event/${e}/performance`)),$X=(e,t,n)=>Q(W.post("/api/mall/event/ai/copy",{eventType:e,theme:t,tone:n}));function Gr({children:e,delay:t=0,y:n=24,className:r="",as:a="div"}){const i=ti(),s=Nt[a];return u.jsx(s,{className:r,initial:i?!1:{opacity:0,y:n},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7,delay:t,ease:[.22,1,.36,1]},children:e})}const kX={hidden:{},show:{transition:{staggerChildren:.07,delayChildren:.05}}},LX={hidden:{opacity:0,y:22},show:{opacity:1,y:0,transition:{duration:.6,ease:[.22,1,.36,1]}}};function pm({children:e,className:t=""}){const n=ti();return u.jsx(Nt.div,{className:t,variants:n?void 0:kX,initial:n?!1:"hidden",whileInView:"show",viewport:{once:!0,margin:"-40px"},children:e})}function mm({children:e,className:t=""}){const n=ti();return u.jsx(Nt.div,{className:t,variants:n?void 0:LX,children:e})}const yT=["","sage","cream"];function Kd({count:e=14,className:t=""}){const n=ti(),r=A.useMemo(()=>Array.from({length:e}).map((a,i)=>{const s=8+Math.round(Math.random()*14);return{left:Math.round(Math.random()*100),size:s,delay:+(Math.random()*12).toFixed(2),duration:+(10+Math.random()*10).toFixed(2),kind:yT[i%yT.length]}}),[e]);return n?null:u.jsx("div",{className:`petal-layer ${t}`,"aria-hidden":"true",children:r.map((a,i)=>u.jsx("span",{className:`petal ${a.kind}`,style:{left:`${a.left}%`,width:`${a.size}px`,height:`${a.size}px`,animationDelay:`${a.delay}s`,animationDuration:`${a.duration}s`}},i))})}function Ua({children:e,className:t="",onClick:n,type:r="button",disabled:a}){const i=ti();return u.jsx(Nt.button,{type:r,onClick:n,disabled:a,className:t,whileHover:i||a?void 0:{scale:1.03,y:-1},whileTap:i||a?void 0:{scale:.97},transition:{type:"spring",stiffness:380,damping:22},children:e})}const ke={name:"Montvale Florist",tagline:"100% Florist-Designed and Hand-Delivered!",founded:2010,address:"6 Railroad Ave, Montvale, NJ 07645",phone:"(201) 690-6721",phoneTel:"+12016906721",email:"wecare@montvalefloristnj.com",rating:4.9,reviewCount:44893,promise:[{title:"100% Florist-Designed",desc:"Every arrangement is crafted by hand in our shop — never mass-produced."},{title:"Locally Independent",desc:"A real, community-focused florist in Montvale since 2010 — not an online middleman."},{title:"100% Satisfaction",desc:"We stand behind every bouquet with our satisfaction guarantee."}],hours:[{day:"Mon – Fri",open:"9:00 AM – 5:30 PM",cutoff:"Same-day by 1:00 PM"},{day:"Saturday",open:"9:00 AM – 4:00 PM",cutoff:"Same-day by 12:00 PM"},{day:"Sunday",open:"9:00 AM – 12:00 PM",cutoff:"Same-day by 10:00 AM"}],social:{instagram:"https://instagram.com/themontvaleflorist",instagramHandle:"@themontvaleflorist",facebook:"https://facebook.com/montvaleflorist1",pinterest:"https://pinterest.com/montvaleflorist",google:"https://www.google.com/search?q=Montvale+Florist",yelp:"https://yelp.com/biz/montvale-florist-montvale-3"},payments:["Visa","Mastercard","Amex","Discover","Apple Pay","Google Pay"],wallets:["Apple Pay","Google Pay"],cards:["Visa","Mastercard","Amex","Discover"],policies:["Terms of Service","Privacy Policy","Accessibility Statement","Delivery Policy"],about:"Montvale Florist is your go-to local florist, delivering not just flowers, but joy, comfort, and memories. An independent, community-focused florist dedicated to craftsmanship and personal service since 2010."},lb=[{img:"/img/hero/slide-1.jpg",eyebrow:"Birthday Blooms",headline:`Make Their Birthday +Unforgettable`,subtext:"Florist-designed bouquets, hand-delivered the same day — a celebration in every petal.",cta:"Find the Perfect Gift",to:"/category?occasion=BIRTHDAY"},{img:"/img/hero/slide-2.jpg",eyebrow:"Sympathy & Comfort",headline:`Honor Their Memory +with Heartfelt Flowers`,subtext:"Thoughtful tributes, gently arranged and delivered with care and compassion.",cta:"Send Your Condolences",to:"/category?occasion=SYMPATHY"},{img:"/img/hero/slide-3.jpg",eyebrow:"Just Because",headline:`Brighten Their Day, +Just Because`,subtext:"No occasion needed — send a smile with fresh, locally designed blooms.",cta:"Send a Smile",to:"/category?occasion=JUST_BECAUSE"}],zX=[{code:"en",label:"EN"},{code:"ko",label:"한국어"}];function ag({variant:e="shop"}){const{i18n:t}=ni(),n=(t.language||"en").split("-")[0],r=s=>{s!==n&&t.changeLanguage(s)},a=e==="admin",i=a?"flex items-center gap-0.5 rounded-lg border border-edge bg-card/60 p-0.5":"flex items-center gap-0.5 rounded-full border border-blush-100 bg-white/70 p-0.5 shadow-soft";return u.jsxs("div",{className:"flex items-center gap-1.5","aria-label":"Language",children:[u.jsx(SK,{size:15,className:a?"text-slate-400":"text-sage-600"}),u.jsx("div",{className:i,role:"group",children:zX.map(s=>{const o=s.code===n,l="px-2 py-0.5 text-[11px] font-medium rounded-full transition-colors",c=a?o?"bg-brand text-ink":"text-slate-300 hover:text-brand":o?"bg-blush-500 text-white":"text-sage-700 hover:text-blush-600";return u.jsx("button",{type:"button",onClick:()=>r(s.code),"aria-pressed":o,className:`${l} ${a?"rounded-md":""} ${c}`,children:s.label},s.code)})})]})}function IX(){const{t:e}=ni(),[t,n]=A.useState(""),[r,a]=A.useState(null),[i,s]=A.useState(!1),[o,l]=A.useState(""),{setZone:c}=bn(),f=Kt(),d=async p=>{if(p.preventDefault(),l(""),a(null),!/^\d{5}$/.test(t)){l(e("zip.errInvalid"));return}s(!0);try{const m=await NY(t);a(m),m!=null&&m.deliverable||l(e("zip.errNotDeliverable"))}catch{l(e("zip.errFailed"))}finally{s(!1)}},h=p=>{c(t,p.storeId,p.storeName),f("/home")};return u.jsxs("div",{className:"relative min-h-screen bg-gradient-to-br from-blush-100 via-cream to-sage-100 flex items-center justify-center px-4 overflow-hidden",children:[u.jsx("div",{className:"absolute top-5 right-5 z-20",children:u.jsx(ag,{variant:"shop"})}),u.jsx(Kd,{count:18}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -top-20 -left-20 text-blush-200/40",animate:{rotate:[0,360]},transition:{duration:80,repeat:1/0,ease:"linear"},children:u.jsx(ft,{size:320,strokeWidth:.5})}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -bottom-24 -right-16 text-sage-300/40",animate:{rotate:[360,0]},transition:{duration:90,repeat:1/0,ease:"linear"},children:u.jsx(ft,{size:260,strokeWidth:.5})}),u.jsxs(Nt.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"relative z-10 w-full max-w-lg text-center",children:[u.jsxs("div",{className:"flex flex-col items-center mb-5",children:[u.jsx(Nt.span,{animate:{rotate:[0,8,-6,0]},transition:{duration:7,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{className:"text-blush-500",size:44})}),u.jsx("h1",{className:"font-serif text-4xl font-bold text-blush-900 mt-3",children:"Montvale Florist"}),u.jsx("p",{className:"font-display text-[13px] tracking-[0.35em] uppercase text-sage-600 mt-1",children:e("zip.since",{year:ke.founded})})]}),u.jsx("p",{className:"font-display text-2xl text-[#6b5258] mb-1",children:ke.tagline}),u.jsx("p",{className:"text-[#8a7077] text-sm mb-8",children:e("zip.lead")}),u.jsxs("form",{onSubmit:d,className:"bg-white/90 backdrop-blur rounded-4xl shadow-bloom p-7 border border-blush-100",children:[u.jsxs("label",{className:"flex items-center gap-2 text-sm text-blush-700 font-medium mb-3 justify-center",children:[u.jsx(dm,{size:16})," ",e("zip.enterZip")]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{value:t,onChange:p=>n(p.target.value.replace(/\D/g,"").slice(0,5)),placeholder:e("zip.placeholder"),inputMode:"numeric",autoFocus:!0,className:"flex-1 px-4 py-3.5 rounded-2xl bg-blush-50 border border-blush-100 text-center text-lg tracking-[0.3em] outline-none focus:border-blush-400 transition-colors"}),u.jsx(Ua,{type:"submit",disabled:i,className:"px-7 rounded-2xl bg-blush-500 text-white font-semibold hover:bg-blush-600 disabled:opacity-60 flex items-center gap-1",children:i?"…":u.jsxs(u.Fragment,{children:[e("zip.go")," ",u.jsx(Es,{size:16})]})})]}),o&&u.jsx("p",{className:"text-blush-500 text-xs mt-3",children:o}),(r==null?void 0:r.deliverable)&&u.jsxs(Nt.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-6 text-left overflow-hidden",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-sage-700 font-medium mb-3",children:[u.jsx(Ud,{size:15})," ",e("zip.availableStores")]}),u.jsx("div",{className:"space-y-2",children:(r.stores||[]).map(p=>u.jsxs(Ua,{onClick:()=>h(p),className:"w-full flex items-center justify-between bg-blush-50 hover:bg-blush-100 border border-blush-100 rounded-2xl px-4 py-3.5 text-left",children:[u.jsxs("span",{children:[u.jsxs("span",{className:"font-medium text-sm flex items-center gap-1.5 text-blush-900",children:[u.jsx(Bd,{size:14,className:"text-blush-500"}),p.storeName]}),u.jsx("span",{className:"block text-xs text-[#8a7077] mt-0.5",children:e("zip.radiusSameDay",{radius:p.radiusMi,cutoff:p.sameDayCutoff,tz:p.timezone})})]}),u.jsx(Es,{size:16,className:"text-blush-500"})]},p.storeId))})]})]}),u.jsxs("div",{className:"flex items-center justify-center gap-2 mt-6 text-[12px] text-[#8a7077]",children:[u.jsx("span",{className:"flex text-gold",children:[1,2,3,4,5].map(p=>u.jsx(Wa,{size:13,fill:"currentColor"},p))}),ke.rating,"★ · ",e("zip.reviews",{n:ke.reviewCount.toLocaleString()})]}),u.jsx("button",{onClick:()=>f("/home"),className:"text-xs text-[#a08a90] hover:text-blush-600 mt-4 underline-offset-2 hover:underline",children:e("zip.browsePickup")})]})]})}function a5({size:e=18}){return u.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12c0 4.24 2.64 7.85 6.36 9.31-.09-.79-.17-2 .03-2.86.18-.78 1.17-4.97 1.17-4.97s-.3-.6-.3-1.48c0-1.39.81-2.43 1.81-2.43.85 0 1.27.64 1.27 1.41 0 .86-.55 2.14-.83 3.33-.24 1 .5 1.81 1.48 1.81 1.78 0 3.14-1.88 3.14-4.58 0-2.4-1.72-4.07-4.19-4.07-2.85 0-4.52 2.14-4.52 4.35 0 .86.33 1.78.74 2.28.08.1.09.19.07.29l-.27 1.13c-.04.18-.14.22-.33.13-1.25-.58-2.03-2.4-2.03-3.87 0-3.15 2.29-6.04 6.6-6.04 3.46 0 6.16 2.47 6.16 5.77 0 3.44-2.17 6.21-5.18 6.21-1.01 0-1.97-.53-2.29-1.15l-.62 2.37c-.23.86-.83 1.94-1.24 2.6.94.29 1.92.44 2.95.44 5.52 0 10-4.48 10-10S17.52 2 12 2z"})})}function BX({size:e=18}){return u.jsxs("svg",{viewBox:"0 0 24 24",width:e,height:e,"aria-hidden":"true",children:[u.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"}),u.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23z"}),u.jsx("path",{fill:"#FBBC05",d:"M5.84 14.1a6.6 6.6 0 0 1 0-4.2V7.06H2.18a11 11 0 0 0 0 9.88l3.66-2.84z"}),u.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1A11 11 0 0 0 2.18 7.06l3.66 2.84C6.71 7.3 9.14 5.38 12 5.38z"})]})}function UX({size:e=18}){return u.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M12.27 13.3l4.45-2.16c.51-.25.66-.92.31-1.36-1.13-1.44-2.7-2.49-4.49-2.99-.55-.15-1.08.27-1.08.84l-.02 5.04c0 .65.72 1.06 1.32.77zM12.6 15.34l4.46 2.13c.51.25 1.13-.07 1.21-.63.25-1.8-.06-3.66-.92-5.31-.27-.51-.96-.6-1.36-.18l-3.5 3.42c-.45.45-.31 1.18.11 1.4v-.84zm-2.59.4l-3.45-3.4c-.41-.4-1.09-.32-1.37.18-.86 1.64-1.18 3.49-.95 5.29.07.56.69.89 1.21.64l4.45-2.12c.6-.29.74-1.02.06-1.43zm.08 2.36l-.02 4.95c0 .57.53.99 1.08.84 1.78-.49 3.34-1.53 4.48-2.96.35-.44.2-1.11-.31-1.36l-4.45-2.15c-.6-.29-1.31.13-1.31.78l.84.01zm-.45-7.1L5.66 7.06c-.43-.7-1.46-.56-1.69.23-.13.45-.22.92-.27 1.4-.16 1.55.05 3.12.61 4.56.21.53.91.62 1.27.13l3.95-5.32c.32-.43.06-1.05-.5-1.16l.39.56z"})})}const FX={instagram:({size:e})=>u.jsx(yk,{size:e}),facebook:({size:e})=>u.jsx(pk,{size:e}),pinterest:a5,google:BX,yelp:UX},VX={instagram:"Instagram",facebook:"Facebook",pinterest:"Pinterest",google:"Google Business",yelp:"Yelp"},HX=["instagram","facebook","pinterest","google","yelp"];function qX({size:e=18,className:t="",iconClass:n=""}){return u.jsx("div",{className:`flex items-center gap-3 ${t}`,children:HX.map(r=>{const a=ke.social[r];if(!a)return null;const i=FX[r];return u.jsx("a",{href:a,target:"_blank",rel:"noreferrer","aria-label":VX[r],className:`transition-colors ${n}`,children:u.jsx(i,{size:e})},r)})})}function KX({url:e,title:t,image:n,className:r=""}){const a=encodeURIComponent(e),i=encodeURIComponent(t||ke.name),s=encodeURIComponent(n||""),o=`https://www.facebook.com/sharer/sharer.php?u=${a}`,l=`https://pinterest.com/pin/create/button/?url=${a}&media=${s}&description=${i}`,c=ke.social.instagram,f=d=>window.open(d,"_blank","noopener,width=640,height=600");return u.jsxs("div",{className:`flex items-center gap-2 ${r}`,children:[u.jsx("span",{className:"text-xs text-[#a08a90]",children:"Share:"}),u.jsx("button",{type:"button",onClick:()=>f(c),"aria-label":"Share on Instagram",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(yk,{size:16})}),u.jsx("button",{type:"button",onClick:()=>f(o),"aria-label":"Share on Facebook",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(pk,{size:16})}),u.jsx("button",{type:"button",onClick:()=>f(l),"aria-label":"Share on Pinterest",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(a5,{size:16})})]})}function GX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Visa",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("text",{x:"24",y:"21",textAnchor:"middle",fontFamily:"Georgia, serif",fontWeight:"700",fontStyle:"italic",fontSize:"13",fill:"#1a1f71",children:"VISA"})]})}function YX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Mastercard",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("circle",{cx:"20",cy:"16",r:"8",fill:"#eb001b"}),u.jsx("circle",{cx:"28",cy:"16",r:"8",fill:"#f79e1b",fillOpacity:"0.85"})]})}function XX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"American Express",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#2e77bb"}),u.jsx("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"9",fill:"#fff",children:"AMEX"})]})}function WX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Discover",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("circle",{cx:"36",cy:"22",r:"9",fill:"#f68121"}),u.jsx("text",{x:"22",y:"19",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"7",fill:"#231f20",children:"DISCOVER"})]})}function QX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Apple Pay",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#000"}),u.jsx("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"-apple-system, Helvetica, sans-serif",fontWeight:"600",fontSize:"9",fill:"#fff",children:" Pay"})]})}function ZX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Google Pay",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsxs("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"9",children:[u.jsx("tspan",{fill:"#4285f4",children:"G"}),u.jsx("tspan",{fill:"#ea4335",children:"o"}),u.jsx("tspan",{fill:"#fbbc05",children:"o"}),u.jsx("tspan",{fill:"#4285f4",children:"g"}),u.jsx("tspan",{fill:"#34a853",children:"l"}),u.jsx("tspan",{fill:"#ea4335",children:"e"}),u.jsx("tspan",{fill:"#5f6368",children:" Pay"})]})]})}const i5={Visa:GX,Mastercard:YX,Amex:XX,Discover:WX,"Apple Pay":QX,"Google Pay":ZX};function s5({items:e,className:t=""}){return u.jsx("div",{className:`flex flex-wrap items-center gap-1.5 ${t}`,children:e.map(n=>{const r=i5[n];return r?u.jsx(r,{},n):u.jsx("span",{className:"text-[10px] bg-cream/10 rounded px-2 py-1",children:n},n)})})}function JX(e){const t=e.replace(/\D/g,"");return t.length<4?"•••• •••• •••• ••••":`•••• •••• •••• ${t.slice(-4)}`}function eW(e){return e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim()}function tW({method:e,onMethod:t,onCardChange:n,cards:r=["Visa","Mastercard","Amex","Discover"],wallets:a=["Apple Pay","Google Pay"]}){const[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(""),[d,h]=A.useState(""),[p,m]=A.useState(!1),g=i.replace(/\D/g,""),b=(v=i,x=o,w=c)=>{const S=v.replace(/\D/g,""),j=S.length>=15&&/^\d{2}\/\d{2}$/.test(x)&&w.replace(/\D/g,"").length>=3;n==null||n({last4:S.slice(-4),expiry:x,complete:j})},y=v=>v==="Apple Pay"?"APPLE_PAY":"GOOGLE_PAY";return u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[u.jsxs("button",{type:"button",onClick:()=>t("CARD"),className:`flex items-center justify-center gap-1.5 py-2.5 rounded-xl border text-sm ${e==="CARD"?"border-bloom bg-petal text-bloom2 font-semibold":"border-blush-100 text-[#6b5258]"}`,children:[u.jsx(WE,{size:16})," Card"]}),a.map(v=>{const x=y(v),w=i5[v];return u.jsx("button",{type:"button",onClick:()=>t(x),className:`flex items-center justify-center py-2 rounded-xl border ${e===x?"border-bloom bg-petal":"border-blush-100"}`,"aria-label":v,children:w?u.jsx(w,{}):u.jsx("span",{className:"text-sm",children:v})},v)})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-[11px] text-gray-400",children:"Accepted:"}),u.jsx(s5,{items:r})]}),e==="CARD"?u.jsxs("div",{className:"rounded-2xl border border-blush-100 p-4 space-y-3 bg-white",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Card number"}),u.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 rounded-xl border border-blush-100 focus-within:border-bloom",children:[u.jsx(WE,{size:16,className:"text-blush-400 shrink-0"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-number",value:p?eW(i):g?JX(i):"",onFocus:()=>m(!0),onBlur:()=>m(!1),onChange:v=>{const x=v.target.value;s(x),b(x)},placeholder:"1234 1234 1234 1234",className:"flex-1 bg-transparent text-sm outline-none tracking-wider"})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Expiry (MM/YY)"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-exp",value:o,onChange:v=>{let x=v.target.value.replace(/\D/g,"").slice(0,4);x.length>=3&&(x=x.slice(0,2)+"/"+x.slice(2)),l(x),b(i,x)},placeholder:"MM/YY",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"CVC"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-csc",value:c,onChange:v=>{const x=v.target.value.replace(/\D/g,"").slice(0,4);f(x),b(i,o,x)},placeholder:"•••",type:"password",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Name on card"}),u.jsx("input",{autoComplete:"cc-name",value:d,onChange:v=>h(v.target.value),placeholder:"Full name",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("p",{className:"flex items-center gap-1 text-[11px] text-gray-400",children:[u.jsx(QE,{size:11})," Card number is masked and never stored on this device. Processed via GUARDiA PaymentGateway."]})]}):u.jsxs("div",{className:"rounded-2xl border border-blush-100 p-4 bg-white",children:[u.jsx("button",{type:"button",className:`w-full py-3 rounded-xl font-semibold flex items-center justify-center gap-2 ${e==="APPLE_PAY"?"bg-black text-white":"bg-white border border-edge text-[#3c4043]"}`,children:e==="APPLE_PAY"?" Pay":"G Pay"}),u.jsxs("p",{className:"flex items-center gap-1 text-[11px] text-gray-400 mt-2",children:[u.jsx(QE,{size:11})," ",e==="APPLE_PAY"?"Apple Pay":"Google Pay"," via secure wallet. If unconfigured, processed as mock at checkout."]})]})]})}const nW=[{to:"/home",key:"home"},{to:"/category",key:"shopAll"},{to:"/category?occasion=ROMANCE",key:"loveRomance"},{to:"/category?occasion=BIRTHDAY",key:"birthday"},{to:"/category?occasion=SYMPATHY",key:"sympathy"},{to:"/daily-standard",key:"todaysBouquet",accent:!0},{to:"/subscription",key:"subscriptions"},{to:"/events",key:"offers"}];function rW(){const{t:e}=ni(),{zip:t,storeName:n,custToken:r,cartCount:a,setCartCount:i}=bn(),s=Kt(),o=jr(),l=ti(),[c,f]=A.useState("");A.useEffect(()=>{if(!r){i(0);return}hj().then(h=>i((h||[]).reduce((p,m)=>p+(m.quantity||1),0))).catch(()=>{})},[r]);const d=h=>{h.preventDefault(),c.trim()&&s(`/search?q=${encodeURIComponent(c.trim())}`)};return u.jsxs("div",{className:"min-h-screen bg-cream text-[#43343a] flex flex-col",children:[u.jsx("div",{className:"bg-sage-700 text-cream/95 text-[12px] tracking-wide",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-9 flex items-center justify-center sm:justify-between gap-3",children:[u.jsxs("span",{className:"hidden sm:flex items-center gap-1.5",children:[u.jsx(ft,{size:13})," ",ke.tagline]}),u.jsxs("span",{className:"flex items-center gap-3",children:[u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(Wa,{size:12,className:"text-gold",fill:"currentColor"})," ",ke.rating,"★ · ",e("shop.topbar.reviews",{n:ke.reviewCount.toLocaleString()})]}),u.jsxs("a",{href:`tel:${ke.phoneTel}`,className:"hidden sm:flex items-center gap-1 hover:text-white",children:[u.jsx(ZE,{size:12})," ",ke.phone]})]})]})}),u.jsxs("header",{className:"sticky top-0 z-30 bg-cream/90 backdrop-blur-md border-b border-blush-100",children:[u.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-[72px] flex items-center gap-4",children:[u.jsxs(Le,{to:"/home",className:"flex items-center gap-2.5 shrink-0",children:[u.jsx(Nt.span,{animate:l?void 0:{rotate:[0,8,-6,0]},transition:{duration:7,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{className:"text-blush-500",size:28})}),u.jsxs("span",{className:"leading-none",children:[u.jsx("span",{className:"block font-serif text-[20px] font-bold text-blush-900 tracking-tight",children:"Montvale"}),u.jsx("span",{className:"block font-display text-[12px] tracking-[0.35em] text-sage-600 uppercase -mt-0.5",children:"Florist"})]})]}),u.jsxs("form",{onSubmit:d,className:"flex-1 max-w-md hidden md:flex items-center bg-white border border-blush-100 rounded-full px-4 py-2.5 shadow-soft",children:[u.jsx(rj,{size:16,className:"text-blush-400"}),u.jsx("input",{value:c,onChange:h=>f(h.target.value),placeholder:e("common.searchPlaceholder"),className:"flex-1 bg-transparent ml-2 text-sm outline-none placeholder:text-blush-300"})]}),u.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-3 ml-auto",children:[u.jsx(ag,{variant:"shop"}),u.jsxs(Le,{to:"/",className:"hidden sm:flex items-center gap-1 text-sm text-sage-700 hover:text-blush-500 transition-colors",children:[u.jsx(dm,{size:15})," ",t?`${t}`:e("shop.header.zip")]}),u.jsx(Le,{to:"/wishlist","aria-label":e("shop.header.wishlist"),className:"p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:u.jsx(Rf,{size:20})}),u.jsxs(Le,{to:"/cart",className:"relative p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:[u.jsx(sj,{size:20}),u.jsx(nx,{children:a>0&&u.jsx(Nt.span,{initial:l?!1:{scale:0},animate:{scale:1},exit:{scale:0},className:"absolute -top-1 -right-1 bg-blush-500 text-white text-[10px] rounded-full min-w-[18px] h-[18px] px-1 flex items-center justify-center",children:a},a)})]}),u.jsx(Le,{to:r?"/mypage":"/account",className:"p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:u.jsx(wk,{size:20})})]})]}),u.jsx("nav",{className:"border-t border-blush-50 bg-white/60",children:u.jsx("div",{className:"max-w-6xl mx-auto px-4 h-11 flex items-center gap-7 text-[13px] overflow-x-auto thin-scroll",children:nW.map(h=>{const p=o.pathname+o.search===h.to||h.to==="/home"&&o.pathname==="/home";return u.jsxs(Le,{to:h.to,className:`relative whitespace-nowrap py-1 transition-colors ${h.accent?"text-sage-700 font-medium":"text-[#6b5258] hover:text-blush-500"} ${p?"text-blush-600":""}`,children:[e(`shop.nav.${h.key}`),p&&u.jsx(Nt.span,{layoutId:"nav-underline",className:"absolute -bottom-[1px] left-0 right-0 h-[2px] bg-blush-500 rounded-full"})]},h.to)})})})]}),u.jsx("main",{className:"flex-1",children:u.jsx(f$,{})}),u.jsxs("footer",{className:"mt-16 bg-sage-800 text-cream/85",children:[u.jsx("div",{className:"botanical-divider py-6 opacity-50",children:u.jsx(ft,{size:16})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 pb-10 grid md:grid-cols-4 gap-8",children:[u.jsxs("div",{className:"md:col-span-1",children:[u.jsx("div",{className:"font-serif text-xl font-bold text-white mb-1",children:"Montvale Florist"}),u.jsx("p",{className:"font-display text-[13px] tracking-[0.3em] uppercase text-sage-300 mb-3",children:e("shop.footer.since",{year:ke.founded})}),u.jsx("p",{className:"text-[13px] leading-relaxed text-cream/70",children:ke.tagline}),u.jsx(qX,{size:18,className:"mt-4 text-cream/80",iconClass:"hover:text-white"})]}),u.jsxs("div",{children:[u.jsx("div",{className:"font-semibold text-white mb-3 text-sm",children:e("shop.footer.visitUs")}),u.jsxs("p",{className:"text-[13px] flex items-start gap-1.5 text-cream/75 mb-1.5",children:[u.jsx(dm,{size:14,className:"mt-0.5 shrink-0"})," ",ke.address]}),u.jsxs("a",{href:`tel:${ke.phoneTel}`,className:"text-[13px] flex items-center gap-1.5 text-cream/75 hover:text-white mb-1.5",children:[u.jsx(ZE,{size:14})," ",ke.phone]}),u.jsx("p",{className:"text-[13px] text-cream/60",children:ke.email})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"font-semibold text-white mb-3 text-sm flex items-center gap-1.5",children:[u.jsx(ck,{size:14})," ",e("shop.footer.hours")]}),ke.hours.map(h=>u.jsxs("div",{className:"text-[13px] text-cream/75 mb-1",children:[u.jsx("span",{className:"inline-block w-20",children:h.day})," ",h.open]},h.day))]}),u.jsxs("div",{children:[u.jsx("div",{className:"font-semibold text-white mb-3 text-sm",children:e("shop.footer.customerCare")}),u.jsxs(Le,{to:"/cs",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.contactAiHelp")]}),u.jsxs(Le,{to:"/orders",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.orderStatus")]}),u.jsxs(Le,{to:"/subscription",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.subscriptions")]}),u.jsxs(Le,{to:"/app",className:"flex items-center gap-1 text-[13px] text-gold hover:text-white mb-3 font-medium",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.getApp")]}),u.jsx("div",{className:"text-[11px] text-cream/50 mb-1.5",children:e("shop.footer.weAccept")}),u.jsx(s5,{items:ke.payments})]})]}),u.jsx("div",{className:"border-t border-cream/10",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex flex-col sm:flex-row items-center justify-between gap-2 text-[11px] text-cream/50",children:[u.jsxs("span",{children:["© 2026 Montvale Florist · ",ke.address]}),u.jsx("span",{className:"flex flex-wrap gap-3",children:ke.policies.map(h=>u.jsx("span",{className:"hover:text-cream/80",children:h},h))})]})})]})]})}function Zl({p:e}){var a;const t=ti(),n=e.salePrice!=null&&e.salePrice>0&&e.salePrice<(e.price||0),r=n?Math.round((1-e.salePrice/e.price)*100):0;return u.jsx(Nt.div,{whileHover:t?void 0:{y:-8},transition:{type:"spring",stiffness:300,damping:24},className:"group h-full",children:u.jsxs(Le,{to:`/product/${e.id}`,className:"block h-full bg-white rounded-3xl overflow-hidden border border-blush-100/70 shadow-soft hover:shadow-bloom transition-shadow duration-500",children:[u.jsxs("div",{className:"relative aspect-[4/5] zoom-frame bg-gradient-to-br from-blush-50 to-ivory flex items-center justify-center",children:[e.thumbnail?u.jsx("img",{src:e.thumbnail,alt:e.name,loading:"lazy",className:"w-full h-full object-cover group-hover:scale-110"}):u.jsx(ft,{className:"text-blush-200",size:56}),n&&u.jsxs("span",{className:"absolute top-3 left-3 bg-blush-500 text-white text-[11px] font-semibold px-2.5 py-1 rounded-full shadow-petal",children:["-",r,"%"]}),e.occasion&&u.jsx("span",{className:"absolute top-3 right-3 bg-white/85 backdrop-blur text-sage-700 text-[10px] uppercase tracking-wide px-2.5 py-1 rounded-full",children:e.occasion}),u.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 bg-gradient-to-t from-blush-900/10 to-transparent"})]}),u.jsxs("div",{className:"p-4",children:[e.brand&&u.jsx("div",{className:"text-[10px] uppercase tracking-[0.12em] text-sage-600 mb-0.5",children:e.brand}),u.jsx("div",{className:"font-serif text-[15px] leading-snug text-blush-900 truncate",children:e.name}),u.jsxs("div",{className:"flex items-center justify-between mt-2",children:[u.jsx("div",{className:"flex items-baseline gap-1.5",children:n?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-blush-600 font-bold",children:Ee(e.salePrice)}),u.jsx("span",{className:"text-gray-400 line-through text-xs",children:Ee(e.price)})]}):u.jsx("span",{className:"font-bold text-blush-900",children:Ee(e.price)})}),e.ratingAvg!=null&&e.reviewCount?u.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-gold",children:[u.jsx(Wa,{size:12,fill:"currentColor"}),(a=e.ratingAvg)==null?void 0:a.toFixed(1)]}):null]})]})]})})}const aW=[wK,ft,aj],iW=6e3;function sW(){const{storeName:e}=bn(),t=ti(),n=A.useRef(null),{scrollYProgress:r}=mq({target:n,offset:["start start","end start"]}),a=Jv(r,[0,1],["0%",t?"0%":"28%"]),i=Jv(r,[0,1],[1,t?1:1.12]),s=Jv(r,[0,.8],[1,t?1:.2]),[o,l]=A.useState(0),[c,f]=A.useState(1),d=lb.length,h=A.useCallback(m=>{f(m>o||o===d-1&&m===0?1:-1),l((m%d+d)%d)},[o,d]);A.useEffect(()=>{if(t)return;const m=setInterval(()=>{f(1),l(g=>(g+1)%d)},iW);return()=>clearInterval(m)},[t,d]);const p=lb[o];return u.jsxs("section",{ref:n,className:"relative overflow-hidden min-h-[78vh] flex items-center",children:[u.jsxs(Nt.div,{style:{y:a,scale:i},className:"absolute inset-0 z-0",children:[u.jsx(nx,{initial:!1,children:u.jsx(Nt.img,{src:p.img,alt:"",className:"absolute inset-0 w-full h-full object-cover",initial:{opacity:0,scale:t?1:1.06},animate:{opacity:1,scale:1},exit:{opacity:0},transition:{duration:t?0:1.1,ease:[.22,1,.36,1]}},p.img)}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blush-900/70 via-blush-900/40 to-transparent"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-sage-900/40 to-transparent"})]}),u.jsx(Kd,{count:16,className:"z-[1]"}),u.jsx(Nt.div,{style:{opacity:s},className:"relative z-10 max-w-6xl mx-auto px-4 w-full py-20",children:u.jsx(nx,{mode:"wait",custom:c,children:u.jsxs(Nt.div,{className:"max-w-xl",custom:c,initial:t?!1:{opacity:0,x:c*36},animate:{opacity:1,x:0},exit:t?{opacity:0}:{opacity:0,x:c*-36},transition:{duration:.7,ease:[.22,1,.36,1]},children:[u.jsxs("div",{className:"inline-flex items-center gap-2 text-cream/90 text-[12px] tracking-[0.25em] uppercase mb-5",children:[u.jsx("span",{className:"h-px w-8 bg-gold"})," ",p.eyebrow]}),u.jsx("h1",{className:"font-serif text-5xl md:text-6xl font-bold text-white leading-[1.05] mb-5 whitespace-pre-line drop-shadow-sm",children:p.headline}),u.jsxs("p",{className:"text-cream/90 text-lg leading-relaxed mb-8 max-w-md font-light",children:[p.subtext,e?` Same-day from ${e}.`:""]}),u.jsxs("div",{className:"flex flex-wrap gap-3",children:[u.jsx(Le,{to:p.to,children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 bg-white text-blush-700 font-semibold px-7 py-3.5 rounded-full shadow-bloom hover:bg-cream",children:[p.cta," ",u.jsx(Es,{size:17})]})}),u.jsx(Le,{to:"/daily-standard",children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 border border-white/70 text-white px-7 py-3.5 rounded-full hover:bg-white/10",children:[u.jsx(ej,{size:16})," Today's Bouquet"]})})]}),u.jsxs("div",{className:"flex items-center gap-2 mt-7 text-cream/85 text-sm",children:[u.jsx("span",{className:"flex text-gold",children:[1,2,3,4,5].map(m=>u.jsx(Wa,{size:15,fill:"currentColor"},m))}),u.jsx("span",{className:"font-medium",children:ke.rating}),u.jsxs("span",{className:"text-cream/60",children:["· ",ke.reviewCount.toLocaleString()," happy customers"]})]})]},o)})}),u.jsx("button",{"aria-label":"Previous slide",onClick:()=>h(o-1),className:"absolute left-3 md:left-5 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 backdrop-blur-sm text-white flex items-center justify-center transition-colors",children:u.jsx(gK,{size:22})}),u.jsx("button",{"aria-label":"Next slide",onClick:()=>h(o+1),className:"absolute right-3 md:right-5 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 backdrop-blur-sm text-white flex items-center justify-center transition-colors",children:u.jsx(Pu,{size:22})}),u.jsx("div",{className:"absolute bottom-7 left-1/2 -translate-x-1/2 z-20 flex items-center gap-2.5",children:lb.map((m,g)=>u.jsx("button",{"aria-label":`Go to slide ${g+1}`,onClick:()=>h(g),className:`h-2.5 rounded-full transition-all duration-300 ${g===o?"w-8 bg-white":"w-2.5 bg-white/45 hover:bg-white/70"}`},g))}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -bottom-6 right-6 z-[2] text-white/20 hidden md:block pointer-events-none",animate:t?void 0:{rotate:[0,5,-4,0],y:[0,-8,0]},transition:{duration:9,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{size:130,strokeWidth:1})})]})}function oW(){var i,s,o;const{data:e}=se({queryKey:["ai-rec"],queryFn:()=>t5("","",8)}),{data:t}=se({queryKey:["best"],queryFn:()=>Ql({sort:"sales",size:8})}),{data:n}=se({queryKey:["feat"],queryFn:()=>Ql({sort:"rating",size:12})}),r=(t==null?void 0:t.items)||[],a=(n==null?void 0:n.items)||[];return u.jsxs("div",{children:[u.jsx(sW,{}),u.jsx("section",{className:"bg-ivory border-b border-blush-100",children:u.jsx("div",{className:"max-w-6xl mx-auto px-4 py-10 grid md:grid-cols-3 gap-6",children:ke.promise.map((l,c)=>{const f=aW[c];return u.jsxs(Gr,{delay:c*.1,className:"flex items-start gap-3",children:[u.jsx("span",{className:"shrink-0 w-11 h-11 rounded-full bg-blush-50 text-blush-500 flex items-center justify-center",children:u.jsx(f,{size:20})}),u.jsxs("div",{children:[u.jsx("div",{className:"font-serif text-lg text-blush-900",children:l.title}),u.jsx("p",{className:"text-sm text-[#6b5258] leading-relaxed mt-0.5",children:l.desc})]})]},l.title)})})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-14 space-y-20",children:[u.jsxs("section",{children:[u.jsxs(Gr,{className:"flex items-end justify-between mb-7",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-600 text-[12px] tracking-[0.2em] uppercase mb-2",children:[u.jsx(xr,{size:15})," Curated by GUARDiA AI · On-premise"]}),u.jsx("h2",{className:"font-serif text-3xl text-blush-900",children:"Picked Just for You"})]}),u.jsxs(Le,{to:"/category",className:"hidden sm:flex items-center gap-1 text-sm text-blush-500 hover:text-blush-700",children:["View all ",u.jsx(Es,{size:15})]})]}),u.jsxs(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:[(e||[]).slice(0,8).map(l=>u.jsx(mm,{children:u.jsx(Zl,{p:l})},l.id)),!(e||[]).length&&u.jsx("div",{className:"col-span-4 text-blush-300 text-sm py-12 text-center",children:"Curating fresh picks…"})]})]}),u.jsx("div",{className:"botanical-divider",children:u.jsx(ft,{size:18})}),u.jsx(Gr,{children:u.jsxs("section",{className:"relative overflow-hidden rounded-4xl bg-gradient-to-br from-sage-700 to-sage-800 text-white",children:[u.jsx(Kd,{count:8}),u.jsxs("div",{className:"relative z-10 p-8 md:p-12 flex flex-col md:flex-row items-center justify-between gap-6",children:[u.jsxs("div",{className:"max-w-lg",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-200 text-[12px] tracking-[0.2em] uppercase mb-3",children:[u.jsx(ej,{size:15})," Farmgirl-style daily"]}),u.jsx("h3",{className:"font-serif text-3xl md:text-4xl font-bold mb-3",children:"Today's Designer Bouquet"}),u.jsx("p",{className:"text-cream/85 leading-relaxed",children:"Made fresh each morning with whatever's most beautiful in the cooler — hand-designed by our florists and curated by GUARDiA AI. Limited daily stock."})]}),u.jsx(Le,{to:"/daily-standard",children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 bg-white text-sage-800 font-semibold px-7 py-3.5 rounded-full shadow-bloom",children:["See today's bouquet ",u.jsx(Es,{size:16})]})})]})]})}),u.jsxs("section",{children:[u.jsxs(Gr,{className:"flex items-end justify-between mb-7",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-600 text-[12px] tracking-[0.2em] uppercase mb-2",children:[u.jsx(Wa,{size:14})," Most loved"]}),u.jsx("h2",{className:"font-serif text-3xl text-blush-900",children:"Bestsellers"})]}),u.jsxs(Le,{to:"/category?sort=sales",className:"hidden sm:flex items-center gap-1 text-sm text-blush-500 hover:text-blush-700",children:["View all ",u.jsx(Es,{size:15})]})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:r.map(l=>u.jsx(mm,{children:u.jsx(Zl,{p:l})},l.id))})]}),u.jsx(Gr,{children:u.jsx("section",{className:"grid md:grid-cols-3 gap-5",children:[{to:"/category?occasion=ROMANCE",label:"Love & Romance",sub:"Roses that speak from the heart",img:(i=a[1])==null?void 0:i.thumbnail},{to:"/category?occasion=SYMPATHY",label:"Sympathy & Comfort",sub:"Thoughtful tributes, gently delivered",img:(s=a[2])==null?void 0:s.thumbnail},{to:"/subscription",label:"Flower Subscriptions",sub:"Fresh blooms, week after week",img:(o=a[3])==null?void 0:o.thumbnail}].map((l,c)=>u.jsxs(Le,{to:l.to,className:"group relative rounded-3xl overflow-hidden zoom-frame aspect-[5/4] block shadow-soft",children:[l.img?u.jsx("img",{src:l.img,alt:"",loading:"lazy",className:"w-full h-full object-cover group-hover:scale-110"}):u.jsx("div",{className:"w-full h-full bg-gradient-to-br from-blush-100 to-sage-100"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-blush-900/75 via-blush-900/20 to-transparent"}),u.jsxs("div",{className:"absolute bottom-0 left-0 p-6 text-white",children:[u.jsx("div",{className:"font-serif text-xl font-semibold mb-0.5",children:l.label}),u.jsx("p",{className:"text-cream/85 text-sm",children:l.sub}),u.jsxs("span",{className:"inline-flex items-center gap-1 text-[13px] text-gold mt-2 group-hover:gap-2 transition-all",children:["Explore ",u.jsx(Es,{size:14})]})]})]},l.to))})}),u.jsx(Gr,{children:u.jsxs("section",{className:"rounded-4xl bg-blush-50 border border-blush-100 p-8 md:p-10 text-center",children:[u.jsx("div",{className:"flex justify-center mb-4",children:u.jsx("span",{className:"w-12 h-12 rounded-full bg-white text-blush-500 flex items-center justify-center shadow-soft",children:u.jsx(Ud,{size:22})})}),u.jsxs("h3",{className:"font-serif text-2xl text-blush-900 mb-2",children:["Your Local Florist Since ",ke.founded]}),u.jsx("p",{className:"text-[#6b5258] max-w-xl mx-auto leading-relaxed text-[15px]",children:ke.about}),u.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 mt-5 text-[12px] text-sage-700",children:[u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"Same-Day Delivery"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"Hand-Delivered"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"100% Satisfaction"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"No-Contact Available"})]})]})})]})]})}const gT=[["","All"],["BIRTHDAY","Birthday"],["ANNIVERSARY","Anniversary"],["SYMPATHY","Sympathy"],["CONGRATS","Congrats"],["ROMANCE","Romance"]],lW=[["","Recommended"],["price_asc","Price ↑"],["price_desc","Price ↓"],["sales","Bestselling"],["rating","Top rated"]];function cW(){var b;const[e,t]=m$(),n=e.get("occasion")||"",[r,a]=A.useState(e.get("sort")||""),[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(null);se({queryKey:["cats"],queryFn:PY});const{data:d}=se({queryKey:["products",n,r,i],queryFn:()=>Ql({occasion:n,sort:r,maxPrice:i?Number(i):void 0,size:24})}),h=c?c.items:(d==null?void 0:d.items)||[],p=y=>{const v=new URLSearchParams(e);y?v.set("occasion",y):v.delete("occasion"),t(v),f(null)},m=async y=>{if(y.preventDefault(),!o.trim()){f(null);return}const v=await n5(o.trim()).catch(()=>null);f(v)},g=((b=gT.find(y=>y[0]===n))==null?void 0:b[1])||"All";return u.jsxs("div",{children:[u.jsx("section",{className:"bg-gradient-to-br from-blush-50 to-ivory border-b border-blush-100",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10",children:[u.jsx("div",{className:"text-[12px] tracking-[0.2em] uppercase text-sage-600 mb-2",children:"Shop the collection"}),u.jsx("h1",{className:"font-serif text-4xl text-blush-900",children:g==="All"?"All Flowers":g})]})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("form",{onSubmit:m,className:"flex items-center gap-2 bg-white border border-blush-100 rounded-full px-5 py-3 mb-6 max-w-xl shadow-soft",children:[u.jsx(xr,{size:16,className:"text-blush-500"}),u.jsx("input",{value:o,onChange:y=>l(y.target.value),placeholder:'Try "anniversary roses under $80"',className:"flex-1 text-sm outline-none bg-transparent placeholder:text-blush-300"}),u.jsx("button",{className:"text-blush-500 text-sm font-semibold",children:"AI Search"})]}),c&&u.jsxs("div",{className:"text-xs text-sage-700 mb-4",children:["AI understood: ",u.jsx("span",{className:"font-medium",children:JSON.stringify(c.parsed)})," · ",c.source]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-7",children:[gT.map(([y,v])=>u.jsx("button",{onClick:()=>p(y),className:`px-4 py-1.5 rounded-full text-sm border transition-colors ${n===y?"bg-blush-500 text-white border-blush-500":"bg-white text-[#6b5258] border-blush-100 hover:border-blush-300"}`,children:v},y)),u.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[u.jsx(CK,{size:15,className:"text-blush-300"}),u.jsx("input",{value:i,onChange:y=>{s(y.target.value.replace(/\D/g,"")),f(null)},placeholder:"Max $",className:"w-24 px-3 py-1.5 rounded-full border border-blush-100 text-sm outline-none focus:border-blush-300"}),u.jsx("select",{value:r,onChange:y=>{a(y.target.value),f(null)},className:"px-3 py-1.5 rounded-full border border-blush-100 text-sm outline-none bg-white",children:lW.map(([y,v])=>u.jsx("option",{value:y,children:v},y))})]})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:h.map(y=>u.jsx(mm,{children:u.jsx(Zl,{p:y})},y.id))}),!h.length&&u.jsxs(Gr,{className:"text-center text-blush-300 py-20",children:[u.jsx(ft,{size:40,className:"mx-auto mb-3 text-blush-200"}),"No flowers match those filters."]})]})]})}function uW(){const{t:e}=ni(),[t]=m$(),n=t.get("q")||"",{data:r,isLoading:a}=se({queryKey:["nl-search",n],queryFn:()=>n5(n),enabled:!!n}),i=(r==null?void 0:r.items)||[];return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(xr,{className:"text-bloom",size:20}),u.jsx("h1",{className:"font-serif text-2xl font-bold",children:e("search.resultsFor",{query:n})})]}),(r==null?void 0:r.parsed)&&u.jsxs("div",{className:"text-xs text-bloom2 mb-5",children:[e("search.aiUnderstood")," ",u.jsx("span",{className:"font-medium",children:JSON.stringify(r.parsed)})," · ",r.source]}),a&&u.jsx("div",{className:"text-gray-400 py-10 text-center",children:e("search.searching")}),u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:i.map(s=>u.jsx(Zl,{p:s},s.id))}),!a&&!i.length&&u.jsx("div",{className:"text-center text-gray-400 py-16",children:e("search.noResults")})]})}function fW(){var te,Z,ye;const{id:e}=o$(),t=Number(e),n=Kt(),r=ti(),{custToken:a,setCartCount:i}=bn(),[s,o]=A.useState(""),[l,c]=A.useState(null),[f,d]=A.useState(null),[h,p]=A.useState(""),[m,g]=A.useState(1),[b,y]=A.useState(""),[v,x]=A.useState(!1),[w,S]=A.useState(null),{data:j}=se({queryKey:["product",t],queryFn:()=>CY(t)}),{data:O}=se({queryKey:["reviews",t],queryFn:()=>WY(t)}),{data:E}=se({queryKey:["rstats",t],queryFn:()=>QY(t)}),{data:T}=se({queryKey:["aisum",t],queryFn:()=>cX(t)});if(!j)return u.jsx("div",{className:"max-w-6xl mx-auto px-4 py-24 text-center text-blush-300",children:"Loading…"});const N=j.sizes||[],M=N.find(J=>J.sizeCode===s)||N[0],C=j.options||[],L=C.filter(J=>J.optionType==="VASE"),D=C.filter(J=>J.optionType==="WRAP"),$=J=>C.find(st=>st.id===J),P=M?M.price:j.salePrice&&j.salePrice>0?j.salePrice:j.price,k=(((te=$(l))==null?void 0:te.extraPrice)||0)+(((Z=$(f))==null?void 0:Z.extraPrice)||0),I=(P+k)*m,F=w||j.thumbnail,H=async()=>{if(!a){n("/account");return}try{await LY({productId:j.id,optionId:l||f||null,sizeCode:(M==null?void 0:M.sizeCode)||"",cardMessage:h,quantity:m}),i(J=>J+m),y("Added to your cart.")}catch{y("Could not add to cart.")}},Y=async()=>{await H(),n("/cart")},q=async()=>{if(!a){n("/account");return}x(!0),setTimeout(()=>x(!1),700),await rX(j.id).catch(()=>{}),y("Saved to your wishlist.")};return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10",children:[u.jsxs("div",{className:"grid md:grid-cols-2 gap-10",children:[u.jsxs(Gr,{children:[u.jsx("div",{className:"relative aspect-[4/5] rounded-4xl overflow-hidden bg-gradient-to-br from-blush-50 to-ivory flex items-center justify-center shadow-soft",children:F?u.jsx(Nt.img,{src:F,alt:j.name,initial:r?!1:{opacity:0,scale:1.04},animate:{opacity:1,scale:1},transition:{duration:.6},className:"w-full h-full object-cover"},F):u.jsx(ft,{className:"text-blush-200",size:96})}),!!(j.images||[]).length&&u.jsxs("div",{className:"flex gap-2 mt-3",children:[u.jsx("button",{onClick:()=>S(null),className:`w-16 h-16 rounded-2xl overflow-hidden border-2 ${w?"border-blush-100":"border-blush-400"}`,children:j.thumbnail?u.jsx("img",{src:j.thumbnail,className:"w-full h-full object-cover"}):u.jsx(ft,{className:"text-blush-200 m-auto",size:20})}),j.images.map((J,st)=>u.jsx("button",{onClick:()=>S(J),className:`w-16 h-16 rounded-2xl overflow-hidden border-2 ${w===J?"border-blush-400":"border-blush-100"}`,children:u.jsx("img",{src:J,className:"w-full h-full object-cover"})},st))]})]}),u.jsxs(Gr,{delay:.1,children:[j.brand&&u.jsx("div",{className:"text-[11px] uppercase tracking-[0.2em] text-sage-600 mb-1",children:j.brand}),u.jsx("h1",{className:"font-serif text-3xl font-bold text-blush-900 mb-2 leading-tight",children:j.name}),u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gold mb-4",children:[u.jsx(Wa,{size:15,fill:"currentColor"})," ",((ye=j.ratingAvg)==null?void 0:ye.toFixed(1))||"–",u.jsxs("span",{className:"text-[#a08a90]",children:["(",j.reviewCount||0," reviews)"]}),j.occasion&&u.jsx("span",{className:"text-xs bg-blush-50 text-blush-700 px-2.5 py-0.5 rounded-full ml-1",children:j.occasion})]}),u.jsx("p",{className:"text-[#6b5258] text-[15px] mb-6 leading-relaxed",children:j.description}),!!N.length&&u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Choose your size"}),u.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:N.map(J=>u.jsxs(Ua,{onClick:()=>o(J.sizeCode),className:`rounded-2xl border p-3 text-center transition-colors ${(M==null?void 0:M.sizeCode)===J.sizeCode?"border-blush-400 bg-blush-50":"border-blush-100 hover:border-blush-300"}`,children:[u.jsx("div",{className:"font-semibold text-sm text-blush-900",children:J.label}),u.jsxs("div",{className:"text-xs text-[#8a7077]",children:[J.stemCount," stems"]}),u.jsx("div",{className:"text-blush-600 font-bold text-sm mt-1",children:Ee(J.price)})]},J.sizeCode))})]}),!!L.length&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Add a vase"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Ch,{active:l===null,onClick:()=>c(null),children:"No vase"}),L.map(J=>u.jsxs(Ch,{active:l===J.id,onClick:()=>c(J.id),children:[J.optionValue," +",Ee(J.extraPrice)]},J.id))]})]}),!!D.length&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Wrapping"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Ch,{active:f===null,onClick:()=>d(null),children:"Standard"}),D.map(J=>u.jsxs(Ch,{active:f===J.id,onClick:()=>d(J.id),children:[J.optionValue," +",Ee(J.extraPrice)]},J.id))]})]}),u.jsxs("div",{className:"mb-5",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("span",{className:"text-sm font-medium text-blush-900",children:"Card message"}),u.jsxs(Le,{to:"/cs",className:"text-xs text-blush-500 flex items-center gap-1",children:[u.jsx(xr,{size:12})," AI message helper"]})]}),u.jsx("textarea",{value:h,onChange:J=>p(J.target.value),rows:2,maxLength:200,placeholder:"Write a heartfelt note for the recipient…",className:"w-full px-3.5 py-2.5 rounded-2xl border border-blush-100 text-sm outline-none focus:border-blush-400"})]}),u.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[u.jsxs("div",{className:"flex items-center border border-blush-100 rounded-full",children:[u.jsx("button",{onClick:()=>g(J=>Math.max(1,J-1)),className:"px-3.5 py-1.5 text-blush-600",children:"−"}),u.jsx("span",{className:"px-2 text-sm w-8 text-center",children:m}),u.jsx("button",{onClick:()=>g(J=>J+1),className:"px-3.5 py-1.5 text-blush-600",children:"+"})]}),u.jsx("div",{className:"font-serif text-2xl font-bold text-blush-900",children:Ee(I)})]}),b&&u.jsx("div",{className:"text-sm text-sage-700 mb-3",children:b}),u.jsxs("div",{className:"flex gap-3",children:[u.jsxs(Ua,{onClick:H,className:"flex-1 flex items-center justify-center gap-2 border border-blush-400 text-blush-600 font-semibold py-3.5 rounded-full hover:bg-blush-50",children:[u.jsx(sj,{size:18})," Add to Cart"]}),u.jsx(Ua,{onClick:Y,className:"flex-1 bg-blush-500 text-white font-semibold py-3.5 rounded-full hover:bg-blush-600 shadow-petal",children:"Buy Now"}),u.jsx("button",{onClick:q,className:`px-4 border border-blush-100 rounded-full text-blush-500 hover:bg-blush-50 ${v?"animate-heartbeat":""}`,children:u.jsx(Rf,{size:18,fill:v?"currentColor":"none"})})]}),u.jsxs("div",{className:"flex items-center gap-5 mt-5 text-xs text-sage-700",children:[u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(Ud,{size:14})," Same-day local delivery"]}),u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(aj,{size:14})," 100% satisfaction"]})]}),u.jsx("div",{className:"mt-4 pt-4 border-t border-blush-100/60",children:u.jsx(KX,{url:typeof window<"u"?window.location.href:"",title:j.name,image:j.thumbnail||""})})]})]}),u.jsxs("div",{className:"mt-16",children:[u.jsx("div",{className:"botanical-divider mb-8",children:u.jsx(ft,{size:16})}),u.jsxs("h2",{className:"font-serif text-2xl font-bold text-blush-900 mb-5",children:["Reviews (",(E==null?void 0:E.count)??j.reviewCount??0,")"]}),(T==null?void 0:T.summary)&&u.jsxs(Gr,{className:"bg-gradient-to-br from-blush-50 to-sage-50 border border-blush-100 rounded-3xl p-5 mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2 text-blush-700 font-medium text-sm mb-1.5",children:[u.jsx(xr,{size:15})," AI Review Summary ",u.jsx("span",{className:"text-xs text-[#a08a90]",children:T.source})]}),u.jsx("p",{className:"text-sm text-[#5a474d] leading-relaxed",children:T.summary})]}),u.jsxs("div",{className:"space-y-3",children:[(O||[]).map(J=>u.jsxs("div",{className:"bg-white rounded-3xl border border-blush-100/70 p-5 shadow-soft",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"font-medium text-sm text-blush-900",children:J.title||"Review"}),u.jsxs("span",{className:"flex items-center gap-0.5 text-gold text-sm",children:[u.jsx(Wa,{size:13,fill:"currentColor"}),J.rating]})]}),u.jsx("p",{className:"text-sm text-[#6b5258] mt-1.5 leading-relaxed",children:J.content})]},J.id)),!(O||[]).length&&u.jsx("div",{className:"text-blush-300 text-sm py-8 text-center",children:"No reviews yet — be the first."})]}),u.jsx(Le,{to:`/review/${j.id}`,className:"inline-flex items-center gap-1 mt-5 text-sm text-blush-500 font-semibold hover:text-blush-700",children:"Write a review →"})]})]})}function Ch({active:e,onClick:t,children:n}){return u.jsx("button",{onClick:t,className:`px-3.5 py-1.5 rounded-full text-sm border transition-colors ${e?"bg-blush-500 text-white border-blush-500":"border-blush-100 text-[#6b5258] hover:border-blush-300"}`,children:n})}function dW(){const{t:e}=ni(),t=nn(),n=Kt(),{custToken:r,setCartCount:a}=bn(),{data:i}=se({queryKey:["cart"],queryFn:hj,enabled:!!r}),s=()=>t.invalidateQueries({queryKey:["cart"]}),o=async(d,h)=>{h<1||(await zY(d,h),s())},l=async d=>{await IY(d),s(),a(h=>Math.max(0,h-1))};if(!r)return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-20 text-center",children:[u.jsx(sj,{className:"mx-auto text-bloom/40 mb-3",size:48}),u.jsx("p",{className:"text-gray-500 mb-4",children:e("cart.signInPrompt")}),u.jsx(Le,{to:"/account",className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:e("cart.signInRegister")})]});const c=i||[],f=c.reduce((d,h)=>d+(h.price||(h.unitPrice||0)*(h.quantity||1)),0);return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsx("h1",{className:"font-serif text-2xl font-bold mb-6",children:e("cart.title")}),c.length?u.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[u.jsx("div",{className:"md:col-span-2 space-y-3",children:c.map(d=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex gap-4",children:[u.jsx("div",{className:"w-20 h-20 bg-petal rounded-xl flex items-center justify-center overflow-hidden shrink-0",children:d.thumbnail?u.jsx("img",{src:d.thumbnail,className:"w-full h-full object-cover"}):u.jsx(ft,{className:"text-bloom/30",size:32})}),u.jsxs("div",{className:"flex-1",children:[u.jsx("div",{className:"font-medium text-sm",children:d.productName||`Product #${d.productId}`}),u.jsxs("div",{className:"text-xs text-gray-500",children:[d.sizeCode,d.cardMessage?` · ${e("cart.card")}: ${d.cardMessage.slice(0,20)}`:""]}),u.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[u.jsxs("div",{className:"flex items-center border border-blush-100 rounded-full text-sm",children:[u.jsx("button",{onClick:()=>o(d.id,(d.quantity||1)-1),className:"px-2.5 py-1 text-bloom2",children:"−"}),u.jsx("span",{className:"px-1 w-6 text-center",children:d.quantity||1}),u.jsx("button",{onClick:()=>o(d.id,(d.quantity||1)+1),className:"px-2.5 py-1 text-bloom2",children:"+"})]}),u.jsx("button",{onClick:()=>l(d.id),className:"text-blush-400 hover:text-blush-600",children:u.jsx(PK,{size:16})})]})]}),u.jsx("div",{className:"font-bold text-bloom2 text-sm",children:Ee(d.price||(d.unitPrice||0)*(d.quantity||1))})]},d.id))}),u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 h-fit",children:[u.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[u.jsx("span",{className:"text-gray-500",children:e("cart.subtotal")}),u.jsx("span",{className:"font-medium",children:Ee(f)})]}),u.jsxs("div",{className:"flex justify-between text-sm mb-3",children:[u.jsx("span",{className:"text-gray-500",children:e("cart.shippingTax")}),u.jsx("span",{className:"text-gray-400",children:e("cart.calcAtCheckout")})]}),u.jsxs("div",{className:"border-t border-blush-100/60 pt-3 flex justify-between font-bold",children:[u.jsx("span",{children:e("cart.total")}),u.jsx("span",{className:"text-bloom2",children:Ee(f)})]}),u.jsx("button",{onClick:()=>n("/checkout"),className:"w-full mt-4 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2",children:e("cart.checkout")})]})]}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:[e("cart.empty")," ",u.jsx(Le,{to:"/category",className:"text-bloom",children:e("cart.startShopping")})]})]})}function hW(e){const t=[],n=new Date;for(let r=0;rSo(!0)}),{data:st}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!t}),{data:Ve}=se({queryKey:["holidays"],queryFn:Wk}),{data:G}=se({queryKey:["avail",o,c],queryFn:()=>$Y(o,c),enabled:!!o&&!!c});A.useEffect(()=>{!o&&(J!=null&&J.length)&&l(J[0].id)},[J]);const oe=ye||[],X=oe.reduce((le,zt)=>le+(zt.price||(zt.unitPrice||0)*(zt.quantity||1)),0),V=G!=null&&G.surgeMultiplier&&G.surgeMultiplier>1?X*(G.surgeMultiplier-1):0,_e=((Co=st==null?void 0:st.benefit)==null?void 0:Co.discountRate)||0,ge=X*(_e/100),Xe=(k==null?void 0:k.taxAmount)||0,ot=(st==null?void 0:st.pointBalance)||0,dt=Math.min(ot,Math.floor(X)),Rn=Math.max(0,X+V+Xe-ge-T),oi=A.useMemo(()=>new Set((Ve||[]).filter(le=>le.blocked).map(le=>le.holidayDate)),[Ve]),No=async()=>{if(!y||!x)return;const le=await oX(y,x).catch(()=>null);P(le)},pa=async()=>{var Er;const le=((Er=J==null?void 0:J.find(nh=>nh.id===o))==null?void 0:Er.state)||"",zt=await sX(X,x||"",le).catch(()=>null);I(zt)};A.useEffect(()=>{X>0&&o&&pa()},[X,o,x]);const ma=async()=>{var le,zt;if(Z(""),!t){e("/account");return}if(!oe.length){Z("Your cart is empty.");return}if(!c||!d){Z("Please select a delivery/pickup date and time slot.");return}if(i==="DELIVERY"&&(!y||!p)){Z("Please enter the recipient and delivery address.");return}if(M==="CARD"&&!L.complete){Z("Please enter your card details.");return}H(!0);try{const Er=await UY({storeId:o,fulfillmentType:i,receiverName:p,receiverPhone:g,address:i==="DELIVERY"?y:"",deliveryZip:x,scheduledDate:c,slotId:d.id,slotLabel:d.label,cardMessage:S,memo:O,couponId:null,discountAmount:Math.round((ge+T)*100)/100,taxAmount:Xe,surgeAmount:Math.round(V*100)/100});await VY({orderId:Er.id,amount:Rn,method:M,usePoints:T,cardLast4:M==="CARD"?L.last4:""}).catch(()=>{}),a(0),q(Er)}catch(Er){Z(((zt=(le=Er==null?void 0:Er.response)==null?void 0:le.data)==null?void 0:zt.message)||"Order failed. Please try again in a moment.")}finally{H(!1)}};return t?Y?u.jsxs("div",{className:"max-w-lg mx-auto px-4 py-20 text-center",children:[u.jsx(vK,{className:"mx-auto text-leaf mb-4",size:56}),u.jsx("h1",{className:"font-serif text-2xl font-bold mb-2",children:"Your order has been placed"}),u.jsxs("p",{className:"text-gray-500 mb-1",children:["Order Number ",u.jsx("span",{className:"font-semibold text-bloom2",children:Y.orderNo||`#${Y.id}`})]}),u.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:[c," · ",d==null?void 0:d.label," · ",Ee(Rn)]}),u.jsxs("div",{className:"flex gap-3 justify-center",children:[u.jsx("button",{onClick:()=>e("/orders"),className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Order History"}),u.jsx("button",{onClick:()=>e("/home"),className:"border border-blush-100 px-6 py-2.5 rounded-full text-bloom2",children:"Continue Shopping"})]})]}):u.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[u.jsx("h1",{className:"font-serif text-2xl font-bold mb-6",children:"Checkout"}),u.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[u.jsxs("div",{className:"md:col-span-2 space-y-5",children:[u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Fulfillment Method"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("button",{onClick:()=>s("DELIVERY"),className:`flex items-center gap-2 justify-center py-3 rounded-xl border ${i==="DELIVERY"?"border-bloom bg-petal text-bloom2":"border-blush-100"}`,children:[u.jsx(Ud,{size:18})," Local Delivery"]}),u.jsxs("button",{onClick:()=>s("PICKUP"),className:`flex items-center gap-2 justify-center py-3 rounded-xl border ${i==="PICKUP"?"border-bloom bg-petal text-bloom2":"border-blush-100"}`,children:[u.jsx(Bd,{size:18})," Store Pickup"]})]}),u.jsxs("div",{className:"mt-3",children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Store"}),u.jsx("select",{value:o,onChange:le=>l(Number(le.target.value)),className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:(J||[]).map(le=>u.jsxs("option",{value:le.id,children:[le.name," (",le.city,", ",le.state,")"]},le.id))})]})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold mb-3",children:[u.jsx(yK,{size:16,className:"text-bloom"})," Delivery / Pickup Date"]}),u.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2",children:hW(14).map(le=>{const zt=oi.has(le),Er=c===le,nh=new Date(le);return u.jsxs("button",{disabled:zt,onClick:()=>{f(le),h(null)},className:`shrink-0 w-16 py-2 rounded-xl border text-center text-xs ${zt?"opacity-30 cursor-not-allowed border-blush-100":Er?"border-bloom bg-bloom text-white":"border-blush-100 hover:border-bloom"}`,children:[u.jsx("div",{className:"font-semibold",children:nh.toLocaleDateString("en-US",{weekday:"short"})}),u.jsx("div",{className:"text-base",children:nh.getDate()}),zt&&u.jsx("div",{className:"text-[9px]",children:"Closed"})]},le)})}),c&&G&&u.jsxs("div",{className:"mt-3",children:[G.blocked&&u.jsxs("div",{className:"flex items-center gap-1.5 text-blush-500 text-xs mb-2",children:[u.jsx(RK,{size:13})," Delivery is unavailable on this date (peak season / closed)."]}),G.surgeMultiplier>1&&u.jsxs("div",{className:"text-xs text-amber-600 mb-2",children:["⚡ Peak-season surge pricing ×",G.surgeMultiplier," applied"]}),G.sameDayAvailable&&u.jsxs("div",{className:"text-xs text-leaf mb-2",children:["Same-Day Delivery available (order by ",G.sameDayCutoff,")"]}),u.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium mb-2",children:[u.jsx(ck,{size:14,className:"text-bloom"})," Delivery Time Slot"]}),u.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[(G.slots||[]).map(le=>{const zt=le.available===!1||le.capacity!=null&&le.booked>=le.capacity;return u.jsx("button",{disabled:zt,onClick:()=>h({id:le.id,label:le.slotLabel}),className:`py-2 rounded-lg border text-xs ${zt?"opacity-30 cursor-not-allowed":(d==null?void 0:d.id)===le.id?"border-bloom bg-petal text-bloom2 font-semibold":"border-blush-100 hover:border-bloom"}`,children:le.slotLabel},le.id)}),!(G.slots||[]).length&&u.jsx("div",{className:"col-span-3 text-gray-400 text-xs py-2",children:"No time slots available."})]})]})]}),i==="DELIVERY"&&u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3",children:[u.jsx("div",{className:"text-sm font-semibold",children:"Recipient Information"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx("input",{value:p,onChange:le=>m(le.target.value),placeholder:"Recipient Name",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:g,onChange:le=>b(le.target.value),placeholder:"Phone",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{value:y,onChange:le=>v(le.target.value),placeholder:"Delivery Address",className:"flex-1 px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:x,onChange:le=>w(le.target.value.replace(/\D/g,"").slice(0,5)),placeholder:"ZIP",className:"w-24 px-3 py-2 rounded-xl border border-blush-100 text-sm text-center outline-none focus:border-bloom"}),u.jsxs("button",{onClick:No,className:"px-3 rounded-xl border border-bloom text-bloom text-sm font-semibold flex items-center gap-1",children:[u.jsx(dm,{size:14})," Verify"]})]}),$&&u.jsx("div",{className:`text-xs ${$.valid?"text-leaf":"text-blush-500"}`,children:$.valid?`Verified: ${$.normalized||y} (${$.provider})`:`Address verification failed (${$.provider})`})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("div",{className:"text-sm font-semibold",children:"Gift Card Message"}),u.jsxs("span",{className:"text-xs text-bloom flex items-center gap-1",children:[u.jsx(xr,{size:12})," AI writing is on the product page"]})]}),u.jsx("textarea",{value:S,onChange:le=>j(le.target.value),rows:2,maxLength:200,placeholder:"Message for the recipient",className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:O,onChange:le=>E(le.target.value),placeholder:"Special Instructions (optional)",className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Payment Method"}),u.jsx(tW,{method:M,onMethod:C,onCardChange:D,cards:ke.cards,wallets:ke.wallets})]})]}),u.jsxs("aside",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 h-fit sticky top-20",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Order Summary"}),u.jsxs("div",{className:"space-y-1.5 text-sm",children:[u.jsx(fu,{k:"Subtotal",v:Ee(X)}),V>0&&u.jsx(fu,{k:"Surge Pricing",v:`+${Ee(V)}`,amber:!0}),u.jsx(fu,{k:"Tax",v:Ee(Xe),sub:k?`${k.provider} ${(k.rate*100).toFixed(1)}%`:""}),ge>0&&u.jsx(fu,{k:`Tier Discount (${(st==null?void 0:st.tierName)||""} ${_e}%)`,v:`-${Ee(ge)}`,green:!0}),T>0&&u.jsx(fu,{k:"Points Used",v:`-${Ee(T)}`,green:!0})]}),!!t&&u.jsxs("div",{className:"mt-4 bg-petal rounded-xl p-3",children:[u.jsxs("div",{className:"flex items-center justify-between text-xs text-bloom2 mb-1",children:[u.jsxs("span",{children:["Points Balance ",ot.toLocaleString()," pts"]}),u.jsx("button",{onClick:()=>N(dt),className:"text-bloom font-semibold",children:"Use All"})]}),u.jsx("input",{type:"range",min:0,max:dt,value:T,onChange:le=>N(Number(le.target.value)),className:"w-full accent-bloom"}),u.jsxs("div",{className:"text-xs text-gray-500 text-right",children:[T.toLocaleString()," pts used"]})]}),u.jsxs("div",{className:"border-t border-blush-100/60 mt-4 pt-3 flex justify-between font-bold text-base",children:[u.jsx("span",{children:"Order Total"}),u.jsx("span",{className:"text-bloom2",children:Ee(Rn)})]}),te&&u.jsx("div",{className:"text-blush-500 text-xs mt-3",children:te}),u.jsx("button",{onClick:ma,disabled:F,className:"w-full mt-4 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2 disabled:opacity-60",children:F?"Processing…":`Place Order · ${Ee(Rn)}`}),u.jsx("p",{className:"text-[11px] text-gray-400 text-center mt-2",children:"Payments processed via GUARDiA PaymentGateway (secure adapter) · Card details not stored"})]})]})]}):(e("/account"),null)}function fu({k:e,v:t,sub:n,amber:r,green:a}){return u.jsxs("div",{className:"flex justify-between",children:[u.jsxs("span",{className:"text-gray-500",children:[e,n&&u.jsx("span",{className:"text-[10px] text-gray-400 ml-1",children:n})]}),u.jsx("span",{className:r?"text-amber-600":a?"text-leaf":"font-medium",children:t})]})}const mW={PAID:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",CONFIRMED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",DELIVERED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",COMPLETED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",APPROVED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",PUBLISHED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",ACTIVE:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",RESOLVED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",SHIPPED:"bg-sky-500/15 text-sky-400 border-sky-500/30",PREPARING:"bg-sky-500/15 text-sky-400 border-sky-500/30",REQUESTED:"bg-sky-500/15 text-sky-400 border-sky-500/30",IN_PROGRESS:"bg-sky-500/15 text-sky-400 border-sky-500/30",PENDING:"bg-amber-500/15 text-amber-400 border-amber-500/30",PAUSED:"bg-amber-500/15 text-amber-400 border-amber-500/30",OPEN:"bg-amber-500/15 text-amber-400 border-amber-500/30",DRAFT:"bg-slate-500/15 text-slate-400 border-slate-500/30",ENDED:"bg-slate-600/20 text-slate-400 border-slate-600/30",CANCELLED:"bg-slate-600/20 text-slate-400 border-slate-600/30",REJECTED:"bg-rose-500/15 text-rose-400 border-rose-500/30",REFUNDED:"bg-rose-500/15 text-rose-400 border-rose-500/30",FAILED:"bg-rose-500/15 text-rose-400 border-rose-500/30",BASIC:"bg-slate-500/15 text-slate-300 border-slate-500/30",SILVER:"bg-slate-300/20 text-slate-200 border-slate-300/30",GOLD:"bg-amber-400/15 text-amber-300 border-amber-400/30",VIP:"bg-violet-500/15 text-violet-300 border-violet-500/30"},yW={PENDING:"Pending",PAID:"Paid",PREPARING:"Preparing",SHIPPED:"Out for Delivery",DELIVERED:"Delivered",CONFIRMED:"Confirmed",CANCELLED:"Cancelled",REFUNDED:"Refunded",ACTIVE:"Active",PAUSED:"Paused",REQUESTED:"Requested",APPROVED:"Approved",REJECTED:"Rejected",COMPLETED:"Completed",PUBLISHED:"Published",DRAFT:"Draft",ENDED:"Ended",OPEN:"Open",IN_PROGRESS:"Processing",RESOLVED:"Resolved"};function Ur({status:e}){if(!e)return null;const t=mW[e]||"bg-slate-500/15 text-slate-400 border-slate-500/30";return u.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs font-medium border ${t}`,children:yW[e]||e})}const vT=[["WEEKLY","Weekly"],["BIWEEKLY","Every 2 Weeks"],["MONTHLY","Monthly"]];function gW(){const e=nn(),t=Kt(),{custToken:n,storeId:r}=bn(),[a,i]=A.useState("WEEKLY"),[s,o]=A.useState(0),[l,c]=A.useState(!1),{data:f}=se({queryKey:["subs"],queryFn:HY,enabled:!!n}),{data:d}=se({queryKey:["stores"],queryFn:()=>So(!0)}),{data:h}=se({queryKey:["sub-prods"],queryFn:()=>Ql({size:12,sort:"sales"})}),p=(h==null?void 0:h.items)||[],m=async()=>{var x;if(!n){t("/account");return}const y=r||((x=d==null?void 0:d[0])==null?void 0:x.id),v=p.find(w=>w.id===s)||p[0];v&&(await qY({storeId:y,productId:v.id,sizeCode:"ORIGINAL",frequency:a,receiverName:"",receiverPhone:"",address:"",deliveryZip:"",price:v.price}).catch(()=>{}),c(!1),e.invalidateQueries({queryKey:["subs"]}))},g=async(y,v)=>{await mT(y,v==="ACTIVE"?"PAUSED":"ACTIVE").catch(()=>{}),e.invalidateQueries({queryKey:["subs"]})},b=async y=>{await mT(y,"CANCELLED").catch(()=>{}),e.invalidateQueries({queryKey:["subs"]})};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Qy,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"Flower Subscription"})]}),u.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Get fresh flowers delivered weekly, every two weeks, or monthly."}),!n&&u.jsxs("div",{className:"bg-petal rounded-2xl p-6 text-center text-sm text-gray-600 mb-6",children:["Please log in to start a subscription. ",u.jsx(Le,{to:"/account",className:"text-bloom font-semibold",children:"Log In →"})]}),u.jsx("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 mb-6",children:l?u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"Delivery Frequency"}),u.jsx("div",{className:"flex gap-2",children:vT.map(([y,v])=>u.jsx("button",{onClick:()=>i(y),className:`px-4 py-2 rounded-full text-sm border ${a===y?"bg-bloom text-white border-bloom":"border-blush-100"}`,children:v},y))})]}),u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"Choose a Product"}),u.jsxs("select",{value:s,onChange:y=>o(Number(y.target.value)),className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:[u.jsx("option",{value:0,children:"Best Seller (Recommended)"}),p.map(y=>u.jsxs("option",{value:y.id,children:[y.name," — ",Ee(y.price)]},y.id))]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{onClick:m,className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Start Subscription"}),u.jsx("button",{onClick:()=>c(!1),className:"border border-blush-100 px-6 py-2.5 rounded-full text-gray-600",children:"Cancel"})]})]}):u.jsx("button",{onClick:()=>n?c(!0):t("/account"),className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Start a New Subscription"})}),u.jsx("h2",{className:"font-serif text-lg font-bold mb-3",children:"My Subscriptions"}),u.jsxs("div",{className:"space-y-3",children:[(f||[]).map(y=>{var v;return u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex items-center gap-4",children:[u.jsx("div",{className:"w-14 h-14 bg-petal rounded-xl flex items-center justify-center",children:u.jsx(ft,{className:"text-bloom/40",size:26})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("div",{className:"font-medium text-sm",children:[y.productName||`상품 #${y.productId}`," · ",((v=vT.find(x=>x[0]===y.frequency))==null?void 0:v[1])||y.frequency]}),u.jsxs("div",{className:"text-xs text-gray-500",children:["다음 배송 ",y.nextDeliveryDate||"-"," · ",Ee(y.price)]})]}),u.jsx(Ur,{status:y.status}),y.status!=="CANCELLED"&&u.jsxs(u.Fragment,{children:[u.jsx("button",{onClick:()=>g(y.id,y.status),className:"text-xs text-bloom2 border border-blush-100 rounded-full px-3 py-1.5",children:y.status==="ACTIVE"?"일시정지":"재개"}),u.jsx("button",{onClick:()=>b(y.id),className:"text-xs text-blush-400 border border-blush-100 rounded-full px-3 py-1.5",children:"해지"})]})]},y.id)}),!(f||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-8 text-center",children:"아직 구독이 없습니다."})]})]})}function vW(){const{storeName:e}=bn(),{data:t}=se({queryKey:["daily-rec"],queryFn:()=>t5("daily","",8)}),{data:n}=se({queryKey:["daily-fresh"],queryFn:()=>Ql({sort:"rating",size:8})}),r=(t&&t.length?t:n==null?void 0:n.items)||[];return u.jsxs("div",{children:[u.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-sage-700 to-sage-800 text-white",children:[u.jsx(Kd,{count:12}),u.jsxs("div",{className:"relative z-10 max-w-6xl mx-auto px-4 py-16",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-200 text-[12px] tracking-[0.2em] uppercase mb-3",children:[u.jsx(ej,{size:15})," Fresh today, gone tomorrow"]}),u.jsx("h1",{className:"font-serif text-5xl font-bold mb-4",children:"Today's Designer Bouquet"}),u.jsxs("p",{className:"text-cream/85 max-w-xl leading-relaxed text-lg font-light",children:["Hand-designed each morning with the freshest stems in our cooler, then curated by ",u.jsx("b",{className:"font-medium",children:"GUARDiA AI"}),". Limited daily stock · ",e||"your nearest store"," same-day delivery."]})]})]}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-12",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(xr,{className:"text-blush-500",size:18}),u.jsx("h2",{className:"font-serif text-2xl font-bold text-blush-900",children:"Today's Picks"}),u.jsx("span",{className:"text-xs text-sage-600",children:"AI-curated"})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:r.map(a=>u.jsx(mm,{children:u.jsx(Zl,{p:a})},a.id))}),!r.length&&u.jsxs("div",{className:"text-center text-blush-300 py-20",children:[u.jsx(ft,{className:"mx-auto text-blush-200 mb-3",size:40}),"Today's bouquet is being designed. ",u.jsx(Le,{to:"/category",className:"text-blush-500",children:"Browse all flowers →"})]})]})]})}const bW={DISCOUNT:_K,POINT_BONUS:Mf,GIFT:mk,TIER_ONLY:Mf,SEASON:Df};function xW(){const{custToken:e}=bn(),t=Kt(),[n,r]=A.useState(""),{data:a}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!e}),i=(a==null?void 0:a.tier)||"",{data:s}=se({queryKey:["ongoing-events",i],queryFn:()=>TX(i)}),o=async l=>{var c,f;if(!e){t("/account");return}r("");try{const d=await NX(l);r(d!=null&&d.coupon?`참여 완료! 쿠폰 발급: ${d.coupon.name} (${d.coupon.code})`:"이벤트에 참여했습니다.")}catch(d){r(((f=(c=d==null?void 0:d.response)==null?void 0:c.data)==null?void 0:f.message)||"참여 자격이 없거나 이미 참여했습니다.")}};return u.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Df,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"이벤트 / 캠페인"})]}),i&&u.jsxs("p",{className:"text-sm text-gray-500 mb-2",children:["현재 등급 ",u.jsx("span",{className:"font-semibold text-bloom2",children:(a==null?void 0:a.tierName)||i})," · 등급 전용 이벤트가 함께 표시됩니다."]}),n&&u.jsx("div",{className:"bg-petal text-bloom2 text-sm rounded-xl px-4 py-2 mb-4",children:n}),u.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mt-4",children:[(s||[]).map(l=>{const c=bW[l.eventType]||Df,f=(l.banners||[])[0];return u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 overflow-hidden",children:[u.jsx("div",{className:"bg-gradient-to-r from-bloom2 to-bloom text-white p-5",children:f?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"font-serif text-lg font-bold",children:f.headline||l.title}),u.jsx("p",{className:"text-white/85 text-sm mt-1",children:f.subtext||l.description})]}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"font-serif text-lg font-bold",children:l.title}),u.jsx("p",{className:"text-white/85 text-sm mt-1",children:l.description})]})}),u.jsxs("div",{className:"p-4 flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[u.jsx(c,{size:16,className:"text-bloom"}),u.jsx("span",{children:l.eventType}),l.bonusPointRate>0&&u.jsxs("span",{className:"text-xs text-leaf",children:["+",l.bonusPointRate,"% 포인트"]}),l.targetTiers&&u.jsxs("span",{className:"text-xs bg-petal text-bloom2 px-2 py-0.5 rounded-full",children:[l.targetTiers," 전용"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ur,{status:l.status}),u.jsx("button",{onClick:()=>o(l.id),className:"bg-bloom text-white text-sm font-semibold px-4 py-2 rounded-full hover:bg-bloom2",children:"참여"})]})]}),u.jsxs("div",{className:"px-4 pb-3 text-[11px] text-gray-400",children:[l.startDate," ~ ",l.endDate]})]},l.id)}),!(s||[]).length&&u.jsx("div",{className:"col-span-2 text-center text-gray-400 py-16",children:"진행 중인 이벤트가 없습니다."})]})]})}function SW(){const{t:e}=ni(),t=nn(),n=Kt(),{custToken:r}=bn(),{data:a}=se({queryKey:["wishlist"],queryFn:nX,enabled:!!r});if(!r)return n("/account"),null;const i=a||[],s=async o=>{await aX(o).catch(()=>{}),t.invalidateQueries({queryKey:["wishlist"]})};return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(Rf,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:e("wishlist.title")})]}),i.length?u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:i.map(o=>u.jsxs("div",{className:"relative",children:[u.jsx(Zl,{p:{...o,id:o.productId||o.id}}),u.jsx("button",{onClick:()=>s(o.productId||o.id),className:"absolute top-2 right-2 bg-white/90 rounded-full p-1.5 text-bloom shadow",children:u.jsx(Rf,{size:16,fill:"currentColor"})})]},o.id||o.productId))}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:[e("wishlist.empty")," ",u.jsx(Le,{to:"/category",className:"text-bloom",children:e("wishlist.startShopping")})]})]})}const bT={BASIC:"from-slate-400 to-slate-500",SILVER:"from-slate-300 to-slate-400",GOLD:"from-amber-400 to-amber-500",VIP:"from-violet-500 to-fuchsia-500"};function wW(){const{custToken:e,setCustToken:t}=bn(),n=Kt(),{data:r}=se({queryKey:["member"],queryFn:JY,enabled:!!e}),{data:a}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!e}),{data:i}=se({queryKey:["point-history"],queryFn:()=>AX(20),enabled:!!e});if(!e)return n("/account"),null;const s=(a==null?void 0:a.tier)||"BASIC",o=a==null?void 0:a.nextTier,l=()=>{t(null),n("/home")};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center justify-between mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(wk,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"My Account"})]}),u.jsxs("button",{onClick:l,className:"flex items-center gap-1.5 text-sm text-gray-500 hover:text-bloom",children:[u.jsx(gk,{size:16})," Log Out"]})]}),u.jsxs("div",{className:`rounded-2xl bg-gradient-to-r ${bT[s]||bT.BASIC} text-white p-6 mb-5`,children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-xs uppercase tracking-widest text-white/70",children:"Membership Tier"}),u.jsxs("div",{className:"font-serif text-2xl font-bold flex items-center gap-2",children:[u.jsx(Mf,{size:24})," ",(a==null?void 0:a.tierName)||s]}),u.jsxs("div",{className:"text-sm text-white/85 mt-1",children:["Spent in last 12 months ",Ee(a==null?void 0:a.spend12m)," · ",(a==null?void 0:a.orderCount12m)||0," orders"]})]}),u.jsxs("div",{className:"text-right",children:[u.jsx("div",{className:"text-xs text-white/70",children:"Points Balance"}),u.jsxs("div",{className:"text-3xl font-bold",children:[((a==null?void 0:a.pointBalance)||0).toLocaleString(),u.jsx("span",{className:"text-base",children:"P"})]})]})]}),o&&!o.isTop&&u.jsxs("div",{className:"mt-4 text-xs text-white/85 bg-white/15 rounded-lg px-3 py-2",children:["Spend ",Ee(o.spendNeeded)," more or place ",o.ordersNeeded," more orders to reach ",u.jsx("b",{children:o.nextTierName}),"."]})]}),(a==null?void 0:a.benefit)&&u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 mb-5",children:[u.jsxs("div",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[u.jsx(mk,{size:16,className:"text-bloom"})," My Tier Benefits"]}),u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 text-sm",children:[u.jsx(_h,{label:"Discount",value:`${a.benefit.discountRate}%`}),u.jsx(_h,{label:"Earn Rate",value:`${a.benefit.pointEarnRate}%`}),u.jsx(_h,{label:"Free Shipping",value:a.benefit.freeShipThreshold===0?"Always":a.benefit.freeShipThreshold?Ee(a.benefit.freeShipThreshold)+"+":"None"}),u.jsx(_h,{label:"Priority Slot",value:a.benefit.prioritySlot?"Included":"–"})]})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-6",children:[u.jsx(cb,{to:"/orders",icon:vk,label:"Order History"}),u.jsx(cb,{to:"/wishlist",icon:Rf,label:"Wishlist"}),u.jsx(cb,{to:"/subscription",icon:Qy,label:"Manage Subscription"})]}),u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[u.jsx(uk,{size:16,className:"text-bloom"})," Points Earned / Used History"]}),u.jsxs("div",{className:"divide-y divide-blush-100/60",children:[(i||[]).map(c=>u.jsxs("div",{className:"flex items-center justify-between py-2 text-sm",children:[u.jsxs("div",{children:[u.jsx("span",{className:"text-gray-700",children:c.reason||c.entryType}),c.orderNo&&u.jsx("span",{className:"text-xs text-gray-400 ml-2",children:c.orderNo}),u.jsx("div",{className:"text-[11px] text-gray-400",children:(c.createdAt||"").slice(0,10)})]}),u.jsxs("span",{className:c.points>=0?"text-leaf font-semibold":"text-blush-500 font-semibold",children:[c.points>=0?"+":"",c.points,"P"]})]},c.id)),!(i||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-6 text-center",children:"No points history yet."})]})]}),(r==null?void 0:r.username)&&u.jsx("div",{className:"text-center text-xs text-gray-400 mt-6",children:r.displayName||r.username})]})}function _h({label:e,value:t}){return u.jsxs("div",{className:"bg-petal rounded-xl p-3 text-center",children:[u.jsx("div",{className:"text-[11px] text-gray-500",children:e}),u.jsx("div",{className:"font-bold text-bloom2",children:t})]})}function cb({to:e,icon:t,label:n}){return u.jsxs(Le,{to:e,className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex flex-col items-center gap-1.5 hover:border-bloom",children:[u.jsx(t,{size:22,className:"text-bloom"}),u.jsx("span",{className:"text-sm",children:n})]})}function jW(){const e=nn(),t=Kt(),{custToken:n}=bn(),{data:r}=se({queryKey:["my-orders"],queryFn:()=>BY(""),enabled:!!n});if(!n)return t("/account"),null;const a=r||[],i=async(s,o)=>{await Qk(s,o).catch(()=>{}),e.invalidateQueries({queryKey:["my-orders"]})};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(vk,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"주문 내역"})]}),a.length?u.jsx("div",{className:"space-y-3",children:a.map(s=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("div",{className:"font-semibold text-sm",children:s.orderNo||`주문 #${s.id}`}),u.jsx(Ur,{status:s.status})]}),u.jsxs("div",{className:"text-xs text-gray-500 mb-3",children:[(s.createdAt||"").slice(0,16).replace("T"," ")," · ",s.fulfillmentType==="PICKUP"?"매장 픽업":"배송"," · ",s.scheduledDate," ",s.slotLabel]}),u.jsx("div",{className:"space-y-1.5",children:(s.items||[]).map(o=>u.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[u.jsx("div",{className:"w-9 h-9 bg-petal rounded-lg flex items-center justify-center",children:u.jsx(ft,{className:"text-bloom/40",size:16})}),u.jsxs("span",{className:"flex-1",children:[o.productName||`상품 #${o.productId}`," ",o.sizeCode&&`· ${o.sizeCode}`," ×",o.quantity]}),u.jsx("span",{className:"text-gray-600",children:Ee(o.price||o.unitPrice)})]},o.id))}),u.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-blush-100/60",children:[u.jsx("span",{className:"font-bold text-bloom2",children:Ee(s.payAmount??s.totalAmount)}),u.jsxs("div",{className:"flex gap-2",children:[s.status==="DELIVERED"&&u.jsx("button",{onClick:()=>i(s.id,"CONFIRMED"),className:"text-xs bg-bloom text-white px-3 py-1.5 rounded-full",children:"구매확정"}),["PENDING","PAID"].includes(s.status)&&u.jsx("button",{onClick:()=>i(s.id,"CANCELLED"),className:"text-xs border border-blush-100 text-blush-400 px-3 py-1.5 rounded-full",children:"주문취소"})]})]})]},s.id))}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:["주문 내역이 없습니다. ",u.jsx(Le,{to:"/category",className:"text-bloom",children:"쇼핑하기 →"})]})]})}function AW(){const{productId:e}=o$(),t=Number(e),n=Kt(),{custToken:r}=bn(),[a,i]=A.useState(5),[s,o]=A.useState(""),[l,c]=A.useState(""),[f,d]=A.useState(""),[h,p]=A.useState("");if(!r)return n("/account"),null;const m=async g=>{g.preventDefault(),p("");try{await ZY({productId:t,rating:a,title:s,content:l,imageUrl:f}),p("리뷰가 등록되었습니다."),setTimeout(()=>n(`/product/${t}`),800)}catch{p("등록에 실패했습니다. (구매 이력이 필요할 수 있습니다)")}};return u.jsxs("div",{className:"max-w-lg mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(OK,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"리뷰 작성"})]}),u.jsxs("form",{onSubmit:m,className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"별점"}),u.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(g=>u.jsx("button",{type:"button",onClick:()=>i(g),className:"text-amber-400",children:u.jsx(Wa,{size:28,fill:g<=a?"currentColor":"none"})},g))})]}),u.jsx("input",{value:s,onChange:g=>o(g.target.value),placeholder:"제목",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("textarea",{value:l,onChange:g=>c(g.target.value),rows:5,required:!0,placeholder:"상품은 어떠셨나요? 신선도, 배송, 디자인 등을 적어주세요.",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:f,onChange:g=>d(g.target.value),placeholder:"사진 URL (선택)",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),h&&u.jsx("div",{className:"text-sm text-leaf",children:h}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{className:"flex-1 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2",children:"등록"}),u.jsx("button",{type:"button",onClick:()=>n(-1),className:"px-6 border border-blush-100 rounded-full text-gray-600",children:"취소"})]})]})]})}function OW(){const[e,t]=A.useState("login"),[n,r]=A.useState(""),[a,i]=A.useState(""),[s,o]=A.useState(""),[l,c]=A.useState(""),[f,d]=A.useState(!1),{setCustToken:h}=bn(),p=Kt(),m=async g=>{var b,y;g.preventDefault(),c(""),d(!0);try{const x=(y=(b=(e==="login"?await Yk(n,a):await EY(n,a,s||n)).data)==null?void 0:b.data)==null?void 0:y.token;if(!x)throw new Error("no token");h(x),p("/home")}catch{c(e==="login"?"Login failed — check your username and password.":"Sign-up failed — that username may already be taken.")}finally{d(!1)}};return u.jsxs("div",{className:"relative min-h-screen bg-gradient-to-br from-blush-100 via-cream to-sage-100 flex items-center justify-center px-4 overflow-hidden",children:[u.jsx(Kd,{count:12}),u.jsxs(Nt.form,{onSubmit:m,initial:{opacity:0,y:22},animate:{opacity:1,y:0},transition:{duration:.7,ease:[.22,1,.36,1]},className:"relative z-10 w-full max-w-sm bg-white/90 backdrop-blur rounded-4xl shadow-bloom p-8 border border-blush-100",children:[u.jsxs(Le,{to:"/home",className:"flex flex-col items-center gap-1 mb-6",children:[u.jsx(ft,{className:"text-blush-500",size:32}),u.jsx("span",{className:"font-serif text-xl font-bold text-blush-900",children:"Montvale Florist"})]}),u.jsx("div",{className:"flex gap-2 mb-6 bg-blush-50 rounded-full p-1 text-sm",children:["login","register"].map(g=>u.jsx("button",{type:"button",onClick:()=>{t(g),c("")},className:`flex-1 py-2 rounded-full font-medium transition-colors ${e===g?"bg-blush-500 text-white shadow-petal":"text-blush-700"}`,children:g==="login"?"Sign In":"Create Account"},g))}),u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Username"}),u.jsx("input",{value:n,onChange:g=>r(g.target.value),required:!0,className:"w-full mb-3 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"}),e==="register"&&u.jsxs(u.Fragment,{children:[u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Name"}),u.jsx("input",{value:s,onChange:g=>o(g.target.value),className:"w-full mb-3 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"})]}),u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Password"}),u.jsx("input",{type:"password",value:a,onChange:g=>i(g.target.value),required:!0,className:"w-full mb-4 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"}),l&&u.jsx("p",{className:"text-blush-500 text-xs mb-3",children:l}),u.jsx(Ua,{type:"submit",disabled:f,className:"w-full py-2.5 rounded-full bg-blush-500 text-white font-semibold hover:bg-blush-600 disabled:opacity-60",children:f?"Please wait…":e==="login"?"Sign In":"Create Account"}),u.jsxs("p",{className:"text-center text-[11px] text-[#a08a90] mt-4",children:["Store & owner staff → ",u.jsx("a",{href:"/admin/login",className:"text-blush-600",children:"Admin Console"})]}),u.jsx("p",{className:"text-center text-[11px] text-sage-600 mt-2",children:ke.tagline})]})]})}const EW=["DELIVERY","PRODUCT","PAYMENT","REFUND","OTHER"];function TW(){const e=nn(),t=Kt(),{custToken:n}=bn(),[r,a]=A.useState("DELIVERY"),[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(""),[d,h]=A.useState(""),[p,m]=A.useState("Birthday"),[g,b]=A.useState("Warm"),[y,v]=A.useState(""),[x,w]=A.useState([]),{data:S}=se({queryKey:["cs"],queryFn:eX,enabled:!!n}),j=async E=>{if(E.preventDefault(),h(""),!n){t("/account");return}try{const T=await tX({orderNo:i,category:r,subject:o,content:c});h(T!=null&&T.aiReply?`AI auto-reply: ${T.aiReply}`:"Your request has been submitted."),l(""),f(""),e.invalidateQueries({queryKey:["cs"]})}catch{h("Failed to submit your request.")}},O=async()=>{const E=await uX(p,g,y).catch(()=>null);w((E==null?void 0:E.messages)||[])};return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(jK,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"Customer Support (1:1)"})]}),u.jsxs("div",{className:"bg-petal rounded-2xl p-5 mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2 text-bloom2 font-medium text-sm mb-3",children:[u.jsx(xr,{size:16})," AI Card Message Helper"]}),u.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[u.jsx("input",{value:p,onChange:E=>m(E.target.value),placeholder:"Occasion (e.g. Birthday)",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"}),u.jsx("input",{value:g,onChange:E=>b(E.target.value),placeholder:"Tone",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"}),u.jsx("input",{value:y,onChange:E=>v(E.target.value),placeholder:"Recipient",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"})]}),u.jsx("button",{onClick:O,className:"bg-bloom text-white text-sm font-semibold px-4 py-2 rounded-full",children:"Suggest Messages"}),!!x.length&&u.jsx("ul",{className:"mt-3 space-y-2",children:x.map((E,T)=>u.jsx("li",{className:"bg-white rounded-lg px-3 py-2 text-sm text-gray-700",children:E},T))})]}),u.jsxs("form",{onSubmit:j,className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3 mb-8",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx("select",{value:r,onChange:E=>a(E.target.value),className:"px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:EW.map(E=>u.jsx("option",{value:E,children:E},E))}),u.jsx("input",{value:i,onChange:E=>s(E.target.value),placeholder:"Order number (optional)",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsx("input",{value:o,onChange:E=>l(E.target.value),required:!0,placeholder:"Subject",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("textarea",{value:c,onChange:E=>f(E.target.value),rows:4,required:!0,placeholder:"Tell us how we can help. Our AI will try to answer first.",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),d&&u.jsx("div",{className:"text-sm text-leaf bg-leaf/10 rounded-lg px-3 py-2",children:d}),u.jsxs("button",{className:"flex items-center gap-1.5 bg-bloom text-white font-semibold px-6 py-2.5 rounded-full hover:bg-bloom2",children:[u.jsx(NK,{size:16})," Submit Request"]}),!n&&u.jsxs("p",{className:"text-xs text-gray-400",children:["Please log in to submit a request. ",u.jsx(Le,{to:"/account",className:"text-bloom",children:"Log In"})]})]}),u.jsx("h2",{className:"font-serif text-lg font-bold mb-3",children:"My Requests"}),u.jsxs("div",{className:"space-y-2",children:[(S||[]).map(E=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"font-medium text-sm",children:E.subject}),u.jsx(Ur,{status:E.status})]}),u.jsx("p",{className:"text-sm text-gray-600 mt-1",children:E.content}),E.aiReply&&u.jsxs("div",{className:"mt-2 text-xs text-bloom2 bg-petal rounded-lg px-3 py-2",children:[u.jsx("b",{children:"AI Reply:"})," ",E.aiReply]}),E.itsmSrId&&u.jsxs("div",{className:"text-[11px] text-gray-400 mt-1",children:["ITSM SR: ",E.itsmSrId]})]},E.id)),!(S||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-6 text-center",children:"No requests submitted yet."})]})]})}const o5="https://itsm.zioinfo.co.kr",ub=e=>e==null?void 0:e.replace(/https?:\/\/zioinfo\.co\.kr:8443/g,o5);function NW(){const[e,t]=A.useState(null),[n,r]=A.useState(!0),[a,i]=A.useState(""),[s,o]=A.useState(!1),l=()=>{r(!0),i(""),fetch(`${o5}/api/app/public-latest`).then(f=>f.json()).then(f=>t({...f,qr_url:ub(f.qr_url),landing_url:ub(f.landing_url),download_url:ub(f.download_url)})).catch(()=>i("Unable to connect to the app store. Please try again in a moment.")).finally(()=>r(!1))};A.useEffect(()=>{l()},[]);const c=async()=>{if(e!=null&&e.landing_url)try{await navigator.clipboard.writeText(e.landing_url),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-10",children:[u.jsxs("div",{className:"text-center mb-8",children:[u.jsxs("div",{className:"flex items-center gap-2 justify-center mb-2",children:[u.jsx(bl,{className:"text-bloom",size:26}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-bloom2",children:"Order with the App"})]}),u.jsxs("p",{className:"text-sm text-gray-500",children:["Scan the QR code to open the ",u.jsx("span",{className:"text-bloom font-semibold",children:"GUARDiA Mall"})," customer app install page.",u.jsx("br",{}),"Enjoy same-day delivery alerts, easy reordering, and subscription management right in the app."]})]}),n&&u.jsx("div",{className:"text-center text-gray-400 py-10",children:"Loading…"}),a&&u.jsx("div",{className:"bg-petal border border-blush-100 rounded-2xl p-6 text-center text-blush-500 text-sm",children:a}),!n&&!a&&e&&!e.has_version&&u.jsxs("div",{className:"bg-white border border-blush-100/60 rounded-2xl p-10 text-center text-gray-400",children:[u.jsx(ft,{size:40,className:"mx-auto mb-3 text-bloom/30"}),"No app version has been published yet.",u.jsx("br",{}),u.jsx("span",{className:"text-xs",children:"App uploads and version management are handled in GUARDiA Manager."})]}),!n&&!a&&(e==null?void 0:e.has_version)&&u.jsxs("div",{className:"bg-white border border-blush-100/60 rounded-2xl p-6 grid md:grid-cols-[200px_1fr] gap-6 items-start shadow-sm",children:[u.jsx("div",{className:"bg-petal rounded-2xl p-3 flex items-center justify-center",children:e.qr_url?u.jsx("img",{src:e.qr_url,alt:"App install QR code",className:"w-44 h-44"}):u.jsx(bl,{size:64,className:"text-bloom/40"})}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[u.jsx("span",{className:"text-lg font-bold",children:e.app_name||"GUARDiA Mall"}),u.jsxs("span",{className:"px-2 py-0.5 rounded-md bg-bloom text-white text-xs font-semibold",children:["v",e.version]})]}),u.jsxs("div",{className:"text-xs text-gray-500 mb-4",children:[e.platform," ",e.file_size_mb?`· ${e.file_size_mb}MB`:"",e.download_count!=null&&` · ${e.download_count} downloads`]}),e.release_notes&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-[11px] font-semibold text-gray-400 uppercase tracking-wider mb-1",children:"What's New"}),u.jsx("div",{className:"text-sm text-gray-600 whitespace-pre-line bg-petal rounded-lg p-3 max-h-32 overflow-auto",children:e.release_notes})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.landing_url&&u.jsxs("a",{href:e.landing_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-4 py-2 rounded-full bg-bloom text-white text-sm font-semibold hover:bg-bloom2",children:[u.jsx(hk,{size:15})," Install Page"]}),e.download_url&&u.jsxs("a",{href:e.download_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-4 py-2 rounded-full border border-blush-100 text-bloom2 text-sm hover:bg-petal",children:[u.jsx(dk,{size:15})," Download APK"]}),u.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 px-4 py-2 rounded-full border border-blush-100 text-bloom2 text-sm hover:bg-petal",children:[s?u.jsx(lk,{size:15,className:"text-leaf"}):u.jsx(fk,{size:15}),s?"Copied":"Copy Link"]}),u.jsx("button",{onClick:l,className:"flex items-center gap-1.5 px-3 py-2 rounded-full border border-blush-100 text-gray-500 text-sm hover:bg-petal",children:u.jsx(nj,{size:15})})]})]})]})]})}function CW(){const{t:e}=ni(),[t,n]=A.useState("admin"),[r,a]=A.useState(""),[i,s]=A.useState(""),o=Kt();A.useEffect(()=>(document.documentElement.classList.add("admin-shell"),()=>document.documentElement.classList.remove("admin-shell")),[]);const l=async c=>{var f,d;c.preventDefault(),s("");try{const p=(d=(f=(await Yk(t,r)).data)==null?void 0:f.data)==null?void 0:d.token;if(!p)throw new Error("no token");localStorage.setItem("mall_admin_token",p);const m=await Xk().catch(()=>null);if(m!=null&&m.role&&localStorage.setItem("mall_role",m.role),m!=null&&m.username&&localStorage.setItem("mall_admin_user",m.username),(m==null?void 0:m.role)==="USER"){s(e("admin.login.errNoPriv")),localStorage.removeItem("mall_admin_token");return}o("/admin/dashboard")}catch{s(e("admin.login.errFailed"))}};return u.jsxs("div",{className:"admin-shell min-h-screen flex items-center justify-center bg-ink text-[#e6edf6]",children:[u.jsx("div",{className:"absolute top-5 right-5",children:u.jsx(ag,{variant:"admin"})}),u.jsxs("form",{onSubmit:l,className:"w-[360px] bg-panel border border-edge rounded-2xl p-8",children:[u.jsxs("div",{className:"flex items-center gap-2 justify-center mb-6",children:[u.jsx(ft,{className:"text-brand",size:28}),u.jsx("span",{className:"text-xl font-bold",children:e("admin.login.title")})]}),u.jsx("p",{className:"text-center text-sm text-slate-400 mb-6",children:e("admin.login.subtitle")}),u.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e("admin.login.username")}),u.jsx("input",{value:t,onChange:c=>n(c.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),u.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e("admin.login.password")}),u.jsx("input",{type:"password",value:r,onChange:c=>a(c.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),i&&u.jsx("p",{className:"text-rose-400 text-xs mb-3",children:i}),u.jsx("button",{className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90",children:e("admin.login.signIn")}),u.jsxs("p",{className:"text-center text-[11px] text-slate-500 mt-4",children:[e("admin.login.storefrontHere")," ",u.jsx("a",{href:"/",className:"text-brand",children:e("admin.login.here")})]})]})]})}const _W=[{to:"/admin/dashboard",key:"dashboard",icon:AK,roles:["ADMIN","MANAGER"]},{to:"/admin/stores",key:"stores",icon:Bd,roles:["ADMIN","MANAGER"]},{to:"/admin/products",key:"products",icon:ft,roles:["ADMIN","MANAGER"]},{to:"/admin/inventory",key:"inventory",icon:sk,roles:["ADMIN","MANAGER"]},{to:"/admin/orders",key:"orders",icon:ij,roles:["ADMIN","MANAGER"]},{to:"/admin/transfers",key:"transfers",icon:ik,roles:["ADMIN","MANAGER"]},{to:"/admin/members",key:"members",icon:jk,roles:["ADMIN","MANAGER"]},{to:"/admin/loyalty",key:"loyalty",icon:Mf,roles:["ADMIN","MANAGER"]},{to:"/admin/events",key:"events",icon:Df,roles:["ADMIN","MANAGER"]},{to:"/admin/subscriptions",key:"subscriptions",icon:Qy,roles:["ADMIN","MANAGER"]},{to:"/admin/schedule",key:"schedule",icon:ok,roles:["ADMIN","MANAGER"]},{to:"/admin/analytics",key:"analytics",icon:Jw,roles:["ADMIN","MANAGER"]}],PW=[{to:"/admin/users",key:"users",icon:Sk,roles:["ADMIN"]},{to:"/admin/audit",key:"audit",icon:bk,roles:["ADMIN","MANAGER"]},{to:"/admin/settings",key:"settings",icon:xk,roles:["ADMIN"]},{to:"/admin/app",key:"appInstall",icon:bl,roles:["ADMIN","MANAGER"]}],xT=({isActive:e})=>`flex items-center gap-3 px-5 py-2.5 text-sm transition-colors ${e?"bg-card text-brand border-r-2 border-brand":"text-slate-300 hover:bg-card/60"}`;function MW(){const{t:e}=ni(),t=localStorage.getItem("mall_admin_token"),[n,r]=A.useState(()=>localStorage.getItem("mall_role")||""),[a,i]=A.useState(()=>localStorage.getItem("mall_admin_user")||""),s=Kt();if(A.useEffect(()=>(document.documentElement.classList.add("admin-shell"),()=>document.documentElement.classList.remove("admin-shell")),[]),A.useEffect(()=>{t&&Xk().then(f=>{f!=null&&f.role&&(localStorage.setItem("mall_role",f.role),r(f.role)),f!=null&&f.username&&(localStorage.setItem("mall_admin_user",f.username),i(f.username))}).catch(()=>{})},[t]),!t)return u.jsx(em,{to:"/admin/login",replace:!0});if(n&&n==="USER")return u.jsx(em,{to:"/admin/login",replace:!0});const o=_W.filter(f=>!n||f.roles.includes(n)),l=PW.filter(f=>f.roles.includes(n)),c=()=>{localStorage.removeItem("mall_admin_token"),localStorage.removeItem("mall_role"),localStorage.removeItem("mall_admin_user"),s("/admin/login")};return u.jsxs("div",{className:"admin-shell flex h-screen bg-ink text-[#e6edf6]",children:[u.jsxs("aside",{className:"w-60 bg-panel border-r border-edge flex flex-col",children:[u.jsxs("div",{className:"h-16 flex items-center gap-2 px-5 border-b border-edge",children:[u.jsx(ft,{className:"text-brand",size:22}),u.jsxs("div",{children:[u.jsx("div",{className:"font-bold text-base leading-tight",children:"GUARDiA Mall"}),u.jsx("div",{className:"text-[11px] text-slate-400",children:e("admin.console")})]})]}),u.jsxs("nav",{className:"flex-1 py-2 overflow-auto",children:[o.map(({to:f,key:d,icon:h})=>u.jsxs(tx,{to:f,className:xT,children:[u.jsx(h,{size:18}),e(`admin.nav.${d}`)]},f)),l.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"px-5 pt-4 pb-1.5 text-[10px] font-semibold tracking-wider text-slate-500 uppercase border-t border-edge mt-3",children:e("admin.system")}),l.map(({to:f,key:d,icon:h})=>u.jsxs(tx,{to:f,className:xT,children:[u.jsx(h,{size:18}),e(`admin.nav.${d}`)]},f))]})]}),u.jsx("div",{className:"p-4 text-[11px] text-slate-500 border-t border-edge",children:e("admin.onPremiseTag")})]}),u.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[u.jsxs("header",{className:"h-16 bg-panel border-b border-edge flex items-center justify-between px-6",children:[u.jsx("div",{className:"text-sm text-slate-400 truncate",children:e("admin.header")}),u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(ag,{variant:"admin"}),u.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-slate-300",children:[u.jsx(bK,{size:18})," ",a||"admin"," ",u.jsx("span",{className:"text-[10px] text-brand",children:n})]}),u.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 text-sm text-slate-400 hover:text-brand",children:[u.jsx(gk,{size:16})," ",e("admin.signOut")]})]})]}),u.jsx("main",{className:"flex-1 overflow-auto p-6",children:u.jsx(f$,{})})]})]})}function l5(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t-1}var PZ=_Z,MZ=sg;function RZ(e,t){var n=this.__data__,r=MZ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var DZ=RZ,$Z=gZ,kZ=OZ,LZ=NZ,zZ=PZ,IZ=DZ;function Vc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Ns=function(t){return oo(t)&&t.indexOf("%")===t.length-1},K=function(t){return iee(t)&&!qc(t)},cee=function(t){return me(t)},$t=function(t){return K(t)||oo(t)},uee=0,jo=function(t){var n=++uee;return"".concat(t||"").concat(n)},pn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!K(t)&&!oo(t))return r;var i;if(Ns(t)){var s=t.indexOf("%");i=n*parseFloat(t.slice(0,s))/100}else i=+t;return qc(i)&&(i=r),a&&i>n&&(i=n),i},xi=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},fee=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Cx(e){"@babel/helpers - typeof";return Cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cx(e)}var MT={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Fa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},RT=null,hb=null,Ej=function e(t){if(t===RT&&Array.isArray(hb))return hb;var n=[];return A.Children.forEach(t,function(r){me(r)||(eee.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),hb=n,RT=t,n};function Wn(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Fa(a)}):r=[Fa(t)],Ej(e).forEach(function(a){var i=Xn(a,"type.displayName")||Xn(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function Ln(e,t){var n=Wn(e,t);return n&&n[0]}var DT=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!K(r)||r<=0||!K(a)||a<=0)},bee=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],xee=function(t){return t&&t.type&&oo(t.type)&&bee.indexOf(t.type)>=0},S5=function(t){return t&&Cx(t)==="object"&&"clipDot"in t},See=function(t,n,r,a){var i,s=(i=db==null?void 0:db[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!de(t)&&(a&&s.includes(n)||pee.includes(n))||r&&Oj.includes(n)},ie=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(A.isValidElement(t)&&(a=t.props),!Uc(a))return null;var i={};return Object.keys(a).forEach(function(s){var o;See((o=a)===null||o===void 0?void 0:o[s],s,n,r)&&(i[s]=a[s])}),i},_x=function e(t,n){if(t===n)return!0;var r=A.Children.count(t);if(r!==A.Children.count(n))return!1;if(r===0)return!0;if(r===1)return $T(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Eee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mx(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,s=e.style,o=e.title,l=e.desc,c=Oee(e,Aee),f=a||{width:n,height:r,x:0,y:0},d=ve("recharts-surface",i);return _.createElement("svg",Px({},ie(c,!0,"svg"),{className:d,width:n,height:r,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),_.createElement("title",null,o),_.createElement("desc",null,l),t)}var Tee=["children","className"];function Rx(){return Rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ae=_.forwardRef(function(e,t){var n=e.children,r=e.className,a=Nee(e,Tee),i=ve("recharts-layer",r);return _.createElement("g",Rx({className:i},ie(a,!0),{ref:t}),n)}),kr=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;ia?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r=r?e:Mee(e,t,n)}var Dee=Ree,$ee="\\ud800-\\udfff",kee="\\u0300-\\u036f",Lee="\\ufe20-\\ufe2f",zee="\\u20d0-\\u20ff",Iee=kee+Lee+zee,Bee="\\ufe0e\\ufe0f",Uee="\\u200d",Fee=RegExp("["+Uee+$ee+Iee+Bee+"]");function Vee(e){return Fee.test(e)}var w5=Vee;function Hee(e){return e.split("")}var qee=Hee,j5="\\ud800-\\udfff",Kee="\\u0300-\\u036f",Gee="\\ufe20-\\ufe2f",Yee="\\u20d0-\\u20ff",Xee=Kee+Gee+Yee,Wee="\\ufe0e\\ufe0f",Qee="["+j5+"]",Dx="["+Xee+"]",$x="\\ud83c[\\udffb-\\udfff]",Zee="(?:"+Dx+"|"+$x+")",A5="[^"+j5+"]",O5="(?:\\ud83c[\\udde6-\\uddff]){2}",E5="[\\ud800-\\udbff][\\udc00-\\udfff]",Jee="\\u200d",T5=Zee+"?",N5="["+Wee+"]?",ete="(?:"+Jee+"(?:"+[A5,O5,E5].join("|")+")"+N5+T5+")*",tte=N5+T5+ete,nte="(?:"+[A5+Dx+"?",Dx,O5,E5,Qee].join("|")+")",rte=RegExp($x+"(?="+$x+")|"+nte+tte,"g");function ate(e){return e.match(rte)||[]}var ite=ate,ste=qee,ote=w5,lte=ite;function cte(e){return ote(e)?lte(e):ste(e)}var ute=cte,fte=Dee,dte=w5,hte=ute,pte=m5;function mte(e){return function(t){t=pte(t);var n=dte(t)?hte(t):void 0,r=n?n[0]:t.charAt(0),a=n?fte(n,1).join(""):t.slice(1);return r[e]()+a}}var yte=mte,gte=yte,vte=gte("toUpperCase"),bte=vte;const xg=Ie(bte);function Qe(e){return function(){return e}}const C5=Math.cos,vm=Math.sin,Fr=Math.sqrt,bm=Math.PI,Sg=2*bm,kx=Math.PI,Lx=2*kx,xs=1e-6,xte=Lx-xs;function _5(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return _5;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;axs)if(!(Math.abs(d*l-c*f)>xs)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-s,m=a-o,g=l*l+c*c,b=p*p+m*m,y=Math.sqrt(g),v=Math.sqrt(h),x=i*Math.tan((kx-Math.acos((g+h-b)/(2*y*v)))/2),w=x/v,S=x/y;Math.abs(w-1)>xs&&this._append`L${t+w*f},${n+w*d}`,this._append`A${i},${i},0,0,${+(d*p>f*m)},${this._x1=t+S*l},${this._y1=n+S*c}`}}arc(t,n,r,a,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(a),l=r*Math.sin(a),c=t+o,f=n+l,d=1^s,h=s?a-i:i-a;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>xs||Math.abs(this._y1-f)>xs)&&this._append`L${c},${f}`,r&&(h<0&&(h=h%Lx+Lx),h>xte?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=f}`:h>xs&&this._append`A${r},${r},0,${+(h>=kx)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function Tj(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new wte(t)}function Nj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function P5(e){this._context=e}P5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function wg(e){return new P5(e)}function M5(e){return e[0]}function R5(e){return e[1]}function D5(e,t){var n=Qe(!0),r=null,a=wg,i=null,s=Tj(o);e=typeof e=="function"?e:e===void 0?M5:Qe(e),t=typeof t=="function"?t:t===void 0?R5:Qe(t);function o(l){var c,f=(l=Nj(l)).length,d,h=!1,p;for(r==null&&(i=a(p=s())),c=0;c<=f;++c)!(c=p;--m)o.point(x[m],w[m]);o.lineEnd(),o.areaEnd()}y&&(x[h]=+e(b,h,d),w[h]=+t(b,h,d),o.point(r?+r(b,h,d):x[h],n?+n(b,h,d):w[h]))}if(v)return o=null,v+""||null}function f(){return D5().defined(a).curve(s).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Qe(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Qe(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Qe(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:Qe(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Qe(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Qe(+d),c):n},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(n)},c.lineX1=function(){return f().x(r).y(t)},c.defined=function(d){return arguments.length?(a=typeof d=="function"?d:Qe(!!d),c):a},c.curve=function(d){return arguments.length?(s=d,i!=null&&(o=s(i)),c):s},c.context=function(d){return arguments.length?(d==null?i=o=null:o=s(i=d),c):i},c}class $5{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function jte(e){return new $5(e,!0)}function Ate(e){return new $5(e,!1)}const Cj={draw(e,t){const n=Fr(t/bm);e.moveTo(n,0),e.arc(0,0,n,0,Sg)}},Ote={draw(e,t){const n=Fr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},k5=Fr(1/3),Ete=k5*2,Tte={draw(e,t){const n=Fr(t/Ete),r=n*k5;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Nte={draw(e,t){const n=Fr(t),r=-n/2;e.rect(r,r,n,n)}},Cte=.8908130915292852,L5=vm(bm/10)/vm(7*bm/10),_te=vm(Sg/10)*L5,Pte=-C5(Sg/10)*L5,Mte={draw(e,t){const n=Fr(t*Cte),r=_te*n,a=Pte*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const s=Sg*i/5,o=C5(s),l=vm(s);e.lineTo(l*n,-o*n),e.lineTo(o*r-l*a,l*r+o*a)}e.closePath()}},pb=Fr(3),Rte={draw(e,t){const n=-Fr(t/(pb*3));e.moveTo(0,n*2),e.lineTo(-pb*n,-n),e.lineTo(pb*n,-n),e.closePath()}},nr=-.5,rr=Fr(3)/2,zx=1/Fr(12),Dte=(zx/2+1)*3,$te={draw(e,t){const n=Fr(t/Dte),r=n/2,a=n*zx,i=r,s=n*zx+n,o=-i,l=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(o,l),e.lineTo(nr*r-rr*a,rr*r+nr*a),e.lineTo(nr*i-rr*s,rr*i+nr*s),e.lineTo(nr*o-rr*l,rr*o+nr*l),e.lineTo(nr*r+rr*a,nr*a-rr*r),e.lineTo(nr*i+rr*s,nr*s-rr*i),e.lineTo(nr*o+rr*l,nr*l-rr*o),e.closePath()}};function kte(e,t){let n=null,r=Tj(a);e=typeof e=="function"?e:Qe(e||Cj),t=typeof t=="function"?t:Qe(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Qe(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Qe(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function xm(){}function Sm(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function z5(e){this._context=e}z5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Sm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lte(e){return new z5(e)}function I5(e){this._context=e}I5.prototype={areaStart:xm,areaEnd:xm,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zte(e){return new I5(e)}function B5(e){this._context=e}B5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ite(e){return new B5(e)}function U5(e){this._context=e}U5.prototype={areaStart:xm,areaEnd:xm,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Bte(e){return new U5(e)}function LT(e){return e<0?-1:1}function zT(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return(LT(i)+LT(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function IT(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function mb(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function wm(e){this._context=e}wm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mb(this,this._t0,IT(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,mb(this,IT(this,n=zT(this,e,t)),n);break;default:mb(this,this._t0,n=zT(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function F5(e){this._context=new V5(e)}(F5.prototype=Object.create(wm.prototype)).point=function(e,t){wm.prototype.point.call(this,t,e)};function V5(e){this._context=e}V5.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function Ute(e){return new wm(e)}function Fte(e){return new F5(e)}function H5(e){this._context=e}H5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=BT(e),a=BT(t),i=0,s=1;s=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Hte(e){return new jg(e,.5)}function qte(e){return new jg(e,0)}function Kte(e){return new jg(e,1)}function Jl(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,o=i.length;n=0;)n[t]=t;return n}function Gte(e,t){return e[t]}function Yte(e){const t=[];return t.key=e,t}function Xte(){var e=Qe([]),t=Ix,n=Jl,r=Gte;function a(i){var s=Array.from(e.apply(this,arguments),Yte),o,l=s.length,c=-1,f;for(const d of i)for(o=0,++c;o0){for(var n,r,a=0,i=e[0].length,s;a0){for(var n=0,r=e[t[0]],a,i=r.length;n0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ane(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var q5={symbolCircle:Cj,symbolCross:Ote,symbolDiamond:Tte,symbolSquare:Nte,symbolStar:Mte,symbolTriangle:Rte,symbolWye:$te},ine=Math.PI/180,sne=function(t){var n="symbol".concat(xg(t));return q5[n]||Cj},one=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*ine;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},lne=function(t,n){q5["symbol".concat(xg(t))]=n},_j=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,s=t.sizeType,o=s===void 0?"area":s,l=rne(t,Jte),c=FT(FT({},l),{},{type:r,size:i,sizeType:o}),f=function(){var b=sne(r),y=kte().type(b).size(one(i,o,r));return y()},d=c.className,h=c.cx,p=c.cy,m=ie(c,!0);return h===+h&&p===+p&&i===+i?_.createElement("path",Bx({},m,{className:ve("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(p,")"),d:f()})):null};_j.registerSymbol=lne;function ec(e){"@babel/helpers - typeof";return ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(e)}function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var v=p.inactive?c:p.color;return _.createElement("li",Ux({className:b,style:d,key:"legend-item-".concat(m)},lo(r.props,p,m)),_.createElement(Mx,{width:s,height:s,viewBox:f,style:h},r.renderIcon(p)),_.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},g?g(y,p,m):y))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,s=r.align;if(!a||!a.length)return null;var o={padding:0,margin:0,textAlign:i==="horizontal"?s:"left"};return _.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(A.PureComponent);kf(Pj,"displayName","Legend");kf(Pj,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var vne=og;function bne(){this.__data__=new vne,this.size=0}var xne=bne;function Sne(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var wne=Sne;function jne(e){return this.__data__.get(e)}var Ane=jne;function One(e){return this.__data__.has(e)}var Ene=One,Tne=og,Nne=vj,Cne=bj,_ne=200;function Pne(e,t){var n=this.__data__;if(n instanceof Tne){var r=n.__data__;if(!Nne||r.length<_ne-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Cne(r)}return n.set(e,t),this.size=n.size,this}var Mne=Pne,Rne=og,Dne=xne,$ne=wne,kne=Ane,Lne=Ene,zne=Mne;function Kc(e){var t=this.__data__=new Rne(e);this.size=t.size}Kc.prototype.clear=Dne;Kc.prototype.delete=$ne;Kc.prototype.get=kne;Kc.prototype.has=Lne;Kc.prototype.set=zne;var Y5=Kc,Ine="__lodash_hash_undefined__";function Bne(e){return this.__data__.set(e,Ine),this}var Une=Bne;function Fne(e){return this.__data__.has(e)}var Vne=Fne,Hne=bj,qne=Une,Kne=Vne;function Am(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Hne;++to))return!1;var c=i.get(e),f=i.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=n&Jne?new Xne:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=rae}var $j=aae,iae=ri,sae=$j,oae=ai,lae="[object Arguments]",cae="[object Array]",uae="[object Boolean]",fae="[object Date]",dae="[object Error]",hae="[object Function]",pae="[object Map]",mae="[object Number]",yae="[object Object]",gae="[object RegExp]",vae="[object Set]",bae="[object String]",xae="[object WeakMap]",Sae="[object ArrayBuffer]",wae="[object DataView]",jae="[object Float32Array]",Aae="[object Float64Array]",Oae="[object Int8Array]",Eae="[object Int16Array]",Tae="[object Int32Array]",Nae="[object Uint8Array]",Cae="[object Uint8ClampedArray]",_ae="[object Uint16Array]",Pae="[object Uint32Array]",tt={};tt[jae]=tt[Aae]=tt[Oae]=tt[Eae]=tt[Tae]=tt[Nae]=tt[Cae]=tt[_ae]=tt[Pae]=!0;tt[lae]=tt[cae]=tt[Sae]=tt[uae]=tt[wae]=tt[fae]=tt[dae]=tt[hae]=tt[pae]=tt[mae]=tt[yae]=tt[gae]=tt[vae]=tt[bae]=tt[xae]=!1;function Mae(e){return oae(e)&&sae(e.length)&&!!tt[iae(e)]}var Rae=Mae;function Dae(e){return function(t){return e(t)}}var n4=Dae,Em={exports:{}};Em.exports;(function(e,t){var n=c5,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i&&n.process,o=function(){try{var l=a&&a.require&&a.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(Em,Em.exports);var $ae=Em.exports,kae=Rae,Lae=n4,XT=$ae,WT=XT&&XT.isTypedArray,zae=WT?Lae(WT):kae,r4=zae,Iae=Fre,Bae=Rj,Uae=Mn,Fae=t4,Vae=Dj,Hae=r4,qae=Object.prototype,Kae=qae.hasOwnProperty;function Gae(e,t){var n=Uae(e),r=!n&&Bae(e),a=!n&&!r&&Fae(e),i=!n&&!r&&!a&&Hae(e),s=n||r||a||i,o=s?Iae(e.length,String):[],l=o.length;for(var c in e)(t||Kae.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vae(c,l)))&&o.push(c);return o}var Yae=Gae,Xae=Object.prototype;function Wae(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Xae;return e===n}var Qae=Wae;function Zae(e,t){return function(n){return e(t(n))}}var a4=Zae,Jae=a4,eie=Jae(Object.keys,Object),tie=eie,nie=Qae,rie=tie,aie=Object.prototype,iie=aie.hasOwnProperty;function sie(e){if(!nie(e))return rie(e);var t=[];for(var n in Object(e))iie.call(e,n)&&n!="constructor"&&t.push(n);return t}var oie=sie,lie=yj,cie=$j;function uie(e){return e!=null&&cie(e.length)&&!lie(e)}var Yd=uie,fie=Yae,die=oie,hie=Yd;function pie(e){return hie(e)?fie(e):die(e)}var Ag=pie,mie=_re,yie=Bre,gie=Ag;function vie(e){return mie(e,gie,yie)}var bie=vie,QT=bie,xie=1,Sie=Object.prototype,wie=Sie.hasOwnProperty;function jie(e,t,n,r,a,i){var s=n&xie,o=QT(e),l=o.length,c=QT(t),f=c.length;if(l!=f&&!s)return!1;for(var d=l;d--;){var h=o[d];if(!(s?h in t:wie.call(t,h)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var b=s;++d-1}var Soe=xoe;function woe(e,t,n){for(var r=-1,a=e==null?0:e.length;++r=Loe){var c=t?null:$oe(e);if(c)return koe(c);s=!1,a=Doe,l=new Poe}else l=t?[]:o;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Joe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ele(e){return e.value}function tle(e,t){if(_.isValidElement(e))return _.cloneElement(e,t);if(typeof e=="function")return _.createElement(e,t);t.ref;var n=Zoe(t,Hoe);return _.createElement(Pj,n)}var hN=1,Jr=function(e){function t(){var n;qoe(this,t);for(var r=arguments.length,a=new Array(r),i=0;ihN||Math.abs(a.height-this.lastBoundingBox.height)>hN)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Sa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,s=a.align,o=a.verticalAlign,l=a.margin,c=a.chartWidth,f=a.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((c||0)-p.width)/2}}else d=s==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var m=this.getBBoxSnapshot();h={top:((f||0)-m.height)/2}}else h=o==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Sa(Sa({},d),h)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,s=a.width,o=a.height,l=a.wrapperStyle,c=a.payloadUniqBy,f=a.payload,d=Sa(Sa({position:"absolute",width:s||"auto",height:o||"auto"},this.getDefaultPosition(l)),l);return _.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},tle(i,Sa(Sa({},this.props),{},{payload:f4(f,c,ele)})))}}],[{key:"getWithHeight",value:function(r,a){var i=Sa(Sa({},this.defaultProps),r.props),s=i.layout;return s==="vertical"&&K(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||a}:null}}])}(A.PureComponent);Og(Jr,"displayName","Legend");Og(Jr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var pN=Gd,nle=Rj,rle=Mn,mN=pN?pN.isConcatSpreadable:void 0;function ale(e){return rle(e)||nle(e)||!!(mN&&e&&e[mN])}var ile=ale,sle=J5,ole=ile;function p4(e,t,n,r,a){var i=-1,s=e.length;for(n||(n=ole),a||(a=[]);++i0&&n(o)?t>1?p4(o,t-1,n,r,a):sle(a,o):r||(a[a.length]=o)}return a}var m4=p4;function lle(e){return function(t,n,r){for(var a=-1,i=Object(t),s=r(t),o=s.length;o--;){var l=s[e?o:++a];if(n(i[l],l,i)===!1)break}return t}}var cle=lle,ule=cle,fle=ule(),dle=fle,hle=dle,ple=Ag;function mle(e,t){return e&&hle(e,t,ple)}var y4=mle,yle=Yd;function gle(e,t){return function(n,r){if(n==null)return n;if(!yle(n))return e(n,r);for(var a=n.length,i=t?a:-1,s=Object(n);(t?i--:++it||i&&s&&l&&!o&&!c||r&&s&&l||!n&&l||!a)return 1;if(!r&&!i&&!c&&e=o)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var Ple=_le,bb=Sj,Mle=wj,Rle=ha,Dle=g4,$le=Ele,kle=n4,Lle=Ple,zle=Yc,Ile=Mn;function Ble(e,t,n){t.length?t=bb(t,function(i){return Ile(i)?function(s){return Mle(s,i.length===1?i[0]:i)}:i}):t=[zle];var r=-1;t=bb(t,kle(Rle));var a=Dle(e,function(i,s,o){var l=bb(t,function(c){return c(i)});return{criteria:l,index:++r,value:i}});return $le(a,function(i,s){return Lle(i,s,n)})}var Ule=Ble;function Fle(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Vle=Fle,Hle=Vle,gN=Math.max;function qle(e,t,n){return t=gN(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=gN(r.length-t,0),s=Array(i);++a0){if(++t>=tce)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ice=ace,sce=ece,oce=ice,lce=oce(sce),cce=lce,uce=Yc,fce=Kle,dce=cce;function hce(e,t){return dce(fce(e,t,uce),e+"")}var pce=hce,mce=gj,yce=Yd,gce=Dj,vce=rs;function bce(e,t,n){if(!vce(n))return!1;var r=typeof t;return(r=="number"?yce(n)&&gce(t,n.length):r=="string"&&t in n)?mce(n[t],e):!1}var Eg=bce,xce=m4,Sce=Ule,wce=pce,bN=Eg,jce=wce(function(e,t){if(e==null)return[];var n=t.length;return n>1&&bN(e,t[0],t[1])?t=[]:n>2&&bN(t[0],t[1],t[2])&&(t=[t[0]]),Sce(e,xce(t,1),[])}),Ace=jce;const zj=Ie(Ace);function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function Xx(){return Xx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(hu,"-left"),K(n)&&t&&K(t.x)&&n=t.y),"".concat(hu,"-top"),K(r)&&t&&K(t.y)&&rg?Math.max(f,l[r]):Math.max(d,l[r])}function Ice(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Bce(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipBox,o=e.useTranslate3d,l=e.viewBox,c,f,d;return s.height>0&&s.width>0&&n?(f=wN({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),d=wN({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),c=Ice({translateX:f,translateY:d,useTranslate3d:o})):c=Lce,{cssProperties:c,cssClasses:zce({translateX:f,translateY:d,coordinate:n})}}function nc(e){"@babel/helpers - typeof";return nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nc(e)}function jN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function AN(e){for(var t=1;tON||Math.abs(r.height-this.state.lastBoundingBox.height)>ON)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,o=a.animationDuration,l=a.animationEasing,c=a.children,f=a.coordinate,d=a.hasPayload,h=a.isAnimationActive,p=a.offset,m=a.position,g=a.reverseDirection,b=a.useTranslate3d,y=a.viewBox,v=a.wrapperStyle,x=Bce({allowEscapeViewBox:s,coordinate:f,offsetTopLeft:p,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:y}),w=x.cssClasses,S=x.cssProperties,j=AN(AN({transition:h&&i?"transform ".concat(o,"ms ").concat(l):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},v);return _.createElement("div",{tabIndex:-1,className:w,style:j,ref:function(E){r.wrapperNode=E}},c)}}])}(A.PureComponent),Wce=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},as={isSsr:Wce()};function rc(e){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}function EN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function TN(e){for(var t=1;t0;return _.createElement(Xce,{allowEscapeViewBox:s,animationDuration:o,animationEasing:l,isAnimationActive:h,active:i,coordinate:f,hasPayload:j,offset:p,position:b,reverseDirection:y,useTranslate3d:v,viewBox:x,wrapperStyle:w},sue(c,TN(TN({},this.props),{},{payload:S})))}}])}(A.PureComponent);Ij(Bn,"displayName","Tooltip");Ij(Bn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!as.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var oue=da,lue=function(){return oue.Date.now()},cue=lue,uue=/\s/;function fue(e){for(var t=e.length;t--&&uue.test(e.charAt(t)););return t}var due=fue,hue=due,pue=/^\s+/;function mue(e){return e&&e.slice(0,hue(e)+1).replace(pue,"")}var yue=mue,gue=yue,NN=rs,vue=Bc,CN=NaN,bue=/^[-+]0x[0-9a-f]+$/i,xue=/^0b[01]+$/i,Sue=/^0o[0-7]+$/i,wue=parseInt;function jue(e){if(typeof e=="number")return e;if(vue(e))return CN;if(NN(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=NN(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gue(e);var n=xue.test(e);return n||Sue.test(e)?wue(e.slice(2),n?2:8):bue.test(e)?CN:+e}var j4=jue,Aue=rs,Sb=cue,_N=j4,Oue="Expected a function",Eue=Math.max,Tue=Math.min;function Nue(e,t,n){var r,a,i,s,o,l,c=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Oue);t=_N(t)||0,Aue(n)&&(f=!!n.leading,d="maxWait"in n,i=d?Eue(_N(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(j){var O=r,E=a;return r=a=void 0,c=j,s=e.apply(E,O),s}function m(j){return c=j,o=setTimeout(y,t),f?p(j):s}function g(j){var O=j-l,E=j-c,T=t-O;return d?Tue(T,i-E):T}function b(j){var O=j-l,E=j-c;return l===void 0||O>=t||O<0||d&&E>=i}function y(){var j=Sb();if(b(j))return v(j);o=setTimeout(y,g(j))}function v(j){return o=void 0,h&&r?p(j):(r=a=void 0,s)}function x(){o!==void 0&&clearTimeout(o),c=0,r=l=a=o=void 0}function w(){return o===void 0?s:v(Sb())}function S(){var j=Sb(),O=b(j);if(r=arguments,a=this,l=j,O){if(o===void 0)return m(l);if(d)return clearTimeout(o),o=setTimeout(y,t),p(l)}return o===void 0&&(o=setTimeout(y,t)),s}return S.cancel=x,S.flush=w,S}var Cue=Nue,_ue=Cue,Pue=rs,Mue="Expected a function";function Rue(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(Mue);return Pue(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),_ue(e,t,{leading:r,maxWait:t,trailing:a})}var Due=Rue;const A4=Ie(Due);function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function PN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Dh(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(L=A4(L,g,{trailing:!0,leading:!1}));var D=new ResizeObserver(L),$=S.current.getBoundingClientRect(),P=$.width,k=$.height;return M(P,k),D.observe(S.current),function(){D.disconnect()}},[M,g]);var C=A.useMemo(function(){var L=T.containerWidth,D=T.containerHeight;if(L<0||D<0)return null;kr(Ns(s)||Ns(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,s,l),kr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var $=Ns(s)?L:s,P=Ns(l)?D:l;n&&n>0&&($?P=$/n:P&&($=P*n),h&&P>h&&(P=h)),kr($>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,$,P,s,l,f,d,n);var k=!Array.isArray(p)&&Fa(p.type).endsWith("Chart");return _.Children.map(p,function(I){return _.isValidElement(I)?A.cloneElement(I,Dh({width:$,height:P},k?{style:Dh({height:"100%",width:"100%",maxHeight:P,maxWidth:$},I.props.style)}:{})):I})},[n,p,l,h,d,f,T,s]);return _.createElement("div",{id:b?"".concat(b):void 0,className:ve("recharts-responsive-container",y),style:Dh(Dh({},w),{},{width:s,height:l,minWidth:f,minHeight:d,maxHeight:h}),ref:S},C)}),Tg=function(t){return null};Tg.displayName="Cell";function Bf(e){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(e)}function RN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Jx(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||as.isSsr)return{width:0,height:0};var r=Yue(n),a=JSON.stringify({text:t,copyStyle:r});if(Ro.widthCache[a])return Ro.widthCache[a];try{var i=document.getElementById(DN);i||(i=document.createElement("span"),i.setAttribute("id",DN),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var s=Jx(Jx({},Gue),r);Object.assign(i.style,s),i.textContent="".concat(t);var o=i.getBoundingClientRect(),l={width:o.width,height:o.height};return Ro.widthCache[a]=l,++Ro.cacheCount>Kue&&(Ro.cacheCount=0,Ro.widthCache={}),l}catch{return{width:0,height:0}}},Xue=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Uf(e){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uf(e)}function _m(e,t){return Jue(e)||Zue(e,t)||Que(e,t)||Wue()}function Wue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Que(e,t){if(e){if(typeof e=="string")return $N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $N(e,t)}}function $N(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function UN(e,t){return gfe(e)||yfe(e,t)||mfe(e,t)||pfe()}function pfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mfe(e,t){if(e){if(typeof e=="string")return FN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FN(e,t)}}function FN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(P,k){var I=k.word,F=k.width,H=P[P.length-1];if(H&&(a==null||i||H.width+F+rk.width?P:k})};if(!f)return p;for(var g="…",b=function($){var P=d.slice(0,$),k=N4({breakAll:c,style:l,children:P+g}).wordsWithComputedWidth,I=h(k),F=I.length>s||m(I).width>Number(a);return[F,I]},y=0,v=d.length-1,x=0,w;y<=v&&x<=d.length-1;){var S=Math.floor((y+v)/2),j=S-1,O=b(j),E=UN(O,2),T=E[0],N=E[1],M=b(S),C=UN(M,1),L=C[0];if(!T&&!L&&(y=S+1),T&&L&&(v=S-1),!T&&L){w=N;break}x++}return w||p},VN=function(t){var n=me(t)?[]:t.toString().split(T4);return[{words:n}]},bfe=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,s=t.breakAll,o=t.maxLines;if((n||r)&&!as.isSsr){var l,c,f=N4({breakAll:s,children:a,style:i});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;l=d,c=h}else return VN(a);return vfe({breakAll:s,children:a,maxLines:o,style:i},l,c,n,r)}return VN(a)},HN="#808080",co=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,s=t.lineHeight,o=s===void 0?"1em":s,l=t.capHeight,c=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,g=m===void 0?"end":m,b=t.fill,y=b===void 0?HN:b,v=BN(t,ffe),x=A.useMemo(function(){return bfe({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:d,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,d,v.style,v.width]),w=v.dx,S=v.dy,j=v.angle,O=v.className,E=v.breakAll,T=BN(v,dfe);if(!$t(r)||!$t(i))return null;var N=r+(K(w)?w:0),M=i+(K(S)?S:0),C;switch(g){case"start":C=wb("calc(".concat(c,")"));break;case"middle":C=wb("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(c," / 2))"));break;default:C=wb("calc(".concat(x.length-1," * -").concat(o,")"));break}var L=[];if(d){var D=x[0].width,$=v.width;L.push("scale(".concat((K($)?$/D:1)/D,")"))}return j&&L.push("rotate(".concat(j,", ").concat(N,", ").concat(M,")")),L.length&&(T.transform=L.join(" ")),_.createElement("text",e1({},ie(T,!0),{x:N,y:M,className:ve("recharts-text",O),textAnchor:p,fill:y.includes("url")?HN:y}),x.map(function(P,k){var I=P.words.join(E?"":" ");return _.createElement("tspan",{x:N,dy:k===0?C:o,key:"".concat(I,"-").concat(k)},I)}))};function Ki(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function xfe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Bj(e){let t,n,r;e.length!==2?(t=Ki,n=(o,l)=>Ki(e(o),l),r=(o,l)=>e(o)-l):(t=e===Ki||e===xfe?e:Sfe,n=e,r=e);function a(o,l,c=0,f=o.length){if(c>>1;n(o[d],l)<0?c=d+1:f=d}while(c>>1;n(o[d],l)<=0?c=d+1:f=d}while(cc&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:a,center:s,right:i}}function Sfe(){return 0}function C4(e){return e===null?NaN:+e}function*wfe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const jfe=Bj(Ki),Xd=jfe.right;Bj(C4).center;class qN extends Map{constructor(t,n=Efe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(KN(this,t))}has(t){return super.has(KN(this,t))}set(t,n){return super.set(Afe(this,t),n)}delete(t){return super.delete(Ofe(this,t))}}function KN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Afe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Ofe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Efe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Tfe(e=Ki){if(e===Ki)return _4;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function _4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Nfe=Math.sqrt(50),Cfe=Math.sqrt(10),_fe=Math.sqrt(2);function Pm(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),s=i>=Nfe?10:i>=Cfe?5:i>=_fe?2:1;let o,l,c;return a<0?(c=Math.pow(10,-a)/s,o=Math.round(e*c),l=Math.round(t*c),o/ct&&--l,c=-c):(c=Math.pow(10,a)*s,o=Math.round(e/c),l=Math.round(t/c),o*ct&&--l),l0))return[];if(e===t)return[e];const r=t=a))return[];const o=i-a+1,l=new Array(o);if(r)if(s<0)for(let c=0;c=r)&&(n=r);return n}function YN(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function P4(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?_4:Tfe(a);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+h)),m=Math.min(r,Math.floor(t+(l-c)*d/l+h));P4(e,t,p,m,a)}const i=e[t];let s=n,o=r;for(pu(e,n,t),a(e[r],i)>0&&pu(e,n,r);s0;)--o}a(e[n],i)===0?pu(e,n,o):(++o,pu(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function pu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Pfe(e,t,n){if(e=Float64Array.from(wfe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return YN(e);if(t>=1)return GN(e);var r,a=(r-1)*t,i=Math.floor(a),s=GN(P4(e,i).subarray(0,i+1)),o=YN(e.subarray(i+1));return s+(o-s)*(a-i)}}function Mfe(e,t,n=C4){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return s+(o-s)*(a-i)}}function Rfe(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Lh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Lh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$fe.exec(e))?new Tn(t[1],t[2],t[3],1):(t=kfe.exec(e))?new Tn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Lfe.exec(e))?Lh(t[1],t[2],t[3],t[4]):(t=zfe.exec(e))?Lh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ife.exec(e))?tC(t[1],t[2]/100,t[3]/100,1):(t=Bfe.exec(e))?tC(t[1],t[2]/100,t[3]/100,t[4]):XN.hasOwnProperty(e)?ZN(XN[e]):e==="transparent"?new Tn(NaN,NaN,NaN,0):null}function ZN(e){return new Tn(e>>16&255,e>>8&255,e&255,1)}function Lh(e,t,n,r){return r<=0&&(e=t=n=NaN),new Tn(e,t,n,r)}function Vfe(e){return e instanceof Wd||(e=qf(e)),e?(e=e.rgb(),new Tn(e.r,e.g,e.b,e.opacity)):new Tn}function i1(e,t,n,r){return arguments.length===1?Vfe(e):new Tn(e,t,n,r??1)}function Tn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Fj(Tn,i1,R4(Wd,{brighter(e){return e=e==null?Mm:Math.pow(Mm,e),new Tn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Vf:Math.pow(Vf,e),new Tn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Tn(Xs(this.r),Xs(this.g),Xs(this.b),Rm(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JN,formatHex:JN,formatHex8:Hfe,formatRgb:eC,toString:eC}));function JN(){return`#${Cs(this.r)}${Cs(this.g)}${Cs(this.b)}`}function Hfe(){return`#${Cs(this.r)}${Cs(this.g)}${Cs(this.b)}${Cs((isNaN(this.opacity)?1:this.opacity)*255)}`}function eC(){const e=Rm(this.opacity);return`${e===1?"rgb(":"rgba("}${Xs(this.r)}, ${Xs(this.g)}, ${Xs(this.b)}${e===1?")":`, ${e})`}`}function Rm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cs(e){return e=Xs(e),(e<16?"0":"")+e.toString(16)}function tC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Dr(e,t,n,r)}function D4(e){if(e instanceof Dr)return new Dr(e.h,e.s,e.l,e.opacity);if(e instanceof Wd||(e=qf(e)),!e)return new Dr;if(e instanceof Dr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,l=(i+a)/2;return o?(t===i?s=(n-r)/o+(n0&&l<1?0:s,new Dr(s,o,l,e.opacity)}function qfe(e,t,n,r){return arguments.length===1?D4(e):new Dr(e,t,n,r??1)}function Dr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fj(Dr,qfe,R4(Wd,{brighter(e){return e=e==null?Mm:Math.pow(Mm,e),new Dr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Vf:Math.pow(Vf,e),new Dr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Tn(jb(e>=240?e-240:e+120,a,r),jb(e,a,r),jb(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Dr(nC(this.h),zh(this.s),zh(this.l),Rm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Rm(this.opacity);return`${e===1?"hsl(":"hsla("}${nC(this.h)}, ${zh(this.s)*100}%, ${zh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function nC(e){return e=(e||0)%360,e<0?e+360:e}function zh(e){return Math.max(0,Math.min(1,e||0))}function jb(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Vj=e=>()=>e;function Kfe(e,t){return function(n){return e+n*t}}function Gfe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Yfe(e){return(e=+e)==1?$4:function(t,n){return n-t?Gfe(t,n,e):Vj(isNaN(t)?n:t)}}function $4(e,t){var n=t-e;return n?Kfe(e,n):Vj(isNaN(e)?t:e)}const rC=function e(t){var n=Yfe(t);function r(a,i){var s=n((a=i1(a)).r,(i=i1(i)).r),o=n(a.g,i.g),l=n(a.b,i.b),c=$4(a.opacity,i.opacity);return function(f){return a.r=s(f),a.g=o(f),a.b=l(f),a.opacity=c(f),a+""}}return r.gamma=e,r}(1);function Xfe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;an&&(i=t.slice(n,i),o[s]?o[s]+=i:o[++s]=i),(r=r[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,l.push({i:s,x:Dm(r,a)})),n=Ab.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function sde(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a2?ode:sde,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?i:(l||(l=o(e.map(r),t,n)))(r(s(h)))}return d.invert=function(h){return s(a((c||(c=o(t,e.map(r),Dm)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,$m),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Hj,f()},d.clamp=function(h){return arguments.length?(s=h?!0:mn,f()):s!==mn},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(i=h,d):i},function(h,p){return r=h,a=p,f()}}function qj(){return Ng()(mn,mn)}function lde(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function km(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ac(e){return e=km(Math.abs(e)),e?e[1]:NaN}function cde(e,t){return function(n,r){for(var a=n.length,i=[],s=0,o=e[0],l=0;a>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),i.push(n.substring(a-=o,a+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function ude(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var fde=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kf(e){if(!(t=fde.exec(e)))throw new Error("invalid format: "+e);var t;return new Kj({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Kf.prototype=Kj.prototype;function Kj(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Kj.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function dde(e){e:for(var t=e.length,n=1,r=-1,a;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var Lm;function hde(e,t){var n=km(e,t);if(!n)return Lm=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(Lm=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+km(e,Math.max(0,t+i-1))[0]}function iC(e,t){var n=km(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const sC={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:lde,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>iC(e*100,t),r:iC,s:hde,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function oC(e){return e}var lC=Array.prototype.map,cC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pde(e){var t=e.grouping===void 0||e.thousands===void 0?oC:cde(lC.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?oC:ude(lC.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d,h){d=Kf(d);var p=d.fill,m=d.align,g=d.sign,b=d.symbol,y=d.zero,v=d.width,x=d.comma,w=d.precision,S=d.trim,j=d.type;j==="n"?(x=!0,j="g"):sC[j]||(w===void 0&&(w=12),S=!0,j="g"),(y||p==="0"&&m==="=")&&(y=!0,p="0",m="=");var O=(h&&h.prefix!==void 0?h.prefix:"")+(b==="$"?n:b==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),E=(b==="$"?r:/[%p]/.test(j)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),T=sC[j],N=/[defgprs%]/.test(j);w=w===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function M(C){var L=O,D=E,$,P,k;if(j==="c")D=T(C)+D,C="";else{C=+C;var I=C<0||1/C<0;if(C=isNaN(C)?l:T(Math.abs(C),w),S&&(C=dde(C)),I&&+C==0&&g!=="+"&&(I=!1),L=(I?g==="("?g:o:g==="-"||g==="("?"":g)+L,D=(j==="s"&&!isNaN(C)&&Lm!==void 0?cC[8+Lm/3]:"")+D+(I&&g==="("?")":""),N){for($=-1,P=C.length;++$k||k>57){D=(k===46?a+C.slice($+1):C.slice($))+D,C=C.slice(0,$);break}}}x&&!y&&(C=t(C,1/0));var F=L.length+C.length+D.length,H=F>1)+L+C+D+H.slice(F);break;default:C=H+L+C+D;break}return i(C)}return M.toString=function(){return d+""},M}function f(d,h){var p=Math.max(-8,Math.min(8,Math.floor(ac(h)/3)))*3,m=Math.pow(10,-p),g=c((d=Kf(d),d.type="f",d),{suffix:cC[8+p/3]});return function(b){return g(m*b)}}return{format:c,formatPrefix:f}}var Ih,Gj,k4;mde({thousands:",",grouping:[3],currency:["$",""]});function mde(e){return Ih=pde(e),Gj=Ih.format,k4=Ih.formatPrefix,Ih}function yde(e){return Math.max(0,-ac(Math.abs(e)))}function gde(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ac(t)/3)))*3-ac(Math.abs(e)))}function vde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ac(t)-ac(e))+1}function L4(e,t,n,r){var a=r1(e,t,n),i;switch(r=Kf(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=gde(a,s))&&(r.precision=i),k4(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=vde(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=yde(a))&&(r.precision=i-(r.type==="%")*2);break}}return Gj(r)}function is(e){var t=e.domain;return e.ticks=function(n){var r=t();return t1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return L4(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],o=r[i],l,c,f=10;for(o0;){if(c=n1(s,o,n),c===l)return r[a]=s,r[i]=o,t(r);if(c>0)s=Math.floor(s/c)*c,o=Math.ceil(o/c)*c;else if(c<0)s=Math.ceil(s*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function zm(){var e=qj();return e.copy=function(){return Qd(e,zm())},Or.apply(e,arguments),is(e)}function z4(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,$m),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return z4(e).unknown(t)},e=arguments.length?Array.from(e,$m):[0,1],is(n)}function I4(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return iMath.pow(e,t)}function jde(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function dC(e){return(t,n)=>-e(-t,n)}function Yj(e){const t=e(uC,fC),n=t.domain;let r=10,a,i;function s(){return a=jde(r),i=wde(r),n()[0]<0?(a=dC(a),i=dC(i),e(bde,xde)):e(uC,fC),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const l=n();let c=l[0],f=l[l.length-1];const d=f0){for(;h<=p;++h)for(m=1;mf)break;y.push(g)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(g=h>0?m/i(-h):m*i(h),!(gf)break;y.push(g)}y.length*2{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Kf(l)).precision==null&&(l.trim=!0),l=Gj(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return f=>{let d=f/i(Math.round(a(f)));return d*rn(I4(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function B4(){const e=Yj(Ng()).domain([1,10]);return e.copy=()=>Qd(e,B4()).base(e.base()),Or.apply(e,arguments),e}function hC(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function pC(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Xj(e){var t=1,n=e(hC(t),pC(t));return n.constant=function(r){return arguments.length?e(hC(t=+r),pC(t)):t},is(n)}function U4(){var e=Xj(Ng());return e.copy=function(){return Qd(e,U4()).constant(e.constant())},Or.apply(e,arguments)}function mC(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ade(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ode(e){return e<0?-e*e:e*e}function Wj(e){var t=e(mn,mn),n=1;function r(){return n===1?e(mn,mn):n===.5?e(Ade,Ode):e(mC(n),mC(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},is(t)}function Qj(){var e=Wj(Ng());return e.copy=function(){return Qd(e,Qj()).exponent(e.exponent())},Or.apply(e,arguments),e}function Ede(){return Qj.apply(null,arguments).exponent(.5)}function yC(e){return Math.sign(e)*e*e}function Tde(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function F4(){var e=qj(),t=[0,1],n=!1,r;function a(i){var s=Tde(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(yC(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,$m)).map(yC)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return F4(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Or.apply(a,arguments),is(a)}function V4(){var e=[],t=[],n=[],r;function a(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s0?n[o-1]:e[0],o=n?[r[n-1],t]:[r[c-1],r[c]]},s.unknown=function(l){return arguments.length&&(i=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return H4().domain([e,t]).range(a).unknown(i)},Or.apply(is(s),arguments)}function q4(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Xd(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return q4().domain(e).range(t).unknown(n)},Or.apply(a,arguments)}const Ob=new Date,Eb=new Date;function Lt(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const l=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i0))return l;let c;do l.push(c=new Date(+i)),t(i,o),e(i);while(cLt(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(Ob.setTime(+i),Eb.setTime(+s),e(Ob),e(Eb),Math.floor(n(Ob,Eb))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Im=Lt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Im.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Lt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Im);Im.range;const Ma=1e3,mr=Ma*60,Ra=mr*60,Qa=Ra*24,Zj=Qa*7,gC=Qa*30,Tb=Qa*365,_s=Lt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ma)},(e,t)=>(t-e)/Ma,e=>e.getUTCSeconds());_s.range;const Jj=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma)},(e,t)=>{e.setTime(+e+t*mr)},(e,t)=>(t-e)/mr,e=>e.getMinutes());Jj.range;const eA=Lt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*mr)},(e,t)=>(t-e)/mr,e=>e.getUTCMinutes());eA.range;const tA=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma-e.getMinutes()*mr)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getHours());tA.range;const nA=Lt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getUTCHours());nA.range;const Zd=Lt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*mr)/Qa,e=>e.getDate()-1);Zd.range;const Cg=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>e.getUTCDate()-1);Cg.range;const K4=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>Math.floor(e/Qa));K4.range;function Ao(e){return Lt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*mr)/Zj)}const _g=Ao(0),Bm=Ao(1),Nde=Ao(2),Cde=Ao(3),ic=Ao(4),_de=Ao(5),Pde=Ao(6);_g.range;Bm.range;Nde.range;Cde.range;ic.range;_de.range;Pde.range;function Oo(e){return Lt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Zj)}const Pg=Oo(0),Um=Oo(1),Mde=Oo(2),Rde=Oo(3),sc=Oo(4),Dde=Oo(5),$de=Oo(6);Pg.range;Um.range;Mde.range;Rde.range;sc.range;Dde.range;$de.range;const rA=Lt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());rA.range;const aA=Lt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());aA.range;const Za=Lt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Za.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Za.range;const Ja=Lt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ja.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ja.range;function G4(e,t,n,r,a,i){const s=[[_s,1,Ma],[_s,5,5*Ma],[_s,15,15*Ma],[_s,30,30*Ma],[i,1,mr],[i,5,5*mr],[i,15,15*mr],[i,30,30*mr],[a,1,Ra],[a,3,3*Ra],[a,6,6*Ra],[a,12,12*Ra],[r,1,Qa],[r,2,2*Qa],[n,1,Zj],[t,1,gC],[t,3,3*gC],[e,1,Tb]];function o(c,f,d){const h=fb).right(s,h);if(p===s.length)return e.every(r1(c/Tb,f/Tb,d));if(p===0)return Im.every(Math.max(r1(c,f,d),1));const[m,g]=s[h/s[p-1][2]53)return null;"w"in V||(V.w=1),"Z"in V?(ge=Cb(mu(V.y,0,1)),Xe=ge.getUTCDay(),ge=Xe>4||Xe===0?Um.ceil(ge):Um(ge),ge=Cg.offset(ge,(V.V-1)*7),V.y=ge.getUTCFullYear(),V.m=ge.getUTCMonth(),V.d=ge.getUTCDate()+(V.w+6)%7):(ge=Nb(mu(V.y,0,1)),Xe=ge.getDay(),ge=Xe>4||Xe===0?Bm.ceil(ge):Bm(ge),ge=Zd.offset(ge,(V.V-1)*7),V.y=ge.getFullYear(),V.m=ge.getMonth(),V.d=ge.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),Xe="Z"in V?Cb(mu(V.y,0,1)).getUTCDay():Nb(mu(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(Xe+5)%7:V.w+V.U*7-(Xe+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,Cb(V)):Nb(V)}}function E(G,oe,X,V){for(var _e=0,ge=oe.length,Xe=X.length,ot,dt;_e=Xe)return-1;if(ot=oe.charCodeAt(_e++),ot===37){if(ot=oe.charAt(_e++),dt=S[ot in vC?oe.charAt(_e++):ot],!dt||(V=dt(G,X,V))<0)return-1}else if(ot!=X.charCodeAt(V++))return-1}return V}function T(G,oe,X){var V=c.exec(oe.slice(X));return V?(G.p=f.get(V[0].toLowerCase()),X+V[0].length):-1}function N(G,oe,X){var V=p.exec(oe.slice(X));return V?(G.w=m.get(V[0].toLowerCase()),X+V[0].length):-1}function M(G,oe,X){var V=d.exec(oe.slice(X));return V?(G.w=h.get(V[0].toLowerCase()),X+V[0].length):-1}function C(G,oe,X){var V=y.exec(oe.slice(X));return V?(G.m=v.get(V[0].toLowerCase()),X+V[0].length):-1}function L(G,oe,X){var V=g.exec(oe.slice(X));return V?(G.m=b.get(V[0].toLowerCase()),X+V[0].length):-1}function D(G,oe,X){return E(G,t,oe,X)}function $(G,oe,X){return E(G,n,oe,X)}function P(G,oe,X){return E(G,r,oe,X)}function k(G){return s[G.getDay()]}function I(G){return i[G.getDay()]}function F(G){return l[G.getMonth()]}function H(G){return o[G.getMonth()]}function Y(G){return a[+(G.getHours()>=12)]}function q(G){return 1+~~(G.getMonth()/3)}function te(G){return s[G.getUTCDay()]}function Z(G){return i[G.getUTCDay()]}function ye(G){return l[G.getUTCMonth()]}function J(G){return o[G.getUTCMonth()]}function st(G){return a[+(G.getUTCHours()>=12)]}function Ve(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var oe=j(G+="",x);return oe.toString=function(){return G},oe},parse:function(G){var oe=O(G+="",!1);return oe.toString=function(){return G},oe},utcFormat:function(G){var oe=j(G+="",w);return oe.toString=function(){return G},oe},utcParse:function(G){var oe=O(G+="",!0);return oe.toString=function(){return G},oe}}}var vC={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,Ude=/^%/,Fde=/[\\^$*+?|[\]().{}]/g;function Pe(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i[t.toLowerCase(),n]))}function Hde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function qde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Kde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Gde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Yde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function bC(e,t,n){var r=Gt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function xC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xde(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Wde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Qde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function SC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zde(e,t,n){var r=Gt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function wC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Jde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ehe(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function the(e,t,n){var r=Gt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nhe(e,t,n){var r=Gt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rhe(e,t,n){var r=Ude.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ahe(e,t,n){var r=Gt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ihe(e,t,n){var r=Gt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function jC(e,t){return Pe(e.getDate(),t,2)}function she(e,t){return Pe(e.getHours(),t,2)}function ohe(e,t){return Pe(e.getHours()%12||12,t,2)}function lhe(e,t){return Pe(1+Zd.count(Za(e),e),t,3)}function Y4(e,t){return Pe(e.getMilliseconds(),t,3)}function che(e,t){return Y4(e,t)+"000"}function uhe(e,t){return Pe(e.getMonth()+1,t,2)}function fhe(e,t){return Pe(e.getMinutes(),t,2)}function dhe(e,t){return Pe(e.getSeconds(),t,2)}function hhe(e){var t=e.getDay();return t===0?7:t}function phe(e,t){return Pe(_g.count(Za(e)-1,e),t,2)}function X4(e){var t=e.getDay();return t>=4||t===0?ic(e):ic.ceil(e)}function mhe(e,t){return e=X4(e),Pe(ic.count(Za(e),e)+(Za(e).getDay()===4),t,2)}function yhe(e){return e.getDay()}function ghe(e,t){return Pe(Bm.count(Za(e)-1,e),t,2)}function vhe(e,t){return Pe(e.getFullYear()%100,t,2)}function bhe(e,t){return e=X4(e),Pe(e.getFullYear()%100,t,2)}function xhe(e,t){return Pe(e.getFullYear()%1e4,t,4)}function She(e,t){var n=e.getDay();return e=n>=4||n===0?ic(e):ic.ceil(e),Pe(e.getFullYear()%1e4,t,4)}function whe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Pe(t/60|0,"0",2)+Pe(t%60,"0",2)}function AC(e,t){return Pe(e.getUTCDate(),t,2)}function jhe(e,t){return Pe(e.getUTCHours(),t,2)}function Ahe(e,t){return Pe(e.getUTCHours()%12||12,t,2)}function Ohe(e,t){return Pe(1+Cg.count(Ja(e),e),t,3)}function W4(e,t){return Pe(e.getUTCMilliseconds(),t,3)}function Ehe(e,t){return W4(e,t)+"000"}function The(e,t){return Pe(e.getUTCMonth()+1,t,2)}function Nhe(e,t){return Pe(e.getUTCMinutes(),t,2)}function Che(e,t){return Pe(e.getUTCSeconds(),t,2)}function _he(e){var t=e.getUTCDay();return t===0?7:t}function Phe(e,t){return Pe(Pg.count(Ja(e)-1,e),t,2)}function Q4(e){var t=e.getUTCDay();return t>=4||t===0?sc(e):sc.ceil(e)}function Mhe(e,t){return e=Q4(e),Pe(sc.count(Ja(e),e)+(Ja(e).getUTCDay()===4),t,2)}function Rhe(e){return e.getUTCDay()}function Dhe(e,t){return Pe(Um.count(Ja(e)-1,e),t,2)}function $he(e,t){return Pe(e.getUTCFullYear()%100,t,2)}function khe(e,t){return e=Q4(e),Pe(e.getUTCFullYear()%100,t,2)}function Lhe(e,t){return Pe(e.getUTCFullYear()%1e4,t,4)}function zhe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?sc(e):sc.ceil(e),Pe(e.getUTCFullYear()%1e4,t,4)}function Ihe(){return"+0000"}function OC(){return"%"}function EC(e){return+e}function TC(e){return Math.floor(+e/1e3)}var Do,Z4,J4;Bhe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Bhe(e){return Do=Bde(e),Z4=Do.format,Do.parse,J4=Do.utcFormat,Do.utcParse,Do}function Uhe(e){return new Date(e)}function Fhe(e){return e instanceof Date?+e:+new Date(+e)}function iA(e,t,n,r,a,i,s,o,l,c){var f=qj(),d=f.invert,h=f.domain,p=c(".%L"),m=c(":%S"),g=c("%I:%M"),b=c("%I %p"),y=c("%a %d"),v=c("%b %d"),x=c("%B"),w=c("%Y");function S(j){return(l(j)t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Pfe(e,i/r))},n.copy=function(){return rL(t).domain(e)},ii.apply(n,arguments)}function Rg(){var e=0,t=.5,n=1,r=1,a,i,s,o,l,c=mn,f,d=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+f(g))-i)*(r*gt}var oL=Xhe,Whe=Dg,Qhe=oL,Zhe=Yc;function Jhe(e){return e&&e.length?Whe(e,Zhe,Qhe):void 0}var epe=Jhe;const Di=Ie(epe);function tpe(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*nt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ne.dividedBy=ne.div=function(e){return Va(this,new this.constructor(e))};ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,n=t.constructor;return Ge(Va(t,new n(e),0,1),n.precision)};ne.equals=ne.eq=function(e){return!this.cmp(e)};ne.exponent=function(){return _t(this)};ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0};ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0};ne.isInteger=ne.isint=function(){return this.e>this.d.length-2};ne.isNegative=ne.isneg=function(){return this.s<0};ne.isPositive=ne.ispos=function(){return this.s>0};ne.isZero=function(){return this.s===0};ne.lessThan=ne.lt=function(e){return this.cmp(e)<0};ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1};ne.logarithm=ne.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Vn))throw Error(Sr+"NaN");if(n.s<1)throw Error(Sr+(n.s?"NaN":"-Infinity"));return n.eq(Vn)?new r(0):(ct=!1,t=Va(Gf(n,i),Gf(e,i),i),ct=!0,Ge(t,a))};ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dL(t,e):uL(t,(e.s=-e.s,e))};ne.modulo=ne.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(Sr+"NaN");return n.s?(ct=!1,t=Va(n,e,0,1).times(e),ct=!0,n.minus(t)):Ge(new r(n),a)};ne.naturalExponential=ne.exp=function(){return fL(this)};ne.naturalLogarithm=ne.ln=function(){return Gf(this)};ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?uL(t,e):dL(t,(e.s=-e.s,e))};ne.precision=ne.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ws+e);if(t=_t(a)+1,r=a.d.length-1,n=r*nt+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ne.squareRoot=ne.sqrt=function(){var e,t,n,r,a,i,s,o=this,l=o.constructor;if(o.s<1){if(!o.s)return new l(0);throw Error(Sr+"NaN")}for(e=_t(o),ct=!1,a=Math.sqrt(+o),a==0||a==1/0?(t=ea(o.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Qc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(a.toString()),n=l.precision,a=s=n+3;;)if(i=r,r=i.plus(Va(o,i,s+2)).times(.5),ea(i.d).slice(0,s)===(t=ea(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Ge(i,n+1,0),i.times(i).eq(o)){r=i;break}}else if(t!="9999")break;s+=4}return ct=!0,Ge(r,n)};ne.times=ne.mul=function(e){var t,n,r,a,i,s,o,l,c,f=this,d=f.constructor,h=f.d,p=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=h.length,c=p.length,l=0;){for(t=0,a=l+r;a>r;)o=i[a]+p[r]*h[a-r-1]+t,i[a--]=o%Ut|0,t=o/Ut|0;i[a]=(i[a]+t)%Ut|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,ct?Ge(e,d.precision):e};ne.toDecimalPlaces=ne.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ca(e,0,Wc),t===void 0?t=r.rounding:ca(t,0,8),Ge(n,e+_t(n)+1,t))};ne.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=fo(r,!0):(ca(e,0,Wc),t===void 0?t=a.rounding:ca(t,0,8),r=Ge(new a(r),e+1,t),n=fo(r,!0,e+1)),n};ne.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?fo(a):(ca(e,0,Wc),t===void 0?t=i.rounding:ca(t,0,8),r=Ge(new i(a),e+_t(a)+1,t),n=fo(r.abs(),!1,e+_t(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return Ge(new t(e),_t(e)+1,t.rounding)};ne.toNumber=function(){return+this};ne.toPower=ne.pow=function(e){var t,n,r,a,i,s,o=this,l=o.constructor,c=12,f=+(e=new l(e));if(!e.s)return new l(Vn);if(o=new l(o),!o.s){if(e.s<1)throw Error(Sr+"Infinity");return o}if(o.eq(Vn))return o;if(r=l.precision,e.eq(Vn))return Ge(o,r);if(t=e.e,n=e.d.length-1,s=t>=n,i=o.s,s){if((n=f<0?-f:f)<=cL){for(a=new l(Vn),t=Math.ceil(r/nt+4),ct=!1;n%2&&(a=a.times(o),_C(a.d,t)),n=Qc(n/2),n!==0;)o=o.times(o),_C(o.d,t);return ct=!0,e.s<0?new l(Vn).div(a):Ge(a,r)}}else if(i<0)throw Error(Sr+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,ct=!1,a=e.times(Gf(o,r+c)),ct=!0,a=fL(a),a.s=i,a};ne.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=_t(a),r=fo(a,n<=i.toExpNeg||n>=i.toExpPos)):(ca(e,1,Wc),t===void 0?t=i.rounding:ca(t,0,8),a=Ge(new i(a),e,t),n=_t(a),r=fo(a,e<=n||n<=i.toExpNeg,e)),r};ne.toSignificantDigits=ne.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ca(e,1,Wc),t===void 0?t=r.rounding:ca(t,0,8)),Ge(new r(n),e,t)};ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=_t(e),n=e.constructor;return fo(e,t<=n.toExpNeg||t>=n.toExpPos)};function uL(e,t){var n,r,a,i,s,o,l,c,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),ct?Ge(t,d):t;if(l=e.d,c=t.d,s=e.e,a=t.e,l=l.slice(),i=s-a,i){for(i<0?(r=l,i=-i,o=c.length):(r=c,a=s,o=l.length),s=Math.ceil(d/nt),o=s>o?s+1:o+1,i>o&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(o=l.length,i=c.length,o-i<0&&(i=o,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/Ut|0,l[i]%=Ut;for(n&&(l.unshift(n),++a),o=l.length;l[--o]==0;)l.pop();return t.d=l,t.e=a,ct?Ge(t,d):t}function ca(e,t,n){if(e!==~~e||en)throw Error(Ws+e)}function ea(e){var t,n,r,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;ts?1:-1;else for(o=l=0;oa[o]?1:-1;break}return l}function n(r,a,i){for(var s=0;i--;)r[i]-=s,s=r[i]1;)r.shift()}return function(r,a,i,s){var o,l,c,f,d,h,p,m,g,b,y,v,x,w,S,j,O,E,T=r.constructor,N=r.s==a.s?1:-1,M=r.d,C=a.d;if(!r.s)return new T(r);if(!a.s)throw Error(Sr+"Division by zero");for(l=r.e-a.e,O=C.length,S=M.length,p=new T(N),m=p.d=[],c=0;C[c]==(M[c]||0);)++c;if(C[c]>(M[c]||0)&&--l,i==null?v=i=T.precision:s?v=i+(_t(r)-_t(a))+1:v=i,v<0)return new T(0);if(v=v/nt+2|0,c=0,O==1)for(f=0,C=C[0],v++;(c1&&(C=e(C,f),M=e(M,f),O=C.length,S=M.length),w=O,g=M.slice(0,O),b=g.length;b=Ut/2&&++j;do f=0,o=t(C,g,O,b),o<0?(y=g[0],O!=b&&(y=y*Ut+(g[1]||0)),f=y/j|0,f>1?(f>=Ut&&(f=Ut-1),d=e(C,f),h=d.length,b=g.length,o=t(d,g,h,b),o==1&&(f--,n(d,O16)throw Error(lA+_t(e));if(!e.s)return new f(Vn);for(ct=!1,o=d,s=new f(.03125);e.abs().gte(.1);)e=e.times(s),c+=5;for(r=Math.log(ws(2,c))/Math.LN10*2+5|0,o+=r,n=a=i=new f(Vn),f.precision=o;;){if(a=Ge(a.times(e),o),n=n.times(++l),s=i.plus(Va(a,n,o)),ea(s.d).slice(0,o)===ea(i.d).slice(0,o)){for(;c--;)i=Ge(i.times(i),o);return f.precision=d,t==null?(ct=!0,Ge(i,d)):i}i=s}}function _t(e){for(var t=e.e*nt,n=e.d[0];n>=10;n/=10)t++;return t}function _b(e,t,n){if(t>e.LN10.sd())throw ct=!0,n&&(e.precision=n),Error(Sr+"LN10 precision limit exceeded");return Ge(new e(e.LN10),t)}function mi(e){for(var t="";e--;)t+="0";return t}function Gf(e,t){var n,r,a,i,s,o,l,c,f,d=1,h=10,p=e,m=p.d,g=p.constructor,b=g.precision;if(p.s<1)throw Error(Sr+(p.s?"NaN":"-Infinity"));if(p.eq(Vn))return new g(0);if(t==null?(ct=!1,c=b):c=t,p.eq(10))return t==null&&(ct=!0),_b(g,c);if(c+=h,g.precision=c,n=ea(m),r=n.charAt(0),i=_t(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ea(p.d),r=n.charAt(0),d++;i=_t(p),r>1?(p=new g("0."+n),i++):p=new g(r+"."+n.slice(1))}else return l=_b(g,c+2,b).times(i+""),p=Gf(new g(r+"."+n.slice(1)),c-h).plus(l),g.precision=b,t==null?(ct=!0,Ge(p,b)):p;for(o=s=p=Va(p.minus(Vn),p.plus(Vn),c),f=Ge(p.times(p),c),a=3;;){if(s=Ge(s.times(f),c),l=o.plus(Va(s,new g(a),c)),ea(l.d).slice(0,c)===ea(o.d).slice(0,c))return o=o.times(2),i!==0&&(o=o.plus(_b(g,c+2,b).times(i+""))),o=Va(o,new g(d),c),g.precision=b,t==null?(ct=!0,Ge(o,b)):o;o=l,a+=2}}function CC(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=Qc(n/nt),e.d=[],r=(n+1)%nt,n<0&&(r+=nt),rFm||e.e<-Fm))throw Error(lA+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ge(e,t,n){var r,a,i,s,o,l,c,f,d=e.d;for(s=1,i=d[0];i>=10;i/=10)s++;if(r=t-s,r<0)r+=nt,a=t,c=d[f=0];else{if(f=Math.ceil((r+1)/nt),i=d.length,f>=i)return e;for(c=i=d[f],s=1;i>=10;i/=10)s++;r%=nt,a=r-nt+s}if(n!==void 0&&(i=ws(10,s-a-1),o=c/i%10|0,l=t<0||d[f+1]!==void 0||c%i,l=n<4?(o||l)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||l||n==6&&(r>0?a>0?c/ws(10,s-a):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=_t(e),d.length=1,t=t-i-1,d[0]=ws(10,(nt-t%nt)%nt),e.e=Qc(-t/nt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,i=1,f--):(d.length=f+1,i=ws(10,nt-r),d[f]=a>0?(c/ws(10,s-a)%ws(10,a)|0)*i:0),l)for(;;)if(f==0){(d[0]+=i)==Ut&&(d[0]=1,++e.e);break}else{if(d[f]+=i,d[f]!=Ut)break;d[f--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(ct&&(e.e>Fm||e.e<-Fm))throw Error(lA+_t(e));return e}function dL(e,t){var n,r,a,i,s,o,l,c,f,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ct?Ge(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),s=c-r,s){for(f=s<0,f?(n=l,s=-s,o=d.length):(n=d,r=c,o=l.length),a=Math.max(Math.ceil(p/nt),o)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,o=d.length,f=a0;--a)l[o++]=0;for(a=d.length;a>s;){if(l[--a]0?i=i.charAt(0)+"."+i.slice(1)+mi(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+mi(-a-1)+i,n&&(r=n-s)>0&&(i+=mi(r))):a>=s?(i+=mi(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+mi(r))):((r=a+1)
모델 미지정 시 서버 기본(guardia.ollama-text-model). localhost Ollama 만 호출하며, - * 장애/오프라인/타임아웃 시 예외 없이 빈 문자열 반환(호출자가 폴백 수행). [GUARDiA-MALL] - */ @SuppressWarnings("unchecked") - public String generateText(String prompt, String reqModel) { - if (prompt == null || prompt.isBlank()) return ""; - String useModel = (reqModel == null || reqModel.isBlank()) ? model : reqModel.trim(); + public String generate(String prompt) { try { - Map body = Map.of("model", useModel, "prompt", prompt, "stream", false); + Map body = Map.of("model", model, "prompt", prompt, "stream", false); Map res = builder.baseUrl(ollamaUrl).build() .post().uri("/api/generate").bodyValue(body) .retrieve().bodyToMono(Map.class) - .timeout(Duration.ofSeconds(120)) + .timeout(Duration.ofSeconds(30)) .map(m -> (Map) m).block(); if (res == null) return ""; Object r = res.get("response"); return r == null ? "" : String.valueOf(r).trim(); } catch (Exception e) { - log.warn("Ollama 일시 불가 — Java 폴백 사용: {}", e.getClass().getSimpleName()); + log.warn("Ollama 일시 불가 — Java 폴백 사용: {}", e.getMessage()); return ""; } } diff --git a/backend/src/main/java/com/zioinfo/mall/auth/AuthController.java b/backend/src/main/java/com/zioinfo/mall/auth/AuthController.java index 2ce0188..7f9b501 100644 --- a/backend/src/main/java/com/zioinfo/mall/auth/AuthController.java +++ b/backend/src/main/java/com/zioinfo/mall/auth/AuthController.java @@ -1,56 +1,28 @@ package com.zioinfo.mall.auth; -import com.zioinfo.mall.auth.dto.ChangePasswordRequest; -import com.zioinfo.mall.auth.dto.OtpConfirmRequest; -import com.zioinfo.mall.auth.dto.OtpSetupResponse; -import com.zioinfo.mall.auth.dto.OtpVerifyRequest; import com.zioinfo.mall.common.ApiResponse; -import com.zioinfo.mall.uiws.auth.OtpAuthService; -import com.zioinfo.mall.uiws.auth.TwoFactorService; -import com.zioinfo.mall.uiws.common.UiwsApiException; -import com.zioinfo.mall.uiws.common.UiwsErrorCode; -import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; import java.util.Map; -/** - * GUARDiA Mall 인증 컨트롤러. - * - /login: 고객(USER)·2FA off → { token }. 운영(ADMIN/MANAGER)+2FA on → { twofa:"true", verifyToken, step, maskedEmail }. - * - /verify: (UIWS 2FA 이식) verify-token + 인증코드 → access 발급. 운영 로그인 2단계 완료용. - * 기존 고객 클라이언트(token 응답)는 형태 보존 → 쇼핑 로그인 회귀 0. - */ @RestController @RequestMapping("/api/mall/auth") @RequiredArgsConstructor public class AuthController { private final AuthService authService; - private final TwoFactorService twoFactorService; - private final OtpAuthService otpAuthService; - private final JwtUtil jwtUtil; @PostMapping("/login") public ApiResponse> login(@RequestBody LoginRequest req) { - return ApiResponse.ok(authService.login(req.username(), req.password())); + String token = authService.login(req.username(), req.password()); + return ApiResponse.ok(Map.of("token", token, "type", "Bearer")); } @PostMapping("/register") public ApiResponse> register(@RequestBody RegisterRequest req) { - return ApiResponse.ok(authService.register(req.username(), req.password(), req.displayName())); - } - - /** UIWS 2FA 이식: 운영 로그인 2차 인증 코드 검증(이메일) → access 발급. */ - @PostMapping("/verify") - public ApiResponse> verify(@RequestBody VerifyRequest req) { - return ApiResponse.ok(twoFactorService.verify(req.verifyToken(), req.code())); - } - - /** TOTP 이식: 운영 로그인 2단계 6자리 검증 → access/refresh 발급(최초 로그인이면 등록 확정). */ - @PostMapping("/verify-otp") - public ApiResponse> verifyOtp(@Valid @RequestBody OtpVerifyRequest req) { - return ApiResponse.ok(otpAuthService.verifyOtp(req.verifyToken(), req.code())); + String token = authService.register(req.username(), req.password(), req.displayName()); + return ApiResponse.ok(Map.of("token", token, "type", "Bearer")); } @GetMapping("/me") @@ -59,51 +31,6 @@ public class AuthController { return ApiResponse.ok(authService.me(token)); } - // ── 마이페이지: OTP 등록/재설정/해제 + 비밀번호 변경 (본인, access 토큰 필요) ────────── - // /api/mall/auth/** 는 permitAll 이라 필터 인증이 없으므로 여기서 access 토큰을 명시 검증. - - /** 마이페이지 OTP 등록/재설정 시작 → { secret, otpAuthUri, qrImage }(이 응답에서만 시크릿/QR 노출). */ - @PostMapping("/otp/setup") - public ApiResponse otpSetup(@RequestHeader("Authorization") String header) { - return ApiResponse.ok(otpAuthService.setup(requireUser(header))); - } - - /** 마이페이지 OTP 확인·활성화(앱 6자리 코드). */ - @PostMapping("/otp/confirm") - public ApiResponse> otpConfirm(@RequestHeader("Authorization") String header, - @Valid @RequestBody OtpConfirmRequest req) { - otpAuthService.confirm(requireUser(header), req.code()); - return ApiResponse.ok(Map.of("result", "ok")); - } - - /** 마이페이지 OTP 해제. */ - @PostMapping("/otp/disable") - public ApiResponse> otpDisable(@RequestHeader("Authorization") String header) { - otpAuthService.disable(requireUser(header)); - return ApiResponse.ok(Map.of("result", "ok")); - } - - /** 마이페이지 비밀번호 변경(현재 비번 검증 + BCrypt). 새 비번은 응답/로그 미포함. */ - @PostMapping("/change-password") - public ApiResponse> changePassword(@RequestHeader("Authorization") String header, - @Valid @RequestBody ChangePasswordRequest req) { - authService.changePassword(requireUser(header), req); - return ApiResponse.ok(Map.of("result", "ok")); - } - - /** - * Authorization 헤더에서 인증 사용자를 해석한다. verify-token(2fa 단계용)은 거부. - * (/api/mall/auth/** 는 permitAll 이라 필터 인증이 없으므로 여기서 access 토큰을 명시 검증.) - */ - private String requireUser(String header) { - String token = header == null ? "" : header.replace("Bearer ", "").trim(); - if (token.isEmpty() || jwtUtil.isVerifyToken(token) || !jwtUtil.isValid(token)) { - throw new UiwsApiException(UiwsErrorCode.UNAUTHORIZED); - } - return jwtUtil.getUsername(token); - } - record LoginRequest(String username, String password) {} record RegisterRequest(String username, String password, String displayName) {} - record VerifyRequest(String verifyToken, String code) {} } diff --git a/backend/src/main/java/com/zioinfo/mall/auth/AuthService.java b/backend/src/main/java/com/zioinfo/mall/auth/AuthService.java index fcced02..6ff2d28 100644 --- a/backend/src/main/java/com/zioinfo/mall/auth/AuthService.java +++ b/backend/src/main/java/com/zioinfo/mall/auth/AuthService.java @@ -1,121 +1,33 @@ package com.zioinfo.mall.auth; -import com.zioinfo.mall.admin.AuditService; -import com.zioinfo.mall.auth.dto.AuthHelperResult; -import com.zioinfo.mall.auth.dto.ChangePasswordRequest; -import com.zioinfo.mall.auth.dto.FindIdRequest; -import com.zioinfo.mall.auth.dto.FindIdResponse; -import com.zioinfo.mall.auth.dto.ResetPasswordRequest; -import com.zioinfo.mall.auth.dto.SignupRequest; import com.zioinfo.mall.auth.mapper.UserMapper; -import com.zioinfo.mall.uiws.auth.OtpAuthService; -import com.zioinfo.mall.uiws.auth.TwoFactorService; -import com.zioinfo.mall.uiws.common.UiwsApiException; -import com.zioinfo.mall.uiws.common.UiwsErrorCode; -import com.zioinfo.mall.uiws.common.mail.MailSender; import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import java.security.SecureRandom; import java.util.Map; -/** - * GUARDiA Mall 인증 서비스. - * - * ★ 고객/운영 분리: Mall 은 {@code mall_account} 단일 테이블/단일 로그인이지만 역할로 구분된다. - * - * 고객(USER) — 쇼핑 로그인: 2FA 미적용(기존 단일 JWT 흐름 그대로, 회귀 0). - * 운영(ADMIN/MANAGER) — 관리자/매장 로그인: UIWS 2FA 레이어 적용(verify-token + 이메일코드 + 실패잠금). - * - * 2FA 전역 토글({@code mall.uiws.auth.twofa-enabled})이 off 면 운영 로그인도 단일 JWT(회귀 0). - */ -@Slf4j @Service @RequiredArgsConstructor public class AuthService { - private static final SecureRandom RANDOM = new SecureRandom(); - /** 임시 비밀번호 문자셋(혼동 문자 0/O/1/l/I 제외). */ - private static final String TMP_PW_CHARS = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789@#$%"; - private final UserMapper userMapper; private final PasswordEncoder passwordEncoder; private final JwtUtil jwtUtil; - private final TwoFactorService twoFactorService; - private final OtpAuthService otpAuthService; - private final MailSender mailSender; - private final AuditService auditService; - /** 운영(2FA 대상) 역할 여부 — 고객(USER)은 제외. */ - private static boolean isOperationsRole(String role) { - return "ADMIN".equalsIgnoreCase(role) || "MANAGER".equalsIgnoreCase(role); - } - - /** - * 1차 로그인. - * @return 고객 또는 2FA off: { token, type, twofa:"false" } - * 운영 + 2FA on : { twofa:"true", verifyToken, step:"EMAIL", maskedEmail } - */ - public Map login(String username, String password) { + public String login(String username, String password) { MallUser user = userMapper.findByUsername(username); - - // 잠금 우선 차단(존재하는 운영 계정에 한해 — 존재 여부 누설 최소화) - if (user != null && isOperationsRole(user.getRole()) && twoFactorService.isLocked(user)) { - throw new UiwsApiException(UiwsErrorCode.ACCOUNT_LOCKED); - } if (user == null || !user.isActive()) { throw new RuntimeException("ERR-AUTH-001: 존재하지 않거나 비활성 계정"); } - // 회원가입 승인 게이트(로그인 보조 이식): signup 으로 가입한 운영자(approved=false)는 비번 일치 전 차단. - // approved 가 NULL(기존 계정/고객 register 흐름)이면 게이트 미적용 → 회귀 0. - if (isOperationsRole(user.getRole()) && Boolean.FALSE.equals(user.getApproved())) { - throw new RuntimeException("ERR-AUTH-003: 승인 대기 중인 계정입니다. 관리자 승인 후 이용 가능합니다."); - } - - boolean opsRole = isOperationsRole(user.getRole()); - // 2단계 인증 대상: 운영(ADMIN/MANAGER) 로그인만. OTP(TOTP) 우선, 없으면 이메일코드. - boolean otpTarget = otpAuthService.isEnabled() && opsRole; - boolean emailTarget = twoFactorService.isEnabled() && opsRole; - if (!passwordEncoder.matches(password, user.getPasswordHash())) { - // 운영 + 2FA(OTP 또는 이메일) 활성 시 실패 누적/잠금. 고객/비활성 시 기존 동작(메시지만) 유지. - if (otpTarget || emailTarget) { - twoFactorService.recordLoginFailure(username); - MallUser after = userMapper.findByUsername(username); - if (after != null && Boolean.TRUE.equals(after.getLocked())) { - throw new UiwsApiException(UiwsErrorCode.ACCOUNT_LOCKED); - } - } throw new RuntimeException("ERR-AUTH-002: 비밀번호 불일치"); } - - // 비밀번호 검증 통과 — 2단계 우선순위: OTP > 이메일코드 > 단일 로그인 - if (otpTarget) { - // { twofa:true, verifyToken, verifyMethod:(OTP|OTP_SETUP), secret?, otpAuthUri?, qrImage? } - return otpAuthService.beginOtp(user); - } - if (emailTarget) { - Map step1 = twoFactorService.beginTwoFactor(user); - return Map.of( - "twofa", "true", - "verifyToken", step1.get("verifyToken"), - "step", step1.get("step"), - "maskedEmail", step1.getOrDefault("maskedEmail", "")); - } - - // 고객(USER) 또는 2FA 비활성 — 기존 단일 로그인 흐름(회귀 0) - if (opsRole) { - userMapper.resetLoginFail(username); - } - String token = jwtUtil.generate(username, user.getRole()); - return Map.of("twofa", "false", "token", token, "type", "Bearer"); + return jwtUtil.generate(username, user.getRole()); } - /** 고객 셀프 회원가입 — 항상 USER 역할로 생성(2FA 미적용 대상). */ - public Map register(String username, String password, String displayName) { + /** 고객 셀프 회원가입 — 항상 USER 역할로 생성. */ + public String register(String username, String password, String displayName) { if (username == null || username.isBlank() || password == null || password.isBlank()) { throw new IllegalArgumentException("ERR-AUTH-400: username/password 필수"); } @@ -129,8 +41,7 @@ public class AuthService { user.setDisplayName(displayName == null || displayName.isBlank() ? username : displayName); user.setActive(true); userMapper.insert(user); - String token = jwtUtil.generate(username, "USER"); - return Map.of("twofa", "false", "token", token, "type", "Bearer"); + return jwtUtil.generate(username, "USER"); } public Map me(String token) { @@ -138,122 +49,4 @@ public class AuthService { String role = jwtUtil.getRole(token); return Map.of("username", username, "role", role); } - - /** - * 마이페이지 비밀번호 변경(현재 비밀번호 검증 + BCrypt 저장). UIWS changePassword 미러. - * 현재 비번 불일치 → PASSWORD_MISMATCH, 기존과 동일 → PASSWORD_SAME_AS_OLD. - * 새 비밀번호 평문은 로그/응답/감사에 절대 기록하지 않는다(보안 불변규칙). - */ - @Transactional - public void changePassword(String username, ChangePasswordRequest req) { - MallUser user = userMapper.findByUsername(username); - if (user == null) { - throw new UiwsApiException(UiwsErrorCode.USER_NOT_FOUND); - } - if (!passwordEncoder.matches(req.currentPassword(), user.getPasswordHash())) { - throw new UiwsApiException(UiwsErrorCode.PASSWORD_MISMATCH); - } - if (passwordEncoder.matches(req.newPassword(), user.getPasswordHash())) { - throw new UiwsApiException(UiwsErrorCode.PASSWORD_SAME_AS_OLD); - } - userMapper.updatePasswordByUsername(username, passwordEncoder.encode(req.newPassword())); - auditService.log(username, "PASSWORD_CHANGE", username, "본인 비밀번호 변경"); - } - - // ── 로그인 보조 이식: 회원가입 / 아이디찾기 / 비밀번호 초기화 ─────────────────── - // 대상: Mall 관리자/운영자 계정(mall_account, ADMIN/MANAGER). 고객(USER) register 흐름과 분리. - - /** - * 운영자 회원가입(승인 대기). username/email 중복 검사 후 approved=false·role=MANAGER 로 INSERT. - * 비밀번호는 BCrypt 저장. 승인 전까지 로그인 차단(login 의 승인 게이트). - */ - @Transactional - public AuthHelperResult signup(SignupRequest req) { - if (req.username() == null || req.username().isBlank() - || req.password() == null || req.password().length() < 4 - || req.email() == null || req.email().isBlank()) { - return new AuthHelperResult(false, "아이디·비밀번호(4자 이상)·이메일은 필수입니다."); - } - if (userMapper.countByUsername(req.username()) > 0) { - return new AuthHelperResult(false, "이미 사용 중인 아이디입니다."); - } - if (userMapper.countByEmail(req.email()) > 0) { - return new AuthHelperResult(false, "이미 등록된 이메일입니다."); - } - MallUser u = new MallUser(); - u.setUsername(req.username()); - u.setPasswordHash(passwordEncoder.encode(req.password())); - u.setDisplayName(req.displayName() != null && !req.displayName().isBlank() - ? req.displayName() : req.username()); - u.setEmail(req.email()); - userMapper.signup(u); - log.info("[auth-helper] signup pending approval: username={}", req.username()); - return new AuthHelperResult(true, "가입 신청이 접수되었습니다. 관리자 승인 후 로그인할 수 있습니다."); - } - - /** - * 아이디 찾기: 표시명+이메일 동시 일치 운영자 1건 조회. username 은 부분 마스킹 후 반환. - * 미발견 시 found=false(원문 username 절대 미노출). - */ - public FindIdResponse findId(FindIdRequest req) { - if (req.displayName() == null || req.displayName().isBlank() - || req.email() == null || req.email().isBlank()) { - return new FindIdResponse(false, ""); - } - MallUser u = userMapper.findByDisplayNameAndEmail(req.displayName(), req.email()); - if (u == null) { - return new FindIdResponse(false, ""); - } - return new FindIdResponse(true, maskUsername(u.getUsername())); - } - - /** - * 비밀번호 초기화: username+email 일치 검증 → 임시비번 생성·BCrypt 저장·잠금/실패카운트 해제. - * 임시비번은 메일(미설정 시 LogMailSender 로그)로만 전달. API 응답·로그 메시지에 비번 미노출. - * 대상 미존재여도 success=true(계정 열거 방지). - */ - @Transactional - public AuthHelperResult resetPassword(ResetPasswordRequest req) { - final String okMsg = "임시 비밀번호를 등록된 이메일로 발송했습니다. 메일을 확인하세요."; - if (req.username() == null || req.username().isBlank() - || req.email() == null || req.email().isBlank()) { - return new AuthHelperResult(false, "아이디와 이메일을 모두 입력하세요."); - } - MallUser u = userMapper.findByUsernameAndEmail(req.username(), req.email()); - if (u == null) { - // 존재 여부 누설 방지 — 동일 성공 메시지 반환(실제 발송 없음). - log.info("[auth-helper] reset-password no match (suppressed): username={}", req.username()); - return new AuthHelperResult(true, okMsg); - } - String tempPw = generateTempPassword(); - userMapper.updatePasswordHash(req.username(), passwordEncoder.encode(tempPw)); - - String subject = "[GUARDiA Mall] 임시 비밀번호 안내"; - String body = String.format( - "안녕하세요 %s 님,\n임시 비밀번호는 [%s] 입니다.\n로그인 후 즉시 비밀번호를 변경하세요.", - u.getDisplayName() != null ? u.getDisplayName() : u.getUsername(), tempPw); - // 메일 본문에만 임시비번 포함. mailSender 미설정 환경은 LogMailSender 폴백(서버 로그). - mailSender.send(u.getEmail(), subject, body); - log.info("[auth-helper] reset-password issued temp pw (sent via mail/log): username={}", req.username()); - return new AuthHelperResult(true, okMsg); - } - - private static String generateTempPassword() { - StringBuilder sb = new StringBuilder(10); - for (int i = 0; i < 10; i++) { - sb.append(TMP_PW_CHARS.charAt(RANDOM.nextInt(TMP_PW_CHARS.length()))); - } - return sb.toString(); - } - - /** username 부분 마스킹: 앞 2자만 노출(예: admin → ad***). 2자 이하는 첫 글자만. */ - private static String maskUsername(String username) { - if (username == null || username.isBlank()) { - return ""; - } - if (username.length() <= 2) { - return username.charAt(0) + "*"; - } - return username.substring(0, 2) + "*".repeat(Math.max(1, username.length() - 2)); - } } diff --git a/backend/src/main/java/com/zioinfo/mall/auth/JwtFilter.java b/backend/src/main/java/com/zioinfo/mall/auth/JwtFilter.java index 9efbf4d..5e80909 100644 --- a/backend/src/main/java/com/zioinfo/mall/auth/JwtFilter.java +++ b/backend/src/main/java/com/zioinfo/mall/auth/JwtFilter.java @@ -26,10 +26,7 @@ public class JwtFilter extends OncePerRequestFilter { String header = req.getHeader("Authorization"); if (header != null && header.startsWith("Bearer ")) { String token = header.substring(7); - // 보안(UIWS 2FA): purpose=2fa verify-token 은 access 토큰이 아니다. - // 동일 서명키라 isValid()는 통과하므로 차단하지 않으면 2차 인증 전 보호 API 접근(2FA 우회)이 가능. - // → verify-token 은 인증 컨텍스트를 세우지 않고 무시한다(/api/mall/auth/verify 에서만 사용). - if (jwtUtil.isValid(token) && !jwtUtil.isVerifyToken(token)) { + if (jwtUtil.isValid(token)) { String username = jwtUtil.getUsername(token); String role = jwtUtil.getRole(token); var auth = new UsernamePasswordAuthenticationToken( diff --git a/backend/src/main/java/com/zioinfo/mall/auth/JwtUtil.java b/backend/src/main/java/com/zioinfo/mall/auth/JwtUtil.java index 205c635..24e5d94 100644 --- a/backend/src/main/java/com/zioinfo/mall/auth/JwtUtil.java +++ b/backend/src/main/java/com/zioinfo/mall/auth/JwtUtil.java @@ -34,47 +34,6 @@ public class JwtUtil { .compact(); } - /** - * UIWS 2FA 이식: 1차 로그인 통과 후 발급하는 단기 verify-token. - * purpose=2fa 클레임으로 access 토큰과 구분(verify-token 으로는 보호 API 접근 불가). - */ - public String generateVerifyToken(String username, long validitySeconds) { - return Jwts.builder() - .subject(username) - .claim("purpose", "2fa") - .issuedAt(new Date()) - .expiration(new Date(System.currentTimeMillis() + validitySeconds * 1000L)) - .signWith(key()) - .compact(); - } - - /** verify-token 검증 후 username 반환. 유효하지 않거나 purpose!=2fa 면 null. */ - public String parseVerifyTokenUsername(String token) { - try { - Claims c = parse(token); - if (!"2fa".equals(c.get("purpose", String.class))) { - return null; - } - return c.getSubject(); - } catch (JwtException | IllegalArgumentException e) { - log.debug("verify-token 검증 실패: {}", e.getMessage()); - return null; - } - } - - /** - * 보안: 토큰이 2FA verify-token(purpose=2fa)인지 판별. - * JwtFilter 가 access 토큰만 인증 컨텍스트로 인정하도록 verify-token 을 걸러내는 데 사용. - * verify-token 은 access 와 동일 서명키라 isValid() 는 통과 → 반드시 별도 차단(2FA 우회 방지). - */ - public boolean isVerifyToken(String token) { - try { - return "2fa".equals(parse(token).get("purpose", String.class)); - } catch (JwtException | IllegalArgumentException e) { - return false; - } - } - public Claims parse(String token) { return Jwts.parser().verifyWith(key()).build() .parseSignedClaims(token).getPayload(); diff --git a/backend/src/main/java/com/zioinfo/mall/auth/MallUser.java b/backend/src/main/java/com/zioinfo/mall/auth/MallUser.java index 125d46d..1ee29f5 100644 --- a/backend/src/main/java/com/zioinfo/mall/auth/MallUser.java +++ b/backend/src/main/java/com/zioinfo/mall/auth/MallUser.java @@ -3,7 +3,7 @@ package com.zioinfo.mall.auth; import lombok.Data; import java.time.LocalDateTime; -/** 계정 (mall_account). 역할: ADMIN/MANAGER(운영) · USER(고객). */ +/** 계정 (mall_account). 역할: ADMIN/MANAGER/USER(고객). */ @Data public class MallUser { private Long id; @@ -13,28 +13,4 @@ public class MallUser { private String displayName; private boolean active; private LocalDateTime createdAt; - - // ── UIWS 2FA 이식 컬럼 (mall_account ALTER, db/91_uiws_port.sql) ─────────────── - // 2FA는 운영(ADMIN/MANAGER) 로그인에만 적용 — 고객(USER) 쇼핑 로그인은 회귀 0. - /** 2FA 발송 대상 이메일(원본 mall_account 미보유 → 91_uiws_port.sql 에서 추가). */ - private String email; - /** 이메일 인증코드(6자리). 발급 후 verify 단계에서 검증. API 응답에는 절대 미포함. */ - private String emailVerifyCode; - /** 인증코드 만료시각. */ - private LocalDateTime emailVerifyExpire; - /** 로그인 실패 누적 횟수(기본 0). max-login-fail 도달 시 locked. */ - private Integer loginFailCount; - /** 계정 잠금 여부(기본 false). */ - private Boolean locked; - /** TOTP 시크릿(UIWS OTP 경로). 등록 확정 전 보류 시크릿도 여기 저장. API 응답에 절대 미포함. */ - private String otpSecret; - /** OTP 등록 확정 여부(기본 false). 최초 로그인 verify 성공 시 true 로 확정(멱등). */ - private Boolean otpEnabled; - - // ── 로그인 보조 이식 컬럼 (mall_account ALTER, db/91_uiws_port.sql) ─────────────── - /** - * 회원가입 승인 게이트. signup 으로 가입한 운영자 계정은 false → 승인 전 로그인 차단. - * 기존 계정/고객(USER)은 NULL → login 게이트는 FALSE(명시적 미승인)만 차단(회귀 0). - */ - private Boolean approved; } diff --git a/backend/src/main/java/com/zioinfo/mall/auth/mapper/UserMapper.java b/backend/src/main/java/com/zioinfo/mall/auth/mapper/UserMapper.java index e838e28..c21ae8a 100644 --- a/backend/src/main/java/com/zioinfo/mall/auth/mapper/UserMapper.java +++ b/backend/src/main/java/com/zioinfo/mall/auth/mapper/UserMapper.java @@ -3,14 +3,7 @@ package com.zioinfo.mall.auth.mapper; import com.zioinfo.mall.auth.MallUser; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Update; -import java.time.LocalDateTime; - -/** - * 계정 매퍼. findByUsername/insert/countByUsername 는 UserMapper.xml 에 정의(2FA 컬럼 포함 resultMap). - * UIWS 2FA 이식 UPDATE 5종은 어노테이션으로 추가 — XML 중복 정의 없음(빈 등록 충돌 회피). - */ @Mapper public interface UserMapper { @@ -19,81 +12,4 @@ public interface UserMapper { int insert(MallUser user); int countByUsername(@Param("username") String username); - - // ── UIWS 2FA 이식: 실패 카운트/잠금/인증코드 갱신 (멱등 UPDATE) ─────────────── - - /** 로그인 성공 시 실패 카운트 초기화. */ - @Update("UPDATE mall_account SET login_fail_count = 0 WHERE username = #{username}") - int resetLoginFail(@Param("username") String username); - - /** 로그인 실패 누적(+1) 및 임계 도달 시 잠금. */ - @Update(""" - UPDATE mall_account - SET login_fail_count = COALESCE(login_fail_count, 0) + 1, - locked = (COALESCE(login_fail_count, 0) + 1 >= #{maxFail}) - WHERE username = #{username} - """) - int incrementLoginFail(@Param("username") String username, @Param("maxFail") int maxFail); - - /** 1차 통과 시 이메일 인증코드/만료 저장(verify 단계에서 검증). */ - @Update(""" - UPDATE mall_account - SET email_verify_code = #{code}, email_verify_expire = #{expire}, login_fail_count = 0 - WHERE username = #{username} - """) - int saveEmailCode(@Param("username") String username, - @Param("code") String code, - @Param("expire") LocalDateTime expire); - - /** 2차 검증 성공 시 코드 폐기. */ - @Update("UPDATE mall_account SET email_verify_code = NULL, email_verify_expire = NULL WHERE username = #{username}") - int clearEmailCode(@Param("username") String username); - - /** 관리자 잠금 해제(실패 카운트/잠금 초기화). */ - @Update("UPDATE mall_account SET locked = false, login_fail_count = 0 WHERE username = #{username}") - int unlock(@Param("username") String username); - - // ── admin 재시드 / 마이페이지 비밀번호 변경: password_hash 만 갱신(부수효과 없음) ──────── - - /** username 기준 BCrypt 해시 갱신(잠금/실패카운트 무영향). AdminPasswordSeeder·changePassword 공용. */ - @Update("UPDATE mall_account SET password_hash = #{passwordHash} WHERE username = #{username}") - int updatePasswordByUsername(@Param("username") String username, - @Param("passwordHash") String passwordHash); - - // ── TOTP(OTP 2차 인증) 이식 (멱등 UPDATE) ──────────────────────────────────── - - /** 보류 시크릿 저장(등록 확정 전). otp_enabled 은 건드리지 않는다(verify/confirm 에서 확정). */ - @Update("UPDATE mall_account SET otp_secret = #{secret} WHERE username = #{username}") - int updateOtpSecret(@Param("username") String username, @Param("secret") String secret); - - /** 등록 확정: otp_enabled=true (시크릿은 유지). */ - @Update("UPDATE mall_account SET otp_enabled = true WHERE username = #{username}") - int enableOtp(@Param("username") String username); - - /** 해제/초기화: 시크릿 폐기 + otp_enabled=false. (마이페이지 해제) */ - @Update("UPDATE mall_account SET otp_secret = NULL, otp_enabled = false WHERE username = #{username}") - int disableOtp(@Param("username") String username); - - // ── 로그인 보조 이식: 회원가입 / 아이디찾기 / 비밀번호 초기화 (UserMapper.xml) ─────── - - /** email 존재 여부(회원가입 중복 검사 — 운영자 계정 한정). */ - int countByEmail(@Param("email") String email); - - /** - * 운영자 회원가입(승인 대기). role=MANAGER·is_active=true·approved=false 고정. - * 관리자 화면에서 승인 전까지 로그인 차단. - */ - int signup(MallUser user); - - /** 아이디찾기: 표시명(display_name)+이메일 일치 운영자 1건. */ - MallUser findByDisplayNameAndEmail(@Param("displayName") String displayName, - @Param("email") String email); - - /** 비밀번호 초기화 대상 검증: username+email 동시 일치 운영자 1건. */ - MallUser findByUsernameAndEmail(@Param("username") String username, - @Param("email") String email); - - /** 임시 비밀번호 적용 + 잠금/실패카운트 해제(초기화 시). */ - int updatePasswordHash(@Param("username") String username, - @Param("passwordHash") String passwordHash); } diff --git a/backend/src/main/java/com/zioinfo/mall/config/SecurityConfig.java b/backend/src/main/java/com/zioinfo/mall/config/SecurityConfig.java index 12ce60f..4fff1e2 100644 --- a/backend/src/main/java/com/zioinfo/mall/config/SecurityConfig.java +++ b/backend/src/main/java/com/zioinfo/mall/config/SecurityConfig.java @@ -71,10 +71,6 @@ public class SecurityConfig { .requestMatchers("/api/admin/audit").hasAnyRole("ADMIN", "MANAGER") .requestMatchers(HttpMethod.GET, "/api/admin/settings").hasAnyRole("ADMIN", "MANAGER") .requestMatchers("/api/admin/settings/**").hasRole("ADMIN") - // AI 플랫폼(LLM provider) 설정 — ADMIN 전용(조회/갱신/연결테스트) - .requestMatchers("/api/admin/ai-config/**", "/api/admin/ai-config").hasRole("ADMIN") - // AI 답변 피드백 수집(로컬 DuckDB + 중앙 rag 전달) — 인증 사용자 - .requestMatchers(HttpMethod.POST, "/api/ai/feedback").authenticated() // 운영 분석 — MANAGER 이상 .requestMatchers("/api/mall/analytics/**").hasAnyRole("ADMIN", "MANAGER") .requestMatchers("/api/mall/settlement/**").hasAnyRole("ADMIN", "MANAGER") @@ -85,14 +81,8 @@ public class SecurityConfig { "/api/mall/promotion/**", "/api/mall/inventory/**").hasAnyRole("ADMIN", "MANAGER") .requestMatchers(HttpMethod.DELETE, "/api/mall/product/**", "/api/mall/category/**", "/api/mall/promotion/**", "/api/mall/inventory/**").hasAnyRole("ADMIN", "MANAGER") - // 최신 AI 기법(중앙 guardia-rag) — 운영 의사결정·토글 변경은 MANAGER+ (추천/피드백/토글조회는 인증 사용자) - .requestMatchers(HttpMethod.POST, "/api/mall/rag/demand-plan").hasAnyRole("ADMIN", "MANAGER") - .requestMatchers(HttpMethod.PUT, "/api/mall/rag/toggles/**").hasAnyRole("ADMIN", "MANAGER") - // 그 외 mall API (장바구니·주문·결제·배송·찜·CS·회원·AI·RAG 추천/피드백/토글조회) — 인증 사용자 + // 그 외 mall API (장바구니·주문·결제·배송·찜·CS·회원·AI) — 인증 사용자 .requestMatchers("/api/mall/**").authenticated() - // UIWS system(권한관리) 이식: 공개 룩업(부서/거래처 트리)은 무인증, 시스템관리 API 는 운영자(ADMIN/MANAGER) - .requestMatchers("/api/public/**").permitAll() - .requestMatchers("/api/system/**").hasAnyRole("ADMIN", "MANAGER") // 나머지 모든 API/WS/Actuator는 인증 (아래 SPA permit 보다 먼저 — API 노출 방지) .requestMatchers("/api/**", "/ws/**", "/actuator/**").authenticated() // 스토어프론트 SPA 딥링크(/app·/cart·/events·/category·/product·/checkout·/mypage·/orders·/search 등) diff --git a/backend/src/main/java/com/zioinfo/mall/member/MemberController.java b/backend/src/main/java/com/zioinfo/mall/member/MemberController.java index e3cf1e0..88d43cf 100644 --- a/backend/src/main/java/com/zioinfo/mall/member/MemberController.java +++ b/backend/src/main/java/com/zioinfo/mall/member/MemberController.java @@ -5,12 +5,10 @@ import com.zioinfo.mall.integration.CrmClient; import com.zioinfo.mall.integration.ItsmSecuritySanitizer; import com.zioinfo.mall.member.mapper.MemberMapper; import lombok.RequiredArgsConstructor; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.core.Authentication; import org.springframework.web.bind.annotation.*; import java.util.LinkedHashMap; -import java.util.List; import java.util.Map; /** 회원 API — /api/mall/member. 본인 프로필 + CRM 인사이트 연계(새니타이즈). */ @@ -34,27 +32,6 @@ public class MemberController { return ApiResponse.ok(mapper.findByUsername(auth.getName())); } - /** - * 관리자 회원 목록/검색 — MANAGER+ 전용. - * - * 보안 불변: 이메일·전화번호는 매퍼에서 마스킹된 값만, 상세 주소는 비포함(MallMemberSummary). - * 주문수·누적결제액 집계 동반. 키워드(아이디/이름)·등급 필터 지원. - */ - @GetMapping("/admin") - @PreAuthorize("hasAnyRole('ADMIN','MANAGER')") - public ApiResponse> adminList( - @RequestParam(required = false) String keyword, - @RequestParam(required = false) String tier, - @RequestParam(defaultValue = "100") int limit) { - int safeLimit = (limit <= 0 || limit > 500) ? 100 : limit; - List items = mapper.adminList(keyword, tier, safeLimit); - int total = mapper.countAdminList(keyword, tier); - Map out = new LinkedHashMap<>(); - out.put("items", items); - out.put("total", total); - return ApiResponse.ok(out); - } - /** CRM 고객 인사이트(구매 성향) — 응답은 ItsmSecuritySanitizer로 정제. */ @GetMapping("/me/insight") public ApiResponse> insight(Authentication auth) { diff --git a/backend/src/main/java/com/zioinfo/mall/member/mapper/MemberMapper.java b/backend/src/main/java/com/zioinfo/mall/member/mapper/MemberMapper.java index 30ceac8..b0d8f86 100644 --- a/backend/src/main/java/com/zioinfo/mall/member/mapper/MemberMapper.java +++ b/backend/src/main/java/com/zioinfo/mall/member/mapper/MemberMapper.java @@ -1,21 +1,11 @@ package com.zioinfo.mall.member.mapper; import com.zioinfo.mall.member.MallMember; -import com.zioinfo.mall.member.MallMemberSummary; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import java.util.List; - @Mapper public interface MemberMapper { MallMember findByUsername(@Param("username") String username); int upsert(MallMember m); - - /** 관리자 회원 목록(검색·등급 필터). 주문수/매출 집계 포함, PII 비노출. */ - List adminList(@Param("keyword") String keyword, - @Param("tier") String tier, - @Param("limit") int limit); - - int countAdminList(@Param("keyword") String keyword, @Param("tier") String tier); } diff --git a/backend/src/main/java/com/zioinfo/mall/subscription/SubscriptionController.java b/backend/src/main/java/com/zioinfo/mall/subscription/SubscriptionController.java index 5a8b4ac..5760da9 100644 --- a/backend/src/main/java/com/zioinfo/mall/subscription/SubscriptionController.java +++ b/backend/src/main/java/com/zioinfo/mall/subscription/SubscriptionController.java @@ -47,33 +47,11 @@ public class SubscriptionController { if (s == null || !s.getOwner().equals(auth.getName())) { throw new RuntimeException("ERR-SUB-403: 본인 구독만 변경할 수 있습니다"); } - mapper.updateStatus(id, normalizeStatus(req.get("status"))); + String to = req.getOrDefault("status", "ACTIVE").toUpperCase(); + mapper.updateStatus(id, to); return ApiResponse.ok(mapper.findById(id)); } - /** - * 관리자 구독 상태 변경(일시정지/재개/취소) — MANAGER+ 전용. 소유자 제한 없음. - */ - @PutMapping("/admin/{id}/status") - @PreAuthorize("hasAnyRole('ADMIN','MANAGER')") - public ApiResponse adminStatus(@PathVariable Long id, @RequestBody Map req) { - MallSubscription s = mapper.findById(id); - if (s == null) { - throw new RuntimeException("ERR-SUB-404: 구독을 찾을 수 없습니다"); - } - mapper.updateStatus(id, normalizeStatus(req.get("status"))); - return ApiResponse.ok(mapper.findById(id)); - } - - /** 허용 상태(ACTIVE/PAUSED/CANCELLED)만 통과. */ - private String normalizeStatus(String raw) { - String to = raw == null ? "ACTIVE" : raw.toUpperCase(); - if (!to.equals("ACTIVE") && !to.equals("PAUSED") && !to.equals("CANCELLED")) { - throw new IllegalArgumentException("ERR-SUB-400: 허용되지 않는 상태입니다"); - } - return to; - } - private LocalDate nextDate(String freq) { LocalDate base = LocalDate.now(); if ("MONTHLY".equalsIgnoreCase(freq)) return base.plusMonths(1); diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index a0595f7..393865a 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -8,20 +8,12 @@ spring: username: ${DB_USER:mall_user} password: ${DB_PASS:mall_pass2026} driver-class-name: org.postgresql.Driver - # UIWS 이식: 부팅 시 91_uiws_port.sql(업무 9테이블 + mall_account 2FA ALTER) 멱등 적용. - # 전부 IF NOT EXISTS / ADD COLUMN IF NOT EXISTS / ON CONFLICT DO NOTHING → mode:always 재실행 안전. - # schema.sql 은 deploy_server 가 psql 로 별도 적용(비멱등 시드 충돌 회피 위해 여기 미포함). - sql: - init: - mode: ${SQL_INIT_MODE:always} - schema-locations: classpath:db/91_uiws_port.sql,classpath:db/92_uiws_system.sql,classpath:db/93_auth_otp.sql,classpath:db/104_seed_ai_config.sql - continue-on-error: true servlet: multipart: max-file-size: 20MB max-request-size: 20MB mybatis: - mapper-locations: classpath:mapper/**/*.xml # ** : 하위 mapper/uiws/*.xml(UIWS 이식) 포함 + mapper-locations: classpath:mapper/*.xml configuration: map-underscore-to-camel-case: true log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl @@ -42,34 +34,13 @@ mall: provider: ${MALL_SMS_PROVIDER:mock} # mock | twilio email: provider: ${MALL_EMAIL_PROVIDER:mock} # mock | sendgrid - # ── UIWS 이식: 2FA(운영 로그인) + 첨부 업로드 설정 (mall.uiws.*) ────────────── - uiws: - auth: - twofa-enabled: ${UIWS_2FA:true} # off=운영 로그인도 단일 JWT(회귀 0). 고객(USER)은 항상 미적용. - verify-token-validity-seconds: 300 # 1차 통과 후 verify-token 5분 - email-code-validity-seconds: 300 # 이메일 인증코드 5분 - max-login-fail: 5 # 실패 5회 시 운영 계정 잠금 - mail: - mode: ${UIWS_MAIL_MODE:log} # LogMailSender 폴백(외부 API 0). smtp 는 설정 시만. - upload: - upload-dir: ${UIWS_UPLOAD_DIR:./uploads/uiws} guardia: itsm-url: ${ITSM_URL:http://localhost:9001} erp-url: ${ERP_URL:http://localhost:8003} crm-url: ${CRM_URL:http://localhost:8004} ocr-url: ${OCR_URL:http://localhost:8005} ollama-url: ${OLLAMA_URL:http://localhost:11434} - ollama-text-model: ${OLLAMA_TEXT_MODEL:llama3.2:1b} - # 로컬 임베디드 DuckDB 학습 저장소 파일(솔루션 격리). 경로 미가용/드라이버 부재 시 자동 비활성(no-op). - mall: - learning: - duckdb-path: ${MALL_LEARNING_DUCKDB:/opt/guardia-mall/data/mall_learning.duckdb} - # 중앙 guardia-rag(온프레미스 전용) — 최신 AI 기법 경유. 미가용 시 Mall 로컬 폴백(degraded) - rag: - base-url: ${RAG_URL:http://127.0.0.1:8020} - timeout-ms: ${RAG_TIMEOUT_MS:120000} - enabled: ${RAG_ENABLED:true} - solution: mall + ollama-text-model: ${OLLAMA_TEXT_MODEL:llama3} crypto: secret: ${CRYPTO_SECRET:guardia-mall-aes-256-gcm-master-key-2026-zioinfo} jwt: diff --git a/backend/src/main/resources/db/schema.sql b/backend/src/main/resources/db/schema.sql index e73723d..e8783cf 100644 --- a/backend/src/main/resources/db/schema.sql +++ b/backend/src/main/resources/db/schema.sql @@ -47,20 +47,7 @@ INSERT INTO mall_setting (key, value) VALUES ('hours_saturday','Sat 9:00 AM - 4:00 PM'), ('hours_sunday','Sun 9:00 AM - 12:00 PM'), ('payment_provider','mock'),('tax_provider','mock'),('address_provider','mock'), -('sms_provider','mock'),('email_provider','mock'), --- 최신 AI 기법(중앙 guardia-rag) 토글 — 무거운 기법(graphrag·rerank·tool_use·stream)은 서버 RAM 제약상 기본 off -('rag.enabled','true'), -('rag.retrieval_mode','vector'), -('rag.rerank','false'), -('rag.graphrag','false'), -('rag.tool_use','false'), -('rag.structured','true'), -('rag.stream','false'), -('rag.top_k','6'), -('rag.agent_max_steps','4'), -('rag.faithfulness_threshold','0.5'), -('rag.temperature','0.2'), -('rag.generation_model','llama3.2:1b') +('sms_provider','mock'),('email_provider','mock') ON CONFLICT (key) DO NOTHING; CREATE TABLE IF NOT EXISTS mall_ai_result ( diff --git a/backend/src/main/resources/mapper/AdminUserMapper.xml b/backend/src/main/resources/mapper/AdminUserMapper.xml index 37a801c..0279811 100644 --- a/backend/src/main/resources/mapper/AdminUserMapper.xml +++ b/backend/src/main/resources/mapper/AdminUserMapper.xml @@ -32,7 +32,6 @@ UPDATE mall_account SET role = #{role} WHERE id = #{id} UPDATE mall_account SET is_active = #{active} WHERE id = #{id} UPDATE mall_account SET password_hash = #{passwordHash} WHERE id = #{id} - UPDATE mall_account SET otp_secret = NULL, otp_enabled = false WHERE id = #{id} DELETE FROM mall_account WHERE id = #{id} diff --git a/backend/src/main/resources/mapper/MemberMapper.xml b/backend/src/main/resources/mapper/MemberMapper.xml index a6e7e01..9430eb6 100644 --- a/backend/src/main/resources/mapper/MemberMapper.xml +++ b/backend/src/main/resources/mapper/MemberMapper.xml @@ -11,44 +11,4 @@ display_name = EXCLUDED.display_name, email = EXCLUDED.email, phone = EXCLUDED.phone, default_zip = EXCLUDED.default_zip, default_address = EXCLUDED.default_address - - - - - - AND (m.username ILIKE '%' || #{keyword} || '%' OR m.display_name ILIKE '%' || #{keyword} || '%') - - AND m.tier = #{tier} - - - - - SELECT - m.id, m.username, m.display_name AS displayName, - CASE WHEN m.email IS NULL OR m.email = '' THEN NULL - WHEN POSITION('@' IN m.email) > 2 - THEN SUBSTRING(m.email FROM 1 FOR 2) || '***' || SUBSTRING(m.email FROM POSITION('@' IN m.email)) - ELSE '***' || SUBSTRING(m.email FROM POSITION('@' IN m.email)) END AS emailMasked, - CASE WHEN m.phone IS NULL OR LENGTH(m.phone) < 4 THEN NULL - ELSE '***-****-' || SUBSTRING(m.phone FROM LENGTH(m.phone) - 3) END AS phoneMasked, - m.default_zip AS defaultZip, m.tier, m.created_at AS createdAt, - COALESCE(o.order_count, 0) AS orderCount, - COALESCE(o.total_spent, 0) AS totalSpent - FROM mall_member m - LEFT JOIN ( - SELECT owner, COUNT(*) AS order_count, SUM(COALESCE(pay_amount, total_amount, 0)) AS total_spent - FROM mall_order WHERE status NOT IN ('CANCELLED','REFUNDED','FAILED') GROUP BY owner - ) o ON o.owner = m.username - - ORDER BY m.created_at DESC - LIMIT #{limit} - - - - SELECT COUNT(*) FROM mall_member m - diff --git a/backend/src/main/resources/mapper/UserMapper.xml b/backend/src/main/resources/mapper/UserMapper.xml index 6982967..a9d98da 100644 --- a/backend/src/main/resources/mapper/UserMapper.xml +++ b/backend/src/main/resources/mapper/UserMapper.xml @@ -11,21 +11,10 @@ - - - - - - - - - - - SELECT id, username, password_hash, role, display_name, is_active, created_at, - email, email_verify_code, email_verify_expire, login_fail_count, locked, otp_secret, otp_enabled, approved + SELECT id, username, password_hash, role, display_name, is_active, created_at FROM mall_account WHERE username = #{username} @@ -40,42 +29,4 @@ SELECT COUNT(*) FROM mall_account WHERE username = #{username} - - - - SELECT COUNT(*) FROM mall_account WHERE email = #{email} - - - - - INSERT INTO mall_account (username, password_hash, display_name, role, email, - is_active, approved, login_fail_count, locked) - VALUES (#{username}, #{passwordHash}, #{displayName}, 'MANAGER', #{email}, - true, false, 0, false) - - - - SELECT id, username, password_hash, role, display_name, is_active, created_at, - email, email_verify_code, email_verify_expire, login_fail_count, locked, otp_secret, otp_enabled, approved - FROM mall_account - WHERE display_name = #{displayName} AND email = #{email} - ORDER BY id - LIMIT 1 - - - - SELECT id, username, password_hash, role, display_name, is_active, created_at, - email, email_verify_code, email_verify_expire, login_fail_count, locked, otp_secret, otp_enabled, approved - FROM mall_account - WHERE username = #{username} AND email = #{email} - - - - - UPDATE mall_account - SET password_hash = #{passwordHash}, locked = false, login_fail_count = 0 - WHERE username = #{username} - - diff --git a/backend/src/main/resources/static/assets/index-BzL8NSpt.css b/backend/src/main/resources/static/assets/index-BzL8NSpt.css new file mode 100644 index 0000000..c3c6ffa --- /dev/null +++ b/backend/src/main/resources/static/assets/index-BzL8NSpt.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.-bottom-24{bottom:-6rem}.-bottom-6{bottom:-1.5rem}.-bottom-\[1px\]{bottom:-1px}.-left-20{left:-5rem}.-right-1{right:-.25rem}.-right-16{right:-4rem}.-top-1{top:-.25rem}.-top-20{top:-5rem}.bottom-0{bottom:0}.bottom-7{bottom:1.75rem}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-5{right:1.25rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.top-5{top:1.25rem}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-\[1\]{z-index:1}.z-\[2\]{z-index:2}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.m-auto{margin:auto}.mx-auto{margin-left:auto;margin-right:auto}.-mt-0\.5{margin-top:-.125rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-7{margin-bottom:1.75rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[4\/5\]{aspect-ratio:4/5}.aspect-\[5\/4\]{aspect-ratio:5/4}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-44{height:11rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-9{height:2.25rem}.h-\[18px\]{height:18px}.h-\[2px\]{height:2px}.h-\[72px\]{height:72px}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:8rem}.min-h-\[78vh\]{min-height:78vh}.min-h-screen{min-height:100vh}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-32{width:8rem}.w-44{width:11rem}.w-48{width:12rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[360px\]{width:360px}.w-auto{width:auto}.w-full{width:100%}.min-w-\[18px\]{min-width:18px}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes heartbeat{0%,to{transform:scale(1)}30%{transform:scale(1.3)}60%{transform:scale(.95)}}.animate-heartbeat{animation:heartbeat .6s ease-in-out}.cursor-not-allowed{cursor:not-allowed}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.gap-8{gap:2rem}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-20>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-blush-100\/60>:not([hidden])~:not([hidden]){border-color:#fbe8ef99}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.75rem}.rounded-4xl{border-radius:2.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-amber-400\/30{border-color:#fbbf244d}.border-amber-500\/30{border-color:#f59e0b4d}.border-bloom{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.border-blush-100{--tw-border-opacity: 1;border-color:rgb(251 232 239 / var(--tw-border-opacity, 1))}.border-blush-100\/60{border-color:#fbe8ef99}.border-blush-100\/70{border-color:#fbe8efb3}.border-blush-400{--tw-border-opacity: 1;border-color:rgb(224 122 156 / var(--tw-border-opacity, 1))}.border-blush-50{--tw-border-opacity: 1;border-color:rgb(253 244 247 / var(--tw-border-opacity, 1))}.border-blush-500{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.border-brand{--tw-border-opacity: 1;border-color:rgb(0 160 200 / var(--tw-border-opacity, 1))}.border-cream\/10{border-color:#fdfaf51a}.border-edge{--tw-border-opacity: 1;border-color:rgb(38 48 74 / var(--tw-border-opacity, 1))}.border-edge\/50{border-color:#26304a80}.border-emerald-500\/30{border-color:#10b9814d}.border-rose-500\/30{border-color:#f43f5e4d}.border-sky-500\/30{border-color:#0ea5e94d}.border-slate-300\/30{border-color:#cbd5e14d}.border-slate-500\/30{border-color:#64748b4d}.border-slate-600\/30{border-color:#4755694d}.border-violet-500\/30{border-color:#8b5cf64d}.border-white\/70{border-color:#ffffffb3}.bg-amber-400\/15{background-color:#fbbf2426}.bg-amber-500\/15{background-color:#f59e0b26}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-bloom{--tw-bg-opacity: 1;background-color:rgb(208 90 130 / var(--tw-bg-opacity, 1))}.bg-blush-50{--tw-bg-opacity: 1;background-color:rgb(253 244 247 / var(--tw-bg-opacity, 1))}.bg-blush-500{--tw-bg-opacity: 1;background-color:rgb(208 90 130 / var(--tw-bg-opacity, 1))}.bg-brand{--tw-bg-opacity: 1;background-color:rgb(0 160 200 / var(--tw-bg-opacity, 1))}.bg-brand2{--tw-bg-opacity: 1;background-color:rgb(0 90 140 / var(--tw-bg-opacity, 1))}.bg-card{--tw-bg-opacity: 1;background-color:rgb(26 34 52 / var(--tw-bg-opacity, 1))}.bg-card\/60{background-color:#1a223499}.bg-cream{--tw-bg-opacity: 1;background-color:rgb(253 250 245 / var(--tw-bg-opacity, 1))}.bg-cream\/10{background-color:#fdfaf51a}.bg-cream\/90{background-color:#fdfaf5e6}.bg-emerald-500\/15{background-color:#10b98126}.bg-gold{--tw-bg-opacity: 1;background-color:rgb(196 163 90 / var(--tw-bg-opacity, 1))}.bg-ink{--tw-bg-opacity: 1;background-color:rgb(11 15 23 / var(--tw-bg-opacity, 1))}.bg-ivory{--tw-bg-opacity: 1;background-color:rgb(251 246 238 / var(--tw-bg-opacity, 1))}.bg-leaf\/10{background-color:#4e6e431a}.bg-panel{--tw-bg-opacity: 1;background-color:rgb(19 25 39 / var(--tw-bg-opacity, 1))}.bg-petal{--tw-bg-opacity: 1;background-color:rgb(251 232 239 / var(--tw-bg-opacity, 1))}.bg-rose-500\/15{background-color:#f43f5e26}.bg-sage-700{--tw-bg-opacity: 1;background-color:rgb(64 88 55 / var(--tw-bg-opacity, 1))}.bg-sage-800{--tw-bg-opacity: 1;background-color:rgb(54 72 47 / var(--tw-bg-opacity, 1))}.bg-sky-500\/15{background-color:#0ea5e926}.bg-slate-300\/20{background-color:#cbd5e133}.bg-slate-500\/15{background-color:#64748b26}.bg-slate-600\/20{background-color:#47556933}.bg-transparent{background-color:transparent}.bg-violet-500\/15{background-color:#8b5cf626}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/15{background-color:#ffffff26}.bg-white\/45{background-color:#ffffff73}.bg-white\/60{background-color:#fff9}.bg-white\/70{background-color:#ffffffb3}.bg-white\/85{background-color:#ffffffd9}.bg-white\/90{background-color:#ffffffe6}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from: #fbbf24 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 191 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bloom2{--tw-gradient-from: #993456 var(--tw-gradient-from-position);--tw-gradient-to: rgb(153 52 86 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-100{--tw-gradient-from: #fbe8ef var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 232 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-50{--tw-gradient-from: #fdf4f7 var(--tw-gradient-from-position);--tw-gradient-to: rgb(253 244 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-900\/10{--tw-gradient-from: rgb(107 42 65 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-900\/70{--tw-gradient-from: rgb(107 42 65 / .7) var(--tw-gradient-from-position);--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-900\/75{--tw-gradient-from: rgb(107 42 65 / .75) var(--tw-gradient-from-position);--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-sage-700{--tw-gradient-from: #405837 var(--tw-gradient-from-position);--tw-gradient-to: rgb(64 88 55 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-sage-900\/40{--tw-gradient-from: rgb(46 61 41 / .4) var(--tw-gradient-from-position);--tw-gradient-to: rgb(46 61 41 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-300{--tw-gradient-from: #cbd5e1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(203 213 225 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-400{--tw-gradient-from: #94a3b8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(148 163 184 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500{--tw-gradient-from: #8b5cf6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-blush-900\/20{--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(107 42 65 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blush-900\/40{--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(107 42 65 / .4) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cream{--tw-gradient-to: rgb(253 250 245 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #fdfaf5 var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-amber-500{--tw-gradient-to: #f59e0b var(--tw-gradient-to-position)}.to-bloom{--tw-gradient-to: #d05a82 var(--tw-gradient-to-position)}.to-fuchsia-500{--tw-gradient-to: #d946ef var(--tw-gradient-to-position)}.to-ivory{--tw-gradient-to: #fbf6ee var(--tw-gradient-to-position)}.to-sage-100{--tw-gradient-to: #e6ede2 var(--tw-gradient-to-position)}.to-sage-50{--tw-gradient-to: #f4f7f3 var(--tw-gradient-to-position)}.to-sage-800{--tw-gradient-to: #36482f var(--tw-gradient-to-position)}.to-slate-400{--tw-gradient-to: #94a3b8 var(--tw-gradient-to-position)}.to-slate-500{--tw-gradient-to: #64748b var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-14{padding-top:3.5rem;padding-bottom:3.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1\.5{padding-bottom:.375rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.text-\[20px\]{font-size:20px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-\[1\.05\]{line-height:1.05}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[0\.12em\]{letter-spacing:.12em}.tracking-\[0\.25em\]{letter-spacing:.25em}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-\[0\.35em\]{letter-spacing:.35em}.tracking-\[0\.3em\]{letter-spacing:.3em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#3c4043\]{--tw-text-opacity: 1;color:rgb(60 64 67 / var(--tw-text-opacity, 1))}.text-\[\#43343a\]{--tw-text-opacity: 1;color:rgb(67 52 58 / var(--tw-text-opacity, 1))}.text-\[\#5a474d\]{--tw-text-opacity: 1;color:rgb(90 71 77 / var(--tw-text-opacity, 1))}.text-\[\#6b5258\]{--tw-text-opacity: 1;color:rgb(107 82 88 / var(--tw-text-opacity, 1))}.text-\[\#8a7077\]{--tw-text-opacity: 1;color:rgb(138 112 119 / var(--tw-text-opacity, 1))}.text-\[\#a08a90\]{--tw-text-opacity: 1;color:rgb(160 138 144 / var(--tw-text-opacity, 1))}.text-\[\#e6edf6\]{--tw-text-opacity: 1;color:rgb(230 237 246 / var(--tw-text-opacity, 1))}.text-accent{--tw-text-opacity: 1;color:rgb(61 220 151 / var(--tw-text-opacity, 1))}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-bloom{--tw-text-opacity: 1;color:rgb(208 90 130 / var(--tw-text-opacity, 1))}.text-bloom\/30{color:#d05a824d}.text-bloom\/40{color:#d05a8266}.text-bloom2{--tw-text-opacity: 1;color:rgb(153 52 86 / var(--tw-text-opacity, 1))}.text-blush-200{--tw-text-opacity: 1;color:rgb(246 205 218 / var(--tw-text-opacity, 1))}.text-blush-200\/40{color:#f6cdda66}.text-blush-300{--tw-text-opacity: 1;color:rgb(238 167 190 / var(--tw-text-opacity, 1))}.text-blush-400{--tw-text-opacity: 1;color:rgb(224 122 156 / var(--tw-text-opacity, 1))}.text-blush-500{--tw-text-opacity: 1;color:rgb(208 90 130 / var(--tw-text-opacity, 1))}.text-blush-600{--tw-text-opacity: 1;color:rgb(184 67 107 / var(--tw-text-opacity, 1))}.text-blush-700{--tw-text-opacity: 1;color:rgb(153 52 86 / var(--tw-text-opacity, 1))}.text-blush-900{--tw-text-opacity: 1;color:rgb(107 42 65 / var(--tw-text-opacity, 1))}.text-brand{--tw-text-opacity: 1;color:rgb(0 160 200 / var(--tw-text-opacity, 1))}.text-cream\/50{color:#fdfaf580}.text-cream\/60{color:#fdfaf599}.text-cream\/70{color:#fdfaf5b3}.text-cream\/75{color:#fdfaf5bf}.text-cream\/80{color:#fdfaf5cc}.text-cream\/85{color:#fdfaf5d9}.text-cream\/90{color:#fdfaf5e6}.text-cream\/95{color:#fdfaf5f2}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-gold{--tw-text-opacity: 1;color:rgb(196 163 90 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-ink{--tw-text-opacity: 1;color:rgb(11 15 23 / var(--tw-text-opacity, 1))}.text-leaf{--tw-text-opacity: 1;color:rgb(78 110 67 / var(--tw-text-opacity, 1))}.text-rose-400{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.text-sage-200{--tw-text-opacity: 1;color:rgb(205 221 198 / var(--tw-text-opacity, 1))}.text-sage-300{--tw-text-opacity: 1;color:rgb(168 195 158 / var(--tw-text-opacity, 1))}.text-sage-300\/40{color:#a8c39e66}.text-sage-600{--tw-text-opacity: 1;color:rgb(78 110 67 / var(--tw-text-opacity, 1))}.text-sage-700{--tw-text-opacity: 1;color:rgb(64 88 55 / var(--tw-text-opacity, 1))}.text-sage-800{--tw-text-opacity: 1;color:rgb(54 72 47 / var(--tw-text-opacity, 1))}.text-sky-400{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-violet-300{--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/20{color:#fff3}.text-white\/70{color:#ffffffb3}.text-white\/85{color:#ffffffd9}.line-through{text-decoration-line:line-through}.underline-offset-2{text-underline-offset:2px}.accent-bloom{accent-color:#d05a82}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-bloom{--tw-shadow: 0 20px 60px -18px rgba(153,52,86,.3);--tw-shadow-colored: 0 20px 60px -18px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-petal{--tw-shadow: 0 10px 40px -12px rgba(208,90,130,.25);--tw-shadow-colored: 0 10px 40px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-soft{--tw-shadow: 0 8px 30px -10px rgba(110,80,90,.18);--tw-shadow-colored: 0 8px 30px -10px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-bloom{--tw-shadow-color: #d05a82;--tw-shadow: var(--tw-shadow-colored)}.shadow-petal{--tw-shadow-color: #fbe8ef;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}:root{--blush: #d05a82;--blush-deep: #993456;--sage: #4e6e43;--cream: #fdfaf5;--gold: #c4a35a}body{margin:0;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:#43343a;background:var(--cream);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}*{box-sizing:border-box}html.lang-ko body,html.lang-ko .admin-shell,html.lang-ko input,html.lang-ko textarea,html.lang-ko select,html.lang-ko button,html.lang-ko p,html.lang-ko span,html.lang-ko a,html.lang-ko li,html.lang-ko td,html.lang-ko th,html.lang-ko label,html.lang-ko h1,html.lang-ko h2,html.lang-ko h3,html.lang-ko h4{font-family:Malgun Gothic,맑은 고딕,Apple SD Gothic Neo,Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}html.lang-ko .font-display{font-family:Cormorant Garamond,Malgun Gothic,맑은 고딕,Georgia,serif}html.lang-ko .font-serif{font-family:Playfair Display,Malgun Gothic,맑은 고딕,Georgia,serif}.admin-shell{color-scheme:dark;background:#0b0f17;color:#e6edf6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.font-display{font-family:Cormorant Garamond,Georgia,serif}.font-serif{font-family:Playfair Display,Georgia,serif}html{scroll-behavior:smooth}::-moz-selection{background:#d05a822e}::selection{background:#d05a822e}.botanical-divider{display:flex;align-items:center;justify-content:center;gap:.75rem;color:#a8c39e}.botanical-divider:before,.botanical-divider:after{content:"";height:1px;flex:1;max-width:7rem;background:linear-gradient(to var(--dir, right),transparent,rgba(168,195,158,.7))}.botanical-divider:before{--dir: left}.petal-layer{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;pointer-events:none;z-index:0}.petal{position:absolute;top:-8vh;border-radius:50% 0 50% 50%;background:radial-gradient(circle at 30% 30%,#eea7bef2,#d05a828c);opacity:0;will-change:transform,opacity;animation:petalfall linear infinite}.petal.sage{background:radial-gradient(circle at 30% 30%,#a8c39ee6,#648a5680)}.petal.cream{background:radial-gradient(circle at 30% 30%,#fdf6eef2,#c4a35a66)}.zoom-frame{overflow:hidden}.zoom-frame img{transition:transform .9s cubic-bezier(.22,1,.36,1)}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}.petal-layer{display:none}}.thin-scroll::-webkit-scrollbar{height:6px}.thin-scroll::-webkit-scrollbar-thumb{background:#d05a8240;border-radius:999px}.placeholder\:text-blush-300::-moz-placeholder{--tw-text-opacity: 1;color:rgb(238 167 190 / var(--tw-text-opacity, 1))}.placeholder\:text-blush-300::placeholder{--tw-text-opacity: 1;color:rgb(238 167 190 / var(--tw-text-opacity, 1))}.focus-within\:border-bloom:focus-within{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.hover\:border-bloom:hover{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.hover\:border-blush-300:hover{--tw-border-opacity: 1;border-color:rgb(238 167 190 / var(--tw-border-opacity, 1))}.hover\:bg-bloom2:hover{--tw-bg-opacity: 1;background-color:rgb(153 52 86 / var(--tw-bg-opacity, 1))}.hover\:bg-blush-100:hover{--tw-bg-opacity: 1;background-color:rgb(251 232 239 / var(--tw-bg-opacity, 1))}.hover\:bg-blush-50:hover{--tw-bg-opacity: 1;background-color:rgb(253 244 247 / var(--tw-bg-opacity, 1))}.hover\:bg-blush-600:hover{--tw-bg-opacity: 1;background-color:rgb(184 67 107 / var(--tw-bg-opacity, 1))}.hover\:bg-brand\/90:hover{background-color:#00a0c8e6}.hover\:bg-card\/60:hover{background-color:#1a223499}.hover\:bg-cream:hover{--tw-bg-opacity: 1;background-color:rgb(253 250 245 / var(--tw-bg-opacity, 1))}.hover\:bg-panel\/50:hover{background-color:#13192780}.hover\:bg-petal:hover{--tw-bg-opacity: 1;background-color:rgb(251 232 239 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/30:hover{background-color:#ffffff4d}.hover\:bg-white\/70:hover{background-color:#ffffffb3}.hover\:text-bloom:hover,.hover\:text-blush-500:hover{--tw-text-opacity: 1;color:rgb(208 90 130 / var(--tw-text-opacity, 1))}.hover\:text-blush-600:hover{--tw-text-opacity: 1;color:rgb(184 67 107 / var(--tw-text-opacity, 1))}.hover\:text-blush-700:hover{--tw-text-opacity: 1;color:rgb(153 52 86 / var(--tw-text-opacity, 1))}.hover\:text-brand:hover{--tw-text-opacity: 1;color:rgb(0 160 200 / var(--tw-text-opacity, 1))}.hover\:text-cream\/80:hover{color:#fdfaf5cc}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-bloom:hover{--tw-shadow: 0 20px 60px -18px rgba(153,52,86,.3);--tw-shadow-colored: 0 20px 60px -18px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-shadow-color: #d05a82;--tw-shadow: var(--tw-shadow-colored)}.focus\:border-bloom:focus{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.focus\:border-blush-300:focus{--tw-border-opacity: 1;border-color:rgb(238 167 190 / var(--tw-border-opacity, 1))}.focus\:border-blush-400:focus{--tw-border-opacity: 1;border-color:rgb(224 122 156 / var(--tw-border-opacity, 1))}.focus\:border-brand:focus{--tw-border-opacity: 1;border-color:rgb(0 160 200 / var(--tw-border-opacity, 1))}.disabled\:opacity-60:disabled{opacity:.6}.group:hover .group-hover\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:gap-2{gap:.5rem}.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width: 640px){.sm\:flex{display:flex}.sm\:flex-row{flex-direction:row}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:.75rem}}@media (min-width: 768px){.md\:left-5{left:1.25rem}.md\:right-5{right:1.25rem}.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:block{display:block}.md\:flex{display:flex}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[200px_1fr\]{grid-template-columns:200px 1fr}.md\:flex-row{flex-direction:row}.md\:p-10{padding:2.5rem}.md\:p-12{padding:3rem}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}.md\:text-6xl{font-size:3.75rem;line-height:1}}@media (min-width: 1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}} diff --git a/backend/src/main/resources/static/assets/index-CUN395kM.js b/backend/src/main/resources/static/assets/index-CUN395kM.js new file mode 100644 index 0000000..f0e4756 --- /dev/null +++ b/backend/src/main/resources/static/assets/index-CUN395kM.js @@ -0,0 +1,489 @@ +var wA=e=>{throw TypeError(e)};var Qg=(e,t,n)=>t.has(e)||wA("Cannot "+n);var R=(e,t,n)=>(Qg(e,t,"read from private field"),n?n.call(e):t.get(e)),ce=(e,t,n)=>t.has(e)?wA("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ee=(e,t,n,r)=>(Qg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Oe=(e,t,n)=>(Qg(e,t,"access private method"),n);var rh=(e,t,n,r)=>({set _(a){ee(e,t,a,n)},get _(){return R(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var ah=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $P={exports:{}},xy={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var az=Symbol.for("react.transitional.element"),iz=Symbol.for("react.fragment");function kP(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:az,type:e,key:r,ref:t!==void 0?t:null,props:n}}xy.Fragment=iz;xy.jsx=kP;xy.jsxs=kP;$P.exports=xy;var u=$P.exports,LP={exports:{}},be={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var aS=Symbol.for("react.transitional.element"),sz=Symbol.for("react.portal"),oz=Symbol.for("react.fragment"),lz=Symbol.for("react.strict_mode"),cz=Symbol.for("react.profiler"),uz=Symbol.for("react.consumer"),fz=Symbol.for("react.context"),dz=Symbol.for("react.forward_ref"),hz=Symbol.for("react.suspense"),pz=Symbol.for("react.memo"),zP=Symbol.for("react.lazy"),mz=Symbol.for("react.activity"),jA=Symbol.iterator;function yz(e){return e===null||typeof e!="object"?null:(e=jA&&e[jA]||e["@@iterator"],typeof e=="function"?e:null)}var IP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},BP=Object.assign,UP={};function Oc(e,t,n){this.props=e,this.context=t,this.refs=UP,this.updater=n||IP}Oc.prototype.isReactComponent={};Oc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Oc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function FP(){}FP.prototype=Oc.prototype;function iS(e,t,n){this.props=e,this.context=t,this.refs=UP,this.updater=n||IP}var sS=iS.prototype=new FP;sS.constructor=iS;BP(sS,Oc.prototype);sS.isPureReactComponent=!0;var AA=Array.isArray;function Fb(){}var at={H:null,A:null,T:null,S:null},VP=Object.prototype.hasOwnProperty;function oS(e,t,n){var r=n.ref;return{$$typeof:aS,type:e,key:t,ref:r!==void 0?r:null,props:n}}function gz(e,t){return oS(e.type,t,e.props)}function lS(e){return typeof e=="object"&&e!==null&&e.$$typeof===aS}function vz(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var OA=/\/+/g;function Zg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?vz(""+e.key):t.toString(36)}function bz(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Fb,Fb):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Bo(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case aS:case sz:s=!0;break;case zP:return s=e._init,Bo(s(e._payload),t,n,r,a)}}if(s)return a=a(e),s=r===""?"."+Zg(e,0):r,AA(a)?(n="",s!=null&&(n=s.replace(OA,"$&/")+"/"),Bo(a,t,n,"",function(c){return c})):a!=null&&(lS(a)&&(a=gz(a,n+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(OA,"$&/")+"/")+s)),t.push(a)),1;s=0;var o=r===""?".":r+":";if(AA(e))for(var l=0;l>>1,H=P[F];if(0>>1;Fa(te,I))Za(ye,te)?(P[F]=ye,P[Z]=I,F=Z):(P[F]=te,P[q]=I,F=q);else if(Za(ye,I))P[F]=ye,P[Z]=I,F=Z;else break e}}return k}function a(P,k){var I=P.sortIndex-k.sortIndex;return I!==0?I:P.id-k.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],c=[],f=1,d=null,h=3,p=!1,m=!1,g=!1,b=!1,y=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function w(P){for(var k=n(c);k!==null;){if(k.callback===null)r(c);else if(k.startTime<=P)r(c),k.sortIndex=k.expirationTime,t(l,k);else break;k=n(c)}}function S(P){if(g=!1,w(P),!m)if(n(l)!==null)m=!0,j||(j=!0,C());else{var k=n(c);k!==null&&$(S,k.startTime-P)}}var j=!1,O=-1,E=5,T=-1;function N(){return b?!0:!(e.unstable_now()-TP&&N());){var F=d.callback;if(typeof F=="function"){d.callback=null,h=d.priorityLevel;var H=F(d.expirationTime<=P);if(P=e.unstable_now(),typeof H=="function"){d.callback=H,w(P),k=!0;break t}d===n(l)&&r(l),w(P)}else r(l);d=n(l)}if(d!==null)k=!0;else{var Y=n(c);Y!==null&&$(S,Y.startTime-P),k=!1}}break e}finally{d=null,h=I,p=!1}k=void 0}}finally{k?C():j=!1}}}var C;if(typeof x=="function")C=function(){x(M)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,D=L.port2;L.port1.onmessage=M,C=function(){D.postMessage(null)}}else C=function(){y(M,0)};function $(P,k){O=y(function(){P(e.unstable_now())},k)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125F?(P.sortIndex=I,t(c,P),n(l)===null&&P===n(c)&&(g?(v(O),O=-1):g=!0,$(S,I-F))):(P.sortIndex=H,t(l,P),m||p||(m=!0,j||(j=!0,C()))),P},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(P){var k=h;return function(){var I=h;h=k;try{return P.apply(this,arguments)}finally{h=I}}}})(KP);qP.exports=KP;var wz=qP.exports,GP={exports:{}},vn={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var jz=A;function YP(e){var t="https://react.dev/errors/"+e;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(XP)}catch(e){console.error(e)}}XP(),GP.exports=vn;var Ez=GP.exports;/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var kt=wz,WP=A,Tz=Ez;function U(e){var t="https://react.dev/errors/"+e;if(1Ho||(e.current=Yb[Ho],Yb[Ho]=null,Ho--)}function Ze(e,t){Ho++,Yb[Ho]=e.current,e.current=t}var na=ua(null),cf=ua(null),ki=ua(null),wp=ua(null);function jp(e,t){switch(Ze(ki,t),Ze(cf,e),Ze(na,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?D2(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=D2(t),e=wD(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}qt(na),Ze(na,e)}function kl(){qt(na),qt(cf),qt(ki)}function Xb(e){e.memoizedState!==null&&Ze(wp,e);var t=na.current,n=wD(t,e.type);t!==n&&(Ze(cf,e),Ze(na,n))}function Ap(e){cf.current===e&&(qt(na),qt(cf)),wp.current===e&&(qt(wp),xf._currentValue=Fs)}var Jg,CA;function ps(e){if(Jg===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jg=t&&t[1]||"",CA=-1)":-1a||l[r]!==c[a]){var f=` +`+l[r].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=r&&0<=a);break}}}finally{ev=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ps(n):""}function Mz(e,t){switch(e.tag){case 26:case 27:case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return e.child!==t&&t!==null?ps("Suspense Fallback"):ps("Suspense");case 19:return ps("SuspenseList");case 0:case 15:return tv(e.type,!1);case 11:return tv(e.type.render,!1);case 1:return tv(e.type,!0);case 31:return ps("Activity");default:return""}}function _A(e){try{var t="",n=null;do t+=Mz(e,n),n=e,e=e.return;while(e);return t}catch(r){return` +Error generating stack: `+r.message+` +`+r.stack}}var Wb=Object.prototype.hasOwnProperty,fS=kt.unstable_scheduleCallback,nv=kt.unstable_cancelCallback,Rz=kt.unstable_shouldYield,Dz=kt.unstable_requestPaint,qn=kt.unstable_now,$z=kt.unstable_getCurrentPriorityLevel,rM=kt.unstable_ImmediatePriority,aM=kt.unstable_UserBlockingPriority,Op=kt.unstable_NormalPriority,kz=kt.unstable_LowPriority,iM=kt.unstable_IdlePriority,Lz=kt.log,zz=kt.unstable_setDisableYieldValue,wd=null,Kn=null;function Ci(e){if(typeof Lz=="function"&&zz(e),Kn&&typeof Kn.setStrictMode=="function")try{Kn.setStrictMode(wd,e)}catch{}}var Gn=Math.clz32?Math.clz32:Uz,Iz=Math.log,Bz=Math.LN2;function Uz(e){return e>>>=0,e===0?32:31-(Iz(e)/Bz|0)|0}var oh=256,lh=262144,ch=4194304;function ms(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function jy(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var a=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~i,r!==0?a=ms(r):(s&=o,s!==0?a=ms(s):n||(n=o&~e,n!==0&&(a=ms(n))))):(o=r&~i,o!==0?a=ms(o):s!==0?a=ms(s):n||(n=r&~e,n!==0&&(a=ms(n)))),a===0?0:t!==0&&t!==a&&!(t&i)&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function jd(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fz(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sM(){var e=ch;return ch<<=1,!(ch&62914560)&&(ch=4194304),e}function rv(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ad(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Vz(e,t,n,r,a,i){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Xz=/[\n"\\]/g;function fr(e){return e.replace(Xz,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Jb(e,t,n,r,a,i,s,o){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+lr(t)):e.value!==""+lr(t)&&(e.value=""+lr(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?e0(e,s,lr(t)):n!=null?e0(e,s,lr(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+lr(o):e.removeAttribute("name")}function mM(e,t,n,r,a,i,s,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Zb(e);return}n=n!=null?""+lr(n):"",t=t!=null?""+lr(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Zb(e)}function e0(e,t,n){t==="number"&&Ep(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function dl(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),n0=!1;if(Ha)try{var eu={};Object.defineProperty(eu,"passive",{get:function(){n0=!0}}),window.addEventListener("test",eu,eu),window.removeEventListener("test",eu,eu)}catch{n0=!1}var _i=null,gS=null,Qh=null;function xM(){if(Qh)return Qh;var e,t=gS,n=t.length,r,a="value"in _i?_i.value:_i.textContent,i=a.length;for(e=0;e=Du),UA=" ",FA=!1;function wM(e,t){switch(e){case"keyup":return jI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Go=!1;function OI(e,t){switch(e){case"compositionend":return jM(t);case"keypress":return t.which!==32?null:(FA=!0,UA);case"textInput":return e=t.data,e===UA&&FA?null:e;default:return null}}function EI(e,t){if(Go)return e==="compositionend"||!bS&&wM(e,t)?(e=xM(),Qh=gS=_i=null,Go=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=GA(n)}}function TM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?TM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function NM(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ep(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ep(e.document)}return t}function xS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var DI=Ha&&"documentMode"in document&&11>=document.documentMode,Yo=null,r0=null,ku=null,a0=!1;function XA(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;a0||Yo==null||Yo!==Ep(r)||(r=Yo,"selectionStart"in r&&xS(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ku&&df(ku,r)||(ku=r,r=Hp(r0,"onSelect"),0>=s,a-=s,Yr=1<<32-Gn(t)+a|n<E?(T=O,O=null):T=O.sibling;var N=h(y,O,x[E],w);if(N===null){O===null&&(O=T);break}e&&O&&N.alternate===null&&t(y,O),v=i(N,v,E),j===null?S=N:j.sibling=N,j=N,O=T}if(E===x.length)return n(y,O),Ce&&Oa(y,E),S;if(O===null){for(;EE?(T=O,O=null):T=O.sibling;var M=h(y,O,N.value,w);if(M===null){O===null&&(O=T);break}e&&O&&M.alternate===null&&t(y,O),v=i(M,v,E),j===null?S=M:j.sibling=M,j=M,O=T}if(N.done)return n(y,O),Ce&&Oa(y,E),S;if(O===null){for(;!N.done;E++,N=x.next())N=d(y,N.value,w),N!==null&&(v=i(N,v,E),j===null?S=N:j.sibling=N,j=N);return Ce&&Oa(y,E),S}for(O=r(O);!N.done;E++,N=x.next())N=p(O,y,E,N.value,w),N!==null&&(e&&N.alternate!==null&&O.delete(N.key===null?E:N.key),v=i(N,v,E),j===null?S=N:j.sibling=N,j=N);return e&&O.forEach(function(C){return t(y,C)}),Ce&&Oa(y,E),S}function b(y,v,x,w){if(typeof x=="object"&&x!==null&&x.type===Vo&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case sh:e:{for(var S=x.key;v!==null;){if(v.key===S){if(S=x.type,S===Vo){if(v.tag===7){n(y,v.sibling),w=a(v,x.props.children),w.return=y,y=w;break e}}else if(v.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===hi&&ys(S)===v.type){n(y,v.sibling),w=a(v,x.props),nu(w,x),w.return=y,y=w;break e}n(y,v);break}else t(y,v);v=v.sibling}x.type===Vo?(w=Vs(x.props.children,y.mode,w,x.key),w.return=y,y=w):(w=Jh(x.type,x.key,x.props,null,y.mode,w),nu(w,x),w.return=y,y=w)}return s(y);case wu:e:{for(S=x.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){n(y,v.sibling),w=a(v,x.children||[]),w.return=y,y=w;break e}else{n(y,v);break}else t(y,v);v=v.sibling}w=dv(x,y.mode,w),w.return=y,y=w}return s(y);case hi:return x=ys(x),b(y,v,x,w)}if(ju(x))return m(y,v,x,w);if(Jc(x)){if(S=Jc(x),typeof S!="function")throw Error(U(150));return x=S.call(x),g(y,v,x,w)}if(typeof x.then=="function")return b(y,v,hh(x),w);if(x.$$typeof===Ca)return b(y,v,dh(y,x),w);ph(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,v!==null&&v.tag===6?(n(y,v.sibling),w=a(v,x),w.return=y,y=w):(n(y,v),w=fv(x,y.mode,w),w.return=y,y=w),s(y)):n(y,v)}return function(y,v,x,w){try{mf=0;var S=b(y,v,x,w);return ml=null,S}catch(O){if(O===Cc||O===Cy)throw O;var j=Fn(29,O,null,y.mode);return j.lanes=w,j.return=y,j}finally{}}}var eo=VM(!0),HM=VM(!1),pi=!1;function CS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function f0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function zi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ii(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Me&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Np(e),$M(e,null,n),t}return Ny(e,r,t,n),Np(e)}function zu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lM(e,n)}}function pv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var d0=!1;function Iu(){if(d0){var e=pl;if(e!==null)throw e}}function Bu(e,t,n,r){d0=!1;var a=e.updateQueue;pi=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var l=o,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==s&&(o===null?f.firstBaseUpdate=c:o.next=c,f.lastBaseUpdate=l))}if(i!==null){var d=a.baseState;s=0,f=c=l=null,o=i;do{var h=o.lane&-536870913,p=h!==o.lane;if(p?(Te&h)===h:(r&h)===h){h!==0&&h===Il&&(d0=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,g=o;h=t;var b=n;switch(g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(b,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,h=typeof m=="function"?m.call(b,d,h):m,h==null)break e;d=it({},d,h);break e;case 2:pi=!0}}h=o.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=a.callbacks,p===null?a.callbacks=[h]:p.push(h))}else p={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(c=f=p,l=d):f=f.next=p,s|=h;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);f===null&&(l=d),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=f,i===null&&(a.shared.lanes=0),Zi|=s,e.lanes=s,e.memoizedState=d}}function qM(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function KM(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ei?i:8;var s=he.T,o={};he.T=o,FS(e,!1,t,n);try{var l=a(),c=he.S;if(c!==null&&c(o,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var f=VI(l,r);Uu(e,t,f,Yn(e))}else Uu(e,t,r,Yn(e))}catch(d){Uu(e,t,{then:function(){},status:"rejected",reason:d},Yn())}finally{De.p=i,s!==null&&o.types!==null&&(s.types=o.types),he.T=s}}function XI(){}function g0(e,t,n,r){if(e.tag!==5)throw Error(U(476));var a=gR(e).queue;yR(e,a,t,Fs,n===null?XI:function(){return vR(e),n(r)})}function gR(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Fs,baseState:Fs,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:Fs},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vR(e){var t=gR(e);t.next===null&&(t=e.alternate.memoizedState),Uu(e,t.next.queue,{},Yn())}function US(){return en(xf)}function bR(){return wt().memoizedState}function xR(){return wt().memoizedState}function WI(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Yn();e=zi(n);var r=Ii(t,e,n);r!==null&&(Nn(r,t,n),zu(r,t,n)),t={cache:ES()},e.payload=t;return}t=t.return}}function QI(e,t,n){var r=Yn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ry(e)?wR(t,n):(n=wS(e,t,n,r),n!==null&&(Nn(n,e,r),jR(n,t,r)))}function SR(e,t,n){var r=Yn();Uu(e,t,n,r)}function Uu(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ry(e))wR(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,o=i(s,n);if(a.hasEagerState=!0,a.eagerState=o,Qn(o,s))return Ny(e,t,a,0),Ye===null&&Ty(),!1}catch{}finally{}if(n=wS(e,t,a,r),n!==null)return Nn(n,e,r),jR(n,t,r),!0}return!1}function FS(e,t,n,r){if(r={lane:2,revertLane:QS(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ry(e)){if(t)throw Error(U(479))}else t=wS(e,n,r,2),t!==null&&Nn(t,e,2)}function Ry(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function wR(e,t){yl=Dp=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function jR(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lM(e,n)}}var gf={readContext:en,use:Py,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};gf.useEffectEvent=pt;var AR={readContext:en,use:Py,useCallback:function(e,t){return fn().memoizedState=[e,t===void 0?null:t],e},useContext:en,useEffect:u2,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,np(4194308,4,fR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return np(4194308,4,e,t)},useInsertionEffect:function(e,t){np(4,2,e,t)},useMemo:function(e,t){var n=fn();t=t===void 0?null:t;var r=e();if(to){Ci(!0);try{e()}finally{Ci(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=fn();if(n!==void 0){var a=n(t);if(to){Ci(!0);try{n(t)}finally{Ci(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=QI.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=fn();return e={current:e},t.memoizedState=e},useState:function(e){e=m0(e);var t=e.queue,n=SR.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:IS,useDeferredValue:function(e,t){var n=fn();return BS(n,e,t)},useTransition:function(){var e=m0(!1);return e=yR.bind(null,xe,e.queue,!0,!1),fn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=xe,a=fn();if(Ce){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ye===null)throw Error(U(349));Te&127||QM(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,u2(JM.bind(null,r,i,e),[e]),r.flags|=2048,Ul(9,{destroy:void 0},ZM.bind(null,r,i,n,t),null),n},useId:function(){var e=fn(),t=Ye.identifierPrefix;if(Ce){var n=Xr,r=Yr;n=(r&~(1<<32-Gn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=$p++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?s.createElement(a,{is:r.is}):s.createElement(a)}}i[Qt]=t,i[_n]=r;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)i.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(tn(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ga(t)}}return et(t),wv(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ga(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(e=ki.current,_o(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Zt,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Qt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||SD(e.nodeValue,n)),e||Wi(t,!0)}else e=qp(e).createTextNode(r),e[Qt]=t,t.stateNode=e}return et(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=_o(t),n!==null){if(e===null){if(!r)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[Qt]=t}else Zs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;et(t),e=!1}else n=hv(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Un(t),t):(Un(t),null);if(t.flags&128)throw Error(U(558))}return et(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=_o(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(U(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(U(317));a[Qt]=t}else Zs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;et(t),a=!1}else a=hv(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Un(t),t):(Un(t),null)}return Un(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),mh(t,t.updateQueue),et(t),null);case 4:return kl(),e===null&&ZS(t.stateNode.containerInfo),et(t),null;case 10:return La(t.type),et(t),null;case 19:if(qt(xt),r=t.memoizedState,r===null)return et(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)ru(r,!1);else{if(vt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Rp(e),i!==null){for(t.flags|=128,ru(r,!1),e=i.updateQueue,t.updateQueue=e,mh(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)kM(n,e),n=n.sibling;return Ze(xt,xt.current&1|2),Ce&&Oa(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&qn()>Ip&&(t.flags|=128,a=!0,ru(r,!1),t.lanes=4194304)}else{if(!a)if(e=Rp(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,mh(t,e),ru(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Ce)return et(t),null}else 2*qn()-r.renderingStartTime>Ip&&n!==536870912&&(t.flags|=128,a=!0,ru(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=qn(),e.sibling=null,n=xt.current,Ze(xt,a?n&1|2:n&1),Ce&&Oa(t,r.treeForkCount),e):(et(t),null);case 22:case 23:return Un(t),_S(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),n=t.updateQueue,n!==null&&mh(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&qt(Hs),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),La(Tt),et(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function nB(e,t){switch(OS(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return La(Tt),kl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ap(t),null;case 31:if(t.memoizedState!==null){if(Un(t),t.alternate===null)throw Error(U(340));Zs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Un(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Zs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qt(xt),null;case 4:return kl(),null;case 10:return La(t.type),null;case 22:case 23:return Un(t),_S(),e!==null&&qt(Hs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return La(Tt),null;case 25:return null;default:return null}}function kR(e,t){switch(OS(t),t.tag){case 3:La(Tt),kl();break;case 26:case 27:case 5:Ap(t);break;case 4:kl();break;case 31:t.memoizedState!==null&&Un(t);break;case 13:Un(t);break;case 19:qt(xt);break;case 10:La(t.type);break;case 22:case 23:Un(t),_S(),e!==null&&qt(Hs);break;case 24:La(Tt)}}function Cd(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,s=n.inst;r=i(),s.destroy=r}n=n.next}while(n!==a)}}catch(o){Ue(t,t.return,o)}}function Qi(e,t,n){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var i=a.next;r=i;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(o!==void 0){s.destroy=void 0,a=t;var l=n,c=o;try{c()}catch(f){Ue(a,l,f)}}}r=r.next}while(r!==i)}}catch(f){Ue(t,t.return,f)}}function LR(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{KM(t,n)}catch(r){Ue(e,e.return,r)}}}function zR(e,t,n){n.props=no(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Ue(e,t,r)}}function Fu(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(a){Ue(e,t,a)}}function Wr(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){Ue(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Ue(e,t,a)}else n.current=null}function IR(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Ue(e,e.return,a)}}function jv(e,t,n){try{var r=e.stateNode;AB(r,e.type,n,t),r[_n]=t}catch(a){Ue(e,e.return,a)}}function BR(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ts(e.type)||e.tag===4}function Av(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||BR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ts(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function w0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_a));else if(r!==4&&(r===27&&ts(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(w0(e,t,n),e=e.sibling;e!==null;)w0(e,t,n),e=e.sibling}function zp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ts(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(zp(e,t,n),e=e.sibling;e!==null;)zp(e,t,n),e=e.sibling}function UR(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);tn(t,r,n),t[Qt]=e,t[_n]=n}catch(i){Ue(e,e.return,i)}}var Na=!1,Et=!1,Ov=!1,j2=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function rB(e,t){if(e=e.containerInfo,C0=Xp,e=NM(e),xS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,o=-1,l=-1,c=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==n||a!==0&&d.nodeType!==3||(o=s+a),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===a&&(o=s),h===i&&++f===r&&(l=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(_0={focusedElem:e,selectionRange:n},Xp=!1,Ft=t;Ft!==null;)if(t=Ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ft=e;else for(;Ft!==null;){switch(t=Ft,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),tn(i,r,n),i[Qt]=e,Vt(i),r=i;break e;case"link":var s=V2("link","href",a).get(r+(n.href||""));if(s){for(var o=0;ob&&(s=b,b=g,g=s);var y=YA(o,g),v=YA(o,b);if(y&&v&&(p.rangeCount!==1||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var x=d.createRange();x.setStart(y.node,y.offset),p.removeAllRanges(),g>b?(p.addRange(x),p.extend(v.node,v.offset)):(x.setEnd(v.node,v.offset),p.addRange(x))}}}}for(d=[],p=o;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;on?32:n,he.T=null,n=O0,O0=null;var i=Ui,s=za;if(Dt=0,Vl=Ui=null,za=0,Me&6)throw Error(U(331));var o=Me;if(Me|=4,ZR(i.current),XR(i,i.current,s,n),Me=o,_d(0,!1),Kn&&typeof Kn.onPostCommitFiberRoot=="function")try{Kn.onPostCommitFiberRoot(wd,i)}catch{}return!0}finally{De.p=a,he.T=r,hD(e,t)}}function T2(e,t,n){t=dr(n,t),t=b0(e.stateNode,t,2),e=Ii(e,t,2),e!==null&&(Ad(e,2),fa(e))}function Ue(e,t,n){if(e.tag===3)T2(e,e,n);else for(;t!==null;){if(t.tag===3){T2(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Bi===null||!Bi.has(r))){e=dr(n,e),n=CR(2),r=Ii(t,n,2),r!==null&&(_R(n,r,t,e),Ad(r,2),fa(r));break}}t=t.return}}function Tv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new sB;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(YS=!0,a.add(n),e=fB.bind(null,e,t,n),t.then(e,e))}function fB(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ye===e&&(Te&n)===n&&(vt===4||vt===3&&(Te&62914560)===Te&&300>qn()-Dy?!(Me&2)&&Hl(e,0):XS|=n,Fl===Te&&(Fl=0)),fa(e)}function mD(e,t){t===0&&(t=sM()),e=vo(e,t),e!==null&&(Ad(e,t),fa(e))}function dB(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),mD(e,n)}function hB(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(U(314))}r!==null&&r.delete(t),mD(e,n)}function pB(e,t){return fS(e,t)}var Fp=null,Fo=null,T0=!1,Vp=!1,Nv=!1,Ri=0;function fa(e){e!==Fo&&e.next===null&&(Fo===null?Fp=Fo=e:Fo=Fo.next=e),Vp=!0,T0||(T0=!0,yB())}function _d(e,t){if(!Nv&&Vp){Nv=!0;do for(var n=!1,r=Fp;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var s=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-Gn(42|e)+1)-1,i&=a&~(s&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,N2(r,i))}else i=Te,i=jy(r,r===Ye?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||jd(r,i)||(n=!0,N2(r,i));r=r.next}while(n);Nv=!1}}function mB(){yD()}function yD(){Vp=T0=!1;var e=0;Ri!==0&&EB()&&(e=Ri);for(var t=qn(),n=null,r=Fp;r!==null;){var a=r.next,i=gD(r,t);i===0?(r.next=null,n===null?Fp=a:n.next=a,a===null&&(Fo=n)):(n=r,(e!==0||i&3)&&(Vp=!0)),r=a}Dt!==0&&Dt!==5||_d(e),Ri!==0&&(Ri=0)}function gD(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0o)break;var f=l.transferSize,d=l.initiatorType;f&&R2(d)&&(l=l.responseEnd,s+=f*(l"u"?null:document;function ED(e,t,n){var r=Pc;if(r&&typeof t=="string"&&t){var a=fr(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),B2.has(a)||(B2.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),tn(t,"link",e),Vt(t),r.head.appendChild(t)))}}function $B(e){ei.D(e),ED("dns-prefetch",e,null)}function kB(e,t){ei.C(e,t),ED("preconnect",e,t)}function LB(e,t,n){ei.L(e,t,n);var r=Pc;if(r&&e&&t){var a='link[rel="preload"][as="'+fr(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+fr(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+fr(n.imageSizes)+'"]')):a+='[href="'+fr(e)+'"]';var i=a;switch(t){case"style":i=ql(e);break;case"script":i=Mc(e)}vr.has(i)||(e=it({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),vr.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(Pd(i))||t==="script"&&r.querySelector(Md(i))||(t=r.createElement("link"),tn(t,"link",e),Vt(t),r.head.appendChild(t)))}}function zB(e,t){ei.m(e,t);var n=Pc;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+fr(r)+'"][href="'+fr(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Mc(e)}if(!vr.has(i)&&(e=it({rel:"modulepreload",href:e},t),vr.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Md(i)))return}r=n.createElement("link"),tn(r,"link",e),Vt(r),n.head.appendChild(r)}}}function IB(e,t,n){ei.S(e,t,n);var r=Pc;if(r&&e){var a=fl(r).hoistableStyles,i=ql(e);t=t||"default";var s=a.get(i);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(Pd(i)))o.loading=5;else{e=it({rel:"stylesheet",href:e,"data-precedence":t},n),(n=vr.get(i))&&JS(e,n);var l=s=r.createElement("link");Vt(l),tn(l,"link",e),l._p=new Promise(function(c,f){l.onload=c,l.onerror=f}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,sp(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},a.set(i,s)}}}function BB(e,t){ei.X(e,t);var n=Pc;if(n&&e){var r=fl(n).hoistableScripts,a=Mc(e),i=r.get(a);i||(i=n.querySelector(Md(a)),i||(e=it({src:e,async:!0},t),(t=vr.get(a))&&ew(e,t),i=n.createElement("script"),Vt(i),tn(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function UB(e,t){ei.M(e,t);var n=Pc;if(n&&e){var r=fl(n).hoistableScripts,a=Mc(e),i=r.get(a);i||(i=n.querySelector(Md(a)),i||(e=it({src:e,async:!0,type:"module"},t),(t=vr.get(a))&&ew(e,t),i=n.createElement("script"),Vt(i),tn(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function U2(e,t,n,r){var a=(a=ki.current)?Kp(a):null;if(!a)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=ql(n.href),n=fl(a).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ql(n.href);var i=fl(a).hoistableStyles,s=i.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=a.querySelector(Pd(e)))&&!i._p&&(s.instance=i,s.state.loading=5),vr.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vr.set(e,n),i||FB(a,e,n,s.state))),t&&r===null)throw Error(U(528,""));return s}if(t&&r!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Mc(n),n=fl(a).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function ql(e){return'href="'+fr(e)+'"'}function Pd(e){return'link[rel="stylesheet"]['+e+"]"}function TD(e){return it({},e,{"data-precedence":e.precedence,precedence:null})}function FB(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),tn(t,"link",n),Vt(t),e.head.appendChild(t))}function Mc(e){return'[src="'+fr(e)+'"]'}function Md(e){return"script[async]"+e}function F2(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+fr(n.href)+'"]');if(r)return t.instance=r,Vt(r),r;var a=it({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Vt(r),tn(r,"style",a),sp(r,n.precedence,e),t.instance=r;case"stylesheet":a=ql(n.href);var i=e.querySelector(Pd(a));if(i)return t.state.loading|=4,t.instance=i,Vt(i),i;r=TD(n),(a=vr.get(a))&&JS(r,a),i=(e.ownerDocument||e).createElement("link"),Vt(i);var s=i;return s._p=new Promise(function(o,l){s.onload=o,s.onerror=l}),tn(i,"link",r),t.state.loading|=4,sp(i,n.precedence,e),t.instance=i;case"script":return i=Mc(n.src),(a=e.querySelector(Md(i)))?(t.instance=a,Vt(a),a):(r=n,(a=vr.get(i))&&(r=it({},n),ew(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),Vt(a),tn(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,sp(r,n.precedence,e));return t.instance}function sp(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,s=0;s title"):null)}function VB(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ND(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function HB(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=ql(r.href),i=t.querySelector(Pd(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Gp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Vt(i);return}i=t.ownerDocument||t,r=TD(r),(a=vr.get(a))&&JS(r,a),i=i.createElement("link"),Vt(i);var s=i;s._p=new Promise(function(o,l){s.onload=o,s.onerror=l}),tn(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Gp.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Dv=0;function qB(e,t){return e.stylesheets&&e.count===0&&lp(e,e.stylesheets),0Dv?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function Gp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yp=null;function lp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yp=new Map,t.forEach(KB,e),Yp=null,Gp.call(e))}function KB(e,t){if(!(t.state.loading&4)){var n=Yp.get(e);if(n)var r=n.get(null);else{n=new Map,Yp.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kD)}catch(e){console.error(e)}}kD(),HP.exports=Sy;var e8=HP.exports;const t8=Ie(e8);var Rd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Rs,Si,jl,OP,n8=(OP=class extends Rd{constructor(){super();ce(this,Rs);ce(this,Si);ce(this,jl);ee(this,jl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,Si)||this.setEventListener(R(this,jl))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Si))==null||t.call(this),ee(this,Si,void 0))}setEventListener(t){var n;ee(this,jl,t),(n=R(this,Si))==null||n.call(this),ee(this,Si,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){R(this,Rs)!==t&&(ee(this,Rs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof R(this,Rs)=="boolean"?R(this,Rs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Rs=new WeakMap,Si=new WeakMap,jl=new WeakMap,OP),iw=new n8,r8={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},wi,rS,EP,a8=(EP=class{constructor(){ce(this,wi,r8);ce(this,rS,!1)}setTimeoutProvider(e){ee(this,wi,e)}setTimeout(e,t){return R(this,wi).setTimeout(e,t)}clearTimeout(e){R(this,wi).clearTimeout(e)}setInterval(e,t){return R(this,wi).setInterval(e,t)}clearInterval(e){R(this,wi).clearInterval(e)}},wi=new WeakMap,rS=new WeakMap,EP),As=new a8;function i8(e){setTimeout(e,0)}var s8=typeof window>"u"||"Deno"in globalThis;function En(){}function o8(e,t){return typeof e=="function"?e(t):e}function z0(e){return typeof e=="number"&&e>=0&&e!==1/0}function LD(e,t){return Math.max(e+(t||0)-Date.now(),0)}function qi(e,t){return typeof e=="function"?e(t):e}function In(e,t){return typeof e=="function"?e(t):e}function Q2(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:s,stale:o}=e;if(s){if(r){if(t.queryHash!==sw(s,t.options))return!1}else if(!Af(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function Z2(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(jf(t.options.mutationKey)!==jf(i))return!1}else if(!Af(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function sw(e,t){return((t==null?void 0:t.queryKeyHashFn)||jf)(e)}function jf(e){return JSON.stringify(e,(t,n)=>B0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Af(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Af(e[n],t[n])):!1}var l8=Object.prototype.hasOwnProperty;function zD(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=J2(e)&&J2(t);if(!r&&!(B0(e)&&B0(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),o=s.length,l=r?new Array(o):{};let c=0;for(let f=0;f{As.setTimeout(t,e)})}function U0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?zD(e,t):t}function u8(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function f8(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ow=Symbol();function ID(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ow?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function BD(e,t){return typeof e=="function"?e(...t):!!e}function d8(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var Of=(()=>{let e=()=>s8;return{isServer(){return e()},setIsServer(t){e=t}}})();function F0(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var h8=i8;function p8(){let e=[],t=0,n=o=>{o()},r=o=>{o()},a=h8;const i=o=>{t?e.push(o):a(()=>{n(o)})},s=()=>{const o=e;e=[],o.length&&a(()=>{r(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{a=o}}}var Wt=p8(),Al,ji,Ol,TP,m8=(TP=class extends Rd{constructor(){super();ce(this,Al,!0);ce(this,ji);ce(this,Ol);ee(this,Ol,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){R(this,ji)||this.setEventListener(R(this,Ol))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,ji))==null||t.call(this),ee(this,ji,void 0))}setEventListener(t){var n;ee(this,Ol,t),(n=R(this,ji))==null||n.call(this),ee(this,ji,t(this.setOnline.bind(this)))}setOnline(t){R(this,Al)!==t&&(ee(this,Al,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return R(this,Al)}},Al=new WeakMap,ji=new WeakMap,Ol=new WeakMap,TP),Qp=new m8;function y8(e){return Math.min(1e3*2**e,3e4)}function UD(e){return(e??"online")==="online"?Qp.isOnline():!0}var V0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function FD(e){let t=!1,n=0,r;const a=F0(),i=()=>a.status!=="pending",s=g=>{var b;if(!i()){const y=new V0(g);h(y),(b=e.onCancel)==null||b.call(e,y)}},o=()=>{t=!0},l=()=>{t=!1},c=()=>iw.isFocused()&&(e.networkMode==="always"||Qp.isOnline())&&e.canRun(),f=()=>UD(e.networkMode)&&e.canRun(),d=g=>{i()||(r==null||r(),a.resolve(g))},h=g=>{i()||(r==null||r(),a.reject(g))},p=()=>new Promise(g=>{var b;r=y=>{(i()||c())&&g(y)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;r=void 0,i()||(g=e.onContinue)==null||g.call(e)}),m=()=>{if(i())return;let g;const b=n===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(d).catch(y=>{var j;if(i())return;const v=e.retry??(Of.isServer()?0:3),x=e.retryDelay??y8,w=typeof x=="function"?x(n,y):x,S=v===!0||typeof v=="number"&&nc()?void 0:p()).then(()=>{t?h(y):m()})})};return{promise:a,status:()=>a.status,cancel:s,continue:()=>(r==null||r(),a),cancelRetry:o,continueRetry:l,canStart:f,start:()=>(f()?m():p().then(m),a)}}var Ds,NP,VD=(NP=class{constructor(){ce(this,Ds)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),z0(this.gcTime)&&ee(this,Ds,As.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Of.isServer()?1/0:5*60*1e3))}clearGcTimeout(){R(this,Ds)!==void 0&&(As.clearTimeout(R(this,Ds)),ee(this,Ds,void 0))}},Ds=new WeakMap,NP);function g8(e){return{onFetch:(t,n)=>{var f,d,h,p,m;const r=t.options,a=(h=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((m=t.state.data)==null?void 0:m.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const b=x=>{d8(x,()=>t.signal,()=>g=!0)},y=ID(t.options,t.fetchOptions),v=async(x,w,S)=>{if(g)return Promise.reject(t.signal.reason);if(w==null&&x.pages.length)return Promise.resolve(x);const O=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:w,direction:S?"backward":"forward",meta:t.options.meta};return b(M),M})(),E=await y(O),{maxPages:T}=t.options,N=S?f8:u8;return{pages:N(x.pages,E,T),pageParams:N(x.pageParams,w,T)}};if(a&&i.length){const x=a==="backward",w=x?v8:tO,S={pages:i,pageParams:s},j=w(r,S);o=await v(S,j,x)}else{const x=e??i.length;do{const w=l===0?s[0]??r.initialPageParam:tO(r,o);if(l>0&&w==null)break;o=await v(o,w),l++}while(l{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function tO(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function v8(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var El,$s,Tl,sr,ks,It,yd,Ls,zn,HD,ja,CP,b8=(CP=class extends VD{constructor(t){super();ce(this,zn);ce(this,El);ce(this,$s);ce(this,Tl);ce(this,sr);ce(this,ks);ce(this,It);ce(this,yd);ce(this,Ls);ee(this,Ls,!1),ee(this,yd,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,ks,t.client),ee(this,sr,R(this,ks).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,$s,rO(this.options)),this.state=t.state??R(this,$s),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return R(this,El)}get promise(){var t;return(t=R(this,It))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,yd),...t},t!=null&&t._type&&ee(this,El,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=rO(this.options);n.data!==void 0&&(this.setState(nO(n.data,n.dataUpdatedAt)),ee(this,$s,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,sr).remove(this)}setData(t,n){const r=U0(this.state.data,t,this.options);return Oe(this,zn,ja).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Oe(this,zn,ja).call(this,{type:"setState",state:t})}cancel(t){var r,a;const n=(r=R(this,It))==null?void 0:r.promise;return(a=R(this,It))==null||a.cancel(t),n?n.then(En).catch(En):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return R(this,$s)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>In(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ow||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>qi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!LD(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,It))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,It))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,sr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(R(this,It)&&(R(this,Ls)||Oe(this,zn,HD).call(this)?R(this,It).cancel({revert:!0}):R(this,It).cancelRetry()),this.scheduleGc()),R(this,sr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Oe(this,zn,ja).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,d,h,p,m,g,b,y,v,x;if(this.state.fetchStatus!=="idle"&&((c=R(this,It))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,It))return R(this,It).continueRetry(),R(this,It).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(S=>S.options.queryFn);w&&this.setOptions(w.options)}const r=new AbortController,a=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(ee(this,Ls,!0),r.signal)})},i=()=>{const w=ID(this.options,n),j=(()=>{const O={client:R(this,ks),queryKey:this.queryKey,meta:this.meta};return a(O),O})();return ee(this,Ls,!1),this.options.persister?this.options.persister(w,j,this):w(j)},o=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:R(this,ks),state:this.state,fetchFn:i};return a(w),w})(),l=R(this,El)==="infinite"?g8(this.options.pages):this.options.behavior;l==null||l.onFetch(o,this),ee(this,Tl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Oe(this,zn,ja).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),ee(this,It,FD({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:w=>{w instanceof V0&&w.revert&&this.setState({...R(this,Tl),fetchStatus:"idle"}),r.abort()},onFail:(w,S)=>{Oe(this,zn,ja).call(this,{type:"failed",failureCount:w,error:S})},onPause:()=>{Oe(this,zn,ja).call(this,{type:"pause"})},onContinue:()=>{Oe(this,zn,ja).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const w=await R(this,It).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(p=(h=R(this,sr).config).onSuccess)==null||p.call(h,w,this),(g=(m=R(this,sr).config).onSettled)==null||g.call(m,w,this.state.error,this),w}catch(w){if(w instanceof V0){if(w.silent)return R(this,It).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Oe(this,zn,ja).call(this,{type:"error",error:w}),(y=(b=R(this,sr).config).onError)==null||y.call(b,w,this),(x=(v=R(this,sr).config).onSettled)==null||x.call(v,this.state.data,w,this),w}finally{this.scheduleGc()}}},El=new WeakMap,$s=new WeakMap,Tl=new WeakMap,sr=new WeakMap,ks=new WeakMap,It=new WeakMap,yd=new WeakMap,Ls=new WeakMap,zn=new WeakSet,HD=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ja=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...qD(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...nO(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,Tl,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Wt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,sr).notify({query:this,type:"updated",action:t})})},CP);function qD(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:UD(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function rO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var jn,Ne,gd,un,zs,Nl,Ea,Ai,vd,Cl,_l,Is,Bs,Oi,Pl,ze,Tu,H0,q0,K0,G0,Y0,X0,W0,KD,_P,x8=(_P=class extends Rd{constructor(t,n){super();ce(this,ze);ce(this,jn);ce(this,Ne);ce(this,gd);ce(this,un);ce(this,zs);ce(this,Nl);ce(this,Ea);ce(this,Ai);ce(this,vd);ce(this,Cl);ce(this,_l);ce(this,Is);ce(this,Bs);ce(this,Oi);ce(this,Pl,new Set);this.options=n,ee(this,jn,t),ee(this,Ai,null),ee(this,Ea,F0()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Ne).addObserver(this),aO(R(this,Ne),this.options)?Oe(this,ze,Tu).call(this):this.updateResult(),Oe(this,ze,G0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Q0(R(this,Ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Q0(R(this,Ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Oe(this,ze,Y0).call(this),Oe(this,ze,X0).call(this),R(this,Ne).removeObserver(this)}setOptions(t){const n=this.options,r=R(this,Ne);if(this.options=R(this,jn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof In(this.options.enabled,R(this,Ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Oe(this,ze,W0).call(this),R(this,Ne).setOptions(this.options),n._defaulted&&!I0(this.options,n)&&R(this,jn).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Ne),observer:this});const a=this.hasListeners();a&&iO(R(this,Ne),r,this.options,n)&&Oe(this,ze,Tu).call(this),this.updateResult(),a&&(R(this,Ne)!==r||In(this.options.enabled,R(this,Ne))!==In(n.enabled,R(this,Ne))||qi(this.options.staleTime,R(this,Ne))!==qi(n.staleTime,R(this,Ne)))&&Oe(this,ze,H0).call(this);const i=Oe(this,ze,q0).call(this);a&&(R(this,Ne)!==r||In(this.options.enabled,R(this,Ne))!==In(n.enabled,R(this,Ne))||i!==R(this,Oi))&&Oe(this,ze,K0).call(this,i)}getOptimisticResult(t){const n=R(this,jn).getQueryCache().build(R(this,jn),t),r=this.createResult(n,t);return w8(this,r)&&(ee(this,un,r),ee(this,Nl,this.options),ee(this,zs,R(this,Ne).state)),r}getCurrentResult(){return R(this,un)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,Ea).status==="pending"&&R(this,Ea).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){R(this,Pl).add(t)}getCurrentQuery(){return R(this,Ne)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=R(this,jn).defaultQueryOptions(t),r=R(this,jn).getQueryCache().build(R(this,jn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Oe(this,ze,Tu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,un)))}createResult(t,n){var T;const r=R(this,Ne),a=this.options,i=R(this,un),s=R(this,zs),o=R(this,Nl),c=t!==r?t.state:R(this,gd),{state:f}=t;let d={...f},h=!1,p;if(n._optimisticResults){const N=this.hasListeners(),M=!N&&aO(t,n),C=N&&iO(t,r,n,a);(M||C)&&(d={...d,...qD(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:b}=d;p=d.data;let y=!1;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let N;i!=null&&i.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(N=i.data,y=!0):N=typeof n.placeholderData=="function"?n.placeholderData((T=R(this,_l))==null?void 0:T.state.data,R(this,_l)):n.placeholderData,N!==void 0&&(b="success",p=U0(i==null?void 0:i.data,N,n),h=!0)}if(n.select&&p!==void 0&&!y)if(i&&p===(s==null?void 0:s.data)&&n.select===R(this,vd))p=R(this,Cl);else try{ee(this,vd,n.select),p=n.select(p),p=U0(i==null?void 0:i.data,p,n),ee(this,Cl,p),ee(this,Ai,null)}catch(N){ee(this,Ai,N)}R(this,Ai)&&(m=R(this,Ai),p=R(this,Cl),g=Date.now(),b="error");const v=d.fetchStatus==="fetching",x=b==="pending",w=b==="error",S=x&&v,j=p!==void 0,E={status:b,fetchStatus:d.fetchStatus,isPending:x,isSuccess:b==="success",isError:w,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:w&&!j,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&j,isStale:lw(t,n),refetch:this.refetch,promise:R(this,Ea),isEnabled:In(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const N=E.data!==void 0,M=E.status==="error"&&!N,C=$=>{M?$.reject(E.error):N&&$.resolve(E.data)},L=()=>{const $=ee(this,Ea,E.promise=F0());C($)},D=R(this,Ea);switch(D.status){case"pending":t.queryHash===r.queryHash&&C(D);break;case"fulfilled":(M||E.data!==D.value)&&L();break;case"rejected":(!M||E.error!==D.reason)&&L();break}}return E}updateResult(){const t=R(this,un),n=this.createResult(R(this,Ne),this.options);if(ee(this,zs,R(this,Ne).state),ee(this,Nl,this.options),R(this,zs).data!==void 0&&ee(this,_l,R(this,Ne)),I0(n,t))return;ee(this,un,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!R(this,Pl).size)return!0;const s=new Set(i??R(this,Pl));return this.options.throwOnError&&s.add("error"),Object.keys(R(this,un)).some(o=>{const l=o;return R(this,un)[l]!==t[l]&&s.has(l)})};Oe(this,ze,KD).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Oe(this,ze,G0).call(this)}},jn=new WeakMap,Ne=new WeakMap,gd=new WeakMap,un=new WeakMap,zs=new WeakMap,Nl=new WeakMap,Ea=new WeakMap,Ai=new WeakMap,vd=new WeakMap,Cl=new WeakMap,_l=new WeakMap,Is=new WeakMap,Bs=new WeakMap,Oi=new WeakMap,Pl=new WeakMap,ze=new WeakSet,Tu=function(t){Oe(this,ze,W0).call(this);let n=R(this,Ne).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(En)),n},H0=function(){Oe(this,ze,Y0).call(this);const t=qi(this.options.staleTime,R(this,Ne));if(Of.isServer()||R(this,un).isStale||!z0(t))return;const r=LD(R(this,un).dataUpdatedAt,t)+1;ee(this,Is,As.setTimeout(()=>{R(this,un).isStale||this.updateResult()},r))},q0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Ne)):this.options.refetchInterval)??!1},K0=function(t){Oe(this,ze,X0).call(this),ee(this,Oi,t),!(Of.isServer()||In(this.options.enabled,R(this,Ne))===!1||!z0(R(this,Oi))||R(this,Oi)===0)&&ee(this,Bs,As.setInterval(()=>{(this.options.refetchIntervalInBackground||iw.isFocused())&&Oe(this,ze,Tu).call(this)},R(this,Oi)))},G0=function(){Oe(this,ze,H0).call(this),Oe(this,ze,K0).call(this,Oe(this,ze,q0).call(this))},Y0=function(){R(this,Is)!==void 0&&(As.clearTimeout(R(this,Is)),ee(this,Is,void 0))},X0=function(){R(this,Bs)!==void 0&&(As.clearInterval(R(this,Bs)),ee(this,Bs,void 0))},W0=function(){const t=R(this,jn).getQueryCache().build(R(this,jn),this.options);if(t===R(this,Ne))return;const n=R(this,Ne);ee(this,Ne,t),ee(this,gd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},KD=function(t){Wt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(R(this,un))}),R(this,jn).getQueryCache().notify({query:R(this,Ne),type:"observerResultsUpdated"})})},_P);function S8(e,t){return In(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&In(t.retryOnMount,e)===!1)}function aO(e,t){return S8(e,t)||e.state.data!==void 0&&Q0(e,t,t.refetchOnMount)}function Q0(e,t,n){if(In(t.enabled,e)!==!1&&qi(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&lw(e,t)}return!1}function iO(e,t,n,r){return(e!==t||In(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&lw(e,n)}function lw(e,t){return In(t.enabled,e)!==!1&&e.isStaleByTime(qi(t.staleTime,e))}function w8(e,t){return!I0(e.getCurrentResult(),t)}var bd,Hr,an,Us,qr,ci,PP,j8=(PP=class extends VD{constructor(t){super();ce(this,qr);ce(this,bd);ce(this,Hr);ce(this,an);ce(this,Us);ee(this,bd,t.client),this.mutationId=t.mutationId,ee(this,an,t.mutationCache),ee(this,Hr,[]),this.state=t.state||A8(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,Hr).includes(t)||(R(this,Hr).push(t),this.clearGcTimeout(),R(this,an).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,Hr,R(this,Hr).filter(n=>n!==t)),this.scheduleGc(),R(this,an).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,Hr).length||(this.state.status==="pending"?this.scheduleGc():R(this,an).remove(this))}continue(){var t;return((t=R(this,Us))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,l,c,f,d,h,p,m,g,b,y,v,x,w,S,j,O;const n=()=>{Oe(this,qr,ci).call(this,{type:"continue"})},r={client:R(this,bd),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Us,FD({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(E,T)=>{Oe(this,qr,ci).call(this,{type:"failed",failureCount:E,error:T})},onPause:()=>{Oe(this,qr,ci).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,an).canRun(this)}));const a=this.state.status==="pending",i=!R(this,Us).canStart();try{if(a)n();else{Oe(this,qr,ci).call(this,{type:"pending",variables:t,isPaused:i}),R(this,an).config.onMutate&&await R(this,an).config.onMutate(t,this,r);const T=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,r));T!==this.state.context&&Oe(this,qr,ci).call(this,{type:"pending",context:T,variables:t,isPaused:i})}const E=await R(this,Us).start();return await((c=(l=R(this,an).config).onSuccess)==null?void 0:c.call(l,E,t,this.state.context,this,r)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,E,t,this.state.context,r)),await((p=(h=R(this,an).config).onSettled)==null?void 0:p.call(h,E,null,this.state.variables,this.state.context,this,r)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,E,null,t,this.state.context,r)),Oe(this,qr,ci).call(this,{type:"success",data:E}),E}catch(E){try{await((y=(b=R(this,an).config).onError)==null?void 0:y.call(b,E,t,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((x=(v=this.options).onError)==null?void 0:x.call(v,E,t,this.state.context,r))}catch(T){Promise.reject(T)}try{await((S=(w=R(this,an).config).onSettled)==null?void 0:S.call(w,void 0,E,this.state.variables,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((O=(j=this.options).onSettled)==null?void 0:O.call(j,void 0,E,t,this.state.context,r))}catch(T){Promise.reject(T)}throw Oe(this,qr,ci).call(this,{type:"error",error:E}),E}finally{R(this,an).runNext(this)}}},bd=new WeakMap,Hr=new WeakMap,an=new WeakMap,Us=new WeakMap,qr=new WeakSet,ci=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Wt.batch(()=>{R(this,Hr).forEach(r=>{r.onMutationUpdate(t)}),R(this,an).notify({mutation:this,type:"updated",action:t})})},PP);function A8(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ta,_r,xd,MP,O8=(MP=class extends Rd{constructor(t={}){super();ce(this,Ta);ce(this,_r);ce(this,xd);this.config=t,ee(this,Ta,new Set),ee(this,_r,new Map),ee(this,xd,0)}build(t,n,r){const a=new j8({client:t,mutationCache:this,mutationId:++rh(this,xd)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){R(this,Ta).add(t);const n=Sh(t);if(typeof n=="string"){const r=R(this,_r).get(n);r?r.push(t):R(this,_r).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Ta).delete(t)){const n=Sh(t);if(typeof n=="string"){const r=R(this,_r).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&R(this,_r).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Sh(t);if(typeof n=="string"){const r=R(this,_r).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=Sh(t);if(typeof n=="string"){const a=(r=R(this,_r).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wt.batch(()=>{R(this,Ta).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Ta).clear(),R(this,_r).clear()})}getAll(){return Array.from(R(this,Ta))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Z2(n,r))}findAll(t={}){return this.getAll().filter(n=>Z2(t,n))}notify(t){Wt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Wt.batch(()=>Promise.all(t.map(n=>n.continue().catch(En))))}},Ta=new WeakMap,_r=new WeakMap,xd=new WeakMap,MP);function Sh(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Kr,RP,E8=(RP=class extends Rd{constructor(t={}){super();ce(this,Kr);this.config=t,ee(this,Kr,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??sw(a,n);let s=this.get(i);return s||(s=new b8({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){R(this,Kr).has(t.queryHash)||(R(this,Kr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=R(this,Kr).get(t.queryHash);n&&(t.destroy(),n===t&&R(this,Kr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,Kr).get(t)}getAll(){return[...R(this,Kr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Q2(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Q2(t,r)):n}notify(t){Wt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kr=new WeakMap,RP),mt,Ei,Ti,Ml,Rl,Ni,Dl,$l,DP,T8=(DP=class{constructor(e={}){ce(this,mt);ce(this,Ei);ce(this,Ti);ce(this,Ml);ce(this,Rl);ce(this,Ni);ce(this,Dl);ce(this,$l);ee(this,mt,e.queryCache||new E8),ee(this,Ei,e.mutationCache||new O8),ee(this,Ti,e.defaultOptions||{}),ee(this,Ml,new Map),ee(this,Rl,new Map),ee(this,Ni,0)}mount(){rh(this,Ni)._++,R(this,Ni)===1&&(ee(this,Dl,iw.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,mt).onFocus())})),ee(this,$l,Qp.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,mt).onOnline())})))}unmount(){var e,t;rh(this,Ni)._--,R(this,Ni)===0&&((e=R(this,Dl))==null||e.call(this),ee(this,Dl,void 0),(t=R(this,$l))==null||t.call(this),ee(this,$l,void 0))}isFetching(e){return R(this,mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,Ei).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,mt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=R(this,mt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(qi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return R(this,mt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=R(this,mt).get(r.queryHash),i=a==null?void 0:a.state.data,s=o8(t,i);if(s!==void 0)return R(this,mt).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Wt.batch(()=>R(this,mt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,mt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=R(this,mt);Wt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=R(this,mt);return Wt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Wt.batch(()=>R(this,mt).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(En).catch(En)}invalidateQueries(e,t={}){return Wt.batch(()=>(R(this,mt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Wt.batch(()=>R(this,mt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(En)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(En)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=R(this,mt).build(this,t);return n.isStaleByTime(qi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(En).catch(En)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(En).catch(En)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Qp.isOnline()?R(this,Ei).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,mt)}getMutationCache(){return R(this,Ei)}getDefaultOptions(){return R(this,Ti)}setDefaultOptions(e){ee(this,Ti,e)}setQueryDefaults(e,t){R(this,Ml).set(jf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,Ml).values()],n={};return t.forEach(r=>{Af(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){R(this,Rl).set(jf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,Rl).values()],n={};return t.forEach(r=>{Af(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,Ti).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sw(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ow&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,Ti).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,mt).clear(),R(this,Ei).clear()}},mt=new WeakMap,Ei=new WeakMap,Ti=new WeakMap,Ml=new WeakMap,Rl=new WeakMap,Ni=new WeakMap,Dl=new WeakMap,$l=new WeakMap,DP),GD=A.createContext(void 0),nn=e=>{const t=A.useContext(GD);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},N8=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(GD.Provider,{value:e,children:t})),YD=A.createContext(!1),C8=()=>A.useContext(YD);YD.Provider;function _8(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var P8=A.createContext(_8()),M8=()=>A.useContext(P8),R8=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?BD(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},D8=e=>{A.useEffect(()=>{e.clearReset()},[e])},$8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||BD(n,[e.error,r])),k8=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},L8=(e,t)=>e.isLoading&&e.isFetching&&!t,z8=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,sO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function I8(e,t,n){var p,m,g,b;const r=C8(),a=M8(),i=nn(),s=i.defaultQueryOptions(e);(m=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||m.call(p,s);const o=i.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=r?"isRestoring":l?"optimistic":void 0,k8(s),R8(s,a,o),D8(a);const c=!i.getQueryCache().get(s.queryHash),[f]=A.useState(()=>new t(i,s)),d=f.getOptimisticResult(s),h=!r&&l;if(A.useSyncExternalStore(A.useCallback(y=>{const v=h?f.subscribe(Wt.batchCalls(y)):En;return f.updateResult(),v},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),A.useEffect(()=>{f.setOptions(s)},[s,f]),z8(s,d))throw sO(s,f,a);if($8({result:d,errorResetBoundary:a,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((b=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||b.call(g,s,d),s.experimental_prefetchInRender&&!Of.isServer()&&L8(d,r)){const y=c?sO(s,f,a):o==null?void 0:o.promise;y==null||y.catch(En).finally(()=>{f.updateResult()})}return s.notifyOnChangeProps?d:f.trackResult(d)}function se(e,t){return I8(e,x8)}/** + * react-router v7.17.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */var oO="popstate";function lO(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function B8(e={}){function t(r,a){var c;let i=(c=a.state)==null?void 0:c.masked,{pathname:s,search:o,hash:l}=i||r.location;return Z0("",{pathname:s,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Ef(a)}return F8(t,n,null,e)}function ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function br(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function U8(){return Math.random().toString(36).substring(2,10)}function cO(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Z0(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Rc(t):t,state:n,key:t&&t.key||r||U8(),mask:a}}function Ef({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Rc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function F8(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,s=a.history,o="POP",l=null,c=f();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function f(){return(s.state||{idx:null}).idx}function d(){o="POP";let b=f(),y=b==null?null:b-c;c=b,l&&l({action:o,location:g.location,delta:y})}function h(b,y){o="PUSH";let v=lO(b)?b:Z0(g.location,b,y);c=f()+1;let x=cO(v,c),w=g.createHref(v.mask||v);try{s.pushState(x,"",w)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;a.location.assign(w)}i&&l&&l({action:o,location:g.location,delta:1})}function p(b,y){o="REPLACE";let v=lO(b)?b:Z0(g.location,b,y);c=f();let x=cO(v,c),w=g.createHref(v.mask||v);s.replaceState(x,"",w),i&&l&&l({action:o,location:g.location,delta:0})}function m(b){return V8(a,b)}let g={get action(){return o},get location(){return e(a,s)},listen(b){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(oO,d),l=b,()=>{a.removeEventListener(oO,d),l=null}},createHref(b){return t(a,b)},createURL:m,encodeLocation(b){let y=m(b);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(b){return s.go(b)}};return g}function V8(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),ut(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ef(t);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function XD(e,t,n="/"){return H8(e,t,n,!1)}function H8(e,t,n,r,a){let i=typeof t=="string"?Rc(t):t,s=Xa(i.pathname||"/",n);if(s==null)return null;let o=q8(e),l=null,c=rU(s);for(let f=0;l==null&&f{let f={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&l)return;ut(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=$r([r,f.relativePath]),h=n.concat(f);s.children&&s.children.length>0&&(ut(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),WD(s.children,t,h,d,l)),!(s.path==null&&!s.index)&&t.push({path:d,score:J8(d,s.index),routesMeta:h})};return e.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let c of QD(s.path))i(s,o,!0,c)}),t}function QD(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let s=QD(r.join("/")),o=[];return o.push(...s.map(l=>l===""?i:[i,l].join("/"))),a&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function K8(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:eU(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var G8=/^:[\w-]+$/,Y8=3,X8=2,W8=1,Q8=10,Z8=-2,uO=e=>e==="*";function J8(e,t){let n=e.split("/"),r=n.length;return n.some(uO)&&(r+=Z8),t&&(r+=X8),n.filter(a=>!uO(a)).reduce((a,i)=>a+(G8.test(i)?Y8:i===""?W8:Q8),r)}function eU(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function tU(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",s=[];for(let o=0;o{if(f==="*"){let m=o[h]||"";s=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const p=o[h];return d&&!p?c[f]=void 0:c[f]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:e}}function nU(e,t=!1,n=!0){br(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l,c,f)=>{if(r.push({paramName:o,isOptional:l!=null}),l){let d=f.charAt(c+s.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function rU(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return br(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Xa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var aU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function iU(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Rc(e):e,i;return n?(n=ZD(n),n.startsWith("/")?i=fO(n.substring(1),"/"):i=fO(n,t)):i=t,{pathname:i,search:lU(r),hash:cU(a)}}function fO(e,t){let n=Jp(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function $v(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function sU(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function cw(e){let t=sU(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Iy(e,t,n,r=!1){let a;typeof e=="string"?a=Rc(e):(a={...e},ut(!a.pathname||!a.pathname.includes("?"),$v("?","pathname","search",a)),ut(!a.pathname||!a.pathname.includes("#"),$v("#","pathname","hash",a)),ut(!a.search||!a.search.includes("#"),$v("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,o;if(s==null)o=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;a.pathname=h.join("/")}o=d>=0?t[d]:"/"}let l=iU(a,o),c=s&&s!=="/"&&s.endsWith("/"),f=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}var ZD=e=>e.replace(/\/\/+/g,"/"),$r=e=>ZD(e.join("/")),Jp=e=>e.replace(/\/+$/,""),oU=e=>Jp(e).replace(/^\/*/,"/"),lU=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cU=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,uU=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function fU(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function dU(e){let t=e.map(n=>n.route.path).filter(Boolean);return $r(t)||"/"}var JD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function e$(e,t){let n=e;if(typeof n!="string"||!aU.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(JD)try{let i=new URL(window.location.href),s=n.startsWith("//")?new URL(i.protocol+n):new URL(n),o=Xa(s.pathname,t);s.origin===i.origin&&o!=null?n=o+s.search+s.hash:a=!0}catch{br(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var t$=["POST","PUT","PATCH","DELETE"];new Set(t$);var hU=["GET",...t$];new Set(hU);var Dc=A.createContext(null);Dc.displayName="DataRouter";var By=A.createContext(null);By.displayName="DataRouterState";var n$=A.createContext(!1);function pU(){return A.useContext(n$)}var r$=A.createContext({isTransitioning:!1});r$.displayName="ViewTransition";var mU=A.createContext(new Map);mU.displayName="Fetchers";var yU=A.createContext(null);yU.displayName="Await";var er=A.createContext(null);er.displayName="Navigation";var Dd=A.createContext(null);Dd.displayName="Location";var wr=A.createContext({outlet:null,matches:[],isDataRoute:!1});wr.displayName="Route";var uw=A.createContext(null);uw.displayName="RouteError";var a$="REACT_ROUTER_ERROR",gU="REDIRECT",vU="ROUTE_ERROR_RESPONSE";function bU(e){if(e.startsWith(`${a$}:${gU}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function xU(e){if(e.startsWith(`${a$}:${vU}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new uU(t.status,t.statusText,t.data)}catch{}}function SU(e,{relative:t}={}){ut($c(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=A.useContext(er),{hash:a,pathname:i,search:s}=$d(e,{relative:t}),o=i;return n!=="/"&&(o=i==="/"?n:$r([n,i])),r.createHref({pathname:o,search:s,hash:a})}function $c(){return A.useContext(Dd)!=null}function jr(){return ut($c(),"useLocation() may be used only in the context of a component."),A.useContext(Dd).location}var i$="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function s$(e){A.useContext(er).static||A.useLayoutEffect(e)}function Kt(){let{isDataRoute:e}=A.useContext(wr);return e?kU():wU()}function wU(){ut($c(),"useNavigate() may be used only in the context of a component.");let e=A.useContext(Dc),{basename:t,navigator:n}=A.useContext(er),{matches:r}=A.useContext(wr),{pathname:a}=jr(),i=JSON.stringify(cw(r)),s=A.useRef(!1);return s$(()=>{s.current=!0}),A.useCallback((l,c={})=>{if(br(s.current,i$),!s.current)return;if(typeof l=="number"){n.go(l);return}let f=Iy(l,JSON.parse(i),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:$r([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,i,a,e])}var jU=A.createContext(null);function AU(e){let t=A.useContext(wr).outlet;return A.useMemo(()=>t&&A.createElement(jU.Provider,{value:e},t),[t,e])}function o$(){let{matches:e}=A.useContext(wr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function $d(e,{relative:t}={}){let{matches:n}=A.useContext(wr),{pathname:r}=jr(),a=JSON.stringify(cw(n));return A.useMemo(()=>Iy(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function OU(e,t){return l$(e,t)}function l$(e,t,n){var b;ut($c(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=A.useContext(er),{matches:a}=A.useContext(wr),i=a[a.length-1],s=i?i.params:{},o=i?i.pathname:"/",l=i?i.pathnameBase:"/",c=i&&i.route;{let y=c&&c.path||"";u$(o,!c||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${o}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let f=jr(),d;if(t){let y=typeof t=="string"?Rc(t):t;ut(l==="/"||((b=y.pathname)==null?void 0:b.startsWith(l)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=f;let h=d.pathname||"/",p=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let m=n&&n.state.matches.length?n.state.matches.map(y=>Object.assign(y,{route:n.manifest[y.route.id]||y.route})):XD(e,{pathname:p});br(c||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),br(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let g=_U(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:$r([l,r.encodeLocation?r.encodeLocation(y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:$r([l,r.encodeLocation?r.encodeLocation(y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),a,n);return t&&g?A.createElement(Dd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},g):g}function EU(){let e=$U(),t=fU(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:i},"ErrorBoundary")," or"," ",A.createElement("code",{style:i},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),n?A.createElement("pre",{style:a},n):null,s)}var TU=A.createElement(EU,null),c$=class extends A.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=xU(e.digest);n&&(e=n)}let t=e!==void 0?A.createElement(wr.Provider,{value:this.props.routeContext},A.createElement(uw.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?A.createElement(NU,{error:e},t):t}};c$.contextType=n$;var kv=new WeakMap;function NU({children:e,error:t}){let{basename:n}=A.useContext(er);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=bU(t.digest);if(r){let a=kv.get(t);if(a)throw a;let i=e$(r.location,n);if(JD&&!kv.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw kv.set(t,s),s}return A.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function CU({routeContext:e,match:t,children:n}){let r=A.useContext(Dc);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(wr.Provider,{value:e},n)}function _U(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let f=a.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);ut(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let s=!1,o=-1;if(n&&r){s=r.renderFallback;for(let f=0;f=0?a=a.slice(0,o+1):a=[a[0]];break}}}}let l=n==null?void 0:n.onError,c=r&&l?(f,d)=>{var h,p;l(f,{location:r.location,params:((p=(h=r.matches)==null?void 0:h[0])==null?void 0:p.params)??{},pattern:dU(r.matches),errorInfo:d})}:void 0;return a.reduceRight((f,d,h)=>{let p,m=!1,g=null,b=null;r&&(p=i&&d.route.id?i[d.route.id]:void 0,g=d.route.errorElement||TU,s&&(o<0&&h===0?(u$("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,b=null):o===h&&(m=!0,b=d.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,h+1)),v=()=>{let x;return p?x=g:m?x=b:d.route.Component?x=A.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=f,A.createElement(CU,{match:d,routeContext:{outlet:f,matches:y,isDataRoute:r!=null},children:x})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?A.createElement(c$,{location:r.location,revalidation:r.revalidation,component:g,error:p,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:c}):v()},null)}function fw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function PU(e){let t=A.useContext(Dc);return ut(t,fw(e)),t}function MU(e){let t=A.useContext(By);return ut(t,fw(e)),t}function RU(e){let t=A.useContext(wr);return ut(t,fw(e)),t}function dw(e){let t=RU(e),n=t.matches[t.matches.length-1];return ut(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function DU(){return dw("useRouteId")}function $U(){var r;let e=A.useContext(uw),t=MU("useRouteError"),n=dw("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function kU(){let{router:e}=PU("useNavigate"),t=dw("useNavigate"),n=A.useRef(!1);return s$(()=>{n.current=!0}),A.useCallback(async(a,i={})=>{br(n.current,i$),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var dO={};function u$(e,t,n){!t&&!dO[e]&&(dO[e]=!0,br(!1,n))}A.memo(LU);function LU({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:i}){return l$(e,void 0,{manifest:t,state:r,isStatic:a,onError:i})}function em({to:e,replace:t,state:n,relative:r}){ut($c()," may be used only in the context of a component.");let{static:a}=A.useContext(er);br(!a," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:i}=A.useContext(wr),{pathname:s}=jr(),o=Kt(),l=Iy(e,cw(i),s,r==="path"),c=JSON.stringify(l);return A.useEffect(()=>{o(JSON.parse(c),{replace:t,state:n,relative:r})},[o,c,r,t,n]),null}function f$(e){return AU(e.context)}function Se(e){ut(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function zU({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,useTransitions:s}){ut(!$c(),"You cannot render a inside another . You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=A.useMemo(()=>({basename:o,navigator:a,static:i,useTransitions:s,future:{}}),[o,a,i,s]);typeof n=="string"&&(n=Rc(n));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:p="default",mask:m}=n,g=A.useMemo(()=>{let b=Xa(c,o);return b==null?null:{location:{pathname:b,search:f,hash:d,state:h,key:p,mask:m},navigationType:r}},[o,c,f,d,h,p,r,m]);return br(g!=null,` is not able to match the URL "${c}${f}${d}" because it does not start with the basename, so the won't render anything.`),g==null?null:A.createElement(er.Provider,{value:l},A.createElement(Dd.Provider,{children:t,value:g}))}function IU({children:e,location:t}){return OU(J0(e),t)}function J0(e,t=[]){let n=[];return A.Children.forEach(e,(r,a)=>{if(!A.isValidElement(r))return;let i=[...t,a];if(r.type===A.Fragment){n.push.apply(n,J0(r.props.children,i));return}ut(r.type===Se,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),ut(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=J0(r.props.children,i)),n.push(s)}),n}var up="get",fp="application/x-www-form-urlencoded";function Uy(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function BU(e){return Uy(e)&&e.tagName.toLowerCase()==="button"}function UU(e){return Uy(e)&&e.tagName.toLowerCase()==="form"}function FU(e){return Uy(e)&&e.tagName.toLowerCase()==="input"}function VU(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HU(e,t){return e.button===0&&(!t||t==="_self")&&!VU(e)}function ex(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function qU(e,t){let n=ex(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var wh=null;function KU(){if(wh===null)try{new FormData(document.createElement("form"),0),wh=!1}catch{wh=!0}return wh}var GU=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lv(e){return e!=null&&!GU.has(e)?(br(!1,`"${e}" is not a valid \`encType\` for \`\`/\`\` and will default to "${fp}"`),null):e}function YU(e,t){let n,r,a,i,s;if(UU(e)){let o=e.getAttribute("action");r=o?Xa(o,t):null,n=e.getAttribute("method")||up,a=Lv(e.getAttribute("enctype"))||fp,i=new FormData(e)}else if(BU(e)||FU(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a or without a ');let l=e.getAttribute("formaction")||o.getAttribute("action");if(r=l?Xa(l,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||up,a=Lv(e.getAttribute("formenctype"))||Lv(o.getAttribute("enctype"))||fp,i=new FormData(o,e),!KU()){let{name:c,type:f,value:d}=e;if(f==="image"){let h=c?`${c}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else c&&i.append(c,d)}}else{if(Uy(e))throw new Error('Cannot submit element that is not , , or ');n=up,r=null,a=fp,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function hw(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function d$(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&Xa(a.pathname,t)==="/"?a.pathname=`${Jp(t)}/_root.${r}`:a.pathname=`${Jp(a.pathname)}.${r}`,a}async function XU(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function WU(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function QU(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await XU(i,n);return s.links?s.links():[]}return[]}));return t7(r.flat(1).filter(WU).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function hO(e,t,n,r,a,i){let s=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,o=(l,c)=>{var f;return n[c].pathname!==l.pathname||((f=n[c].route.path)==null?void 0:f.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,c)=>s(l,c)||o(l,c)):i==="data"?t.filter((l,c)=>{var d;let f=r.routes[l.route.id];if(!f||!f.hasLoader)return!1;if(s(l,c)||o(l,c))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function ZU(e,t,{includeHydrateFallback:n}={}){return JU(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function JU(e){return[...new Set(e)]}function e7(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function t7(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(e7(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function pw(){let e=A.useContext(Dc);return hw(e,"You must render this element inside a element"),e}function n7(){let e=A.useContext(By);return hw(e,"You must render this element inside a element"),e}var mw=A.createContext(void 0);mw.displayName="FrameworkContext";function yw(){let e=A.useContext(mw);return hw(e,"You must render this element inside a element"),e}function r7(e,t){let n=A.useContext(mw),[r,a]=A.useState(!1),[i,s]=A.useState(!1),{onFocus:o,onBlur:l,onMouseEnter:c,onMouseLeave:f,onTouchStart:d}=t,h=A.useRef(null);A.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let g=y=>{y.forEach(v=>{s(v.isIntersecting)})},b=new IntersectionObserver(g,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),A.useEffect(()=>{if(r){let g=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(g)}}},[r]);let p=()=>{a(!0)},m=()=>{a(!1),s(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:su(o,p),onBlur:su(l,m),onMouseEnter:su(c,p),onMouseLeave:su(f,m),onTouchStart:su(d,p)}]:[!1,h,{}]}function su(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function a7({page:e,...t}){let n=pU(),{router:r}=pw(),a=A.useMemo(()=>XD(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?A.createElement(s7,{page:e,matches:a,...t}):A.createElement(o7,{page:e,matches:a,...t}):null}function i7(e){let{manifest:t,routeModules:n}=yw(),[r,a]=A.useState([]);return A.useEffect(()=>{let i=!1;return QU(e,t,n).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,n]),r}function s7({page:e,matches:t,...n}){let r=jr(),{future:a}=yw(),{basename:i}=pw(),s=A.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let o=d$(e,i,a.v8_trailingSlashAwareDataRequests,"rsc"),l=!1,c=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?l=!0:c.push(f.route.id);return l&&c.length>0&&o.searchParams.set("_routes",c.join(",")),[o.pathname+o.search]},[i,a.v8_trailingSlashAwareDataRequests,e,r,t]);return A.createElement(A.Fragment,null,s.map(o=>A.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...n})))}function o7({page:e,matches:t,...n}){let r=jr(),{future:a,manifest:i,routeModules:s}=yw(),{basename:o}=pw(),{loaderData:l,matches:c}=n7(),f=A.useMemo(()=>hO(e,t,c,i,r,"data"),[e,t,c,i,r]),d=A.useMemo(()=>hO(e,t,c,i,r,"assets"),[e,t,c,i,r]),h=A.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,b=!1;if(t.forEach(v=>{var w;let x=i.routes[v.route.id];!x||!x.hasLoader||(!f.some(S=>S.route.id===v.route.id)&&v.route.id in l&&((w=s[v.route.id])!=null&&w.shouldRevalidate)||x.hasClientLoader?b=!0:g.add(v.route.id))}),g.size===0)return[];let y=d$(e,o,a.v8_trailingSlashAwareDataRequests,"data");return b&&g.size>0&&y.searchParams.set("_routes",t.filter(v=>g.has(v.route.id)).map(v=>v.route.id).join(",")),[y.pathname+y.search]},[o,a.v8_trailingSlashAwareDataRequests,l,r,i,f,t,e,s]),p=A.useMemo(()=>ZU(d,i),[d,i]),m=i7(d);return A.createElement(A.Fragment,null,h.map(g=>A.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),p.map(g=>A.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),m.map(({key:g,link:b})=>A.createElement("link",{key:g,nonce:n.nonce,...b,crossOrigin:b.crossOrigin??n.crossOrigin})))}function l7(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var c7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{c7&&(window.__reactRouterVersion="7.17.0")}catch{}function u7({basename:e,children:t,useTransitions:n,window:r}){let a=A.useRef();a.current==null&&(a.current=B8({window:r,v5Compat:!0}));let i=a.current,[s,o]=A.useState({action:i.action,location:i.location}),l=A.useCallback(c=>{n===!1?o(c):A.startTransition(()=>o(c))},[n]);return A.useLayoutEffect(()=>i.listen(l),[i,l]),A.createElement(zU,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,useTransitions:n})}var h$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Le=A.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:i,replace:s,mask:o,state:l,target:c,to:f,preventScrollReset:d,viewTransition:h,defaultShouldRevalidate:p,...m},g){let{basename:b,navigator:y,useTransitions:v}=A.useContext(er),x=typeof f=="string"&&h$.test(f),w=e$(f,b);f=w.to;let S=SU(f,{relative:a}),j=jr(),O=null;if(o){let $=Iy(o,[],j.mask?j.mask.pathname:"/",!0);b!=="/"&&($.pathname=$.pathname==="/"?b:$r([b,$.pathname])),O=y.createHref($)}let[E,T,N]=r7(r,m),M=h7(f,{replace:s,mask:o,state:l,target:c,preventScrollReset:d,relative:a,viewTransition:h,defaultShouldRevalidate:p,useTransitions:v});function C($){t&&t($),$.defaultPrevented||M($)}let L=!(w.isExternal||i),D=A.createElement("a",{...m,...N,href:(L?O:void 0)||w.absoluteURL||S,onClick:L?C:t,ref:l7(g,T),target:c,"data-discover":!x&&n==="render"?"true":void 0});return E&&!x?A.createElement(A.Fragment,null,D,A.createElement(a7,{page:S})):D});Le.displayName="Link";var tx=A.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:i,to:s,viewTransition:o,children:l,...c},f){let d=$d(s,{relative:c.relative}),h=jr(),p=A.useContext(By),{navigator:m,basename:g}=A.useContext(er),b=p!=null&&v7(d)&&o===!0,y=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=h.pathname,x=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(v=v.toLowerCase(),x=x?x.toLowerCase():null,y=y.toLowerCase()),x&&g&&(x=Xa(x,g)||x);const w=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let S=v===y||!a&&v.startsWith(y)&&v.charAt(w)==="/",j=x!=null&&(x===y||!a&&x.startsWith(y)&&x.charAt(y.length)==="/"),O={isActive:S,isPending:j,isTransitioning:b},E=S?t:void 0,T;typeof r=="function"?T=r(O):T=[r,S?"active":null,j?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let N=typeof i=="function"?i(O):i;return A.createElement(Le,{...c,"aria-current":E,className:T,ref:f,style:N,to:s,viewTransition:o},typeof l=="function"?l(O):l)});tx.displayName="NavLink";var f7=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:s=up,action:o,onSubmit:l,relative:c,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h,...p},m)=>{let{useTransitions:g}=A.useContext(er),b=y7(),y=g7(o,{relative:c}),v=s.toLowerCase()==="get"?"get":"post",x=typeof o=="string"&&h$.test(o),w=S=>{if(l&&l(S),S.defaultPrevented)return;S.preventDefault();let j=S.nativeEvent.submitter,O=(j==null?void 0:j.getAttribute("formmethod"))||s,E=()=>b(j||S.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:a,state:i,relative:c,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h});g&&n!==!1?A.startTransition(()=>E()):E()};return A.createElement("form",{ref:m,method:v,action:y,onSubmit:r?l:w,...p,"data-discover":!x&&e==="render"?"true":void 0})});f7.displayName="Form";function d7(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function p$(e){let t=A.useContext(Dc);return ut(t,d7(e)),t}function h7(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:o,defaultShouldRevalidate:l,useTransitions:c}={}){let f=Kt(),d=jr(),h=$d(e,{relative:s});return A.useCallback(p=>{if(HU(p,t)){p.preventDefault();let m=n!==void 0?n:Ef(d)===Ef(h),g=()=>f(e,{replace:m,mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:o,defaultShouldRevalidate:l});c?A.startTransition(()=>g()):g()}},[d,f,h,n,r,a,t,e,i,s,o,l,c])}function m$(e){br(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=A.useRef(ex(e)),n=A.useRef(!1),r=jr(),a=A.useMemo(()=>qU(r.search,n.current?null:t.current),[r.search]),i=Kt(),s=A.useCallback((o,l)=>{const c=ex(typeof o=="function"?o(new URLSearchParams(a)):o);n.current=!0,i("?"+c,l)},[i,a]);return[a,s]}var p7=0,m7=()=>`__${String(++p7)}__`;function y7(){let{router:e}=p$("useSubmit"),{basename:t}=A.useContext(er),n=DU(),r=e.fetch,a=e.navigate;return A.useCallback(async(i,s={})=>{let{action:o,method:l,encType:c,formData:f,body:d}=YU(i,t);if(s.navigate===!1){let h=s.fetcherKey||m7();await r(h,n,s.action||o,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:f,body:d,formMethod:s.method||l,formEncType:s.encType||c,flushSync:s.flushSync})}else await a(s.action||o,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:f,body:d,formMethod:s.method||l,formEncType:s.encType||c,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,a,t,n])}function g7(e,{relative:t}={}){let{basename:n}=A.useContext(er),r=A.useContext(wr);ut(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...$d(e||".",{relative:t})},s=jr();if(e==null){i.search=s.search;let o=new URLSearchParams(i.search),l=o.getAll("index");if(l.some(f=>f==="")){o.delete("index"),l.filter(d=>d).forEach(d=>o.append("index",d));let f=o.toString();i.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:$r([n,i.pathname])),Ef(i)}function v7(e,{relative:t}={}){let n=A.useContext(r$);ut(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=p$("useViewTransitionState"),a=$d(e,{relative:t});if(!n.isTransitioning)return!1;let i=Xa(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Xa(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Zp(a.pathname,s)!=null||Zp(a.pathname,i)!=null}const y$=A.createContext(null);function b7({children:e}){const[t,n]=A.useState(()=>localStorage.getItem("mall_zip")||""),[r,a]=A.useState(()=>{const m=localStorage.getItem("mall_store_id");return m?Number(m):null}),[i,s]=A.useState(()=>localStorage.getItem("mall_store_name")||""),[o,l]=A.useState(()=>localStorage.getItem("mall_token")),[c,f]=A.useState(0),d=(m,g,b)=>{n(m),a(g),s(b),localStorage.setItem("mall_zip",m),localStorage.setItem("mall_store_id",String(g)),localStorage.setItem("mall_store_name",b)},h=()=>{n(""),a(null),s(""),localStorage.removeItem("mall_zip"),localStorage.removeItem("mall_store_id"),localStorage.removeItem("mall_store_name")},p=m=>{l(m),m?localStorage.setItem("mall_token",m):localStorage.removeItem("mall_token")};return A.useEffect(()=>{const m=()=>l(localStorage.getItem("mall_token"));return window.addEventListener("storage",m),()=>window.removeEventListener("storage",m)},[]),u.jsx(y$.Provider,{value:{zip:t,storeId:r,storeName:i,setZone:d,clearZone:h,custToken:o,setCustToken:p,cartCount:c,setCartCount:f},children:e})}const bn=()=>A.useContext(y$),Ee=e=>`$${(Number(e)||0).toFixed(2)}`,gw=A.createContext({});function kc(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const Fy=A.createContext(null),Vy=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class x7 extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function S7({children:e,isPresent:t}){const n=A.useId(),r=A.useRef(null),a=A.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=A.useContext(Vy);return A.useInsertionEffect(()=>{const{width:s,height:o,top:l,left:c}=a.current;if(t||!r.current||!s||!o)return;r.current.dataset.motionPopId=n;const f=document.createElement("style");return i&&(f.nonce=i),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${s}px !important; + height: ${o}px !important; + top: ${l}px !important; + left: ${c}px !important; + } + `),()=>{document.head.removeChild(f)}},[t]),u.jsx(x7,{isPresent:t,childRef:r,sizeRef:a,children:A.cloneElement(e,{ref:r})})}const w7=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:i,mode:s})=>{const o=kc(j7),l=A.useId(),c=A.useCallback(d=>{o.set(d,!0);for(const h of o.values())if(!h)return;r&&r()},[o,r]),f=A.useMemo(()=>({id:l,initial:t,isPresent:n,custom:a,onExitComplete:c,register:d=>(o.set(d,!1),()=>o.delete(d))}),i?[Math.random(),c]:[n,c]);return A.useMemo(()=>{o.forEach((d,h)=>o.set(h,!1))},[n]),A.useEffect(()=>{!n&&!o.size&&r&&r()},[n]),s==="popLayout"&&(e=u.jsx(S7,{isPresent:n,children:e})),u.jsx(Fy.Provider,{value:f,children:e})};function j7(){return new Map}function g$(e=!0){const t=A.useContext(Fy);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,i=A.useId();A.useEffect(()=>{e&&a(i)},[e]);const s=A.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const jh=e=>e.key||"";function pO(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const vw=typeof window<"u",Hy=vw?A.useLayoutEffect:A.useEffect,nx=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:i="sync",propagate:s=!1})=>{const[o,l]=g$(s),c=A.useMemo(()=>pO(e),[e]),f=s&&!o?[]:c.map(jh),d=A.useRef(!0),h=A.useRef(c),p=kc(()=>new Map),[m,g]=A.useState(c),[b,y]=A.useState(c);Hy(()=>{d.current=!1,h.current=c;for(let w=0;w{const S=jh(w),j=s&&!o?!1:c===b||f.includes(S),O=()=>{if(p.has(S))p.set(S,!0);else return;let E=!0;p.forEach(T=>{T||(E=!1)}),E&&(x==null||x(),y(h.current),s&&(l==null||l()),r&&r())};return u.jsx(w7,{isPresent:j,initial:!d.current||n?void 0:!1,custom:j?void 0:t,presenceAffectsLayout:a,mode:i,onExitComplete:j?void 0:O,children:w},S)})})},yn=e=>e;let A7=yn,v$=yn;function bw(e){let t;return()=>(t===void 0&&(t=e()),t)}const ro=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ia=e=>e*1e3,Ba=e=>e/1e3,O7={useManualTiming:!1};function E7(e){let t=new Set,n=new Set,r=!1,a=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function o(c){i.has(c)&&(l.schedule(c),e()),c(s)}const l={schedule:(c,f=!1,d=!1)=>{const p=d&&r?t:n;return f&&i.add(c),p.has(c)||p.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(s=c,r){a=!0;return}r=!0,[t,n]=[n,t],t.forEach(o),t.clear(),r=!1,a&&(a=!1,l.process(c))}};return l}const Ah=["read","resolveKeyframes","update","preRender","render","postRender"],T7=40;function b$(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Ah.reduce((y,v)=>(y[v]=E7(i),y),{}),{read:o,resolveKeyframes:l,update:c,preRender:f,render:d,postRender:h}=s,p=()=>{const y=performance.now();n=!1,a.delta=r?1e3/60:Math.max(Math.min(y-a.timestamp,T7),1),a.timestamp=y,a.isProcessing=!0,o.process(a),l.process(a),c.process(a),f.process(a),d.process(a),h.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,a.isProcessing||e(p)};return{schedule:Ah.reduce((y,v)=>{const x=s[v];return y[v]=(w,S=!1,j=!1)=>(n||m(),x.schedule(w,S,j)),y},{}),cancel:y=>{for(let v=0;vmO[e].some(n=>!!t[n])};function N7(e){for(const t in e)Gl[t]={...Gl[t],...e[t]}}const C7=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function tm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||C7.has(e)}let S$=e=>!tm(e);function _7(e){e&&(S$=t=>t.startsWith("on")?!tm(t):e(t))}try{_7(require("@emotion/is-prop-valid").default)}catch{}function P7(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(S$(a)||n===!0&&tm(a)||!t&&!tm(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function M7(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}const qy=A.createContext({});function Tf(e){return typeof e=="string"||Array.isArray(e)}function Ky(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const xw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sw=["initial",...xw];function Gy(e){return Ky(e.animate)||Sw.some(t=>Tf(e[t]))}function w$(e){return!!(Gy(e)||e.variants)}function R7(e,t){if(Gy(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Tf(n)?n:void 0,animate:Tf(r)?r:void 0}}return e.inherit!==!1?t:{}}function D7(e){const{initial:t,animate:n}=R7(e,A.useContext(qy));return A.useMemo(()=>({initial:t,animate:n}),[yO(t),yO(n)])}function yO(e){return Array.isArray(e)?e.join(" "):e}const $7=Symbol.for("motionComponentSymbol");function tl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function k7(e,t,n){return A.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):tl(n)&&(n.current=r))},[t])}const ww=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),L7="framerAppearId",j$="data-"+ww(L7),{schedule:jw}=b$(queueMicrotask,!1),A$=A.createContext({});function z7(e,t,n,r,a){var i,s;const{visualElement:o}=A.useContext(qy),l=A.useContext(x$),c=A.useContext(Fy),f=A.useContext(Vy).reducedMotion,d=A.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f}));const h=d.current,p=A.useContext(A$);h&&!h.projection&&a&&(h.type==="html"||h.type==="svg")&&I7(d.current,n,a,p);const m=A.useRef(!1);A.useInsertionEffect(()=>{h&&m.current&&h.update(n,c)});const g=n[j$],b=A.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,g)));return Hy(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),jw.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),A.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),b.current=!1))}),h}function I7(e,t,n,r){const{layoutId:a,layout:i,drag:s,dragConstraints:o,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:O$(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!s||o&&tl(o),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function O$(e){if(e)return e.options.allowProjection!==!1?e.projection:O$(e.parent)}function B7({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){var i,s;e&&N7(e);function o(c,f){let d;const h={...A.useContext(Vy),...c,layoutId:U7(c)},{isStatic:p}=h,m=D7(c),g=r(c,p);if(!p&&vw){F7();const b=V7(h);d=b.MeasureLayout,m.visualElement=z7(a,g,h,t,b.ProjectionNode)}return u.jsxs(qy.Provider,{value:m,children:[d&&m.visualElement?u.jsx(d,{visualElement:m.visualElement,...h}):null,n(a,c,k7(g,m.visualElement,f),g,p,m.visualElement)]})}o.displayName=`motion.${typeof a=="string"?a:`create(${(s=(i=a.displayName)!==null&&i!==void 0?i:a.name)!==null&&s!==void 0?s:""})`}`;const l=A.forwardRef(o);return l[$7]=a,l}function U7({layoutId:e}){const t=A.useContext(gw).id;return t&&e!==void 0?t+"-"+e:e}function F7(e,t){A.useContext(x$).strict}function V7(e){const{drag:t,layout:n}=Gl;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const H7=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Aw(e){return typeof e!="string"||e.includes("-")?!1:!!(H7.indexOf(e)>-1||/[A-Z]/u.test(e))}function gO(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ow(e,t,n,r){if(typeof t=="function"){const[a,i]=gO(r);t=t(n!==void 0?n:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=gO(r);t=t(n!==void 0?n:e.custom,a,i)}return t}const rx=e=>Array.isArray(e),q7=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),K7=e=>rx(e)?e[e.length-1]||0:e,cn=e=>!!(e&&e.getVelocity);function dp(e){const t=cn(e)?e.get():e;return q7(t)?t.toValue():t}function G7({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,a,i){const s={latestValues:Y7(r,a,i,e),renderState:t()};return n&&(s.onMount=o=>n({props:r,current:o,...s}),s.onUpdate=o=>n(o)),s}const E$=e=>(t,n)=>{const r=A.useContext(qy),a=A.useContext(Fy),i=()=>G7(e,t,r,a);return n?i():kc(i)};function Y7(e,t,n,r){const a={},i=r(e,{});for(const h in i)a[h]=dp(i[h]);let{initial:s,animate:o}=e;const l=Gy(e),c=w$(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),o===void 0&&(o=t.animate));let f=n?n.initial===!1:!1;f=f||s===!1;const d=f?o:s;if(d&&typeof d!="boolean"&&!Ky(d)){const h=Array.isArray(d)?d:[d];for(let p=0;pt=>typeof t=="string"&&t.startsWith(e),N$=T$("--"),X7=T$("var(--"),Ew=e=>X7(e)?W7.test(e.split("/*")[0].trim()):!1,W7=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,C$=(e,t)=>t&&typeof e=="number"?t.transform(e):e,la=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Nf={...zc,transform:e=>la(0,1,e)},Oh={...zc,default:1},kd=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ui=kd("deg"),ra=kd("%"),fe=kd("px"),Q7=kd("vh"),Z7=kd("vw"),vO={...ra,parse:e=>ra.parse(e)/100,transform:e=>ra.transform(e*100)},J7={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,backgroundPositionX:fe,backgroundPositionY:fe},eF={rotate:ui,rotateX:ui,rotateY:ui,rotateZ:ui,scale:Oh,scaleX:Oh,scaleY:Oh,scaleZ:Oh,skew:ui,skewX:ui,skewY:ui,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:Nf,originX:vO,originY:vO,originZ:fe},bO={...zc,transform:Math.round},Tw={...J7,...eF,zIndex:bO,size:fe,fillOpacity:Nf,strokeOpacity:Nf,numOctaves:bO},tF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nF=Lc.length;function rF(e,t,n){let r="",a=!0;for(let i=0;i({style:{},transform:{},transformOrigin:{},vars:{}}),_$=()=>({..._w(),attrs:{}}),Pw=e=>typeof e=="string"&&e.toLowerCase()==="svg";function P$(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const M$=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function R$(e,t,n,r){P$(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(M$.has(a)?a:ww(a),t.attrs[a])}const nm={};function lF(e){Object.assign(nm,e)}function D$(e,{layout:t,layoutId:n}){return xo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!nm[e]||e==="opacity")}function Mw(e,t,n){var r;const{style:a}=e,i={};for(const s in a)(cn(a[s])||t.style&&cn(t.style[s])||D$(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=a[s]);return i}function $$(e,t,n){const r=Mw(e,t,n);for(const a in e)if(cn(e[a])||cn(t[a])){const i=Lc.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=e[a]}return r}function cF(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const SO=["x","y","width","height","cx","cy","r"],uF={useVisualState:E$({scrapeMotionValuesFromProps:$$,createRenderState:_$,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:a})=>{if(!n)return;let i=!!e.drag;if(!i){for(const o in a)if(xo.has(o)){i=!0;break}}if(!i)return;let s=!t;if(t)for(let o=0;o{cF(n,r),Re.render(()=>{Cw(r,a,Pw(n.tagName),e.transformTemplate),R$(n,r)})})}})},fF={useVisualState:E$({scrapeMotionValuesFromProps:Mw,createRenderState:_w})};function k$(e,t,n){for(const r in t)!cn(t[r])&&!D$(r,n)&&(e[r]=t[r])}function dF({transformTemplate:e},t){return A.useMemo(()=>{const n=_w();return Nw(n,t,e),Object.assign({},n.vars,n.style)},[t])}function hF(e,t){const n=e.style||{},r={};return k$(r,n,e),Object.assign(r,dF(e,t)),r}function pF(e,t){const n={},r=hF(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function mF(e,t,n,r){const a=A.useMemo(()=>{const i=_$();return Cw(i,t,Pw(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};k$(i,e.style,e),a.style={...i,...a.style}}return a}function yF(e=!1){return(n,r,a,{latestValues:i},s)=>{const l=(Aw(n)?mF:pF)(r,i,s,n),c=P7(r,typeof n=="string",e),f=n!==A.Fragment?{...c,...l,ref:a}:{},{children:d}=r,h=A.useMemo(()=>cn(d)?d.get():d,[d]);return A.createElement(n,{...f,children:h})}}function gF(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const s={...Aw(r)?uF:fF,preloadedFeatures:e,useRender:yF(a),createVisualElement:t,Component:r};return B7(s)}}function L$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rwindow.ScrollTimeline!==void 0);class vF{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(z$()&&a.attachTimeline)return a.attachTimeline(t);if(typeof n=="function")return n(a)});return()=>{r.forEach((a,i)=>{a&&a(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class bF extends vF{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Rw(e,t){return e?e[t]||e.default||e:void 0}const ax=2e4;function I$(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=ax?1/0:t}function Dw(e){return typeof e=="function"}function wO(e,t){e.timeline=t,e.onfinish=null}const $w=e=>Array.isArray(e)&&typeof e[0]=="number",xF={linearEasing:void 0};function SF(e,t){const n=bw(e);return()=>{var r;return(r=xF[t])!==null&&r!==void 0?r:n()}}const rm=SF(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),B$=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let i=0;i`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ix={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nu([0,.65,.55,1]),circOut:Nu([.55,0,1,.45]),backIn:Nu([.31,.01,.66,-.59]),backOut:Nu([.33,1.53,.69,.99])};function F$(e,t){if(e)return typeof e=="function"&&rm()?B$(e,t):$w(e)?Nu(e):Array.isArray(e)?e.map(n=>F$(n,t)||ix.easeOut):ix[e]}const Cr={x:!1,y:!1};function V$(){return Cr.x||Cr.y}function H$(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let a=document;const i=(r=void 0)!==null&&r!==void 0?r:a.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function q$(e,t){const n=H$(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function jO(e){return t=>{t.pointerType==="touch"||V$()||e(t)}}function wF(e,t,n={}){const[r,a,i]=q$(e,n),s=jO(o=>{const{target:l}=o,c=t(o);if(typeof c!="function"||!l)return;const f=jO(d=>{c(d),l.removeEventListener("pointerleave",f)});l.addEventListener("pointerleave",f,a)});return r.forEach(o=>{o.addEventListener("pointerenter",s,a)}),i}const K$=(e,t)=>t?e===t?!0:K$(e,t.parentElement):!1,kw=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,jF=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function AF(e){return jF.has(e.tagName)||e.tabIndex!==-1}const Cu=new WeakSet;function AO(e){return t=>{t.key==="Enter"&&e(t)}}function Iv(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const OF=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=AO(()=>{if(Cu.has(n))return;Iv(n,"down");const a=AO(()=>{Iv(n,"up")}),i=()=>Iv(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function OO(e){return kw(e)&&!V$()}function EF(e,t,n={}){const[r,a,i]=q$(e,n),s=o=>{const l=o.currentTarget;if(!OO(o)||Cu.has(l))return;Cu.add(l);const c=t(o),f=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),!(!OO(p)||!Cu.has(l))&&(Cu.delete(l),typeof c=="function"&&c(p,{success:m}))},d=p=>{f(p,n.useGlobalTarget||K$(l,p.target))},h=p=>{f(p,!1)};window.addEventListener("pointerup",d,a),window.addEventListener("pointercancel",h,a)};return r.forEach(o=>{!AF(o)&&o.getAttribute("tabindex")===null&&(o.tabIndex=0),(n.useGlobalTarget?window:o).addEventListener("pointerdown",s,a),o.addEventListener("focus",c=>OF(c,a),a)}),i}function TF(e){return e==="x"||e==="y"?Cr[e]?null:(Cr[e]=!0,()=>{Cr[e]=!1}):Cr.x||Cr.y?null:(Cr.x=Cr.y=!0,()=>{Cr.x=Cr.y=!1})}const G$=new Set(["width","height","top","left","right","bottom",...Lc]);let hp;function NF(){hp=void 0}const aa={now:()=>(hp===void 0&&aa.set(Bt.isProcessing||O7.useManualTiming?Bt.timestamp:performance.now()),hp),set:e=>{hp=e,queueMicrotask(NF)}};function Lw(e,t){e.indexOf(t)===-1&&e.push(t)}function zw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Iw{constructor(){this.subscriptions=[]}add(t){return Lw(this.subscriptions,t),()=>zw(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e)),Gu={current:void 0};class _F{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{const i=aa.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=aa.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=CF(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Iw);const r=this.events[t].add(n);return t==="change"?()=>{r(),Re.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Gu.current&&Gu.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=aa.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>EO)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,EO);return Bw(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qr(e,t){return new _F(e,t)}function PF(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qr(n))}function MF(e,t){const n=Yy(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const s in i){const o=K7(i[s]);PF(e,s,o)}}function RF(e){return!!(cn(e)&&e.add)}function sx(e,t){const n=e.getValue("willChange");if(RF(n))return n.add(t)}function Y$(e){return e.props[j$]}const X$=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,DF=1e-7,$F=12;function kF(e,t,n,r,a){let i,s,o=0;do s=t+(n-t)/2,i=X$(s,r,a)-e,i>0?n=s:t=s;while(Math.abs(i)>DF&&++o<$F);return s}function Ld(e,t,n,r){if(e===t&&n===r)return yn;const a=i=>kF(i,0,1,e,n);return i=>i===0||i===1?i:X$(a(i),t,r)}const W$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Q$=e=>t=>1-e(1-t),Z$=Ld(.33,1.53,.69,.99),Uw=Q$(Z$),J$=W$(Uw),e3=e=>(e*=2)<1?.5*Uw(e):.5*(2-Math.pow(2,-10*(e-1))),Fw=e=>1-Math.sin(Math.acos(e)),t3=Q$(Fw),n3=W$(Fw),r3=e=>/^0[^.\s]+$/u.test(e);function LF(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||r3(e):!0}const Yu=e=>Math.round(e*1e5)/1e5,Vw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zF(e){return e==null}const IF=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hw=(e,t)=>n=>!!(typeof n=="string"&&IF.test(n)&&n.startsWith(e)||t&&!zF(n)&&Object.prototype.hasOwnProperty.call(n,t)),a3=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,i,s,o]=r.match(Vw);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},BF=e=>la(0,255,e),Bv={...zc,transform:e=>Math.round(BF(e))},Os={test:Hw("rgb","red"),parse:a3("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Bv.transform(e)+", "+Bv.transform(t)+", "+Bv.transform(n)+", "+Yu(Nf.transform(r))+")"};function UF(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const ox={test:Hw("#"),parse:UF,transform:Os.transform},nl={test:Hw("hsl","hue"),parse:a3("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ra.transform(Yu(t))+", "+ra.transform(Yu(n))+", "+Yu(Nf.transform(r))+")"},sn={test:e=>Os.test(e)||ox.test(e)||nl.test(e),parse:e=>Os.test(e)?Os.parse(e):nl.test(e)?nl.parse(e):ox.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Os.transform(e):nl.transform(e)},FF=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function VF(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vw))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(FF))===null||n===void 0?void 0:n.length)||0)>0}const i3="number",s3="color",HF="var",qF="var(",TO="${}",KF=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Cf(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(KF,l=>(sn.test(l)?(r.color.push(i),a.push(s3),n.push(sn.parse(l))):l.startsWith(qF)?(r.var.push(i),a.push(HF),n.push(l)):(r.number.push(i),a.push(i3),n.push(parseFloat(l))),++i,TO)).split(TO);return{values:n,split:o,indexes:r,types:a}}function o3(e){return Cf(e).values}function l3(e){const{split:t,types:n}=Cf(e),r=t.length;return a=>{let i="";for(let s=0;stypeof e=="number"?0:e;function YF(e){const t=o3(e);return l3(e)(t.map(GF))}const Ji={test:VF,parse:o3,createTransformer:l3,getAnimatableNone:YF},XF=new Set(["brightness","contrast","saturate","opacity"]);function WF(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vw)||[];if(!r)return e;const a=n.replace(r,"");let i=XF.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+a+")"}const QF=/\b([a-z-]*)\(.*?\)/gu,lx={...Ji,getAnimatableNone:e=>{const t=e.match(QF);return t?t.map(WF).join(" "):e}},ZF={...Tw,color:sn,backgroundColor:sn,outlineColor:sn,fill:sn,stroke:sn,borderColor:sn,borderTopColor:sn,borderRightColor:sn,borderBottomColor:sn,borderLeftColor:sn,filter:lx,WebkitFilter:lx},qw=e=>ZF[e];function c3(e,t){let n=qw(e);return n!==lx&&(n=Ji),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const JF=new Set(["auto","none","0"]);function eV(e,t,n){let r=0,a;for(;re===zc||e===fe,CO=(e,t)=>parseFloat(e.split(", ")[t]),_O=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const a=r.match(/^matrix3d\((.+)\)$/u);if(a)return CO(a[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?CO(i[1],e):0}},tV=new Set(["x","y","z"]),nV=Lc.filter(e=>!tV.has(e));function rV(e){const t=[];return nV.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Yl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:_O(4,13),y:_O(5,14)};Yl.translateX=Yl.x;Yl.translateY=Yl.y;const Gs=new Set;let cx=!1,ux=!1;function u3(){if(ux){const e=Array.from(Gs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=rV(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([i,s])=>{var o;(o=r.getValue(i))===null||o===void 0||o.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ux=!1,cx=!1,Gs.forEach(e=>e.complete()),Gs.clear()}function f3(){Gs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ux=!0)})}function aV(){f3(),u3()}class Kw{constructor(t,n,r,a,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Gs.add(this),cx||(cx=!0,Re.read(f3),Re.resolveKeyframes(u3))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;for(let i=0;i/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),iV=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sV(e){const t=iV.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function h3(e,t,n=1){const[r,a]=sV(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return d3(s)?parseFloat(s):s}return Ew(a)?h3(a,t,n+1):a}const p3=e=>t=>t.test(e),oV={test:e=>e==="auto",parse:e=>e},m3=[zc,fe,ra,ui,Z7,Q7,oV],PO=e=>m3.find(p3(e));class y3 extends Kw{constructor(t,n,r,a,i){super(t,n,r,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const MO=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ji.test(e)||e==="0")&&!e.startsWith("url("));function lV(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function Xy(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(uV),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const fV=40;class g3{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=aa.now(),this.options={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:i,repeatType:s,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>fV?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&aV(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=aa.now(),this.hasAttemptedResolve=!0;const{name:r,type:a,velocity:i,delay:s,onComplete:o,onUpdate:l,isGenerator:c}=this.options;if(!c&&!cV(t,r,a,i))if(s)this.options.duration=0;else{l&&l(Xy(t,this.options,n)),o&&o(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ht=(e,t,n)=>e+(t-e)*n;function Uv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function dV({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,i=0,s=0;if(!t)a=i=s=n;else{const o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;a=Uv(l,o,e+1/3),i=Uv(l,o,e),s=Uv(l,o,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function am(e,t){return n=>n>0?t:e}const Fv=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},hV=[ox,Os,nl],pV=e=>hV.find(t=>t.test(e));function RO(e){const t=pV(e);if(!t)return!1;let n=t.parse(e);return t===nl&&(n=dV(n)),n}const DO=(e,t)=>{const n=RO(e),r=RO(t);if(!n||!r)return am(e,t);const a={...n};return i=>(a.red=Fv(n.red,r.red,i),a.green=Fv(n.green,r.green,i),a.blue=Fv(n.blue,r.blue,i),a.alpha=ht(n.alpha,r.alpha,i),Os.transform(a))},mV=(e,t)=>n=>t(e(n)),zd=(...e)=>e.reduce(mV),fx=new Set(["none","hidden"]);function yV(e,t){return fx.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gV(e,t){return n=>ht(e,t,n)}function Gw(e){return typeof e=="number"?gV:typeof e=="string"?Ew(e)?am:sn.test(e)?DO:xV:Array.isArray(e)?v3:typeof e=="object"?sn.test(e)?DO:vV:am}function v3(e,t){const n=[...e],r=n.length,a=e.map((i,s)=>Gw(i)(i,t[s]));return i=>{for(let s=0;s{for(const i in r)n[i]=r[i](a);return n}}function bV(e,t){var n;const r=[],a={color:0,var:0,number:0};for(let i=0;i{const n=Ji.createTransformer(t),r=Cf(e),a=Cf(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?fx.has(e)&&!a.values.length||fx.has(t)&&!r.values.length?yV(e,t):zd(v3(bV(r,a),a.values),n):am(e,t)};function b3(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ht(e,t,n):Gw(e)(e,t)}const SV=5;function x3(e,t,n){const r=Math.max(t-SV,0);return Bw(n-e(r),t-r)}const yt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Vv=.001;function wV({duration:e=yt.duration,bounce:t=yt.bounce,velocity:n=yt.velocity,mass:r=yt.mass}){let a,i,s=1-t;s=la(yt.minDamping,yt.maxDamping,s),e=la(yt.minDuration,yt.maxDuration,Ba(e)),s<1?(a=c=>{const f=c*s,d=f*e,h=f-n,p=dx(c,s),m=Math.exp(-d);return Vv-h/p*m},i=c=>{const d=c*s*e,h=d*n+n,p=Math.pow(s,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=dx(Math.pow(c,2),s);return(-a(c)+Vv>0?-1:1)*((h-p)*m)/g}):(a=c=>{const f=Math.exp(-c*e),d=(c-n)*e+1;return-Vv+f*d},i=c=>{const f=Math.exp(-c*e),d=(n-c)*(e*e);return f*d});const o=5/e,l=AV(a,i,o);if(e=Ia(e),isNaN(l))return{stiffness:yt.stiffness,damping:yt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const jV=12;function AV(e,t,n){let r=n;for(let a=1;ae[n]!==void 0)}function TV(e){let t={velocity:yt.velocity,stiffness:yt.stiffness,damping:yt.damping,mass:yt.mass,isResolvedFromDuration:!1,...e};if(!$O(e,EV)&&$O(e,OV))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,i=2*la(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:yt.mass,stiffness:a,damping:i}}else{const n=wV(e);t={...t,...n,mass:yt.mass},t.isResolvedFromDuration=!0}return t}function S3(e=yt.visualDuration,t=yt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:l,damping:c,mass:f,duration:d,velocity:h,isResolvedFromDuration:p}=TV({...n,velocity:-Ba(n.velocity||0)}),m=h||0,g=c/(2*Math.sqrt(l*f)),b=s-i,y=Ba(Math.sqrt(l/f)),v=Math.abs(b)<5;r||(r=v?yt.restSpeed.granular:yt.restSpeed.default),a||(a=v?yt.restDelta.granular:yt.restDelta.default);let x;if(g<1){const S=dx(y,g);x=j=>{const O=Math.exp(-g*y*j);return s-O*((m+g*y*b)/S*Math.sin(S*j)+b*Math.cos(S*j))}}else if(g===1)x=S=>s-Math.exp(-y*S)*(b+(m+y*b)*S);else{const S=y*Math.sqrt(g*g-1);x=j=>{const O=Math.exp(-g*y*j),E=Math.min(S*j,300);return s-O*((m+g*y*b)*Math.sinh(E)+S*b*Math.cosh(E))/S}}const w={calculatedDuration:p&&d||null,next:S=>{const j=x(S);if(p)o.done=S>=d;else{let O=0;g<1&&(O=S===0?Ia(m):x3(x,S,j));const E=Math.abs(O)<=r,T=Math.abs(s-j)<=a;o.done=E&&T}return o.value=o.done?s:j,o},toString:()=>{const S=Math.min(I$(w),ax),j=B$(O=>w.next(S*O).value,S,30);return S+"ms "+j}};return w}function kO({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:l,restDelta:c=.5,restSpeed:f}){const d=e[0],h={done:!1,value:d},p=E=>o!==void 0&&El,m=E=>o===void 0?l:l===void 0||Math.abs(o-E)-g*Math.exp(-E/r),x=E=>y+v(E),w=E=>{const T=v(E),N=x(E);h.done=Math.abs(T)<=c,h.value=h.done?y:N};let S,j;const O=E=>{p(h.value)&&(S=E,j=S3({keyframes:[h.value,m(h.value)],velocity:x3(x,E,h.value),damping:a,stiffness:i,restDelta:c,restSpeed:f}))};return O(0),{calculatedDuration:null,next:E=>{let T=!1;return!j&&S===void 0&&(T=!0,w(E),O(E)),S!==void 0&&E>=S?j.next(E-S):(!T&&w(E),h)}}}const NV=Ld(.42,0,1,1),CV=Ld(0,0,.58,1),w3=Ld(.42,0,.58,1),_V=e=>Array.isArray(e)&&typeof e[0]!="number",PV={linear:yn,easeIn:NV,easeInOut:w3,easeOut:CV,circIn:Fw,circInOut:n3,circOut:t3,backIn:Uw,backInOut:J$,backOut:Z$,anticipate:e3},LO=e=>{if($w(e)){v$(e.length===4);const[t,n,r,a]=e;return Ld(t,n,r,a)}else if(typeof e=="string")return PV[e];return e};function MV(e,t,n){const r=[],a=n||b3,i=e.length-1;for(let s=0;st[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=MV(t,r,a),l=o.length,c=f=>{if(s&&f1)for(;dc(la(e[0],e[i-1],f)):c}function RV(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=ro(0,t,r);e.push(ht(n,1,a))}}function j3(e){const t=[0];return RV(t,e.length-1),t}function DV(e,t){return e.map(n=>n*t)}function $V(e,t){return e.map(()=>t||w3).splice(0,e.length-1)}function im({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=_V(r)?r.map(LO):LO(r),i={done:!1,value:t[0]},s=DV(n&&n.length===t.length?n:j3(t),e),o=Yw(s,t,{ease:Array.isArray(a)?a:$V(t,a)});return{calculatedDuration:e,next:l=>(i.value=o(l),i.done=l>=e,i)}}const kV=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Re.update(t,!0),stop:()=>Lr(t),now:()=>Bt.isProcessing?Bt.timestamp:aa.now()}},LV={decay:kO,inertia:kO,tween:im,keyframes:im,spring:S3},zV=e=>e/100;class Xw extends g3{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:a,keyframes:i}=this.options,s=(a==null?void 0:a.KeyframeResolver)||Kw,o=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new s(i,o,n,r,a),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=this.options,o=Dw(n)?n:LV[n]||im;let l,c;o!==im&&typeof t[0]!="number"&&(l=zd(zV,b3(t[0],t[1])),t=[0,100]);const f=o({...this.options,keyframes:t});i==="mirror"&&(c=o({...this.options,keyframes:[...t].reverse(),velocity:-s})),f.calculatedDuration===null&&(f.calculatedDuration=I$(f));const{calculatedDuration:d}=f,h=d+a,p=h*(r+1)-a;return{generator:f,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:E}=this.options;return{done:!0,value:E[E.length-1]}}const{finalKeyframe:a,generator:i,mirroredGenerator:s,mapPercentToKeyframes:o,keyframes:l,calculatedDuration:c,totalDuration:f,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:p,repeatType:m,repeatDelay:g,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>f;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let x=this.currentTime,w=i;if(p){const E=Math.min(this.currentTime,f)/d;let T=Math.floor(E),N=E%1;!N&&E>=1&&(N=1),N===1&&T--,T=Math.min(T,p+1),!!(T%2)&&(m==="reverse"?(N=1-N,g&&(N-=g/d)):m==="mirror"&&(w=s)),x=la(0,1,N)*d}const S=v?{done:!1,value:l[0]}:w.next(x);o&&(S.value=o(S.value));let{done:j}=S;!v&&c!==null&&(j=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return O&&a!==void 0&&(S.value=Xy(l,this.options,a)),b&&b(S.value),O&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Ba(t.calculatedDuration):0}get time(){return Ba(this.currentTime)}set time(t){t=Ia(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ba(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=kV,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const IV=new Set(["opacity","clipPath","filter","transform"]);function BV(e,t,n,{delay:r=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const f=F$(o,a);return Array.isArray(f)&&(c.easing=f),e.animate(c,{delay:r,duration:a,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const UV=bw(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sm=10,FV=2e4;function VV(e){return Dw(e.type)||e.type==="spring"||!U$(e.ease)}function HV(e,t){const n=new Xw({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const a=[];let i=0;for(;!r.done&&ithis.onKeyframesResolved(s,o),n,r,a),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:a,ease:i,type:s,motionValue:o,name:l,startTime:c}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof i=="string"&&rm()&&qV(i)&&(i=A3[i]),VV(this.options)){const{onComplete:d,onUpdate:h,motionValue:p,element:m,...g}=this.options,b=HV(t,g);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,a=b.times,i=b.ease,s="keyframes"}const f=BV(o.owner.current,l,t,{...this.options,duration:r,times:a,ease:i});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(wO(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:d}=this.options;o.set(Xy(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:a,type:s,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ba(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ba(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ia(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return yn;const{animation:r}=n;wO(r,t)}return yn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:a,type:i,ease:s,times:o}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:f,onComplete:d,element:h,...p}=this.options,m=new Xw({...p,keyframes:r,duration:a,type:i,ease:s,times:o,isGenerator:!0}),g=Ia(this.time);c.setWithVelocity(m.sample(g-sm).value,m.sample(g).value,sm)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:a,repeatType:i,damping:s,type:o}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return UV()&&r&&IV.has(r)&&!l&&!c&&!a&&i!=="mirror"&&s!==0&&o!=="inertia"}}const KV={type:"spring",stiffness:500,damping:25,restSpeed:10},GV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),YV={type:"keyframes",duration:.8},XV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WV=(e,{keyframes:t})=>t.length>2?YV:xo.has(e)?e.startsWith("scale")?GV(t[1]):KV:XV;function QV({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:l,elapsed:c,...f}){return!!Object.keys(f).length}const Ww=(e,t,n,r={},a,i)=>s=>{const o=Rw(r,e)||{},l=o.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Ia(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-c,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:a};QV(o)||(f={...f,...WV(e,f)}),f.duration&&(f.duration=Ia(f.duration)),f.repeatDelay&&(f.repeatDelay=Ia(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!i&&t.get()!==void 0){const h=Xy(f.keyframes,o);if(h!==void 0)return Re.update(()=>{f.onUpdate(h),f.onComplete()}),new bF([])}return!i&&zO.supports(f)?new zO(f):new Xw(f)};function ZV({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function O3(e,t,{delay:n=0,transitionOverride:r,type:a}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:o,...l}=t;r&&(s=r);const c=[],f=a&&e.animationState&&e.animationState.getState()[a];for(const d in l){const h=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),p=l[d];if(p===void 0||f&&ZV(f,d))continue;const m={delay:n,...Rw(s||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=Y$(e);if(y){const v=window.MotionHandoffAnimation(y,d,Re);v!==null&&(m.startTime=v,g=!0)}}sx(e,d),h.start(Ww(d,h,p,e.shouldReduceMotion&&G$.has(d)?{type:!1}:m,e,g));const b=h.animation;b&&c.push(b)}return o&&Promise.all(c).then(()=>{Re.update(()=>{o&&MF(e,o)})}),c}function hx(e,t,n={}){var r;const a=Yy(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(i=n.transitionOverride);const s=a?()=>Promise.all(O3(e,a,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:h}=i;return JV(e,t,f+c,d,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,f]=l==="beforeChildren"?[s,o]:[o,s];return c().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function JV(e,t,n=0,r=0,a=1,i){const s=[],o=(e.variantChildren.size-1)*r,l=a===1?(c=0)=>c*r:(c=0)=>o-c*r;return Array.from(e.variantChildren).sort(e9).forEach((c,f)=>{c.notify("AnimationStart",t),s.push(hx(c,t,{...i,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function e9(e,t){return e.sortNodePosition(t)}function t9(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(i=>hx(e,i,n));r=Promise.all(a)}else if(typeof t=="string")r=hx(e,t,n);else{const a=typeof t=="function"?Yy(e,t,n.custom):t;r=Promise.all(O3(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const n9=Sw.length;function E3(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?E3(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>t9(e,n,r)))}function s9(e){let t=i9(e),n=IO(),r=!0;const a=l=>(c,f)=>{var d;const h=Yy(e,f,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:p,transitionEnd:m,...g}=h;c={...c,...g,...m}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,f=E3(e.parent)||{},d=[],h=new Set;let p={},m=1/0;for(let b=0;bm&&w,T=!1;const N=Array.isArray(x)?x:[x];let M=N.reduce(a(y),{});S===!1&&(M={});const{prevResolvedValues:C={}}=v,L={...C,...M},D=k=>{E=!0,h.has(k)&&(T=!0,h.delete(k)),v.needsAnimating[k]=!0;const I=e.getValue(k);I&&(I.liveStyle=!1)};for(const k in L){const I=M[k],F=C[k];if(p.hasOwnProperty(k))continue;let H=!1;rx(I)&&rx(F)?H=!L$(I,F):H=I!==F,H?I!=null?D(k):h.add(k):I!==void 0&&h.has(k)?D(k):v.protectedKeys[k]=!0}v.prevProp=x,v.prevResolvedValues=M,v.isActive&&(p={...p,...M}),r&&e.blockInitialAnimation&&(E=!1),E&&(!(j&&O)||T)&&d.push(...N.map(k=>({animation:k,options:{type:y}})))}if(h.size){const b={};h.forEach(y=>{const v=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),b[y]=v??null}),d.push({animation:b})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function o(l,c){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=s(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:s,setActive:o,setAnimateFunction:i,getState:()=>n,reset:()=>{n=IO(),r=!0}}}function o9(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!L$(t,e):!1}function us(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function IO(){return{animate:us(!0),whileInView:us(),whileHover:us(),whileTap:us(),whileDrag:us(),whileFocus:us(),exit:us()}}class ns{constructor(t){this.isMounted=!1,this.node=t}update(){}}class l9 extends ns{constructor(t){super(t),t.animationState||(t.animationState=s9(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ky(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let c9=0;class u9 extends ns{constructor(){super(...arguments),this.id=c9++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const f9={animation:{Feature:l9},exit:{Feature:u9}};function _f(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Id(e){return{point:{x:e.pageX,y:e.pageY}}}const d9=e=>t=>kw(t)&&e(t,Id(t));function Xu(e,t,n,r){return _f(e,t,d9(n),r)}const BO=(e,t)=>Math.abs(e-t);function h9(e,t){const n=BO(e.x,t.x),r=BO(e.y,t.y);return Math.sqrt(n**2+r**2)}class T3{constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=qv(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=h9(d.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=d,{timestamp:g}=Bt;this.history.push({...m,timestamp:g});const{onStart:b,onMove:y}=this.handlers;h||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Hv(h,this.transformPagePoint),Re.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=qv(d.type==="pointercancel"?this.lastMoveEventInfo:Hv(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,b),m&&m(d,b)},!kw(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const s=Id(t),o=Hv(s,this.transformPagePoint),{point:l}=o,{timestamp:c}=Bt;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,qv(o,this.history)),this.removeListeners=zd(Xu(this.contextWindow,"pointermove",this.handlePointerMove),Xu(this.contextWindow,"pointerup",this.handlePointerUp),Xu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Lr(this.updatePoint)}}function Hv(e,t){return t?{point:t(e.point)}:e}function UO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qv({point:e},t){return{point:e,delta:UO(e,N3(t)),offset:UO(e,p9(t)),velocity:m9(t,.1)}}function p9(e){return e[0]}function N3(e){return e[e.length-1]}function m9(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=N3(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Ia(t)));)n--;if(!r)return{x:0,y:0};const i=Ba(a.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const C3=1e-4,y9=1-C3,g9=1+C3,_3=.01,v9=0-_3,b9=0+_3;function Jn(e){return e.max-e.min}function x9(e,t,n){return Math.abs(e-t)<=n}function FO(e,t,n,r=.5){e.origin=r,e.originPoint=ht(t.min,t.max,e.origin),e.scale=Jn(n)/Jn(t),e.translate=ht(n.min,n.max,e.origin)-e.originPoint,(e.scale>=y9&&e.scale<=g9||isNaN(e.scale))&&(e.scale=1),(e.translate>=v9&&e.translate<=b9||isNaN(e.translate))&&(e.translate=0)}function Wu(e,t,n,r){FO(e.x,t.x,n.x,r?r.originX:void 0),FO(e.y,t.y,n.y,r?r.originY:void 0)}function VO(e,t,n){e.min=n.min+t.min,e.max=e.min+Jn(t)}function S9(e,t,n){VO(e.x,t.x,n.x),VO(e.y,t.y,n.y)}function HO(e,t,n){e.min=t.min-n.min,e.max=e.min+Jn(t)}function Qu(e,t,n){HO(e.x,t.x,n.x),HO(e.y,t.y,n.y)}function w9(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ht(n,e,r.max):Math.min(e,n)),e}function qO(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function j9(e,{top:t,left:n,bottom:r,right:a}){return{x:qO(e.x,n,a),y:qO(e.y,t,r)}}function KO(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=ro(t.min,t.max-r,e.min):r>a&&(n=ro(e.min,e.max-a,t.min)),la(0,1,n)}function E9(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const px=.35;function T9(e=px){return e===!1?e=0:e===!0&&(e=px),{x:GO(e,"left","right"),y:GO(e,"top","bottom")}}function GO(e,t,n){return{min:YO(e,t),max:YO(e,n)}}function YO(e,t){return typeof e=="number"?e:e[t]||0}const XO=()=>({translate:0,scale:1,origin:0,originPoint:0}),rl=()=>({x:XO(),y:XO()}),WO=()=>({min:0,max:0}),bt=()=>({x:WO(),y:WO()});function ir(e){return[e("x"),e("y")]}function P3({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function N9({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function C9(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Kv(e){return e===void 0||e===1}function mx({scale:e,scaleX:t,scaleY:n}){return!Kv(e)||!Kv(t)||!Kv(n)}function vs(e){return mx(e)||M3(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function M3(e){return QO(e.x)||QO(e.y)}function QO(e){return e&&e!=="0%"}function om(e,t,n){const r=e-n,a=t*r;return n+a}function ZO(e,t,n,r,a){return a!==void 0&&(e=om(e,a,r)),om(e,n,r)+t}function yx(e,t=0,n=1,r,a){e.min=ZO(e.min,t,n,r,a),e.max=ZO(e.max,t,n,r,a)}function R3(e,{x:t,y:n}){yx(e.x,t.translate,t.scale,t.originPoint),yx(e.y,n.translate,n.scale,n.originPoint)}const JO=.999999999999,eE=1.0000000000001;function _9(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let i,s;for(let o=0;oJO&&(t.x=1),t.yJO&&(t.y=1)}function al(e,t){e.min=e.min+t,e.max=e.max+t}function tE(e,t,n,r,a=.5){const i=ht(e.min,e.max,a);yx(e,t,n,i,r)}function il(e,t){tE(e.x,t.x,t.scaleX,t.scale,t.originX),tE(e.y,t.y,t.scaleY,t.scale,t.originY)}function D3(e,t){return P3(C9(e.getBoundingClientRect(),t))}function P9(e,t,n){const r=D3(e,n),{scroll:a}=t;return a&&(al(r.x,a.offset.x),al(r.y,a.offset.y)),r}const $3=({current:e})=>e?e.ownerDocument.defaultView:null,M9=new WeakMap;class R9{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=bt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Id(f).point)},i=(f,d)=>{const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=TF(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ir(b=>{let y=this.getAxisMotionValue(b).get()||0;if(ra.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[b];x&&(y=Jn(x)*(parseFloat(y)/100))}}this.originPoint[b]=y}),m&&Re.postRender(()=>m(f,d)),sx(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(f,d)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=d;if(p&&this.currentDirection===null){this.currentDirection=D9(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),g&&g(f,d)},o=(f,d)=>this.stop(f,d),l=()=>ir(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new T3(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:o,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:$3(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&Re.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!Eh(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=w9(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&tl(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&a?this.constraints=j9(a.layoutBox,n):this.constraints=!1,this.elastic=T9(r),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&ir(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=E9(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tl(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=P9(r,a.root,this.visualElement.getTransformPagePoint());let s=A9(a.layout.layoutBox,i);if(n){const o=n(N9(s));this.hasMutatedConstraints=!!o,o&&(s=P3(o))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},c=ir(f=>{if(!Eh(f,n,this.currentDirection))return;let d=l&&l[f]||{};s&&(d={min:0,max:0});const h=a?200:1e6,p=a?40:1e7,m={type:"inertia",velocity:r?t[f]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(f,m)});return Promise.all(c).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return sx(this.visualElement,t),r.start(Ww(t,r,0,n,this.visualElement,!1))}stopAnimation(){ir(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ir(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ir(n=>{const{drag:r}=this.getProps();if(!Eh(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(n);if(a&&a.layout){const{min:s,max:o}=a.layout.layoutBox[n];i.set(t[n]-ht(s,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!tl(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};ir(s=>{const o=this.getAxisMotionValue(s);if(o&&this.constraints!==!1){const l=o.get();a[s]=O9({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ir(s=>{if(!Eh(s,t,null))return;const o=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];o.set(ht(l,c,a[s]))})}addListeners(){if(!this.visualElement.current)return;M9.set(this.visualElement,this);const t=this.visualElement.current,n=Xu(t,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();tl(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Re.read(r);const s=_f(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ir(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=l[f].translate,d.set(d.get()+l[f].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:s=px,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:i,dragElastic:s,dragMomentum:o}}}function Eh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function D9(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $9 extends ns{constructor(t){super(t),this.removeGroupControls=yn,this.removeListeners=yn,this.controls=new R9(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yn}unmount(){this.removeGroupControls(),this.removeListeners()}}const nE=e=>(t,n)=>{e&&Re.postRender(()=>e(t,n))};class k9 extends ns{constructor(){super(...arguments),this.removePointerDownListener=yn}onPointerDown(t){this.session=new T3(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$3(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:nE(t),onStart:nE(n),onMove:r,onEnd:(i,s)=>{delete this.session,a&&Re.postRender(()=>a(i,s))}}}mount(){this.removePointerDownListener=Xu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const pp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ou={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=rE(e,t.target.x),r=rE(e,t.target.y);return`${n}% ${r}%`}},L9={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=Ji.parse(e);if(a.length>5)return r;const i=Ji.createTransformer(e),s=typeof a[0]!="number"?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;a[0+s]/=o,a[1+s]/=l;const c=ht(o,l,.5);return typeof a[2+s]=="number"&&(a[2+s]/=c),typeof a[3+s]=="number"&&(a[3+s]/=c),i(a)}};class z9 extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:i}=t;lF(I9),i&&(n.group&&n.group.add(i),r&&r.register&&a&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),pp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,a||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Re.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),jw.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function k3(e){const[t,n]=g$(),r=A.useContext(gw);return u.jsx(z9,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(A$),isPresent:t,safeToRemove:n})}const I9={borderRadius:{...ou,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ou,borderTopRightRadius:ou,borderBottomLeftRadius:ou,borderBottomRightRadius:ou,boxShadow:L9};function B9(e,t,n){const r=cn(e)?e:Qr(e);return r.start(Ww("",r,t,n)),r.animation}function U9(e){return e instanceof SVGElement&&e.tagName!=="svg"}const F9=(e,t)=>e.depth-t.depth;class V9{constructor(){this.children=[],this.isDirty=!1}add(t){Lw(this.children,t),this.isDirty=!0}remove(t){zw(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(F9),this.isDirty=!1,this.children.forEach(t)}}function H9(e,t){const n=aa.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(Lr(r),e(i-t))};return Re.read(r,!0),()=>Lr(r)}const L3=["TopLeft","TopRight","BottomLeft","BottomRight"],q9=L3.length,aE=e=>typeof e=="string"?parseFloat(e):e,iE=e=>typeof e=="number"||fe.test(e);function K9(e,t,n,r,a,i){a?(e.opacity=ht(0,n.opacity!==void 0?n.opacity:1,G9(r)),e.opacityExit=ht(t.opacity!==void 0?t.opacity:1,0,Y9(r))):i&&(e.opacity=ht(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(ro(e,t,r))}function oE(e,t){e.min=t.min,e.max=t.max}function tr(e,t){oE(e.x,t.x),oE(e.y,t.y)}function lE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function cE(e,t,n,r,a){return e-=t,e=om(e,1/n,r),a!==void 0&&(e=om(e,1/a,r)),e}function X9(e,t=0,n=1,r=.5,a,i=e,s=e){if(ra.test(t)&&(t=parseFloat(t),t=ht(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=ht(i.min,i.max,r);e===i&&(o-=t),e.min=cE(e.min,t,n,o,a),e.max=cE(e.max,t,n,o,a)}function uE(e,t,[n,r,a],i,s){X9(e,t[n],t[r],t[a],t.scale,i,s)}const W9=["x","scaleX","originX"],Q9=["y","scaleY","originY"];function fE(e,t,n,r){uE(e.x,t,W9,n?n.x:void 0,r?r.x:void 0),uE(e.y,t,Q9,n?n.y:void 0,r?r.y:void 0)}function dE(e){return e.translate===0&&e.scale===1}function I3(e){return dE(e.x)&&dE(e.y)}function hE(e,t){return e.min===t.min&&e.max===t.max}function Z9(e,t){return hE(e.x,t.x)&&hE(e.y,t.y)}function pE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function B3(e,t){return pE(e.x,t.x)&&pE(e.y,t.y)}function mE(e){return Jn(e.x)/Jn(e.y)}function yE(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class J9{constructor(){this.members=[]}add(t){Lw(this.members,t),t.scheduleRender()}remove(t){if(zw(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function eH(e,t,n){let r="";const a=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((a||i||s)&&(r=`translate3d(${a}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:f,rotateX:d,rotateY:h,skewX:p,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const o=e.x.scale*t.x,l=e.y.scale*t.y;return(o!==1||l!==1)&&(r+=`scale(${o}, ${l})`),r||"none"}const bs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},_u=typeof window<"u"&&window.MotionDebug!==void 0,Gv=["","X","Y","Z"],tH={visibility:"hidden"},gE=1e3;let nH=0;function Yv(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function U3(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Y$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Re,!(a||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&U3(r)}function F3({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(s={},o=t==null?void 0:t()){this.id=nH++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,_u&&(bs.totalNodes=bs.resolvedTargetDeltas=bs.recalculatedProjection=0),this.nodes.forEach(iH),this.nodes.forEach(uH),this.nodes.forEach(fH),this.nodes.forEach(sH),_u&&window.MotionDebug.record(bs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=H9(h,250),pp.hasAnimatedSinceResize&&(pp.hasAnimatedSinceResize=!1,this.nodes.forEach(bE))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||f.getDefaultTransition()||yH,{onLayoutAnimationStart:b,onLayoutAnimationComplete:y}=f.getProps(),v=!this.targetLayout||!B3(this.targetLayout,m)||p,x=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const w={...Rw(g,"layout"),onPlay:b,onComplete:y};(f.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else h||bE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Lr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(dH),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&U3(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const S=w/1e3;xE(d.x,s.x,S),xE(d.y,s.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qu(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pH(this.relativeTarget,this.relativeTargetOrigin,h,S),x&&Z9(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=bt()),tr(x,this.relativeTarget)),g&&(this.animationValues=f,K9(f,c,this.latestValues,S,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Lr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Re.update(()=>{pp.hasAnimatedSinceResize=!0,this.currentAnimation=B9(0,gE,{...s,onUpdate:o=>{this.mixTargetDelta(o),s.onUpdate&&s.onUpdate(o)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:l,layout:c,latestValues:f}=s;if(!(!o||!l||!c)){if(this!==s&&this.layout&&c&&V3(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||bt();const d=Jn(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const h=Jn(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}tr(o,l),il(o,f),Wu(this.projectionDeltaWithTransform,this.layoutCorrected,o,f)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new J9),this.sharedNodes.get(s).add(o);const c=o.options.initialPromotionConfig;o.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const c={};l.z&&Yv("z",s,c,this.animationValues);for(let f=0;f{var o;return(o=s.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(vE),this.root.sharedNodes.clear()}}}function rH(e){e.updateLayout()}function aH(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?ir(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],p=Jn(h);h.min=r[d].min,h.max=h.min+p}):V3(i,n.layoutBox,r)&&ir(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],p=Jn(r[d]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const o=rl();Wu(o,r,n.layoutBox);const l=rl();s?Wu(l,e.applyTransform(a,!0),n.measuredBox):Wu(l,r,n.layoutBox);const c=!I3(o);let f=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:p}=d;if(h&&p){const m=bt();Qu(m,n.layoutBox,h.layoutBox);const g=bt();Qu(g,r,p.layoutBox),B3(m,g)||(f=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:o,hasLayoutChanged:c,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function iH(e){_u&&bs.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function sH(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function oH(e){e.clearSnapshot()}function vE(e){e.clearMeasurements()}function lH(e){e.isLayoutDirty=!1}function cH(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function bE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function uH(e){e.resolveTargetDelta()}function fH(e){e.calcProjection()}function dH(e){e.resetSkewAndRotation()}function hH(e){e.removeLeadSnapshot()}function xE(e,t,n){e.translate=ht(t.translate,0,n),e.scale=ht(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function SE(e,t,n,r){e.min=ht(t.min,n.min,r),e.max=ht(t.max,n.max,r)}function pH(e,t,n,r){SE(e.x,t.x,n.x,r),SE(e.y,t.y,n.y,r)}function mH(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yH={duration:.45,ease:[.4,0,.1,1]},wE=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),jE=wE("applewebkit/")&&!wE("chrome/")?Math.round:yn;function AE(e){e.min=jE(e.min),e.max=jE(e.max)}function gH(e){AE(e.x),AE(e.y)}function V3(e,t,n){return e==="position"||e==="preserve-aspect"&&!x9(mE(t),mE(n),.2)}function vH(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const bH=F3({attachResizeListener:(e,t)=>_f(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xv={current:void 0},H3=F3({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xv.current){const e=new bH({});e.mount(window),e.setOptions({layoutScroll:!0}),Xv.current=e}return Xv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),xH={pan:{Feature:k9},drag:{Feature:$9,ProjectionNode:H3,MeasureLayout:k3}};function OE(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,i=r[a];i&&Re.postRender(()=>i(t,Id(t)))}class SH extends ns{mount(){const{current:t}=this.node;t&&(this.unmount=wF(t,n=>(OE(this.node,n,"Start"),r=>OE(this.node,r,"End"))))}unmount(){}}class wH extends ns{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=zd(_f(this.node.current,"focus",()=>this.onFocus()),_f(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function EE(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),i=r[a];i&&Re.postRender(()=>i(t,Id(t)))}class jH extends ns{mount(){const{current:t}=this.node;t&&(this.unmount=EF(t,n=>(EE(this.node,n,"Start"),(r,{success:a})=>EE(this.node,r,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const gx=new WeakMap,Wv=new WeakMap,AH=e=>{const t=gx.get(e.target);t&&t(e)},OH=e=>{e.forEach(AH)};function EH({root:e,...t}){const n=e||document;Wv.has(n)||Wv.set(n,{});const r=Wv.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(OH,{root:e,...t})),r[a]}function TH(e,t,n){const r=EH(t);return gx.set(e,n),r.observe(e),()=>{gx.delete(e),r.unobserve(e)}}const NH={some:0,all:1};class CH extends ns{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:NH[a]},o=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),h=c?f:d;h&&h(l)};return TH(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_H(t,n))&&this.startObserver()}unmount(){}}function _H({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const PH={inView:{Feature:CH},tap:{Feature:jH},focus:{Feature:wH},hover:{Feature:SH}},MH={layout:{ProjectionNode:H3,MeasureLayout:k3}},lm={current:null},Qw={current:!1};function q3(){if(Qw.current=!0,!!vw)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>lm.current=e.matches;e.addListener(t),t()}else lm.current=!1}const RH=[...m3,sn,Ji],DH=e=>RH.find(p3(e)),TE=new WeakMap;function $H(e,t,n){for(const r in t){const a=t[r],i=n[r];if(cn(a))e.addValue(r,a);else if(cn(i))e.addValue(r,Qr(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=e.getStaticValue(r);e.addValue(r,Qr(s!==void 0?s:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const NE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class kH{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=aa.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),Qw.current||q3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:lm.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){TE.delete(this.current),this.projection&&this.projection.unmount(),Lr(this.notifyUpdate),Lr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=xo.has(t),a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Re.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Gl){const n=Gl[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):bt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Qr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(d3(a)||r3(a))?a=parseFloat(a):!DH(a)&&Ji.test(n)&&(a=c3(t,n)),this.setBaseTarget(t,cn(a)?a.get():a)),cn(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let a;if(typeof r=="string"||typeof r=="object"){const s=Ow(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(a=s[t])}if(r&&a!==void 0)return a;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!cn(i)?i:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Iw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class K3 extends kH{constructor(){super(...arguments),this.KeyframeResolver=y3}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;cn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function LH(e){return window.getComputedStyle(e)}class zH extends K3{constructor(){super(...arguments),this.type="html",this.renderInstance=P$}readValueFromInstance(t,n){if(xo.has(n)){const r=qw(n);return r&&r.default||0}else{const r=LH(t),a=(N$(n)?r.getPropertyValue(n):r[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return D3(t,n)}build(t,n,r){Nw(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Mw(t,n,r)}}class IH extends K3{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=bt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(xo.has(n)){const r=qw(n);return r&&r.default||0}return n=M$.has(n)?n:ww(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return $$(t,n,r)}build(t,n,r){Cw(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,a){R$(t,n,r,a)}mount(t){this.isSVGTag=Pw(t.tagName),super.mount(t)}}const BH=(e,t)=>Aw(e)?new IH(t):new zH(t,{allowProjection:e!==A.Fragment}),UH=gF({...f9,...PH,...xH,...MH},BH),Nt=M7(UH);function G3(e,t){let n;const r=()=>{const{currentTime:a}=t,s=(a===null?0:a.value)/100;n!==s&&e(s),n=s};return Re.update(r,!0),()=>Lr(r)}const mp=new WeakMap;let fi;function FH(e,t){if(t){const{inlineSize:n,blockSize:r}=t[0];return{width:n,height:r}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function VH({target:e,contentRect:t,borderBoxSize:n}){var r;(r=mp.get(e))===null||r===void 0||r.forEach(a=>{a({target:e,contentSize:t,get size(){return FH(e,n)}})})}function HH(e){e.forEach(VH)}function qH(){typeof ResizeObserver>"u"||(fi=new ResizeObserver(HH))}function KH(e,t){fi||qH();const n=H$(e);return n.forEach(r=>{let a=mp.get(r);a||(a=new Set,mp.set(r,a)),a.add(t),fi==null||fi.observe(r)}),()=>{n.forEach(r=>{const a=mp.get(r);a==null||a.delete(t),a!=null&&a.size||fi==null||fi.unobserve(r)})}}const yp=new Set;let Zu;function GH(){Zu=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};yp.forEach(n=>n(t))},window.addEventListener("resize",Zu)}function YH(e){return yp.add(e),Zu||GH(),()=>{yp.delete(e),!yp.size&&Zu&&(Zu=void 0)}}function XH(e,t){return typeof e=="function"?YH(e):KH(e,t)}const WH=50,CE=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),QH=()=>({time:0,x:CE(),y:CE()}),ZH={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function _E(e,t,n,r){const a=n[t],{length:i,position:s}=ZH[t],o=a.current,l=n.time;a.current=e[`scroll${s}`],a.scrollLength=e[`scroll${i}`]-e[`client${i}`],a.offset.length=0,a.offset[0]=0,a.offset[1]=a.scrollLength,a.progress=ro(0,a.scrollLength,a.current);const c=r-l;a.velocity=c>WH?0:Bw(a.current-o,c)}function JH(e,t,n){_E(e,"x",t,n),_E(e,"y",t,n),t.time=n}function eq(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const a=r.getBoundingClientRect();r=r.parentElement;const i=r.getBoundingClientRect();n.x+=a.left-i.left,n.y+=a.top-i.top}else if(r instanceof SVGGraphicsElement){const{x:a,y:i}=r.getBBox();n.x+=a,n.y+=i;let s=null,o=r.parentNode;for(;!s;)o.tagName==="svg"&&(s=o),o=r.parentNode;r=s}else break;return n}const vx={start:0,center:.5,end:1};function PE(e,t,n=0){let r=0;if(e in vx&&(e=vx[e]),typeof e=="string"){const a=parseFloat(e);e.endsWith("px")?r=a:e.endsWith("%")?e=a/100:e.endsWith("vw")?r=a/100*document.documentElement.clientWidth:e.endsWith("vh")?r=a/100*document.documentElement.clientHeight:e=a}return typeof e=="number"&&(r=t*e),n+r}const tq=[0,0];function nq(e,t,n,r){let a=Array.isArray(e)?e:tq,i=0,s=0;return typeof e=="number"?a=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?a=e.split(" "):a=[e,vx[e]?e:"0"]),i=PE(a[0],n,r),s=PE(a[1],t),i-s}const rq={All:[[0,0],[1,1]]},aq={x:0,y:0};function iq(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function sq(e,t,n){const{offset:r=rq.All}=n,{target:a=e,axis:i="y"}=n,s=i==="y"?"height":"width",o=a!==e?eq(a,e):aq,l=a===e?{width:e.scrollWidth,height:e.scrollHeight}:iq(a),c={width:e.clientWidth,height:e.clientHeight};t[i].offset.length=0;let f=!t[i].interpolate;const d=r.length;for(let h=0;hoq(e,r.target,n),update:a=>{JH(e,n,a),(r.offset||r.target)&&sq(e,n,r)},notify:()=>t(n)}}const lu=new WeakMap,ME=new WeakMap,Qv=new WeakMap,RE=e=>e===document.documentElement?window:e;function Zw(e,{container:t=document.documentElement,...n}={}){let r=Qv.get(t);r||(r=new Set,Qv.set(t,r));const a=QH(),i=lq(t,e,a,n);if(r.add(i),!lu.has(t)){const o=()=>{for(const h of r)h.measure()},l=()=>{for(const h of r)h.update(Bt.timestamp)},c=()=>{for(const h of r)h.notify()},f=()=>{Re.read(o,!1,!0),Re.read(l,!1,!0),Re.update(c,!1,!0)};lu.set(t,f);const d=RE(t);window.addEventListener("resize",f,{passive:!0}),t!==document.documentElement&&ME.set(t,XH(t,f)),d.addEventListener("scroll",f,{passive:!0})}const s=lu.get(t);return Re.read(s,!1,!0),()=>{var o;Lr(s);const l=Qv.get(t);if(!l||(l.delete(i),l.size))return;const c=lu.get(t);lu.delete(t),c&&(RE(t).removeEventListener("scroll",c),(o=ME.get(t))===null||o===void 0||o(),window.removeEventListener("resize",c))}}function cq({source:e,container:t,axis:n="y"}){e&&(t=e);const r={value:0},a=Zw(i=>{r.value=i[n].progress*100},{container:t,axis:n});return{currentTime:r,cancel:a}}const Zv=new Map;function Y3({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),Zv.has(t)||Zv.set(t,{});const r=Zv.get(t);return r[n]||(r[n]=z$()?new ScrollTimeline({source:t,axis:n}):cq({source:t,axis:n})),r[n]}function uq(e){return e.length===2}function X3(e){return e&&(e.target||e.offset)}function fq(e,t){return uq(e)||X3(t)?Zw(n=>{e(n[t.axis].progress,n)},t):G3(e,Y3(t))}function dq(e,t){if(e.flatten(),X3(t))return e.pause(),Zw(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=Y3(t);return e.attachTimeline?e.attachTimeline(n,r=>(r.pause(),G3(a=>{r.time=r.duration*a},n))):yn}}function hq(e,{axis:t="y",...n}={}){const r={axis:t,...n};return typeof e=="function"?fq(e,r):dq(e,r)}function DE(e,t){A7(!!(!t||t.current))}const pq=()=>({scrollX:Qr(0),scrollY:Qr(0),scrollXProgress:Qr(0),scrollYProgress:Qr(0)});function mq({container:e,target:t,layoutEffect:n=!0,...r}={}){const a=kc(pq);return(n?Hy:A.useEffect)(()=>(DE("target",t),DE("container",e),hq((s,{x:o,y:l})=>{a.scrollX.set(o.current),a.scrollXProgress.set(o.progress),a.scrollY.set(l.current),a.scrollYProgress.set(l.progress)},{...r,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0})),[e,t,JSON.stringify(r.offset)]),a}function yq(e){const t=kc(()=>Qr(e)),{isStatic:n}=A.useContext(Vy);if(n){const[,r]=A.useState(e);A.useEffect(()=>t.on("change",r),[])}return t}function W3(e,t){const n=yq(t()),r=()=>n.set(t());return r(),Hy(()=>{const a=()=>Re.preRender(r,!1,!0),i=e.map(s=>s.on("change",a));return()=>{i.forEach(s=>s()),Lr(r)}}),n}const gq=e=>e&&typeof e=="object"&&e.mix,vq=e=>gq(e)?e.mix:void 0;function bq(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],a=e[1+n],i=e[2+n],s=e[3+n],o=Yw(a,i,{mixer:vq(i[0]),...s});return t?o(r):o}function xq(e){Gu.current=[],e();const t=W3(Gu.current,e);return Gu.current=void 0,t}function Jv(e,t,n,r){if(typeof e=="function")return xq(e);const a=typeof t=="function"?t:bq(t,n,r);return Array.isArray(e)?$E(e,a):$E([e],([i])=>a(i))}function $E(e,t){const n=kc(()=>[]);return W3(e,()=>{n.length=0;const r=e.length;for(let a=0;atypeof e=="string",cu=()=>{let e,t;const n=new Promise((r,a)=>{e=r,t=a});return n.resolve=e,n.reject=t,n},kE=e=>e==null?"":String(e),Sq=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},wq=/###/g,LE=e=>e&&e.includes("###")?e.replace(wq,"."):e,zE=e=>!e||pe(e),Ju=(e,t,n)=>{const r=pe(t)?t.split("."):t;let a=0;for(;a{const{obj:r,k:a}=Ju(e,t,Object);if(r!==void 0||t.length===1){r[a]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),o=Ju(e,s,Object);for(;o.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),o=Ju(e,s,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${i}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${i}`]=n},jq=(e,t,n,r)=>{const{obj:a,k:i}=Ju(e,t,Object);a[i]=a[i]||[],a[i].push(n)},cm=(e,t)=>{const{obj:n,k:r}=Ju(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Aq=(e,t,n)=>{const r=cm(e,n);return r!==void 0?r:cm(t,n)},Q3=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?pe(e[r])||e[r]instanceof String||pe(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Q3(e[r],t[r],n):e[r]=t[r]);return e},xa=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Oq={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Eq=e=>pe(e)?e.replace(/[&<>"'\/]/g,t=>Oq[t]):e;class Tq{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Nq=[" ",",","?","!",";"],Cq=new Tq(20),_q=(e,t,n)=>{t=t||"",n=n||"";const r=Nq.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const a=Cq.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!a.test(e);if(!i){const s=e.indexOf(n);s>0&&!a.test(e.substring(0,s))&&(i=!0)}return i},bx=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let a=e;for(let i=0;ie==null?void 0:e.replace(/_/g,"-"),Pq={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class um{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Pq,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,a){return a&&!this.debug?null:(t=t.map(i=>pe(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),pe(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new um(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new um(this.logger,t)}}var Zr=new um;let Wy=class{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const a=this.observers[r].get(n)||0;this.observers[r].set(n,a+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...a)=>{n(...a),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([a,i])=>{for(let s=0;s{for(let s=0;s-1&&this.options.ns.splice(n,1)}getResource(t,n,r,a={}){var c,f;const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;t.includes(".")?o=t.split("."):(o=[t,n],r&&(Array.isArray(r)?o.push(...r):pe(r)&&i?o.push(...r.split(i)):o.push(r)));const l=cm(this.data,o);return!l&&!n&&!r&&t.includes(".")&&(t=o[0],n=o[1],r=o.slice(2).join(".")),l||!s||!pe(r)?l:bx((f=(c=this.data)==null?void 0:c[t])==null?void 0:f[n],r,i)}addResource(t,n,r,a,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let o=[t,n];r&&(o=o.concat(s?r.split(s):r)),t.includes(".")&&(o=t.split("."),a=n,n=o[1]),this.addNamespaces(n),IE(this.data,o,a),i.silent||this.emit("added",t,n,r,a)}addResources(t,n,r,a={silent:!1}){for(const i in r)(pe(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});a.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,a,i,s={silent:!1,skipCopy:!1}){let o=[t,n];t.includes(".")&&(o=t.split("."),a=r,r=n,n=o[1]),this.addNamespaces(n);let l=cm(this.data,o)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),a?Q3(l,r,i):l={...l,...r},IE(this.data,o,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(a=>n[a]&&Object.keys(n[a]).length>0)}toJSON(){return this.data}}var Z3={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,a){return e.forEach(i=>{var s;t=((s=this.processors[i])==null?void 0:s.process(t,n,r,a))??t}),t}};const J3=Symbol("i18next/PATH_KEY");function Mq(){const e=[],t=Object.create(null);let n;return t.get=(r,a)=>{var i;return(i=n==null?void 0:n.revoke)==null||i.call(n),a===J3?e:(e.push(a),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function vl(e,t){const{[J3]:n}=e(Mq()),r=(t==null?void 0:t.keySeparator)??".",a=(t==null?void 0:t.nsSeparator)??":",i=(t==null?void 0:t.enableSelector)==="strict";if(n.length>1&&a){const s=t==null?void 0:t.ns,o=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(o&&(i?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${a}${n.slice(1).join(r)}`}return n.join(r)}const eb=e=>!pe(e)&&typeof e!="boolean"&&typeof e!="number";class fm extends Wy{constructor(t,n={}){super(),Sq(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zr.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const a=this.resolve(t,r);if((a==null?void 0:a.res)===void 0)return!1;const i=eb(a.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!_q(t,r,a);if(s&&!o){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:pe(i)?[i]:i};const c=t.split(r);(r!==a||r===a&&this.options.ns.includes(c[0]))&&(i=c.shift()),t=c.join(a)}return{key:t,namespaces:pe(i)?[i]:i}}translate(t,n,r){let a=typeof n=="object"?{...n}:n;if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";typeof t=="function"&&(t=vl(t,{...this.options,...a})),Array.isArray(t)||(t=[String(t)]),t=t.map(L=>typeof L=="function"?vl(L,{...this.options,...a}):String(L));const i=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(t[t.length-1],a),c=l[l.length-1];let f=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const d=a.lng||this.language,h=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return h?i?{res:`${c}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:`${c}${f}${o}`:i?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:o;const p=this.resolve(t,a);let m=p==null?void 0:p.res;const g=(p==null?void 0:p.usedKey)||o,b=(p==null?void 0:p.exactUsedKey)||o,y=["[object Number]","[object Function]","[object RegExp]"],v=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,w=a.count!==void 0&&!pe(a.count),S=fm.hasDefaultValue(a),j=w?this.pluralResolver.getSuffix(d,a.count,a):"",O=a.ordinal&&w?this.pluralResolver.getSuffix(d,a.count,{ordinal:!1}):"",E=w&&!a.ordinal&&a.count===0,T=E&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${j}`]||a[`defaultValue${O}`]||a.defaultValue;let N=m;x&&!m&&S&&(N=T);const M=eb(N),C=Object.prototype.toString.apply(N);if(x&&N&&M&&!y.includes(C)&&!(pe(v)&&Array.isArray(N))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,N,{...a,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(p.res=L,p.usedParams=this.getUsedParamsDetails(a),p):L}if(s){const L=Array.isArray(N),D=L?[]:{},$=L?b:g;for(const P in N)if(Object.prototype.hasOwnProperty.call(N,P)){const k=`${$}${s}${P}`;S&&!m?D[P]=this.translate(k,{...a,defaultValue:eb(T)?T[P]:void 0,joinArrays:!1,ns:l}):D[P]=this.translate(k,{...a,joinArrays:!1,ns:l}),D[P]===k&&(D[P]=N[P])}m=D}}else if(x&&pe(v)&&Array.isArray(m))m=m.join(v),m&&(m=this.extendTranslation(m,t,a,r));else{let L=!1,D=!1;!this.isValidLookup(m)&&S&&(L=!0,m=T),this.isValidLookup(m)||(D=!0,m=o);const P=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:m,k=S&&T!==m&&this.options.updateMissing;if(D||L||k){if(this.logger.log(k?"updateKey":"missingKey",d,c,w&&!k?`${o}${this.pluralResolver.getSuffix(d,a.count,a)}`:o,k?T:m),s){const Y=this.resolve(o,{...a,keySeparator:!1});Y&&Y.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let I=[];const F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(let Y=0;Y{var ye;const Z=S&&te!==m?te:P;this.options.missingKeyHandler?this.options.missingKeyHandler(Y,c,q,Z,k,a):(ye=this.backendConnector)!=null&&ye.saveMissing&&this.backendConnector.saveMissing(Y,c,q,Z,k,a),this.emit("missingKey",Y,c,q,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?I.forEach(Y=>{const q=this.pluralResolver.getSuffixes(Y,a);E&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!q.includes(`${this.options.pluralSeparator}zero`)&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(te=>{H([Y],o+te,a[`defaultValue${te}`]||T)})}):H(I,o,T))}m=this.extendTranslation(m,t,a,p,r),D&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${c}${f}${o}`),(D||L)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${o}`:o,L?m:void 0,a))}return i?(p.res=m,p.usedParams=this.getUsedParamsDetails(a),p):m}extendTranslation(t,n,r,a,i){var l,c;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=pe(t)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(f){const p=t.match(this.interpolator.nestingRegexp);d=p&&p.length}let h=r.replace&&!pe(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||a.usedLng,r),f){const p=t.match(this.interpolator.nestingRegexp),m=p&&p.length;d(i==null?void 0:i[0])===p[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):this.translate(...p,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,o=pe(s)?[s]:s;return t!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(t=Z3.handle(o,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,a,i,s,o;return pe(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(l=>typeof l=="function"?vl(l,{...this.options,...n}):l)),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),f=c.key;a=f;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=n.count!==void 0&&!pe(n.count),p=h&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(pe(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(b=>{var y,v;this.isValidLookup(r)||(o=b,!this.checkedLoadedFor[`${g[0]}-${b}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((v=this.utils)!=null&&v.hasLoadedNamespace(o))&&(this.checkedLoadedFor[`${g[0]}-${b}`]=!0,this.logger.warn(`key "${a}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(x=>{var j;if(this.isValidLookup(r))return;s=x;const w=[f];if((j=this.i18nFormat)!=null&&j.addLookupKeys)this.i18nFormat.addLookupKeys(w,f,x,b,n);else{let O;h&&(O=this.pluralResolver.getSuffix(x,n.count,n));const E=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&O.startsWith(T)&&w.push(f+O.replace(T,this.options.pluralSeparator)),w.push(f+O),p&&w.push(f+E)),m){const N=`${f}${this.options.contextSeparator||"_"}${n.context}`;w.push(N),h&&(n.ordinal&&O.startsWith(T)&&w.push(N+O.replace(T,this.options.pluralSeparator)),w.push(N+O),p&&w.push(N+E))}}let S;for(;S=w.pop();)this.isValidLookup(r)||(i=S,r=this.getResource(x,b,S,n))}))})}),{res:r,usedKey:a,exactUsedKey:i,usedLng:s,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,a={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,a):this.resourceStore.getResource(t,n,r,a)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!pe(t.replace);let a=r?t.replace:t;if(r&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!r){a={...a};for(const i of n)delete a[i]}return a}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class UE{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zr.create("languageUtils")}getScriptPartFromCode(t){if(t=Pf(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Pf(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(pe(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const a=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const a=this.getScriptPartFromCode(r);if(this.isSupportedCode(a))return n=a;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),pe(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),a=[],i=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return pe(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):pe(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{a.includes(s)||i(this.formatLanguageCode(s))}),a}}const FE={zero:0,one:1,two:2,few:3,many:4,other:5},VE={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Rq{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Zr.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Pf(t==="dev"?"en":t),a=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:a});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:a})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),VE;if(!t.match(/-|_/))return VE;const l=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(l,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(a=>`${n}${a}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((a,i)=>FE[a]-FE[i]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,n,r={}){const a=this.getRule(t,r);return a?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const HE=(e,t,n,r=".",a=!0)=>{let i=Aq(e,t,n);return!i&&a&&pe(n)&&(i=bx(e,n,r),i===void 0&&(i=bx(t,n,r))),i},tb=e=>e.replace(/\$/g,"$$$$");class qE{constructor(t={}){var n;this.logger=Zr.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:a,prefix:i,prefixEscaped:s,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:f,unescapePrefix:d,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:b,maxReplaces:y,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:Eq,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=i?xa(i):s||"{{",this.suffix=o?xa(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":d?xa(d):"-",this.unescapeSuffix=this.unescapePrefix?"":f?xa(f):"",this.nestingPrefix=h?xa(h):p||xa("$t("),this.nestingSuffix=m?xa(m):g||xa(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=y||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,a){var p;let i,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=m=>{if(!m.includes(this.formatSeparator)){const v=HE(n,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...a,...n,interpolationkey:m}):v}const g=m.split(this.formatSeparator),b=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(HE(n,l,b,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...a,...n,interpolationkey:b})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const f=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((p=a==null?void 0:a.interpolation)==null?void 0:p.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>tb(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?tb(this.escape(m)):tb(m)}].forEach(m=>{for(o=0;i=m.regex.exec(t);){const g=i[1].trim();if(s=c(g),s===void 0)if(typeof f=="function"){const y=f(t,i,a);s=pe(y)?y:""}else if(a&&Object.prototype.hasOwnProperty.call(a,g))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else!pe(s)&&!this.useRawValueToEscape&&(s=kE(s));const b=m.safeValue(s);if(t=t.replace(i[0],b),d?(m.regex.lastIndex+=s.length,m.regex.lastIndex-=i[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,n,r={}){let a,i,s;const o=(l,c)=>{const f=this.nestingOptionsSeparator;if(!l.includes(f))return l;const d=l.split(new RegExp(`${xa(f)}[ ]*{`));let h=`{${d[1]}`;l=d[0],h=this.interpolate(h,s);const p=h.match(/'/g),m=h.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!m||((m==null?void 0:m.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),c&&(s={...c,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${f}${h}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,l};for(;a=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&!pe(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(c!==-1&&(l=a[1].slice(c).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),a[1]=a[1].slice(0,c)),i=n(o.call(this,a[1].trim(),s),s),i&&a[0]===t&&!pe(i))return i;pe(i)||(i=kE(i)),i||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),i=""),l.length&&(i=l.reduce((f,d)=>this.format(f,d,r.lng,{...r,interpolationkey:a[1].trim()}),i.trim())),t=t.replace(a[0],i),this.regexp.lastIndex=0}return t}}const Dq=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const a=r[1].slice(0,-1);t==="currency"&&!a.includes(":")?n.currency||(n.currency=a.trim()):t==="relativetime"&&!a.includes(":")?n.range||(n.range=a.trim()):a.split(";").forEach(s=>{if(s){const[o,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();n[f]||(n[f]=c),c==="false"&&(n[f]=!1),c==="true"&&(n[f]=!0),isNaN(c)||(n[f]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},KE=e=>{const t={};return(n,r,a)=>{let i=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(i={...i,[a.interpolationkey]:void 0});const s=r+JSON.stringify(i);let o=t[s];return o||(o=e(Pf(r),a),t[s]=o),o(n)}},$q=e=>(t,n,r)=>e(Pf(n),r)(t);class kq{constructor(t={}){this.logger=Zr.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?KE:$q;this.formats={number:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i});return o=>s.format(o)}),currency:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i,style:"currency"});return o=>s.format(o)}),datetime:r((a,i)=>{const s=new Intl.DateTimeFormat(a,{...i});return o=>s.format(o)}),relativetime:r((a,i)=>{const s=new Intl.RelativeTimeFormat(a,{...i});return o=>s.format(o,i.range||"day")}),list:r((a,i)=>{const s=new Intl.ListFormat(a,{...i});return o=>s.format(o)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=KE(n)}format(t,n,r,a={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&!i[0].includes(")")&&i.find(o=>o.includes(")"))){const o=i.findIndex(l=>l.includes(")"));i[0]=[i[0],...i.splice(1,o)].join(this.formatSeparator)}return i.reduce((o,l)=>{var d;const{formatName:c,formatOptions:f}=Dq(l);if(this.formats[c]){let h=o;try{const p=((d=a==null?void 0:a.formatParams)==null?void 0:d[a.interpolationkey])||{},m=p.locale||p.lng||a.locale||a.lng||r;h=this.formats[c](o,m,{...f,...a,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn(`there was no format function for ${c}`);return o},t)}}const Lq=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class zq extends Wy{constructor(t,n,r,a={}){var i,s;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=a,this.logger=Zr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(s=(i=this.backend)==null?void 0:i.init)==null||s.call(i,r,a.backend,a)}queueLoad(t,n,r,a){const i={},s={},o={},l={};return t.forEach(c=>{let f=!0;n.forEach(d=>{const h=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,f=!1,s[h]===void 0&&(s[h]=!0),i[h]===void 0&&(i[h]=!0),l[d]===void 0&&(l[d]=!0)))}),f||(o[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const a=t.split("|"),i=a[0],s=a[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const o={};this.queue.forEach(l=>{jq(l.loaded,[i],s),Lq(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const f=l.loaded[c];f.length&&f.forEach(d=>{o[c][d]===void 0&&(o[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r,a=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:a,wait:i,callback:s});return}this.readingCalls++;const o=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&f&&a{this.read(t,n,r,a+1,i*2,s)},i);return}s(c,f)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}return}return l(t,n,o)}prepareLoading(t,n,r={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();pe(t)&&(t=this.languageUtils.toResolveHierarchy(t)),pe(n)&&(n=[n]);const i=this.queueLoad(t,n,r,a);if(!i.toLoad.length)return i.pending.length||a(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),a=r[0],i=r[1];this.read(a,i,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${a} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${i} for language ${a}`,o),this.loaded(t,s,o)})}saveMissing(t,n,r,a,i,s={},o=()=>{}){var l,c,f,d,h;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((d=(f=this.services)==null?void 0:f.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((h=this.backend)!=null&&h.create){const p={...s,isUpdate:i},m=this.backend.create.bind(this.backend);if(m.length<6)try{let g;m.length===5?g=m(t,n,r,a,p):g=m(t,n,r,a),g&&typeof g.then=="function"?g.then(b=>o(null,b)).catch(o):o(null,g)}catch(g){o(g)}else m(t,n,r,a,o,p)}!t||!t[0]||this.store.addResource(t[0],n,r,a)}}}const nb=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),pe(e[1])&&(t.defaultValue=e[1]),pe(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),GE=e=>(pe(e.ns)&&(e.ns=[e.ns]),pe(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),pe(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Th=()=>{},Iq=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ef extends Wy{constructor(t={},n){if(super(),this.options=GE(t),this.services={},this.logger=Zr,this.modules={external:[]},Iq(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(pe(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=nb();this.options={...r,...this.options,...GE(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const a=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Zr.init(a(this.modules.logger),this.options):Zr.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=kq;const f=new UE(this.options);this.store=new BE(this.options.resources,this.options);const d=this.services;d.logger=Zr,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new Rq(f,{prepend:this.options.pluralSeparator}),c&&(d.formatter=a(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new qE(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new zq(a(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(d.languageDetector=a(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=a(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new fm(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Th),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...f)=>this.store[c](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...f)=>(this.store[c](...f),this)});const o=cu(),l=()=>{const c=(f,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(d),n(f,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(t,n=Th){var i,s;let r=n;const a=pe(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((a==null?void 0:a.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(d=>{d!=="cimode"&&(o.includes(d)||o.push(d))})};a?l(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>l(f)),(s=(i=this.options.preload)==null?void 0:i.forEach)==null||s.call(i,c=>l(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const a=cu();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Th),this.services.backendConnector.reload(t,n,i=>{a.resolve(),r(i)}),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Z3.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},i=(o,l)=>{l?this.isLanguageChangingTo===t&&(a(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(o,(...c)=>this.t(...c))},s=o=>{var f,d;!t&&!o&&this.services.languageDetector&&(o=[]);const l=pe(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(pe(o)?[o]:o);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),(d=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||d.call(f,c)),this.loadResources(c,h=>{i(h,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,a){const i=a==null?void 0:a.scopeNs,s=(o,l,...c)=>{let f;typeof l!="object"?f=this.options.overloadTranslationOptionHandler([o,l].concat(c)):f={...l},f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs;const d=f.ns!==void 0&&f.ns!==null;f.ns=f.ns||s.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||r||s.keyPrefix);const h={...this.options,...f};Array.isArray(i)&&!d&&(h.ns=i),typeof f.keyPrefix=="function"&&(f.keyPrefix=vl(f.keyPrefix,h));const p=this.options.keySeparator||".";let m;return f.keyPrefix&&Array.isArray(o)?m=o.map(g=>(typeof g=="function"&&(g=vl(g,h)),`${f.keyPrefix}${p}${g}`)):(typeof o=="function"&&(o=vl(o,h)),m=f.keyPrefix?`${f.keyPrefix}${p}${o}`:o),this.t(m,f)};return pe(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!a||s(i,t)))}loadNamespaces(t,n){const r=cu();return this.options.ns?(pe(t)&&(t=[t]),t.forEach(a=>{this.options.ns.includes(a)||this.options.ns.push(a)}),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=cu();pe(t)&&(t=[t]);const a=this.options.preload||[],i=t.filter(s=>!a.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=a.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var a,i;if(t||(t=this.resolvedLanguage||(((a=this.languages)==null?void 0:a.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const s=new Intl.Locale(t);if(s&&s.getTextInfo){const o=s.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new UE(nb());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new ef(t,n);return r.createInstance=ef.createInstance,r}cloneInstance(t={},n=Th){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const a={...this.options,...t,isClone:!0},i=new ef(a);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(o=>{i[o]=this[o]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((f,d)=>(f[d]={...l[c][d]},f),l[c]),l),{});i.store=new BE(o,a),i.services.resourceStore=i.store}if(t.interpolation){const l={...nb().interpolation,...this.options.interpolation,...t.interpolation},c={...a,interpolation:l};i.services.interpolator=new qE(c)}return i.translator=new fm(i.services,a),i.translator.on("*",(o,...l)=>{i.emit(o,...l)}),i.init(a,n),i.translator.options=a,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const rn=ef.createInstance();rn.createInstance;rn.dir;rn.init;rn.loadResources;rn.reloadResources;rn.use;rn.changeLanguage;rn.getFixedT;rn.t;rn.exists;rn.setDefaultNamespace;rn.hasLoadedNamespace;rn.loadNamespaces;rn.loadLanguages;const Bq=(e,t,n,r)=>{var i,s,o,l;const a=[n,{code:t,...r||{}}];if((s=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&s.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);ao(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(l=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&l.warn?e.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},YE={},xx=(e,t,n,r)=>{ao(n)&&YE[n]||(ao(n)&&(YE[n]=new Date),Bq(e,t,n,r))},ek=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Sx=(e,t,n)=>{e.loadNamespaces(t,ek(e,n))},XE=(e,t,n,r)=>{if(ao(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Sx(e,n,r);n.forEach(a=>{e.options.ns.indexOf(a)<0&&e.options.ns.push(a)}),e.loadLanguages(t,ek(e,r))},Uq=(e,t,n={})=>!t.languages||!t.languages.length?(xx(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!a(r.isLanguageChangingTo,e))return!1}}),ao=e=>typeof e=="string",Fq=e=>typeof e=="object"&&e!==null,Vq=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Hq={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},qq=e=>Hq[e],Kq=e=>e.replace(Vq,qq);let wx={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Kq,transDefaultProps:void 0};const Gq=(e={})=>{wx={...wx,...e}},Yq=()=>wx;let tk;const Xq=e=>{tk=e},Wq=()=>tk,Qq={type:"3rdParty",init(e){Gq(e.options.react),Xq(e)}},Zq=A.createContext();class Jq{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var nk={exports:{}},rk={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Xl=A;function eK(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tK=typeof Object.is=="function"?Object.is:eK,nK=Xl.useState,rK=Xl.useEffect,aK=Xl.useLayoutEffect,iK=Xl.useDebugValue;function sK(e,t){var n=t(),r=nK({inst:{value:n,getSnapshot:t}}),a=r[0].inst,i=r[1];return aK(function(){a.value=n,a.getSnapshot=t,rb(a)&&i({inst:a})},[e,n,t]),rK(function(){return rb(a)&&i({inst:a}),e(function(){rb(a)&&i({inst:a})})},[e]),iK(n),n}function rb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tK(e,n)}catch{return!0}}function oK(e,t){return t()}var lK=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oK:sK;rk.useSyncExternalStore=Xl.useSyncExternalStore!==void 0?Xl.useSyncExternalStore:lK;nk.exports=rk;var cK=nk.exports;const uK=(e,t)=>{if(ao(t))return t;if(Fq(t)&&ao(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const n=e[e.length-1];return typeof n=="function"?"":n}return e},fK={t:uK,ready:!1},dK=()=>()=>{},ni=(e,t={})=>{var T,N,M;const{i18n:n}=t,{i18n:r,defaultNS:a}=A.useContext(Zq)||{},i=n||r||Wq();i&&!i.reportNamespaces&&(i.reportNamespaces=new Jq),i||xx(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const s=A.useMemo(()=>{var C;return{...Yq(),...(C=i==null?void 0:i.options)==null?void 0:C.react,...t}},[i,t]),{useSuspense:o,keyPrefix:l}=s,c=a||((T=i==null?void 0:i.options)==null?void 0:T.defaultNS),f=ao(c)?[c]:c||["translation"],d=A.useMemo(()=>f,f);(M=(N=i==null?void 0:i.reportNamespaces)==null?void 0:N.addUsedNamespaces)==null||M.call(N,d);const h=A.useRef(0),p=A.useCallback(C=>{if(!i)return dK;const{bindI18n:L,bindI18nStore:D}=s,$=()=>{h.current+=1,C()};return L&&i.on(L,$),D&&i.store.on(D,$),()=>{L&&L.split(" ").forEach(P=>i.off(P,$)),D&&D.split(" ").forEach(P=>i.store.off(P,$))}},[i,s]),m=A.useRef(),g=A.useCallback(()=>{if(!i)return fK;const C=!!(i.isInitialized||i.initializedStoreOnce)&&d.every(I=>Uq(I,i,s)),L=t.lng||i.language,D=h.current,$=m.current;if($&&$.ready===C&&$.lng===L&&$.keyPrefix===l&&$.revision===D)return $;const k={t:i.getFixedT(L,s.nsMode==="fallback"?d:d[0],l,{scopeNs:d}),ready:C,lng:L,keyPrefix:l,revision:D};return m.current=k,k},[i,d,l,s,t.lng]),[b,y]=A.useState(0),{t:v,ready:x}=cK.useSyncExternalStore(p,g,g);A.useEffect(()=>{if(i&&!x&&!o){const C=()=>y(L=>L+1);t.lng?XE(i,t.lng,d,C):Sx(i,d,C)}},[i,t.lng,d,x,o,b]);const w=i||{},S=A.useRef(null),j=A.useRef(),O=C=>{const L=Object.getOwnPropertyDescriptors(C);L.__original&&delete L.__original;const D=Object.create(Object.getPrototypeOf(C),L);if(!Object.prototype.hasOwnProperty.call(D,"__original"))try{Object.defineProperty(D,"__original",{value:C,writable:!1,enumerable:!1,configurable:!1})}catch{}return D},E=A.useMemo(()=>{const C=w,L=C==null?void 0:C.language;let D=C;C&&(S.current&&S.current.__original===C?j.current!==L?(D=O(C),S.current=D,j.current=L):D=S.current:(D=O(C),S.current=D,j.current=L));const $=!x&&!o?(...k)=>(xx(i,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),v(...k)):v,P=[$,D,x];return P.t=$,P.i18n=D,P.ready=x,P},[v,w,x,w.resolvedLanguage,w.language,w.languages]);if(i&&o&&!x)throw new Promise(C=>{const L=()=>C();t.lng?XE(i,t.lng,d,L):Sx(i,d,L)});return E};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hK=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ak=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var pK={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mK=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...o},l)=>A.createElement("svg",{ref:l,...pK,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ak("lucide",a),...o},[...s.map(([c,f])=>A.createElement(c,f)),...Array.isArray(i)?i:[i]]));/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ae=(e,t)=>{const n=A.forwardRef(({className:r,...a},i)=>A.createElement(mK,{ref:i,iconNode:t,className:ak(`lucide-${hK(e)}`,r),...a}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ik=ae("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Es=ae("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jw=ae("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sk=ae("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ok=ae("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yK=ae("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lk=ae("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gK=ae("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pu=ae("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vK=ae("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bK=ae("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ck=ae("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uk=ae("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fk=ae("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WE=ae("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mf=ae("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xK=ae("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dk=ae("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hk=ae("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pk=ae("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ft=ae("Flower2",[["path",{d:"M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1",key:"3pnvol"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M12 10v12",key:"6ubwww"}],["path",{d:"M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z",key:"9hd38g"}],["path",{d:"M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z",key:"ufn41s"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mk=ae("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SK=ae("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wK=ae("HandHeart",[["path",{d:"M11 14h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 16",key:"1ifwr1"}],["path",{d:"m7 20 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"17abbs"}],["path",{d:"m2 15 6 6",key:"10dquu"}],["path",{d:"M19.5 8.5c.7-.7 1.5-1.6 1.5-2.7A2.73 2.73 0 0 0 16 4a2.78 2.78 0 0 0-5 1.8c0 1.2.8 2 1.5 2.8L16 12Z",key:"1h3036"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jK=ae("Headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rf=ae("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yk=ae("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const AK=ae("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ej=ae("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QE=ae("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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gk=ae("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dm=ae("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Df=ae("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vk=ae("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OK=ae("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZE=ae("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EK=ae("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tj=ae("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const TK=ae("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JE=ae("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nj=ae("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qy=ae("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bk=ae("ScrollText",[["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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rj=ae("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NK=ae("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xk=ae("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aj=ae("ShieldCheck",[["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",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ij=ae("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sj=ae("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CK=ae("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bl=ae("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xr=ae("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wa=ae("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bd=ae("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _K=ae("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PK=ae("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MK=ae("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const RK=ae("TriangleAlert",[["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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ud=ae("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sk=ae("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wk=ae("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jk=ae("Users",[["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"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);function Ak(e,t){return function(){return e.apply(t,arguments)}}const{toString:DK}=Object.prototype,{getPrototypeOf:Zy}=Object,{iterator:Jy,toStringTag:Ok}=Symbol,eg=(e=>t=>{const n=DK.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Br=e=>(e=e.toLowerCase(),t=>eg(t)===e),tg=e=>t=>typeof t===e,{isArray:io}=Array,Wl=tg("undefined");function Ic(e){return e!==null&&!Wl(e)&&e.constructor!==null&&!Wl(e.constructor)&&Cn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ek=Br("ArrayBuffer");function $K(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ek(e.buffer),t}const kK=tg("string"),Cn=tg("function"),Tk=tg("number"),Fd=e=>e!==null&&typeof e=="object",LK=e=>e===!0||e===!1,gp=e=>{if(eg(e)!=="object")return!1;const t=Zy(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ok in e)&&!(Jy in e)},zK=e=>{if(!Fd(e)||Ic(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},IK=Br("Date"),BK=Br("File"),UK=e=>!!(e&&typeof e.uri<"u"),FK=e=>e&&typeof e.getParts<"u",VK=Br("Blob"),HK=Br("FileList"),qK=e=>Fd(e)&&Cn(e.pipe);function KK(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const eT=KK(),tT=typeof eT.FormData<"u"?eT.FormData:void 0,GK=e=>{if(!e)return!1;if(tT&&e instanceof tT)return!0;const t=Zy(e);if(!t||t===Object.prototype||!Cn(e.append))return!1;const n=eg(e);return n==="formdata"||n==="object"&&Cn(e.toString)&&e.toString()==="[object FormData]"},YK=Br("URLSearchParams"),[XK,WK,QK,ZK]=["ReadableStream","Request","Response","Headers"].map(Br),JK=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vd(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),io(e))for(r=0,a=e.length;r0;)if(a=n[r],t===a.toLowerCase())return a;return null}const Ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ck=e=>!Wl(e)&&e!==Ts;function jx(...e){const{caseless:t,skipUndefined:n}=Ck(this)&&this||{},r={},a=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const o=t&&typeof s=="string"&&Nk(r,s)||s,l=Ax(r,o)?r[o]:void 0;gp(l)&&gp(i)?r[o]=jx(l,i):gp(i)?r[o]=jx({},i):io(i)?r[o]=i.slice():(!n||!Wl(i))&&(r[o]=i)};for(let i=0,s=e.length;i(Vd(t,(a,i)=>{n&&Cn(a)?Object.defineProperty(e,i,{__proto__:null,value:Ak(a,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),tG=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),nG=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},rG=(e,t,n,r)=>{let a,i,s;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!r||r(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=n!==!1&&Zy(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},aG=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},iG=e=>{if(!e)return null;if(io(e))return e;let t=e.length;if(!Tk(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sG=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zy(Uint8Array)),oG=(e,t)=>{const r=(e&&e[Jy]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},lG=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},cG=Br("HTMLFormElement"),uG=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),Ax=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),{propertyIsEnumerable:fG}=Object.prototype,dG=Br("RegExp"),_k=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Vd(n,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(r[i]=s||a)}),Object.defineProperties(e,r)},hG=e=>{_k(e,(t,n)=>{if(Cn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Cn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},pG=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return io(e)?r(e):r(String(e).split(t)),n},mG=()=>{},yG=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function gG(e){return!!(e&&Cn(e.append)&&e[Ok]==="FormData"&&e[Jy])}const vG=e=>{const t=new WeakSet,n=r=>{if(Fd(r)){if(t.has(r))return;if(Ic(r))return r;if(!("toJSON"in r)){t.add(r);const a=io(r)?[]:{};return Vd(r,(i,s)=>{const o=n(i);!Wl(o)&&(a[s]=o)}),t.delete(r),a}}return r};return n(e)},bG=Br("AsyncFunction"),xG=e=>e&&(Fd(e)||Cn(e))&&Cn(e.then)&&Cn(e.catch),Pk=((e,t)=>e?setImmediate:t?((n,r)=>(Ts.addEventListener("message",({source:a,data:i})=>{a===Ts&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Ts.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Cn(Ts.postMessage)),SG=typeof queueMicrotask<"u"?queueMicrotask.bind(Ts):typeof process<"u"&&process.nextTick||Pk,wG=e=>e!=null&&Cn(e[Jy]),z={isArray:io,isArrayBuffer:Ek,isBuffer:Ic,isFormData:GK,isArrayBufferView:$K,isString:kK,isNumber:Tk,isBoolean:LK,isObject:Fd,isPlainObject:gp,isEmptyObject:zK,isReadableStream:XK,isRequest:WK,isResponse:QK,isHeaders:ZK,isUndefined:Wl,isDate:IK,isFile:BK,isReactNativeBlob:UK,isReactNative:FK,isBlob:VK,isRegExp:dG,isFunction:Cn,isStream:qK,isURLSearchParams:YK,isTypedArray:sG,isFileList:HK,forEach:Vd,merge:jx,extend:eG,trim:JK,stripBOM:tG,inherits:nG,toFlatObject:rG,kindOf:eg,kindOfTest:Br,endsWith:aG,toArray:iG,forEachEntry:oG,matchAll:lG,isHTMLForm:cG,hasOwnProperty:Ax,hasOwnProp:Ax,reduceDescriptors:_k,freezeMethods:hG,toObjectSet:pG,toCamelCase:uG,noop:mG,toFiniteNumber:yG,findKey:Nk,global:Ts,isContextDefined:Ck,isSpecCompliantForm:gG,toJSONObject:vG,isAsyncFn:bG,isThenable:xG,setImmediate:Pk,asap:SG,isIterable:wG},jG=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),AG=e=>{const t={};let n,r,a;return e&&e.split(` +`).forEach(function(s){a=s.indexOf(":"),n=s.substring(0,a).trim().toLowerCase(),r=s.substring(a+1).trim(),!(!n||t[n]&&jG[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function OG(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const EG=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),TG=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function oj(e,t){return z.isArray(e)?e.map(n=>oj(n,t)):OG(String(e).replace(t,""))}const NG=e=>oj(e,EG),CG=e=>oj(e,TG);function Mk(e){const t=Object.create(null);return z.forEach(e.toJSON(),(n,r)=>{t[r]=CG(n)}),t}const nT=Symbol("internals");function uu(e){return e&&String(e).trim().toLowerCase()}function vp(e){return e===!1||e==null?e:z.isArray(e)?e.map(vp):NG(String(e))}function _G(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const PG=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ab(e,t,n,r,a){if(z.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!z.isString(t)){if(z.isString(r))return t.indexOf(r)!==-1;if(z.isRegExp(r))return r.test(t)}}function MG(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function RG(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(a,i,s){return this[r].call(this,t,a,i,s)},configurable:!0})})}let gn=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(o,l,c){const f=uu(l);if(!f)return;const d=z.findKey(a,f);(!d||a[d]===void 0||c===!0||c===void 0&&a[d]!==!1)&&(a[d||l]=vp(o))}const s=(o,l)=>z.forEach(o,(c,f)=>i(c,f,l));if(z.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(z.isString(t)&&(t=t.trim())&&!PG(t))s(AG(t),n);else if(z.isObject(t)&&z.isIterable(t)){let o={},l,c;for(const f of t){if(!z.isArray(f))throw new TypeError("Object iterator must return a key-value pair");o[c=f[0]]=(l=o[c])?z.isArray(l)?[...l,f[1]]:[l,f[1]]:f[1]}s(o,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=uu(t),t){const r=z.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return _G(a);if(z.isFunction(n))return n.call(this,a,r);if(z.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=uu(t),t){const r=z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ab(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(s){if(s=uu(s),s){const o=z.findKey(r,s);o&&(!n||ab(r,r[o],o,n))&&(delete r[o],a=!0)}}return z.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||ab(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return z.forEach(this,(a,i)=>{const s=z.findKey(r,i);if(s){n[s]=vp(a),delete n[i];return}const o=t?MG(i):String(i).trim();o!==i&&delete n[i],n[o]=vp(a),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return z.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&z.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[nT]=this[nT]={accessors:{}}).accessors,a=this.prototype;function i(s){const o=uu(s);r[o]||(RG(a,s),r[o]=!0)}return z.isArray(t)?t.forEach(i):i(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});z.freezeMethods(gn);const DG="[REDACTED ****]";function $G(e){if(z.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function kG(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],a=i=>{if(i===null||typeof i!="object"||z.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof gn&&(i=i.toJSON()),r.push(i);let s;if(z.isArray(i))s=[],i.forEach((o,l)=>{const c=a(o);z.isUndefined(c)||(s[l]=c)});else{if(!z.isPlainObject(i)&&$G(i))return r.pop(),i;s=Object.create(null);for(const[o,l]of Object.entries(i)){const c=n.has(o.toLowerCase())?DG:a(l);z.isUndefined(c)||(s[o]=c)}}return r.pop(),s};return a(e)}let re=class Rk extends Error{static from(t,n,r,a,i,s){const o=new Rk(t.message,n||t.code,r,a,i);return o.cause=t,o.name=t.name,t.status!=null&&o.status==null&&(o.status=t.status),s&&Object.assign(o,s),o}constructor(t,n,r,a,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&z.hasOwnProp(t,"redact")?t.redact:void 0,r=z.isArray(n)&&n.length>0?kG(t,n):z.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};re.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";re.ERR_BAD_OPTION="ERR_BAD_OPTION";re.ECONNABORTED="ECONNABORTED";re.ETIMEDOUT="ETIMEDOUT";re.ECONNREFUSED="ECONNREFUSED";re.ERR_NETWORK="ERR_NETWORK";re.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";re.ERR_DEPRECATED="ERR_DEPRECATED";re.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";re.ERR_BAD_REQUEST="ERR_BAD_REQUEST";re.ERR_CANCELED="ERR_CANCELED";re.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";re.ERR_INVALID_URL="ERR_INVALID_URL";re.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const LG=null;function Ox(e){return z.isPlainObject(e)||z.isArray(e)}function Dk(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function ib(e,t,n){return e?e.concat(t).map(function(a,i){return a=Dk(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function zG(e){return z.isArray(e)&&!e.some(Ox)}const IG=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function ng(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,y){return!z.isUndefined(y[b])});const r=n.metaTokens,a=n.visitor||d,i=n.dots,s=n.indexes,o=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,c=o&&z.isSpecCompliantForm(t);if(!z.isFunction(a))throw new TypeError("visitor must be a function");function f(g){if(g===null)return"";if(z.isDate(g))return g.toISOString();if(z.isBoolean(g))return g.toString();if(!c&&z.isBlob(g))throw new re("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(g)||z.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,b,y){let v=g;if(z.isReactNative(t)&&z.isReactNativeBlob(g))return t.append(ib(y,b,i),f(g)),!1;if(g&&!y&&typeof g=="object"){if(z.endsWith(b,"{}"))b=r?b:b.slice(0,-2),g=JSON.stringify(g);else if(z.isArray(g)&&zG(g)||(z.isFileList(g)||z.endsWith(b,"[]"))&&(v=z.toArray(g)))return b=Dk(b),v.forEach(function(w,S){!(z.isUndefined(w)||w===null)&&t.append(s===!0?ib([b],S,i):s===null?b:b+"[]",f(w))}),!1}return Ox(g)?!0:(t.append(ib(y,b,i),f(g)),!1)}const h=[],p=Object.assign(IG,{defaultVisitor:d,convertValue:f,isVisitable:Ox});function m(g,b,y=0){if(!z.isUndefined(g)){if(y>l)throw new re("Object is too deeply nested ("+y+" levels). Max depth: "+l,re.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(g)!==-1)throw new Error("Circular reference detected in "+b.join("."));h.push(g),z.forEach(g,function(x,w){(!(z.isUndefined(x)||x===null)&&a.call(t,x,z.isString(w)?w.trim():w,b,p))===!0&&m(x,b?b.concat(w):[w],y+1)}),h.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return m(e),t}function rT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function lj(e,t){this._pairs=[],e&&ng(e,this,t)}const $k=lj.prototype;$k.append=function(t,n){this._pairs.push([t,n])};$k.toString=function(t){const n=t?function(r){return t.call(this,r,rT)}:rT;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function BG(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function kk(e,t,n){if(!t)return e;const r=n&&n.encode||BG,a=z.isFunction(n)?{serialize:n}:n,i=a&&a.serialize;let s;if(i?s=i(t,a):s=z.isURLSearchParams(t)?t.toString():new lj(t,a).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class aT{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const cj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},UG=typeof URLSearchParams<"u"?URLSearchParams:lj,FG=typeof FormData<"u"?FormData:null,VG=typeof Blob<"u"?Blob:null,HG={isBrowser:!0,classes:{URLSearchParams:UG,FormData:FG,Blob:VG},protocols:["http","https","file","blob","url","data"]},uj=typeof window<"u"&&typeof document<"u",Ex=typeof navigator=="object"&&navigator||void 0,qG=uj&&(!Ex||["ReactNative","NativeScript","NS"].indexOf(Ex.product)<0),KG=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",GG=uj&&window.location.href||"http://localhost",YG=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:uj,hasStandardBrowserEnv:qG,hasStandardBrowserWebWorkerEnv:KG,navigator:Ex,origin:GG},Symbol.toStringTag,{value:"Module"})),Jt={...YG,...HG};function XG(e,t){return ng(e,new Jt.classes.URLSearchParams,{visitor:function(n,r,a,i){return Jt.isNode&&z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function WG(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function QG(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r=n.length;return s=!s&&z.isArray(a)?a.length:s,l?(z.hasOwnProp(a,s)?a[s]=z.isArray(a[s])?a[s].concat(r):[a[s],r]:a[s]=r,!o):((!z.hasOwnProp(a,s)||!z.isObject(a[s]))&&(a[s]=[]),t(n,r,a[s],i)&&z.isArray(a[s])&&(a[s]=QG(a[s])),!o)}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,(r,a)=>{t(WG(r),a,n,0)}),n}return null}const Mo=(e,t)=>e!=null&&z.hasOwnProp(e,t)?e[t]:void 0;function ZG(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Hd={transitional:cj,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=z.isObject(t);if(i&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return a?JSON.stringify(Lk(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){const l=Mo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return XG(t,l).toString();if((o=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=Mo(this,"env"),f=c&&c.FormData;return ng(o?{"files[]":t}:t,f&&new f,l)}}return i||a?(n.setContentType("application/json",!1),ZG(t)):t}],transformResponse:[function(t){const n=Mo(this,"transitional")||Hd.transitional,r=n&&n.forcedJSONParsing,a=Mo(this,"responseType"),i=a==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(r&&!a||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,Mo(this,"parseReviver"))}catch(l){if(o)throw l.name==="SyntaxError"?re.from(l,re.ERR_BAD_RESPONSE,this,null,Mo(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Jt.classes.FormData,Blob:Jt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch","query"],e=>{Hd.headers[e]={}});function sb(e,t){const n=this||Hd,r=t||n,a=gn.from(r.headers);let i=r.data;return z.forEach(e,function(o){i=o.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function zk(e){return!!(e&&e.__CANCEL__)}let qd=class extends re{constructor(t,n,r){super(t??"canceled",re.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ik(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new re("Request failed with status code "+n.status,n.status>=400&&n.status<500?re.ERR_BAD_REQUEST:re.ERR_BAD_RESPONSE,n.config,n.request,n))}function JG(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function eY(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),f=r[i];s||(s=c),n[a]=l,r[a]=c;let d=i,h=0;for(;d!==a;)h+=n[d++],d=d%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-s{n=f,a=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{const f=Date.now(),d=f-n;d>=r?s(c,f):(a=c,i||(i=setTimeout(()=>{i=null,s(a)},r-d)))},()=>a&&s(a)]}const hm=(e,t,n=3)=>{let r=0;const a=eY(50,250);return tY(i=>{if(!i||typeof i.loaded!="number")return;const s=i.loaded,o=i.lengthComputable?i.total:void 0,l=o!=null?Math.min(s,o):s,c=Math.max(0,l-r),f=a(c);r=Math.max(r,l);const d={loaded:l,total:o,progress:o?l/o:void 0,bytes:c,rate:f||void 0,estimated:f&&o?(o-l)/f:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(d)},n)},iT=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},sT=e=>(...t)=>z.asap(()=>e(...t)),nY=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,rY=Jt.hasStandardBrowserEnv?{write(e,t,n,r,a,i,s){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];z.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),z.isString(r)&&o.push(`path=${r}`),z.isString(a)&&o.push(`domain=${a}`),i===!0&&o.push("secure"),z.isString(s)&&o.push(`SameSite=${s}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof gn?{...e}:e;function so(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,f,d,h){return z.isPlainObject(c)&&z.isPlainObject(f)?z.merge.call({caseless:h},c,f):z.isPlainObject(f)?z.merge({},f):z.isArray(f)?f.slice():f}function a(c,f,d,h){if(z.isUndefined(f)){if(!z.isUndefined(c))return r(void 0,c,d,h)}else return r(c,f,d,h)}function i(c,f){if(!z.isUndefined(f))return r(void 0,f)}function s(c,f){if(z.isUndefined(f)){if(!z.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function o(c,f,d){if(z.hasOwnProp(t,d))return r(c,f);if(z.hasOwnProp(e,d))return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:o,headers:(c,f,d)=>a(oT(c),oT(f),d,!0)};return z.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const d=z.hasOwnProp(l,f)?l[f]:a,h=z.hasOwnProp(e,f)?e[f]:void 0,p=z.hasOwnProp(t,f)?t[f]:void 0,m=d(h,p,f);z.isUndefined(m)&&d!==o||(n[f]=m)}),n}const sY=["content-type","content-length"];function oY(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,a])=>{sY.includes(r.toLowerCase())&&e.set(r,a)})}const lY=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Uk(e){const t=so({},e),n=h=>z.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let a=n("withXSRFToken");const i=n("xsrfHeaderName"),s=n("xsrfCookieName");let o=n("headers");const l=n("auth"),c=n("baseURL"),f=n("allowAbsoluteUrls"),d=n("url");if(t.headers=o=gn.from(o),t.url=kk(Bk(c,d,f),n("params"),n("paramsSerializer")),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?lY(l.password):""))),z.isFormData(r)&&(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv||z.isReactNative(r)?o.setContentType(void 0):z.isFunction(r.getHeaders)&&oY(o,r.getHeaders(),n("formDataHeaderPolicy"))),Jt.hasStandardBrowserEnv&&(z.isFunction(a)&&(a=a(t)),a===!0||a==null&&nY(t.url))){const p=i&&s&&rY.read(s);p&&o.set(i,p)}return t}const cY=typeof XMLHttpRequest<"u",uY=cY&&function(e){return new Promise(function(n,r){const a=Uk(e);let i=a.data;const s=gn.from(a.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=a,f,d,h,p,m;function g(){p&&p(),m&&m(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(a.method.toUpperCase(),a.url,!0),b.timeout=a.timeout;function y(){if(!b)return;const x=gn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),S={data:!o||o==="text"||o==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:x,config:e,request:b};Ik(function(O){n(O),g()},function(O){r(O),g()},S),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(y)},b.onabort=function(){b&&(r(new re("Request aborted",re.ECONNABORTED,e,b)),g(),b=null)},b.onerror=function(w){const S=w&&w.message?w.message:"Network Error",j=new re(S,re.ERR_NETWORK,e,b);j.event=w||null,r(j),g(),b=null},b.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const S=a.transitional||cj;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),r(new re(w,S.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,b)),g(),b=null},i===void 0&&s.setContentType(null),"setRequestHeader"in b&&z.forEach(Mk(s),function(w,S){b.setRequestHeader(S,w)}),z.isUndefined(a.withCredentials)||(b.withCredentials=!!a.withCredentials),o&&o!=="json"&&(b.responseType=a.responseType),c&&([h,m]=hm(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,p]=hm(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(f=x=>{b&&(r(!x||x.type?new qd(null,e,b):x),b.abort(),g(),b=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const v=JG(a.url);if(v&&!Jt.protocols.includes(v)){r(new re("Unsupported protocol "+v+":",re.ERR_BAD_REQUEST,e));return}b.send(i||null)})},fY=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const a=function(l){if(!r){r=!0,s();const c=l instanceof Error?l:this.reason;n.abort(c instanceof re?c:new qd(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,a(new re(`timeout of ${t}ms exceeded`,re.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),e=null)};e.forEach(l=>l.addEventListener("abort",a));const{signal:o}=n;return o.unsubscribe=()=>z.asap(s),o},dY=function*(e,t){let n=e.byteLength;if(n{const a=hY(e,t);let i=0,s,o=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:f}=await a.next();if(c){o(),l.close();return}let d=f.byteLength;if(n){let h=i+=d;n(h)}l.enqueue(new Uint8Array(f))}catch(c){throw o(c),c}},cancel(l){return o(l),a.return()}},{highWaterMark:2})};function mY(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let s=r.length;const o=r.length;for(let p=0;p=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(s-=2,p+=2)}let l=0,c=o-1;const f=p=>p>=2&&r.charCodeAt(p-2)===37&&r.charCodeAt(p-1)===51&&(r.charCodeAt(p)===68||r.charCodeAt(p)===100);c>=0&&(r.charCodeAt(c)===61?(l++,c--):f(c)&&(l++,c-=3)),l===1&&c>=0&&(r.charCodeAt(c)===61||f(c))&&l++;const h=Math.floor(s/4)*3-(l||0);return h>0?h:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let i=0;for(let s=0,o=r.length;s=55296&&l<=56319&&s+1=56320&&c<=57343?(i+=4,s++):i+=3}else i+=3}return i}const fj="1.17.0",cT=64*1024,{isFunction:Nh}=z,yY=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),uT=e=>{if(!z.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},fT=(e,...t)=>{try{return!!e(...t)}catch{return!1}},gY=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},vY=e=>{const t=z.global!==void 0&&z.global!==null?z.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:i,Response:s}=e,o=a?Nh(a):typeof fetch=="function",l=Nh(i),c=Nh(s);if(!o)return!1;const f=o&&Nh(n),d=o&&(typeof r=="function"?(y=>v=>y.encode(v))(new r):async y=>new Uint8Array(await new i(y).arrayBuffer())),h=l&&f&&fT(()=>{let y=!1;const v=new i(Jt.origin,{body:new n,method:"POST",get duplex(){return y=!0,"half"}}),x=v.headers.has("Content-Type");return v.body!=null&&v.body.cancel(),y&&!x}),p=c&&f&&fT(()=>z.isReadableStream(new s("").body)),m={stream:p&&(y=>y.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!m[y]&&(m[y]=(v,x)=>{let w=v&&v[y];if(w)return w.call(v);throw new re(`Response type '${y}' is not supported`,re.ERR_NOT_SUPPORT,x)})});const g=async y=>{if(y==null)return 0;if(z.isBlob(y))return y.size;if(z.isSpecCompliantForm(y))return(await new i(Jt.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(z.isArrayBufferView(y)||z.isArrayBuffer(y))return y.byteLength;if(z.isURLSearchParams(y)&&(y=y+""),z.isString(y))return(await d(y)).byteLength},b=async(y,v)=>{const x=z.toFiniteNumber(y.getContentLength());return x??g(v)};return async y=>{let{url:v,method:x,data:w,signal:S,cancelToken:j,timeout:O,onDownloadProgress:E,onUploadProgress:T,responseType:N,headers:M,withCredentials:C="same-origin",fetchOptions:L,maxContentLength:D,maxBodyLength:$}=Uk(y);const P=z.isNumber(D)&&D>-1,k=z.isNumber($)&&$>-1,I=Z=>z.hasOwnProp(y,Z)?y[Z]:void 0;let F=a||fetch;N=N?(N+"").toLowerCase():"text";let H=fY([S,j&&j.toAbortSignal()],O),Y=null;const q=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let te;try{let Z;const ye=I("auth");if(ye){const X=ye.username||"",V=ye.password||"";Z={username:X,password:V}}if(gY(v)){const X=new URL(v,Jt.origin);if(!Z&&(X.username||X.password)){const V=uT(X.username),_e=uT(X.password);Z={username:V,password:_e}}(X.username||X.password)&&(X.username="",X.password="",v=X.href)}if(Z&&(M.delete("authorization"),M.set("Authorization","Basic "+btoa(yY((Z.username||"")+":"+(Z.password||""))))),P&&typeof v=="string"&&v.startsWith("data:")&&mY(v)>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y);if(k&&x!=="get"&&x!=="head"){const X=await b(M,w);if(typeof X=="number"&&isFinite(X)&&X>$)throw new re("Request body larger than maxBodyLength limit",re.ERR_BAD_REQUEST,y,Y)}if(T&&h&&x!=="get"&&x!=="head"&&(te=await b(M,w))!==0){let X=new i(v,{method:"POST",body:w,duplex:"half"}),V;if(z.isFormData(w)&&(V=X.headers.get("content-type"))&&M.setContentType(V),X.body){const[_e,ge]=iT(te,hm(sT(T)));w=lT(X.body,cT,_e,ge)}}z.isString(C)||(C=C?"include":"omit");const J=l&&"credentials"in i.prototype;if(z.isFormData(w)){const X=M.getContentType();X&&/^multipart\/form-data/i.test(X)&&!/boundary=/i.test(X)&&M.delete("content-type")}M.set("User-Agent","axios/"+fj,!1);const st={...L,signal:H,method:x.toUpperCase(),headers:Mk(M.normalize()),body:w,duplex:"half",credentials:J?C:void 0};Y=l&&new i(v,st);let Ve=await(l?F(Y,L):F(v,st));if(P){const X=z.toFiniteNumber(Ve.headers.get("content-length"));if(X!=null&&X>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y)}const G=p&&(N==="stream"||N==="response");if(p&&Ve.body&&(E||P||G&&q)){const X={};["status","statusText","headers"].forEach(dt=>{X[dt]=Ve[dt]});const V=z.toFiniteNumber(Ve.headers.get("content-length")),[_e,ge]=E&&iT(V,hm(sT(E),!0))||[];let Xe=0;const ot=dt=>{if(P&&(Xe=dt,Xe>D))throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y);_e&&_e(dt)};Ve=new s(lT(Ve.body,cT,ot,()=>{ge&&ge(),q&&q()}),X)}N=N||"text";let oe=await m[z.findKey(m,N)||"text"](Ve,y);if(P&&!p&&!G){let X;if(oe!=null&&(typeof oe.byteLength=="number"?X=oe.byteLength:typeof oe.size=="number"?X=oe.size:typeof oe=="string"&&(X=typeof r=="function"?new r().encode(oe).byteLength:oe.length)),typeof X=="number"&&X>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y)}return!G&&q&&q(),await new Promise((X,V)=>{Ik(X,V,{data:oe,headers:gn.from(Ve.headers),status:Ve.status,statusText:Ve.statusText,config:y,request:Y})})}catch(Z){if(q&&q(),H&&H.aborted&&H.reason instanceof re){const ye=H.reason;throw ye.config=y,Y&&(ye.request=Y),Z!==ye&&(ye.cause=Z),ye}throw Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)?Object.assign(new re("Network Error",re.ERR_NETWORK,y,Y,Z&&Z.response),{cause:Z.cause||Z}):re.from(Z,Z&&Z.code,y,Y,Z&&Z.response)}}},bY=new Map,Fk=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let s=i.length,o=s,l,c,f=bY;for(;o--;)l=i[o],c=f.get(l),c===void 0&&f.set(l,c=o?new Map:vY(t)),f=c;return c};Fk();const dj={http:LG,xhr:uY,fetch:{get:Fk}};z.forEach(dj,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const dT=e=>`- ${e}`,xY=e=>z.isFunction(e)||e===null||e===!1;function SY(e,t){e=z.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let s=0;s`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=n?s.length>1?`since : +`+s.map(dT).join(` +`):" "+dT(s[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return a}const Vk={getAdapter:SY,adapters:dj};function ob(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qd(null,e)}function hT(e){return ob(e),e.headers=gn.from(e.headers),e.data=sb.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vk.getAdapter(e.adapter||Hd.adapter,e)(e).then(function(r){ob(e),e.response=r;try{r.data=sb.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=gn.from(r.headers),r},function(r){if(!zk(r)&&(ob(e),r&&r.response)){e.response=r.response;try{r.response.data=sb.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=gn.from(r.response.headers)}return Promise.reject(r)})}const rg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rg[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pT={};rg.transitional=function(t,n,r){function a(i,s){return"[Axios v"+fj+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,o)=>{if(t===!1)throw new re(a(s," has been removed"+(n?" in "+n:"")),re.ERR_DEPRECATED);return n&&!pT[s]&&(pT[s]=!0,console.warn(a(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,o):!0}};rg.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function wY(e,t,n){if(typeof e!="object")throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],s=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(s){const o=e[i],l=o===void 0||s(o,i,e);if(l!==!0)throw new re("option "+i+" must be "+l,re.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new re("Unknown option "+i,re.ERR_BAD_OPTION)}}const bp={assertOptions:wY,validators:rg},wn=bp.validators;let Ys=class{constructor(t){this.defaults=t||{},this.interceptors={request:new aT,response:new aT}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=(()=>{if(!a.stack)return"";const s=a.stack.indexOf(` +`);return s===-1?"":a.stack.slice(s+1)})();try{if(!r.stack)r.stack=i;else if(i){const s=i.indexOf(` +`),o=s===-1?-1:i.indexOf(` +`,s+1),l=o===-1?"":i.slice(o+1);String(r.stack).endsWith(l)||(r.stack+=` +`+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=so(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&bp.assertOptions(r,{silentJSONParsing:wn.transitional(wn.boolean),forcedJSONParsing:wn.transitional(wn.boolean),clarifyTimeoutError:wn.transitional(wn.boolean),legacyInterceptorReqResOrdering:wn.transitional(wn.boolean),advertiseZstdAcceptEncoding:wn.transitional(wn.boolean)},!1),a!=null&&(z.isFunction(a)?n.paramsSerializer={serialize:a}:bp.assertOptions(a,{encode:wn.function,serialize:wn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),bp.assertOptions(n,{baseUrl:wn.spelling("baseURL"),withXsrfToken:wn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&z.merge(i.common,i[n.method]);i&&z.forEach(["delete","get","head","post","put","patch","query","common"],m=>{delete i[m]}),n.headers=gn.concat(s,i);const o=[];let l=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;l=l&&g.synchronous;const b=n.transitional||cj;b&&b.legacyInterceptorReqResOrdering?o.unshift(g.fulfilled,g.rejected):o.push(g.fulfilled,g.rejected)});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let f,d=0,h;if(!l){const m=[hT.bind(this),void 0];for(m.unshift(...o),m.push(...c),h=m.length,f=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const s=new Promise(o=>{r.subscribe(o),i=o}).then(a);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,o){r.reason||(r.reason=new qd(i,s,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Hk(function(a){t=a}),cancel:t}}};function AY(e){return function(n){return e.apply(null,n)}}function OY(e){return z.isObject(e)&&e.isAxiosError===!0}const Tx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Tx).forEach(([e,t])=>{Tx[t]=e});function qk(e){const t=new Ys(e),n=Ak(Ys.prototype.request,t);return z.extend(n,Ys.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return qk(so(e,a))},n}const jt=qk(Hd);jt.Axios=Ys;jt.CanceledError=qd;jt.CancelToken=jY;jt.isCancel=zk;jt.VERSION=fj;jt.toFormData=ng;jt.AxiosError=re;jt.Cancel=jt.CanceledError;jt.all=function(t){return Promise.all(t)};jt.spread=AY;jt.isAxiosError=OY;jt.mergeConfig=so;jt.AxiosHeaders=gn;jt.formToJSON=e=>Lk(z.isHTMLForm(e)?new FormData(e):e);jt.getAdapter=Vk.getAdapter;jt.HttpStatusCode=Tx;jt.default=jt;const{Axios:YAe,AxiosError:XAe,CanceledError:WAe,isCancel:QAe,CancelToken:ZAe,VERSION:JAe,all:e2e,Cancel:t2e,isAxiosError:n2e,spread:r2e,toFormData:a2e,AxiosHeaders:i2e,HttpStatusCode:s2e,formToJSON:o2e,getAdapter:l2e,mergeConfig:c2e,create:u2e}=jt,W=jt.create({baseURL:""}),Kk=()=>location.pathname.startsWith("/admin"),Gk=()=>Kk()?"mall_admin_token":"mall_token";W.interceptors.request.use(e=>{const t=localStorage.getItem(Gk());return t&&(e.headers.Authorization=`Bearer ${t}`),e});W.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem(Gk()),Kk()&&location.pathname!=="/admin/login"&&(location.href="/admin/login")),Promise.reject(e)});const Q=e=>e.then(t=>{var n;return(n=t.data)==null?void 0:n.data}),Yk=(e,t)=>W.post("/api/mall/auth/login",{username:e,password:t}),EY=(e,t,n)=>W.post("/api/mall/auth/register",{username:e,password:t,displayName:n}),Xk=()=>Q(W.get("/api/mall/auth/me")),So=(e=!0)=>Q(W.get(`/api/mall/store?activeOnly=${e}`)),TY=(e,t)=>Q(W.put(`/api/mall/store/${e}/active`,{active:t})),NY=e=>Q(W.get(`/api/mall/zone/lookup?zip=${encodeURIComponent(e)}`)),Ql=(e={})=>{const t=new URLSearchParams;return Object.entries(e).forEach(([n,r])=>{r!==void 0&&r!==""&&r!==null&&t.set(n,String(r))}),Q(W.get(`/api/mall/product?${t}`))},CY=e=>Q(W.get(`/api/mall/product/${e}`)),_Y=(e,t)=>Q(W.put(`/api/mall/product/${e}/status`,{status:t})),PY=()=>Q(W.get("/api/mall/category")),MY=e=>Q(W.get(`/api/mall/store-inventory/store/${e}`)),RY=(e,t,n)=>Q(W.put(`/api/mall/store-inventory/store/${e}/product/${t}/toggle`,{available:n})),DY=(e,t,n)=>Q(W.put(`/api/mall/store-inventory/store/${e}/product/${t}/adjust`,{delta:n})),$Y=(e,t)=>Q(W.get(`/api/mall/schedule/availability?storeId=${e}&date=${t}`)),Wk=()=>Q(W.get("/api/mall/schedule/holidays")),kY=e=>Q(W.post("/api/mall/schedule/holiday",e)),hj=()=>Q(W.get("/api/mall/cart")),LY=e=>Q(W.post("/api/mall/cart",e)),zY=(e,t)=>Q(W.put(`/api/mall/cart/${e}`,{quantity:t})),IY=e=>W.delete(`/api/mall/cart/${e}`),BY=(e="")=>Q(W.get(`/api/mall/order?status=${e}`)),UY=e=>Q(W.post("/api/mall/order/checkout",e)),Qk=(e,t)=>Q(W.put(`/api/mall/order/${e}/status`,{status:t})),FY=(e="",t=100)=>Q(W.get(`/api/mall/order/admin?status=${e}&limit=${t}`)),VY=e=>Q(W.post("/api/mall/payment",e)),HY=()=>Q(W.get("/api/mall/subscription")),qY=e=>Q(W.post("/api/mall/subscription",e)),mT=(e,t)=>Q(W.put(`/api/mall/subscription/${e}/status`,{status:t})),KY=()=>Q(W.get("/api/mall/subscription/admin")),GY=(e="",t="")=>{const n=new URLSearchParams;return e&&n.set("status",e),t&&n.set("storeId",t),Q(W.get(`/api/mall/transfer?${n}`))},YY=e=>Q(W.put(`/api/mall/transfer/${e}/approve`,{})),XY=e=>Q(W.put(`/api/mall/transfer/${e}/reject`,{})),WY=e=>Q(W.get(`/api/mall/review/product/${e}`)),QY=e=>Q(W.get(`/api/mall/review/product/${e}/stats`)),ZY=e=>Q(W.post("/api/mall/review",e)),JY=()=>Q(W.get("/api/mall/member/me")),eX=()=>Q(W.get("/api/mall/cs")),tX=e=>Q(W.post("/api/mall/cs",e)),nX=()=>Q(W.get("/api/mall/wishlist")),rX=e=>Q(W.post(`/api/mall/wishlist/${e}`,{})),aX=e=>W.delete(`/api/mall/wishlist/${e}`),iX=(e=1,t=500)=>Q(W.get(`/api/mall/analytics/dashboard?days=${e}&bigOrderThreshold=${t}`)),Zk=(e=7)=>Q(W.get(`/api/mall/analytics/store-sales?days=${e}`)),Jk=(e=14)=>Q(W.get(`/api/mall/analytics/trend?days=${e}`)),e5=(e=10)=>Q(W.get(`/api/mall/analytics/top-products?limit=${e}`)),sX=(e,t,n)=>Q(W.post("/api/mall/gateway/tax/quote",{amount:e,zip:t,state:n})),oX=(e,t)=>Q(W.post("/api/mall/gateway/address/verify",{address:e,zip:t})),lX=()=>Q(W.get("/api/mall/gateway/providers")),t5=(e="",t="",n=6)=>{const r=new URLSearchParams;return e&&r.set("occasion",e),t&&r.set("keyword",t),r.set("limit",String(n)),Q(W.get(`/api/mall/ai/recommend?${r}`))},cX=e=>Q(W.get(`/api/mall/ai/review-summary/${e}`)),n5=e=>Q(W.post("/api/mall/ai/nl-search",{query:e})),uX=(e,t,n)=>Q(W.post("/api/mall/ai/card-message",{occasion:e,tone:t,recipient:n})),fX=(e="valentine",t=14)=>Q(W.get(`/api/mall/ai/demand-forecast?season=${e}&days=${t}`)),dX=e=>Q(W.post("/api/mall/ai/transfer-recommend",{storeIds:e})),hX=()=>Q(W.get("/api/admin/users")),pX=e=>Q(W.post("/api/admin/users",e)),mX=(e,t)=>Q(W.put(`/api/admin/users/${e}/role`,{role:t})),yX=(e,t)=>Q(W.put(`/api/admin/users/${e}/active`,{active:t})),gX=(e,t)=>Q(W.put(`/api/admin/users/${e}/password`,{password:t})),vX=e=>W.delete(`/api/admin/users/${e}`),bX=(e="",t="",n=100)=>{const r=new URLSearchParams;return e&&r.set("action",e),t&&r.set("actor",t),r.set("limit",String(n)),Q(W.get(`/api/admin/audit?${r}`))},xX=()=>Q(W.get("/api/admin/settings")),SX=(e,t)=>Q(W.put(`/api/admin/settings/${encodeURIComponent(e)}`,{value:t})),wX=(e=!0)=>Q(W.get(`/api/mall/loyalty/tiers?activeOnly=${e}`)),jX=(e,t)=>Q(W.put(`/api/mall/loyalty/tiers/${e}`,t)),pj=()=>Q(W.get("/api/mall/loyalty/me")),AX=(e=100)=>Q(W.get(`/api/mall/loyalty/points/history?limit=${e}`)),OX=(e,t,n)=>Q(W.post("/api/mall/loyalty/points/adjust",{owner:e,points:t,reason:n})),EX=()=>Q(W.post("/api/mall/loyalty/recalc-all",{})),r5=(e=30)=>Q(W.get(`/api/mall/loyalty/analytics/by-tier?days=${e}`)),TX=(e="")=>Q(W.get(`/api/mall/event/ongoing${e?`?tier=${e}`:""}`)),NX=e=>Q(W.post(`/api/mall/event/${e}/join`,{})),CX=(e="",t="",n=!1)=>{const r=new URLSearchParams;return e&&r.set("status",e),t&&r.set("type",t),r.set("activeOnly",String(n)),Q(W.get(`/api/mall/event?${r}`))},_X=e=>Q(W.post("/api/mall/event",e)),PX=e=>Q(W.post(`/api/mall/event/${e}/publish`,{})),MX=e=>Q(W.post(`/api/mall/event/${e}/end`,{})),RX=e=>W.delete(`/api/mall/event/${e}`),DX=e=>Q(W.get(`/api/mall/event/${e}/performance`)),$X=(e,t,n)=>Q(W.post("/api/mall/event/ai/copy",{eventType:e,theme:t,tone:n}));function Gr({children:e,delay:t=0,y:n=24,className:r="",as:a="div"}){const i=ti(),s=Nt[a];return u.jsx(s,{className:r,initial:i?!1:{opacity:0,y:n},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7,delay:t,ease:[.22,1,.36,1]},children:e})}const kX={hidden:{},show:{transition:{staggerChildren:.07,delayChildren:.05}}},LX={hidden:{opacity:0,y:22},show:{opacity:1,y:0,transition:{duration:.6,ease:[.22,1,.36,1]}}};function pm({children:e,className:t=""}){const n=ti();return u.jsx(Nt.div,{className:t,variants:n?void 0:kX,initial:n?!1:"hidden",whileInView:"show",viewport:{once:!0,margin:"-40px"},children:e})}function mm({children:e,className:t=""}){const n=ti();return u.jsx(Nt.div,{className:t,variants:n?void 0:LX,children:e})}const yT=["","sage","cream"];function Kd({count:e=14,className:t=""}){const n=ti(),r=A.useMemo(()=>Array.from({length:e}).map((a,i)=>{const s=8+Math.round(Math.random()*14);return{left:Math.round(Math.random()*100),size:s,delay:+(Math.random()*12).toFixed(2),duration:+(10+Math.random()*10).toFixed(2),kind:yT[i%yT.length]}}),[e]);return n?null:u.jsx("div",{className:`petal-layer ${t}`,"aria-hidden":"true",children:r.map((a,i)=>u.jsx("span",{className:`petal ${a.kind}`,style:{left:`${a.left}%`,width:`${a.size}px`,height:`${a.size}px`,animationDelay:`${a.delay}s`,animationDuration:`${a.duration}s`}},i))})}function Ua({children:e,className:t="",onClick:n,type:r="button",disabled:a}){const i=ti();return u.jsx(Nt.button,{type:r,onClick:n,disabled:a,className:t,whileHover:i||a?void 0:{scale:1.03,y:-1},whileTap:i||a?void 0:{scale:.97},transition:{type:"spring",stiffness:380,damping:22},children:e})}const ke={name:"Montvale Florist",tagline:"100% Florist-Designed and Hand-Delivered!",founded:2010,address:"6 Railroad Ave, Montvale, NJ 07645",phone:"(201) 690-6721",phoneTel:"+12016906721",email:"wecare@montvalefloristnj.com",rating:4.9,reviewCount:44893,promise:[{title:"100% Florist-Designed",desc:"Every arrangement is crafted by hand in our shop — never mass-produced."},{title:"Locally Independent",desc:"A real, community-focused florist in Montvale since 2010 — not an online middleman."},{title:"100% Satisfaction",desc:"We stand behind every bouquet with our satisfaction guarantee."}],hours:[{day:"Mon – Fri",open:"9:00 AM – 5:30 PM",cutoff:"Same-day by 1:00 PM"},{day:"Saturday",open:"9:00 AM – 4:00 PM",cutoff:"Same-day by 12:00 PM"},{day:"Sunday",open:"9:00 AM – 12:00 PM",cutoff:"Same-day by 10:00 AM"}],social:{instagram:"https://instagram.com/themontvaleflorist",instagramHandle:"@themontvaleflorist",facebook:"https://facebook.com/montvaleflorist1",pinterest:"https://pinterest.com/montvaleflorist",google:"https://www.google.com/search?q=Montvale+Florist",yelp:"https://yelp.com/biz/montvale-florist-montvale-3"},payments:["Visa","Mastercard","Amex","Discover","Apple Pay","Google Pay"],wallets:["Apple Pay","Google Pay"],cards:["Visa","Mastercard","Amex","Discover"],policies:["Terms of Service","Privacy Policy","Accessibility Statement","Delivery Policy"],about:"Montvale Florist is your go-to local florist, delivering not just flowers, but joy, comfort, and memories. An independent, community-focused florist dedicated to craftsmanship and personal service since 2010."},lb=[{img:"/img/hero/slide-1.jpg",eyebrow:"Birthday Blooms",headline:`Make Their Birthday +Unforgettable`,subtext:"Florist-designed bouquets, hand-delivered the same day — a celebration in every petal.",cta:"Find the Perfect Gift",to:"/category?occasion=BIRTHDAY"},{img:"/img/hero/slide-2.jpg",eyebrow:"Sympathy & Comfort",headline:`Honor Their Memory +with Heartfelt Flowers`,subtext:"Thoughtful tributes, gently arranged and delivered with care and compassion.",cta:"Send Your Condolences",to:"/category?occasion=SYMPATHY"},{img:"/img/hero/slide-3.jpg",eyebrow:"Just Because",headline:`Brighten Their Day, +Just Because`,subtext:"No occasion needed — send a smile with fresh, locally designed blooms.",cta:"Send a Smile",to:"/category?occasion=JUST_BECAUSE"}],zX=[{code:"en",label:"EN"},{code:"ko",label:"한국어"}];function ag({variant:e="shop"}){const{i18n:t}=ni(),n=(t.language||"en").split("-")[0],r=s=>{s!==n&&t.changeLanguage(s)},a=e==="admin",i=a?"flex items-center gap-0.5 rounded-lg border border-edge bg-card/60 p-0.5":"flex items-center gap-0.5 rounded-full border border-blush-100 bg-white/70 p-0.5 shadow-soft";return u.jsxs("div",{className:"flex items-center gap-1.5","aria-label":"Language",children:[u.jsx(SK,{size:15,className:a?"text-slate-400":"text-sage-600"}),u.jsx("div",{className:i,role:"group",children:zX.map(s=>{const o=s.code===n,l="px-2 py-0.5 text-[11px] font-medium rounded-full transition-colors",c=a?o?"bg-brand text-ink":"text-slate-300 hover:text-brand":o?"bg-blush-500 text-white":"text-sage-700 hover:text-blush-600";return u.jsx("button",{type:"button",onClick:()=>r(s.code),"aria-pressed":o,className:`${l} ${a?"rounded-md":""} ${c}`,children:s.label},s.code)})})]})}function IX(){const{t:e}=ni(),[t,n]=A.useState(""),[r,a]=A.useState(null),[i,s]=A.useState(!1),[o,l]=A.useState(""),{setZone:c}=bn(),f=Kt(),d=async p=>{if(p.preventDefault(),l(""),a(null),!/^\d{5}$/.test(t)){l(e("zip.errInvalid"));return}s(!0);try{const m=await NY(t);a(m),m!=null&&m.deliverable||l(e("zip.errNotDeliverable"))}catch{l(e("zip.errFailed"))}finally{s(!1)}},h=p=>{c(t,p.storeId,p.storeName),f("/home")};return u.jsxs("div",{className:"relative min-h-screen bg-gradient-to-br from-blush-100 via-cream to-sage-100 flex items-center justify-center px-4 overflow-hidden",children:[u.jsx("div",{className:"absolute top-5 right-5 z-20",children:u.jsx(ag,{variant:"shop"})}),u.jsx(Kd,{count:18}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -top-20 -left-20 text-blush-200/40",animate:{rotate:[0,360]},transition:{duration:80,repeat:1/0,ease:"linear"},children:u.jsx(ft,{size:320,strokeWidth:.5})}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -bottom-24 -right-16 text-sage-300/40",animate:{rotate:[360,0]},transition:{duration:90,repeat:1/0,ease:"linear"},children:u.jsx(ft,{size:260,strokeWidth:.5})}),u.jsxs(Nt.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"relative z-10 w-full max-w-lg text-center",children:[u.jsxs("div",{className:"flex flex-col items-center mb-5",children:[u.jsx(Nt.span,{animate:{rotate:[0,8,-6,0]},transition:{duration:7,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{className:"text-blush-500",size:44})}),u.jsx("h1",{className:"font-serif text-4xl font-bold text-blush-900 mt-3",children:"Montvale Florist"}),u.jsx("p",{className:"font-display text-[13px] tracking-[0.35em] uppercase text-sage-600 mt-1",children:e("zip.since",{year:ke.founded})})]}),u.jsx("p",{className:"font-display text-2xl text-[#6b5258] mb-1",children:ke.tagline}),u.jsx("p",{className:"text-[#8a7077] text-sm mb-8",children:e("zip.lead")}),u.jsxs("form",{onSubmit:d,className:"bg-white/90 backdrop-blur rounded-4xl shadow-bloom p-7 border border-blush-100",children:[u.jsxs("label",{className:"flex items-center gap-2 text-sm text-blush-700 font-medium mb-3 justify-center",children:[u.jsx(dm,{size:16})," ",e("zip.enterZip")]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{value:t,onChange:p=>n(p.target.value.replace(/\D/g,"").slice(0,5)),placeholder:e("zip.placeholder"),inputMode:"numeric",autoFocus:!0,className:"flex-1 px-4 py-3.5 rounded-2xl bg-blush-50 border border-blush-100 text-center text-lg tracking-[0.3em] outline-none focus:border-blush-400 transition-colors"}),u.jsx(Ua,{type:"submit",disabled:i,className:"px-7 rounded-2xl bg-blush-500 text-white font-semibold hover:bg-blush-600 disabled:opacity-60 flex items-center gap-1",children:i?"…":u.jsxs(u.Fragment,{children:[e("zip.go")," ",u.jsx(Es,{size:16})]})})]}),o&&u.jsx("p",{className:"text-blush-500 text-xs mt-3",children:o}),(r==null?void 0:r.deliverable)&&u.jsxs(Nt.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-6 text-left overflow-hidden",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-sage-700 font-medium mb-3",children:[u.jsx(Ud,{size:15})," ",e("zip.availableStores")]}),u.jsx("div",{className:"space-y-2",children:(r.stores||[]).map(p=>u.jsxs(Ua,{onClick:()=>h(p),className:"w-full flex items-center justify-between bg-blush-50 hover:bg-blush-100 border border-blush-100 rounded-2xl px-4 py-3.5 text-left",children:[u.jsxs("span",{children:[u.jsxs("span",{className:"font-medium text-sm flex items-center gap-1.5 text-blush-900",children:[u.jsx(Bd,{size:14,className:"text-blush-500"}),p.storeName]}),u.jsx("span",{className:"block text-xs text-[#8a7077] mt-0.5",children:e("zip.radiusSameDay",{radius:p.radiusMi,cutoff:p.sameDayCutoff,tz:p.timezone})})]}),u.jsx(Es,{size:16,className:"text-blush-500"})]},p.storeId))})]})]}),u.jsxs("div",{className:"flex items-center justify-center gap-2 mt-6 text-[12px] text-[#8a7077]",children:[u.jsx("span",{className:"flex text-gold",children:[1,2,3,4,5].map(p=>u.jsx(Wa,{size:13,fill:"currentColor"},p))}),ke.rating,"★ · ",e("zip.reviews",{n:ke.reviewCount.toLocaleString()})]}),u.jsx("button",{onClick:()=>f("/home"),className:"text-xs text-[#a08a90] hover:text-blush-600 mt-4 underline-offset-2 hover:underline",children:e("zip.browsePickup")})]})]})}function a5({size:e=18}){return u.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12c0 4.24 2.64 7.85 6.36 9.31-.09-.79-.17-2 .03-2.86.18-.78 1.17-4.97 1.17-4.97s-.3-.6-.3-1.48c0-1.39.81-2.43 1.81-2.43.85 0 1.27.64 1.27 1.41 0 .86-.55 2.14-.83 3.33-.24 1 .5 1.81 1.48 1.81 1.78 0 3.14-1.88 3.14-4.58 0-2.4-1.72-4.07-4.19-4.07-2.85 0-4.52 2.14-4.52 4.35 0 .86.33 1.78.74 2.28.08.1.09.19.07.29l-.27 1.13c-.04.18-.14.22-.33.13-1.25-.58-2.03-2.4-2.03-3.87 0-3.15 2.29-6.04 6.6-6.04 3.46 0 6.16 2.47 6.16 5.77 0 3.44-2.17 6.21-5.18 6.21-1.01 0-1.97-.53-2.29-1.15l-.62 2.37c-.23.86-.83 1.94-1.24 2.6.94.29 1.92.44 2.95.44 5.52 0 10-4.48 10-10S17.52 2 12 2z"})})}function BX({size:e=18}){return u.jsxs("svg",{viewBox:"0 0 24 24",width:e,height:e,"aria-hidden":"true",children:[u.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"}),u.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23z"}),u.jsx("path",{fill:"#FBBC05",d:"M5.84 14.1a6.6 6.6 0 0 1 0-4.2V7.06H2.18a11 11 0 0 0 0 9.88l3.66-2.84z"}),u.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1A11 11 0 0 0 2.18 7.06l3.66 2.84C6.71 7.3 9.14 5.38 12 5.38z"})]})}function UX({size:e=18}){return u.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M12.27 13.3l4.45-2.16c.51-.25.66-.92.31-1.36-1.13-1.44-2.7-2.49-4.49-2.99-.55-.15-1.08.27-1.08.84l-.02 5.04c0 .65.72 1.06 1.32.77zM12.6 15.34l4.46 2.13c.51.25 1.13-.07 1.21-.63.25-1.8-.06-3.66-.92-5.31-.27-.51-.96-.6-1.36-.18l-3.5 3.42c-.45.45-.31 1.18.11 1.4v-.84zm-2.59.4l-3.45-3.4c-.41-.4-1.09-.32-1.37.18-.86 1.64-1.18 3.49-.95 5.29.07.56.69.89 1.21.64l4.45-2.12c.6-.29.74-1.02.06-1.43zm.08 2.36l-.02 4.95c0 .57.53.99 1.08.84 1.78-.49 3.34-1.53 4.48-2.96.35-.44.2-1.11-.31-1.36l-4.45-2.15c-.6-.29-1.31.13-1.31.78l.84.01zm-.45-7.1L5.66 7.06c-.43-.7-1.46-.56-1.69.23-.13.45-.22.92-.27 1.4-.16 1.55.05 3.12.61 4.56.21.53.91.62 1.27.13l3.95-5.32c.32-.43.06-1.05-.5-1.16l.39.56z"})})}const FX={instagram:({size:e})=>u.jsx(yk,{size:e}),facebook:({size:e})=>u.jsx(pk,{size:e}),pinterest:a5,google:BX,yelp:UX},VX={instagram:"Instagram",facebook:"Facebook",pinterest:"Pinterest",google:"Google Business",yelp:"Yelp"},HX=["instagram","facebook","pinterest","google","yelp"];function qX({size:e=18,className:t="",iconClass:n=""}){return u.jsx("div",{className:`flex items-center gap-3 ${t}`,children:HX.map(r=>{const a=ke.social[r];if(!a)return null;const i=FX[r];return u.jsx("a",{href:a,target:"_blank",rel:"noreferrer","aria-label":VX[r],className:`transition-colors ${n}`,children:u.jsx(i,{size:e})},r)})})}function KX({url:e,title:t,image:n,className:r=""}){const a=encodeURIComponent(e),i=encodeURIComponent(t||ke.name),s=encodeURIComponent(n||""),o=`https://www.facebook.com/sharer/sharer.php?u=${a}`,l=`https://pinterest.com/pin/create/button/?url=${a}&media=${s}&description=${i}`,c=ke.social.instagram,f=d=>window.open(d,"_blank","noopener,width=640,height=600");return u.jsxs("div",{className:`flex items-center gap-2 ${r}`,children:[u.jsx("span",{className:"text-xs text-[#a08a90]",children:"Share:"}),u.jsx("button",{type:"button",onClick:()=>f(c),"aria-label":"Share on Instagram",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(yk,{size:16})}),u.jsx("button",{type:"button",onClick:()=>f(o),"aria-label":"Share on Facebook",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(pk,{size:16})}),u.jsx("button",{type:"button",onClick:()=>f(l),"aria-label":"Share on Pinterest",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(a5,{size:16})})]})}function GX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Visa",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("text",{x:"24",y:"21",textAnchor:"middle",fontFamily:"Georgia, serif",fontWeight:"700",fontStyle:"italic",fontSize:"13",fill:"#1a1f71",children:"VISA"})]})}function YX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Mastercard",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("circle",{cx:"20",cy:"16",r:"8",fill:"#eb001b"}),u.jsx("circle",{cx:"28",cy:"16",r:"8",fill:"#f79e1b",fillOpacity:"0.85"})]})}function XX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"American Express",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#2e77bb"}),u.jsx("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"9",fill:"#fff",children:"AMEX"})]})}function WX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Discover",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("circle",{cx:"36",cy:"22",r:"9",fill:"#f68121"}),u.jsx("text",{x:"22",y:"19",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"7",fill:"#231f20",children:"DISCOVER"})]})}function QX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Apple Pay",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#000"}),u.jsx("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"-apple-system, Helvetica, sans-serif",fontWeight:"600",fontSize:"9",fill:"#fff",children:" Pay"})]})}function ZX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Google Pay",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsxs("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"9",children:[u.jsx("tspan",{fill:"#4285f4",children:"G"}),u.jsx("tspan",{fill:"#ea4335",children:"o"}),u.jsx("tspan",{fill:"#fbbc05",children:"o"}),u.jsx("tspan",{fill:"#4285f4",children:"g"}),u.jsx("tspan",{fill:"#34a853",children:"l"}),u.jsx("tspan",{fill:"#ea4335",children:"e"}),u.jsx("tspan",{fill:"#5f6368",children:" Pay"})]})]})}const i5={Visa:GX,Mastercard:YX,Amex:XX,Discover:WX,"Apple Pay":QX,"Google Pay":ZX};function s5({items:e,className:t=""}){return u.jsx("div",{className:`flex flex-wrap items-center gap-1.5 ${t}`,children:e.map(n=>{const r=i5[n];return r?u.jsx(r,{},n):u.jsx("span",{className:"text-[10px] bg-cream/10 rounded px-2 py-1",children:n},n)})})}function JX(e){const t=e.replace(/\D/g,"");return t.length<4?"•••• •••• •••• ••••":`•••• •••• •••• ${t.slice(-4)}`}function eW(e){return e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim()}function tW({method:e,onMethod:t,onCardChange:n,cards:r=["Visa","Mastercard","Amex","Discover"],wallets:a=["Apple Pay","Google Pay"]}){const[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(""),[d,h]=A.useState(""),[p,m]=A.useState(!1),g=i.replace(/\D/g,""),b=(v=i,x=o,w=c)=>{const S=v.replace(/\D/g,""),j=S.length>=15&&/^\d{2}\/\d{2}$/.test(x)&&w.replace(/\D/g,"").length>=3;n==null||n({last4:S.slice(-4),expiry:x,complete:j})},y=v=>v==="Apple Pay"?"APPLE_PAY":"GOOGLE_PAY";return u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[u.jsxs("button",{type:"button",onClick:()=>t("CARD"),className:`flex items-center justify-center gap-1.5 py-2.5 rounded-xl border text-sm ${e==="CARD"?"border-bloom bg-petal text-bloom2 font-semibold":"border-blush-100 text-[#6b5258]"}`,children:[u.jsx(WE,{size:16})," Card"]}),a.map(v=>{const x=y(v),w=i5[v];return u.jsx("button",{type:"button",onClick:()=>t(x),className:`flex items-center justify-center py-2 rounded-xl border ${e===x?"border-bloom bg-petal":"border-blush-100"}`,"aria-label":v,children:w?u.jsx(w,{}):u.jsx("span",{className:"text-sm",children:v})},v)})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-[11px] text-gray-400",children:"Accepted:"}),u.jsx(s5,{items:r})]}),e==="CARD"?u.jsxs("div",{className:"rounded-2xl border border-blush-100 p-4 space-y-3 bg-white",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Card number"}),u.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 rounded-xl border border-blush-100 focus-within:border-bloom",children:[u.jsx(WE,{size:16,className:"text-blush-400 shrink-0"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-number",value:p?eW(i):g?JX(i):"",onFocus:()=>m(!0),onBlur:()=>m(!1),onChange:v=>{const x=v.target.value;s(x),b(x)},placeholder:"1234 1234 1234 1234",className:"flex-1 bg-transparent text-sm outline-none tracking-wider"})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Expiry (MM/YY)"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-exp",value:o,onChange:v=>{let x=v.target.value.replace(/\D/g,"").slice(0,4);x.length>=3&&(x=x.slice(0,2)+"/"+x.slice(2)),l(x),b(i,x)},placeholder:"MM/YY",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"CVC"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-csc",value:c,onChange:v=>{const x=v.target.value.replace(/\D/g,"").slice(0,4);f(x),b(i,o,x)},placeholder:"•••",type:"password",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Name on card"}),u.jsx("input",{autoComplete:"cc-name",value:d,onChange:v=>h(v.target.value),placeholder:"Full name",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("p",{className:"flex items-center gap-1 text-[11px] text-gray-400",children:[u.jsx(QE,{size:11})," Card number is masked and never stored on this device. Processed via GUARDiA PaymentGateway."]})]}):u.jsxs("div",{className:"rounded-2xl border border-blush-100 p-4 bg-white",children:[u.jsx("button",{type:"button",className:`w-full py-3 rounded-xl font-semibold flex items-center justify-center gap-2 ${e==="APPLE_PAY"?"bg-black text-white":"bg-white border border-edge text-[#3c4043]"}`,children:e==="APPLE_PAY"?" Pay":"G Pay"}),u.jsxs("p",{className:"flex items-center gap-1 text-[11px] text-gray-400 mt-2",children:[u.jsx(QE,{size:11})," ",e==="APPLE_PAY"?"Apple Pay":"Google Pay"," via secure wallet. If unconfigured, processed as mock at checkout."]})]})]})}const nW=[{to:"/home",key:"home"},{to:"/category",key:"shopAll"},{to:"/category?occasion=ROMANCE",key:"loveRomance"},{to:"/category?occasion=BIRTHDAY",key:"birthday"},{to:"/category?occasion=SYMPATHY",key:"sympathy"},{to:"/daily-standard",key:"todaysBouquet",accent:!0},{to:"/subscription",key:"subscriptions"},{to:"/events",key:"offers"}];function rW(){const{t:e}=ni(),{zip:t,storeName:n,custToken:r,cartCount:a,setCartCount:i}=bn(),s=Kt(),o=jr(),l=ti(),[c,f]=A.useState("");A.useEffect(()=>{if(!r){i(0);return}hj().then(h=>i((h||[]).reduce((p,m)=>p+(m.quantity||1),0))).catch(()=>{})},[r]);const d=h=>{h.preventDefault(),c.trim()&&s(`/search?q=${encodeURIComponent(c.trim())}`)};return u.jsxs("div",{className:"min-h-screen bg-cream text-[#43343a] flex flex-col",children:[u.jsx("div",{className:"bg-sage-700 text-cream/95 text-[12px] tracking-wide",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-9 flex items-center justify-center sm:justify-between gap-3",children:[u.jsxs("span",{className:"hidden sm:flex items-center gap-1.5",children:[u.jsx(ft,{size:13})," ",ke.tagline]}),u.jsxs("span",{className:"flex items-center gap-3",children:[u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(Wa,{size:12,className:"text-gold",fill:"currentColor"})," ",ke.rating,"★ · ",e("shop.topbar.reviews",{n:ke.reviewCount.toLocaleString()})]}),u.jsxs("a",{href:`tel:${ke.phoneTel}`,className:"hidden sm:flex items-center gap-1 hover:text-white",children:[u.jsx(ZE,{size:12})," ",ke.phone]})]})]})}),u.jsxs("header",{className:"sticky top-0 z-30 bg-cream/90 backdrop-blur-md border-b border-blush-100",children:[u.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-[72px] flex items-center gap-4",children:[u.jsxs(Le,{to:"/home",className:"flex items-center gap-2.5 shrink-0",children:[u.jsx(Nt.span,{animate:l?void 0:{rotate:[0,8,-6,0]},transition:{duration:7,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{className:"text-blush-500",size:28})}),u.jsxs("span",{className:"leading-none",children:[u.jsx("span",{className:"block font-serif text-[20px] font-bold text-blush-900 tracking-tight",children:"Montvale"}),u.jsx("span",{className:"block font-display text-[12px] tracking-[0.35em] text-sage-600 uppercase -mt-0.5",children:"Florist"})]})]}),u.jsxs("form",{onSubmit:d,className:"flex-1 max-w-md hidden md:flex items-center bg-white border border-blush-100 rounded-full px-4 py-2.5 shadow-soft",children:[u.jsx(rj,{size:16,className:"text-blush-400"}),u.jsx("input",{value:c,onChange:h=>f(h.target.value),placeholder:e("common.searchPlaceholder"),className:"flex-1 bg-transparent ml-2 text-sm outline-none placeholder:text-blush-300"})]}),u.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-3 ml-auto",children:[u.jsx(ag,{variant:"shop"}),u.jsxs(Le,{to:"/",className:"hidden sm:flex items-center gap-1 text-sm text-sage-700 hover:text-blush-500 transition-colors",children:[u.jsx(dm,{size:15})," ",t?`${t}`:e("shop.header.zip")]}),u.jsx(Le,{to:"/wishlist","aria-label":e("shop.header.wishlist"),className:"p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:u.jsx(Rf,{size:20})}),u.jsxs(Le,{to:"/cart",className:"relative p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:[u.jsx(sj,{size:20}),u.jsx(nx,{children:a>0&&u.jsx(Nt.span,{initial:l?!1:{scale:0},animate:{scale:1},exit:{scale:0},className:"absolute -top-1 -right-1 bg-blush-500 text-white text-[10px] rounded-full min-w-[18px] h-[18px] px-1 flex items-center justify-center",children:a},a)})]}),u.jsx(Le,{to:r?"/mypage":"/account",className:"p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:u.jsx(wk,{size:20})})]})]}),u.jsx("nav",{className:"border-t border-blush-50 bg-white/60",children:u.jsx("div",{className:"max-w-6xl mx-auto px-4 h-11 flex items-center gap-7 text-[13px] overflow-x-auto thin-scroll",children:nW.map(h=>{const p=o.pathname+o.search===h.to||h.to==="/home"&&o.pathname==="/home";return u.jsxs(Le,{to:h.to,className:`relative whitespace-nowrap py-1 transition-colors ${h.accent?"text-sage-700 font-medium":"text-[#6b5258] hover:text-blush-500"} ${p?"text-blush-600":""}`,children:[e(`shop.nav.${h.key}`),p&&u.jsx(Nt.span,{layoutId:"nav-underline",className:"absolute -bottom-[1px] left-0 right-0 h-[2px] bg-blush-500 rounded-full"})]},h.to)})})})]}),u.jsx("main",{className:"flex-1",children:u.jsx(f$,{})}),u.jsxs("footer",{className:"mt-16 bg-sage-800 text-cream/85",children:[u.jsx("div",{className:"botanical-divider py-6 opacity-50",children:u.jsx(ft,{size:16})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 pb-10 grid md:grid-cols-4 gap-8",children:[u.jsxs("div",{className:"md:col-span-1",children:[u.jsx("div",{className:"font-serif text-xl font-bold text-white mb-1",children:"Montvale Florist"}),u.jsx("p",{className:"font-display text-[13px] tracking-[0.3em] uppercase text-sage-300 mb-3",children:e("shop.footer.since",{year:ke.founded})}),u.jsx("p",{className:"text-[13px] leading-relaxed text-cream/70",children:ke.tagline}),u.jsx(qX,{size:18,className:"mt-4 text-cream/80",iconClass:"hover:text-white"})]}),u.jsxs("div",{children:[u.jsx("div",{className:"font-semibold text-white mb-3 text-sm",children:e("shop.footer.visitUs")}),u.jsxs("p",{className:"text-[13px] flex items-start gap-1.5 text-cream/75 mb-1.5",children:[u.jsx(dm,{size:14,className:"mt-0.5 shrink-0"})," ",ke.address]}),u.jsxs("a",{href:`tel:${ke.phoneTel}`,className:"text-[13px] flex items-center gap-1.5 text-cream/75 hover:text-white mb-1.5",children:[u.jsx(ZE,{size:14})," ",ke.phone]}),u.jsx("p",{className:"text-[13px] text-cream/60",children:ke.email})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"font-semibold text-white mb-3 text-sm flex items-center gap-1.5",children:[u.jsx(ck,{size:14})," ",e("shop.footer.hours")]}),ke.hours.map(h=>u.jsxs("div",{className:"text-[13px] text-cream/75 mb-1",children:[u.jsx("span",{className:"inline-block w-20",children:h.day})," ",h.open]},h.day))]}),u.jsxs("div",{children:[u.jsx("div",{className:"font-semibold text-white mb-3 text-sm",children:e("shop.footer.customerCare")}),u.jsxs(Le,{to:"/cs",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.contactAiHelp")]}),u.jsxs(Le,{to:"/orders",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.orderStatus")]}),u.jsxs(Le,{to:"/subscription",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.subscriptions")]}),u.jsxs(Le,{to:"/app",className:"flex items-center gap-1 text-[13px] text-gold hover:text-white mb-3 font-medium",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.getApp")]}),u.jsx("div",{className:"text-[11px] text-cream/50 mb-1.5",children:e("shop.footer.weAccept")}),u.jsx(s5,{items:ke.payments})]})]}),u.jsx("div",{className:"border-t border-cream/10",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex flex-col sm:flex-row items-center justify-between gap-2 text-[11px] text-cream/50",children:[u.jsxs("span",{children:["© 2026 Montvale Florist · ",ke.address]}),u.jsx("span",{className:"flex flex-wrap gap-3",children:ke.policies.map(h=>u.jsx("span",{className:"hover:text-cream/80",children:h},h))})]})})]})]})}function Zl({p:e}){var a;const t=ti(),n=e.salePrice!=null&&e.salePrice>0&&e.salePrice<(e.price||0),r=n?Math.round((1-e.salePrice/e.price)*100):0;return u.jsx(Nt.div,{whileHover:t?void 0:{y:-8},transition:{type:"spring",stiffness:300,damping:24},className:"group h-full",children:u.jsxs(Le,{to:`/product/${e.id}`,className:"block h-full bg-white rounded-3xl overflow-hidden border border-blush-100/70 shadow-soft hover:shadow-bloom transition-shadow duration-500",children:[u.jsxs("div",{className:"relative aspect-[4/5] zoom-frame bg-gradient-to-br from-blush-50 to-ivory flex items-center justify-center",children:[e.thumbnail?u.jsx("img",{src:e.thumbnail,alt:e.name,loading:"lazy",className:"w-full h-full object-cover group-hover:scale-110"}):u.jsx(ft,{className:"text-blush-200",size:56}),n&&u.jsxs("span",{className:"absolute top-3 left-3 bg-blush-500 text-white text-[11px] font-semibold px-2.5 py-1 rounded-full shadow-petal",children:["-",r,"%"]}),e.occasion&&u.jsx("span",{className:"absolute top-3 right-3 bg-white/85 backdrop-blur text-sage-700 text-[10px] uppercase tracking-wide px-2.5 py-1 rounded-full",children:e.occasion}),u.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 bg-gradient-to-t from-blush-900/10 to-transparent"})]}),u.jsxs("div",{className:"p-4",children:[e.brand&&u.jsx("div",{className:"text-[10px] uppercase tracking-[0.12em] text-sage-600 mb-0.5",children:e.brand}),u.jsx("div",{className:"font-serif text-[15px] leading-snug text-blush-900 truncate",children:e.name}),u.jsxs("div",{className:"flex items-center justify-between mt-2",children:[u.jsx("div",{className:"flex items-baseline gap-1.5",children:n?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-blush-600 font-bold",children:Ee(e.salePrice)}),u.jsx("span",{className:"text-gray-400 line-through text-xs",children:Ee(e.price)})]}):u.jsx("span",{className:"font-bold text-blush-900",children:Ee(e.price)})}),e.ratingAvg!=null&&e.reviewCount?u.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-gold",children:[u.jsx(Wa,{size:12,fill:"currentColor"}),(a=e.ratingAvg)==null?void 0:a.toFixed(1)]}):null]})]})]})})}const aW=[wK,ft,aj],iW=6e3;function sW(){const{storeName:e}=bn(),t=ti(),n=A.useRef(null),{scrollYProgress:r}=mq({target:n,offset:["start start","end start"]}),a=Jv(r,[0,1],["0%",t?"0%":"28%"]),i=Jv(r,[0,1],[1,t?1:1.12]),s=Jv(r,[0,.8],[1,t?1:.2]),[o,l]=A.useState(0),[c,f]=A.useState(1),d=lb.length,h=A.useCallback(m=>{f(m>o||o===d-1&&m===0?1:-1),l((m%d+d)%d)},[o,d]);A.useEffect(()=>{if(t)return;const m=setInterval(()=>{f(1),l(g=>(g+1)%d)},iW);return()=>clearInterval(m)},[t,d]);const p=lb[o];return u.jsxs("section",{ref:n,className:"relative overflow-hidden min-h-[78vh] flex items-center",children:[u.jsxs(Nt.div,{style:{y:a,scale:i},className:"absolute inset-0 z-0",children:[u.jsx(nx,{initial:!1,children:u.jsx(Nt.img,{src:p.img,alt:"",className:"absolute inset-0 w-full h-full object-cover",initial:{opacity:0,scale:t?1:1.06},animate:{opacity:1,scale:1},exit:{opacity:0},transition:{duration:t?0:1.1,ease:[.22,1,.36,1]}},p.img)}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blush-900/70 via-blush-900/40 to-transparent"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-sage-900/40 to-transparent"})]}),u.jsx(Kd,{count:16,className:"z-[1]"}),u.jsx(Nt.div,{style:{opacity:s},className:"relative z-10 max-w-6xl mx-auto px-4 w-full py-20",children:u.jsx(nx,{mode:"wait",custom:c,children:u.jsxs(Nt.div,{className:"max-w-xl",custom:c,initial:t?!1:{opacity:0,x:c*36},animate:{opacity:1,x:0},exit:t?{opacity:0}:{opacity:0,x:c*-36},transition:{duration:.7,ease:[.22,1,.36,1]},children:[u.jsxs("div",{className:"inline-flex items-center gap-2 text-cream/90 text-[12px] tracking-[0.25em] uppercase mb-5",children:[u.jsx("span",{className:"h-px w-8 bg-gold"})," ",p.eyebrow]}),u.jsx("h1",{className:"font-serif text-5xl md:text-6xl font-bold text-white leading-[1.05] mb-5 whitespace-pre-line drop-shadow-sm",children:p.headline}),u.jsxs("p",{className:"text-cream/90 text-lg leading-relaxed mb-8 max-w-md font-light",children:[p.subtext,e?` Same-day from ${e}.`:""]}),u.jsxs("div",{className:"flex flex-wrap gap-3",children:[u.jsx(Le,{to:p.to,children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 bg-white text-blush-700 font-semibold px-7 py-3.5 rounded-full shadow-bloom hover:bg-cream",children:[p.cta," ",u.jsx(Es,{size:17})]})}),u.jsx(Le,{to:"/daily-standard",children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 border border-white/70 text-white px-7 py-3.5 rounded-full hover:bg-white/10",children:[u.jsx(ej,{size:16})," Today's Bouquet"]})})]}),u.jsxs("div",{className:"flex items-center gap-2 mt-7 text-cream/85 text-sm",children:[u.jsx("span",{className:"flex text-gold",children:[1,2,3,4,5].map(m=>u.jsx(Wa,{size:15,fill:"currentColor"},m))}),u.jsx("span",{className:"font-medium",children:ke.rating}),u.jsxs("span",{className:"text-cream/60",children:["· ",ke.reviewCount.toLocaleString()," happy customers"]})]})]},o)})}),u.jsx("button",{"aria-label":"Previous slide",onClick:()=>h(o-1),className:"absolute left-3 md:left-5 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 backdrop-blur-sm text-white flex items-center justify-center transition-colors",children:u.jsx(gK,{size:22})}),u.jsx("button",{"aria-label":"Next slide",onClick:()=>h(o+1),className:"absolute right-3 md:right-5 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 backdrop-blur-sm text-white flex items-center justify-center transition-colors",children:u.jsx(Pu,{size:22})}),u.jsx("div",{className:"absolute bottom-7 left-1/2 -translate-x-1/2 z-20 flex items-center gap-2.5",children:lb.map((m,g)=>u.jsx("button",{"aria-label":`Go to slide ${g+1}`,onClick:()=>h(g),className:`h-2.5 rounded-full transition-all duration-300 ${g===o?"w-8 bg-white":"w-2.5 bg-white/45 hover:bg-white/70"}`},g))}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -bottom-6 right-6 z-[2] text-white/20 hidden md:block pointer-events-none",animate:t?void 0:{rotate:[0,5,-4,0],y:[0,-8,0]},transition:{duration:9,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{size:130,strokeWidth:1})})]})}function oW(){var i,s,o;const{data:e}=se({queryKey:["ai-rec"],queryFn:()=>t5("","",8)}),{data:t}=se({queryKey:["best"],queryFn:()=>Ql({sort:"sales",size:8})}),{data:n}=se({queryKey:["feat"],queryFn:()=>Ql({sort:"rating",size:12})}),r=(t==null?void 0:t.items)||[],a=(n==null?void 0:n.items)||[];return u.jsxs("div",{children:[u.jsx(sW,{}),u.jsx("section",{className:"bg-ivory border-b border-blush-100",children:u.jsx("div",{className:"max-w-6xl mx-auto px-4 py-10 grid md:grid-cols-3 gap-6",children:ke.promise.map((l,c)=>{const f=aW[c];return u.jsxs(Gr,{delay:c*.1,className:"flex items-start gap-3",children:[u.jsx("span",{className:"shrink-0 w-11 h-11 rounded-full bg-blush-50 text-blush-500 flex items-center justify-center",children:u.jsx(f,{size:20})}),u.jsxs("div",{children:[u.jsx("div",{className:"font-serif text-lg text-blush-900",children:l.title}),u.jsx("p",{className:"text-sm text-[#6b5258] leading-relaxed mt-0.5",children:l.desc})]})]},l.title)})})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-14 space-y-20",children:[u.jsxs("section",{children:[u.jsxs(Gr,{className:"flex items-end justify-between mb-7",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-600 text-[12px] tracking-[0.2em] uppercase mb-2",children:[u.jsx(xr,{size:15})," Curated by GUARDiA AI · On-premise"]}),u.jsx("h2",{className:"font-serif text-3xl text-blush-900",children:"Picked Just for You"})]}),u.jsxs(Le,{to:"/category",className:"hidden sm:flex items-center gap-1 text-sm text-blush-500 hover:text-blush-700",children:["View all ",u.jsx(Es,{size:15})]})]}),u.jsxs(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:[(e||[]).slice(0,8).map(l=>u.jsx(mm,{children:u.jsx(Zl,{p:l})},l.id)),!(e||[]).length&&u.jsx("div",{className:"col-span-4 text-blush-300 text-sm py-12 text-center",children:"Curating fresh picks…"})]})]}),u.jsx("div",{className:"botanical-divider",children:u.jsx(ft,{size:18})}),u.jsx(Gr,{children:u.jsxs("section",{className:"relative overflow-hidden rounded-4xl bg-gradient-to-br from-sage-700 to-sage-800 text-white",children:[u.jsx(Kd,{count:8}),u.jsxs("div",{className:"relative z-10 p-8 md:p-12 flex flex-col md:flex-row items-center justify-between gap-6",children:[u.jsxs("div",{className:"max-w-lg",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-200 text-[12px] tracking-[0.2em] uppercase mb-3",children:[u.jsx(ej,{size:15})," Farmgirl-style daily"]}),u.jsx("h3",{className:"font-serif text-3xl md:text-4xl font-bold mb-3",children:"Today's Designer Bouquet"}),u.jsx("p",{className:"text-cream/85 leading-relaxed",children:"Made fresh each morning with whatever's most beautiful in the cooler — hand-designed by our florists and curated by GUARDiA AI. Limited daily stock."})]}),u.jsx(Le,{to:"/daily-standard",children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 bg-white text-sage-800 font-semibold px-7 py-3.5 rounded-full shadow-bloom",children:["See today's bouquet ",u.jsx(Es,{size:16})]})})]})]})}),u.jsxs("section",{children:[u.jsxs(Gr,{className:"flex items-end justify-between mb-7",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-600 text-[12px] tracking-[0.2em] uppercase mb-2",children:[u.jsx(Wa,{size:14})," Most loved"]}),u.jsx("h2",{className:"font-serif text-3xl text-blush-900",children:"Bestsellers"})]}),u.jsxs(Le,{to:"/category?sort=sales",className:"hidden sm:flex items-center gap-1 text-sm text-blush-500 hover:text-blush-700",children:["View all ",u.jsx(Es,{size:15})]})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:r.map(l=>u.jsx(mm,{children:u.jsx(Zl,{p:l})},l.id))})]}),u.jsx(Gr,{children:u.jsx("section",{className:"grid md:grid-cols-3 gap-5",children:[{to:"/category?occasion=ROMANCE",label:"Love & Romance",sub:"Roses that speak from the heart",img:(i=a[1])==null?void 0:i.thumbnail},{to:"/category?occasion=SYMPATHY",label:"Sympathy & Comfort",sub:"Thoughtful tributes, gently delivered",img:(s=a[2])==null?void 0:s.thumbnail},{to:"/subscription",label:"Flower Subscriptions",sub:"Fresh blooms, week after week",img:(o=a[3])==null?void 0:o.thumbnail}].map((l,c)=>u.jsxs(Le,{to:l.to,className:"group relative rounded-3xl overflow-hidden zoom-frame aspect-[5/4] block shadow-soft",children:[l.img?u.jsx("img",{src:l.img,alt:"",loading:"lazy",className:"w-full h-full object-cover group-hover:scale-110"}):u.jsx("div",{className:"w-full h-full bg-gradient-to-br from-blush-100 to-sage-100"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-blush-900/75 via-blush-900/20 to-transparent"}),u.jsxs("div",{className:"absolute bottom-0 left-0 p-6 text-white",children:[u.jsx("div",{className:"font-serif text-xl font-semibold mb-0.5",children:l.label}),u.jsx("p",{className:"text-cream/85 text-sm",children:l.sub}),u.jsxs("span",{className:"inline-flex items-center gap-1 text-[13px] text-gold mt-2 group-hover:gap-2 transition-all",children:["Explore ",u.jsx(Es,{size:14})]})]})]},l.to))})}),u.jsx(Gr,{children:u.jsxs("section",{className:"rounded-4xl bg-blush-50 border border-blush-100 p-8 md:p-10 text-center",children:[u.jsx("div",{className:"flex justify-center mb-4",children:u.jsx("span",{className:"w-12 h-12 rounded-full bg-white text-blush-500 flex items-center justify-center shadow-soft",children:u.jsx(Ud,{size:22})})}),u.jsxs("h3",{className:"font-serif text-2xl text-blush-900 mb-2",children:["Your Local Florist Since ",ke.founded]}),u.jsx("p",{className:"text-[#6b5258] max-w-xl mx-auto leading-relaxed text-[15px]",children:ke.about}),u.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 mt-5 text-[12px] text-sage-700",children:[u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"Same-Day Delivery"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"Hand-Delivered"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"100% Satisfaction"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"No-Contact Available"})]})]})})]})]})}const gT=[["","All"],["BIRTHDAY","Birthday"],["ANNIVERSARY","Anniversary"],["SYMPATHY","Sympathy"],["CONGRATS","Congrats"],["ROMANCE","Romance"]],lW=[["","Recommended"],["price_asc","Price ↑"],["price_desc","Price ↓"],["sales","Bestselling"],["rating","Top rated"]];function cW(){var b;const[e,t]=m$(),n=e.get("occasion")||"",[r,a]=A.useState(e.get("sort")||""),[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(null);se({queryKey:["cats"],queryFn:PY});const{data:d}=se({queryKey:["products",n,r,i],queryFn:()=>Ql({occasion:n,sort:r,maxPrice:i?Number(i):void 0,size:24})}),h=c?c.items:(d==null?void 0:d.items)||[],p=y=>{const v=new URLSearchParams(e);y?v.set("occasion",y):v.delete("occasion"),t(v),f(null)},m=async y=>{if(y.preventDefault(),!o.trim()){f(null);return}const v=await n5(o.trim()).catch(()=>null);f(v)},g=((b=gT.find(y=>y[0]===n))==null?void 0:b[1])||"All";return u.jsxs("div",{children:[u.jsx("section",{className:"bg-gradient-to-br from-blush-50 to-ivory border-b border-blush-100",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10",children:[u.jsx("div",{className:"text-[12px] tracking-[0.2em] uppercase text-sage-600 mb-2",children:"Shop the collection"}),u.jsx("h1",{className:"font-serif text-4xl text-blush-900",children:g==="All"?"All Flowers":g})]})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("form",{onSubmit:m,className:"flex items-center gap-2 bg-white border border-blush-100 rounded-full px-5 py-3 mb-6 max-w-xl shadow-soft",children:[u.jsx(xr,{size:16,className:"text-blush-500"}),u.jsx("input",{value:o,onChange:y=>l(y.target.value),placeholder:'Try "anniversary roses under $80"',className:"flex-1 text-sm outline-none bg-transparent placeholder:text-blush-300"}),u.jsx("button",{className:"text-blush-500 text-sm font-semibold",children:"AI Search"})]}),c&&u.jsxs("div",{className:"text-xs text-sage-700 mb-4",children:["AI understood: ",u.jsx("span",{className:"font-medium",children:JSON.stringify(c.parsed)})," · ",c.source]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-7",children:[gT.map(([y,v])=>u.jsx("button",{onClick:()=>p(y),className:`px-4 py-1.5 rounded-full text-sm border transition-colors ${n===y?"bg-blush-500 text-white border-blush-500":"bg-white text-[#6b5258] border-blush-100 hover:border-blush-300"}`,children:v},y)),u.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[u.jsx(CK,{size:15,className:"text-blush-300"}),u.jsx("input",{value:i,onChange:y=>{s(y.target.value.replace(/\D/g,"")),f(null)},placeholder:"Max $",className:"w-24 px-3 py-1.5 rounded-full border border-blush-100 text-sm outline-none focus:border-blush-300"}),u.jsx("select",{value:r,onChange:y=>{a(y.target.value),f(null)},className:"px-3 py-1.5 rounded-full border border-blush-100 text-sm outline-none bg-white",children:lW.map(([y,v])=>u.jsx("option",{value:y,children:v},y))})]})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:h.map(y=>u.jsx(mm,{children:u.jsx(Zl,{p:y})},y.id))}),!h.length&&u.jsxs(Gr,{className:"text-center text-blush-300 py-20",children:[u.jsx(ft,{size:40,className:"mx-auto mb-3 text-blush-200"}),"No flowers match those filters."]})]})]})}function uW(){const{t:e}=ni(),[t]=m$(),n=t.get("q")||"",{data:r,isLoading:a}=se({queryKey:["nl-search",n],queryFn:()=>n5(n),enabled:!!n}),i=(r==null?void 0:r.items)||[];return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(xr,{className:"text-bloom",size:20}),u.jsx("h1",{className:"font-serif text-2xl font-bold",children:e("search.resultsFor",{query:n})})]}),(r==null?void 0:r.parsed)&&u.jsxs("div",{className:"text-xs text-bloom2 mb-5",children:[e("search.aiUnderstood")," ",u.jsx("span",{className:"font-medium",children:JSON.stringify(r.parsed)})," · ",r.source]}),a&&u.jsx("div",{className:"text-gray-400 py-10 text-center",children:e("search.searching")}),u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:i.map(s=>u.jsx(Zl,{p:s},s.id))}),!a&&!i.length&&u.jsx("div",{className:"text-center text-gray-400 py-16",children:e("search.noResults")})]})}function fW(){var te,Z,ye;const{id:e}=o$(),t=Number(e),n=Kt(),r=ti(),{custToken:a,setCartCount:i}=bn(),[s,o]=A.useState(""),[l,c]=A.useState(null),[f,d]=A.useState(null),[h,p]=A.useState(""),[m,g]=A.useState(1),[b,y]=A.useState(""),[v,x]=A.useState(!1),[w,S]=A.useState(null),{data:j}=se({queryKey:["product",t],queryFn:()=>CY(t)}),{data:O}=se({queryKey:["reviews",t],queryFn:()=>WY(t)}),{data:E}=se({queryKey:["rstats",t],queryFn:()=>QY(t)}),{data:T}=se({queryKey:["aisum",t],queryFn:()=>cX(t)});if(!j)return u.jsx("div",{className:"max-w-6xl mx-auto px-4 py-24 text-center text-blush-300",children:"Loading…"});const N=j.sizes||[],M=N.find(J=>J.sizeCode===s)||N[0],C=j.options||[],L=C.filter(J=>J.optionType==="VASE"),D=C.filter(J=>J.optionType==="WRAP"),$=J=>C.find(st=>st.id===J),P=M?M.price:j.salePrice&&j.salePrice>0?j.salePrice:j.price,k=(((te=$(l))==null?void 0:te.extraPrice)||0)+(((Z=$(f))==null?void 0:Z.extraPrice)||0),I=(P+k)*m,F=w||j.thumbnail,H=async()=>{if(!a){n("/account");return}try{await LY({productId:j.id,optionId:l||f||null,sizeCode:(M==null?void 0:M.sizeCode)||"",cardMessage:h,quantity:m}),i(J=>J+m),y("Added to your cart.")}catch{y("Could not add to cart.")}},Y=async()=>{await H(),n("/cart")},q=async()=>{if(!a){n("/account");return}x(!0),setTimeout(()=>x(!1),700),await rX(j.id).catch(()=>{}),y("Saved to your wishlist.")};return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10",children:[u.jsxs("div",{className:"grid md:grid-cols-2 gap-10",children:[u.jsxs(Gr,{children:[u.jsx("div",{className:"relative aspect-[4/5] rounded-4xl overflow-hidden bg-gradient-to-br from-blush-50 to-ivory flex items-center justify-center shadow-soft",children:F?u.jsx(Nt.img,{src:F,alt:j.name,initial:r?!1:{opacity:0,scale:1.04},animate:{opacity:1,scale:1},transition:{duration:.6},className:"w-full h-full object-cover"},F):u.jsx(ft,{className:"text-blush-200",size:96})}),!!(j.images||[]).length&&u.jsxs("div",{className:"flex gap-2 mt-3",children:[u.jsx("button",{onClick:()=>S(null),className:`w-16 h-16 rounded-2xl overflow-hidden border-2 ${w?"border-blush-100":"border-blush-400"}`,children:j.thumbnail?u.jsx("img",{src:j.thumbnail,className:"w-full h-full object-cover"}):u.jsx(ft,{className:"text-blush-200 m-auto",size:20})}),j.images.map((J,st)=>u.jsx("button",{onClick:()=>S(J),className:`w-16 h-16 rounded-2xl overflow-hidden border-2 ${w===J?"border-blush-400":"border-blush-100"}`,children:u.jsx("img",{src:J,className:"w-full h-full object-cover"})},st))]})]}),u.jsxs(Gr,{delay:.1,children:[j.brand&&u.jsx("div",{className:"text-[11px] uppercase tracking-[0.2em] text-sage-600 mb-1",children:j.brand}),u.jsx("h1",{className:"font-serif text-3xl font-bold text-blush-900 mb-2 leading-tight",children:j.name}),u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gold mb-4",children:[u.jsx(Wa,{size:15,fill:"currentColor"})," ",((ye=j.ratingAvg)==null?void 0:ye.toFixed(1))||"–",u.jsxs("span",{className:"text-[#a08a90]",children:["(",j.reviewCount||0," reviews)"]}),j.occasion&&u.jsx("span",{className:"text-xs bg-blush-50 text-blush-700 px-2.5 py-0.5 rounded-full ml-1",children:j.occasion})]}),u.jsx("p",{className:"text-[#6b5258] text-[15px] mb-6 leading-relaxed",children:j.description}),!!N.length&&u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Choose your size"}),u.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:N.map(J=>u.jsxs(Ua,{onClick:()=>o(J.sizeCode),className:`rounded-2xl border p-3 text-center transition-colors ${(M==null?void 0:M.sizeCode)===J.sizeCode?"border-blush-400 bg-blush-50":"border-blush-100 hover:border-blush-300"}`,children:[u.jsx("div",{className:"font-semibold text-sm text-blush-900",children:J.label}),u.jsxs("div",{className:"text-xs text-[#8a7077]",children:[J.stemCount," stems"]}),u.jsx("div",{className:"text-blush-600 font-bold text-sm mt-1",children:Ee(J.price)})]},J.sizeCode))})]}),!!L.length&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Add a vase"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Ch,{active:l===null,onClick:()=>c(null),children:"No vase"}),L.map(J=>u.jsxs(Ch,{active:l===J.id,onClick:()=>c(J.id),children:[J.optionValue," +",Ee(J.extraPrice)]},J.id))]})]}),!!D.length&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Wrapping"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Ch,{active:f===null,onClick:()=>d(null),children:"Standard"}),D.map(J=>u.jsxs(Ch,{active:f===J.id,onClick:()=>d(J.id),children:[J.optionValue," +",Ee(J.extraPrice)]},J.id))]})]}),u.jsxs("div",{className:"mb-5",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("span",{className:"text-sm font-medium text-blush-900",children:"Card message"}),u.jsxs(Le,{to:"/cs",className:"text-xs text-blush-500 flex items-center gap-1",children:[u.jsx(xr,{size:12})," AI message helper"]})]}),u.jsx("textarea",{value:h,onChange:J=>p(J.target.value),rows:2,maxLength:200,placeholder:"Write a heartfelt note for the recipient…",className:"w-full px-3.5 py-2.5 rounded-2xl border border-blush-100 text-sm outline-none focus:border-blush-400"})]}),u.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[u.jsxs("div",{className:"flex items-center border border-blush-100 rounded-full",children:[u.jsx("button",{onClick:()=>g(J=>Math.max(1,J-1)),className:"px-3.5 py-1.5 text-blush-600",children:"−"}),u.jsx("span",{className:"px-2 text-sm w-8 text-center",children:m}),u.jsx("button",{onClick:()=>g(J=>J+1),className:"px-3.5 py-1.5 text-blush-600",children:"+"})]}),u.jsx("div",{className:"font-serif text-2xl font-bold text-blush-900",children:Ee(I)})]}),b&&u.jsx("div",{className:"text-sm text-sage-700 mb-3",children:b}),u.jsxs("div",{className:"flex gap-3",children:[u.jsxs(Ua,{onClick:H,className:"flex-1 flex items-center justify-center gap-2 border border-blush-400 text-blush-600 font-semibold py-3.5 rounded-full hover:bg-blush-50",children:[u.jsx(sj,{size:18})," Add to Cart"]}),u.jsx(Ua,{onClick:Y,className:"flex-1 bg-blush-500 text-white font-semibold py-3.5 rounded-full hover:bg-blush-600 shadow-petal",children:"Buy Now"}),u.jsx("button",{onClick:q,className:`px-4 border border-blush-100 rounded-full text-blush-500 hover:bg-blush-50 ${v?"animate-heartbeat":""}`,children:u.jsx(Rf,{size:18,fill:v?"currentColor":"none"})})]}),u.jsxs("div",{className:"flex items-center gap-5 mt-5 text-xs text-sage-700",children:[u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(Ud,{size:14})," Same-day local delivery"]}),u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(aj,{size:14})," 100% satisfaction"]})]}),u.jsx("div",{className:"mt-4 pt-4 border-t border-blush-100/60",children:u.jsx(KX,{url:typeof window<"u"?window.location.href:"",title:j.name,image:j.thumbnail||""})})]})]}),u.jsxs("div",{className:"mt-16",children:[u.jsx("div",{className:"botanical-divider mb-8",children:u.jsx(ft,{size:16})}),u.jsxs("h2",{className:"font-serif text-2xl font-bold text-blush-900 mb-5",children:["Reviews (",(E==null?void 0:E.count)??j.reviewCount??0,")"]}),(T==null?void 0:T.summary)&&u.jsxs(Gr,{className:"bg-gradient-to-br from-blush-50 to-sage-50 border border-blush-100 rounded-3xl p-5 mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2 text-blush-700 font-medium text-sm mb-1.5",children:[u.jsx(xr,{size:15})," AI Review Summary ",u.jsx("span",{className:"text-xs text-[#a08a90]",children:T.source})]}),u.jsx("p",{className:"text-sm text-[#5a474d] leading-relaxed",children:T.summary})]}),u.jsxs("div",{className:"space-y-3",children:[(O||[]).map(J=>u.jsxs("div",{className:"bg-white rounded-3xl border border-blush-100/70 p-5 shadow-soft",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"font-medium text-sm text-blush-900",children:J.title||"Review"}),u.jsxs("span",{className:"flex items-center gap-0.5 text-gold text-sm",children:[u.jsx(Wa,{size:13,fill:"currentColor"}),J.rating]})]}),u.jsx("p",{className:"text-sm text-[#6b5258] mt-1.5 leading-relaxed",children:J.content})]},J.id)),!(O||[]).length&&u.jsx("div",{className:"text-blush-300 text-sm py-8 text-center",children:"No reviews yet — be the first."})]}),u.jsx(Le,{to:`/review/${j.id}`,className:"inline-flex items-center gap-1 mt-5 text-sm text-blush-500 font-semibold hover:text-blush-700",children:"Write a review →"})]})]})}function Ch({active:e,onClick:t,children:n}){return u.jsx("button",{onClick:t,className:`px-3.5 py-1.5 rounded-full text-sm border transition-colors ${e?"bg-blush-500 text-white border-blush-500":"border-blush-100 text-[#6b5258] hover:border-blush-300"}`,children:n})}function dW(){const{t:e}=ni(),t=nn(),n=Kt(),{custToken:r,setCartCount:a}=bn(),{data:i}=se({queryKey:["cart"],queryFn:hj,enabled:!!r}),s=()=>t.invalidateQueries({queryKey:["cart"]}),o=async(d,h)=>{h<1||(await zY(d,h),s())},l=async d=>{await IY(d),s(),a(h=>Math.max(0,h-1))};if(!r)return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-20 text-center",children:[u.jsx(sj,{className:"mx-auto text-bloom/40 mb-3",size:48}),u.jsx("p",{className:"text-gray-500 mb-4",children:e("cart.signInPrompt")}),u.jsx(Le,{to:"/account",className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:e("cart.signInRegister")})]});const c=i||[],f=c.reduce((d,h)=>d+(h.price||(h.unitPrice||0)*(h.quantity||1)),0);return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsx("h1",{className:"font-serif text-2xl font-bold mb-6",children:e("cart.title")}),c.length?u.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[u.jsx("div",{className:"md:col-span-2 space-y-3",children:c.map(d=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex gap-4",children:[u.jsx("div",{className:"w-20 h-20 bg-petal rounded-xl flex items-center justify-center overflow-hidden shrink-0",children:d.thumbnail?u.jsx("img",{src:d.thumbnail,className:"w-full h-full object-cover"}):u.jsx(ft,{className:"text-bloom/30",size:32})}),u.jsxs("div",{className:"flex-1",children:[u.jsx("div",{className:"font-medium text-sm",children:d.productName||`Product #${d.productId}`}),u.jsxs("div",{className:"text-xs text-gray-500",children:[d.sizeCode,d.cardMessage?` · ${e("cart.card")}: ${d.cardMessage.slice(0,20)}`:""]}),u.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[u.jsxs("div",{className:"flex items-center border border-blush-100 rounded-full text-sm",children:[u.jsx("button",{onClick:()=>o(d.id,(d.quantity||1)-1),className:"px-2.5 py-1 text-bloom2",children:"−"}),u.jsx("span",{className:"px-1 w-6 text-center",children:d.quantity||1}),u.jsx("button",{onClick:()=>o(d.id,(d.quantity||1)+1),className:"px-2.5 py-1 text-bloom2",children:"+"})]}),u.jsx("button",{onClick:()=>l(d.id),className:"text-blush-400 hover:text-blush-600",children:u.jsx(PK,{size:16})})]})]}),u.jsx("div",{className:"font-bold text-bloom2 text-sm",children:Ee(d.price||(d.unitPrice||0)*(d.quantity||1))})]},d.id))}),u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 h-fit",children:[u.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[u.jsx("span",{className:"text-gray-500",children:e("cart.subtotal")}),u.jsx("span",{className:"font-medium",children:Ee(f)})]}),u.jsxs("div",{className:"flex justify-between text-sm mb-3",children:[u.jsx("span",{className:"text-gray-500",children:e("cart.shippingTax")}),u.jsx("span",{className:"text-gray-400",children:e("cart.calcAtCheckout")})]}),u.jsxs("div",{className:"border-t border-blush-100/60 pt-3 flex justify-between font-bold",children:[u.jsx("span",{children:e("cart.total")}),u.jsx("span",{className:"text-bloom2",children:Ee(f)})]}),u.jsx("button",{onClick:()=>n("/checkout"),className:"w-full mt-4 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2",children:e("cart.checkout")})]})]}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:[e("cart.empty")," ",u.jsx(Le,{to:"/category",className:"text-bloom",children:e("cart.startShopping")})]})]})}function hW(e){const t=[],n=new Date;for(let r=0;rSo(!0)}),{data:st}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!t}),{data:Ve}=se({queryKey:["holidays"],queryFn:Wk}),{data:G}=se({queryKey:["avail",o,c],queryFn:()=>$Y(o,c),enabled:!!o&&!!c});A.useEffect(()=>{!o&&(J!=null&&J.length)&&l(J[0].id)},[J]);const oe=ye||[],X=oe.reduce((le,zt)=>le+(zt.price||(zt.unitPrice||0)*(zt.quantity||1)),0),V=G!=null&&G.surgeMultiplier&&G.surgeMultiplier>1?X*(G.surgeMultiplier-1):0,_e=((Co=st==null?void 0:st.benefit)==null?void 0:Co.discountRate)||0,ge=X*(_e/100),Xe=(k==null?void 0:k.taxAmount)||0,ot=(st==null?void 0:st.pointBalance)||0,dt=Math.min(ot,Math.floor(X)),Rn=Math.max(0,X+V+Xe-ge-T),oi=A.useMemo(()=>new Set((Ve||[]).filter(le=>le.blocked).map(le=>le.holidayDate)),[Ve]),No=async()=>{if(!y||!x)return;const le=await oX(y,x).catch(()=>null);P(le)},pa=async()=>{var Er;const le=((Er=J==null?void 0:J.find(nh=>nh.id===o))==null?void 0:Er.state)||"",zt=await sX(X,x||"",le).catch(()=>null);I(zt)};A.useEffect(()=>{X>0&&o&&pa()},[X,o,x]);const ma=async()=>{var le,zt;if(Z(""),!t){e("/account");return}if(!oe.length){Z("Your cart is empty.");return}if(!c||!d){Z("Please select a delivery/pickup date and time slot.");return}if(i==="DELIVERY"&&(!y||!p)){Z("Please enter the recipient and delivery address.");return}if(M==="CARD"&&!L.complete){Z("Please enter your card details.");return}H(!0);try{const Er=await UY({storeId:o,fulfillmentType:i,receiverName:p,receiverPhone:g,address:i==="DELIVERY"?y:"",deliveryZip:x,scheduledDate:c,slotId:d.id,slotLabel:d.label,cardMessage:S,memo:O,couponId:null,discountAmount:Math.round((ge+T)*100)/100,taxAmount:Xe,surgeAmount:Math.round(V*100)/100});await VY({orderId:Er.id,amount:Rn,method:M,usePoints:T,cardLast4:M==="CARD"?L.last4:""}).catch(()=>{}),a(0),q(Er)}catch(Er){Z(((zt=(le=Er==null?void 0:Er.response)==null?void 0:le.data)==null?void 0:zt.message)||"Order failed. Please try again in a moment.")}finally{H(!1)}};return t?Y?u.jsxs("div",{className:"max-w-lg mx-auto px-4 py-20 text-center",children:[u.jsx(vK,{className:"mx-auto text-leaf mb-4",size:56}),u.jsx("h1",{className:"font-serif text-2xl font-bold mb-2",children:"Your order has been placed"}),u.jsxs("p",{className:"text-gray-500 mb-1",children:["Order Number ",u.jsx("span",{className:"font-semibold text-bloom2",children:Y.orderNo||`#${Y.id}`})]}),u.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:[c," · ",d==null?void 0:d.label," · ",Ee(Rn)]}),u.jsxs("div",{className:"flex gap-3 justify-center",children:[u.jsx("button",{onClick:()=>e("/orders"),className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Order History"}),u.jsx("button",{onClick:()=>e("/home"),className:"border border-blush-100 px-6 py-2.5 rounded-full text-bloom2",children:"Continue Shopping"})]})]}):u.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[u.jsx("h1",{className:"font-serif text-2xl font-bold mb-6",children:"Checkout"}),u.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[u.jsxs("div",{className:"md:col-span-2 space-y-5",children:[u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Fulfillment Method"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("button",{onClick:()=>s("DELIVERY"),className:`flex items-center gap-2 justify-center py-3 rounded-xl border ${i==="DELIVERY"?"border-bloom bg-petal text-bloom2":"border-blush-100"}`,children:[u.jsx(Ud,{size:18})," Local Delivery"]}),u.jsxs("button",{onClick:()=>s("PICKUP"),className:`flex items-center gap-2 justify-center py-3 rounded-xl border ${i==="PICKUP"?"border-bloom bg-petal text-bloom2":"border-blush-100"}`,children:[u.jsx(Bd,{size:18})," Store Pickup"]})]}),u.jsxs("div",{className:"mt-3",children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Store"}),u.jsx("select",{value:o,onChange:le=>l(Number(le.target.value)),className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:(J||[]).map(le=>u.jsxs("option",{value:le.id,children:[le.name," (",le.city,", ",le.state,")"]},le.id))})]})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold mb-3",children:[u.jsx(yK,{size:16,className:"text-bloom"})," Delivery / Pickup Date"]}),u.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2",children:hW(14).map(le=>{const zt=oi.has(le),Er=c===le,nh=new Date(le);return u.jsxs("button",{disabled:zt,onClick:()=>{f(le),h(null)},className:`shrink-0 w-16 py-2 rounded-xl border text-center text-xs ${zt?"opacity-30 cursor-not-allowed border-blush-100":Er?"border-bloom bg-bloom text-white":"border-blush-100 hover:border-bloom"}`,children:[u.jsx("div",{className:"font-semibold",children:nh.toLocaleDateString("en-US",{weekday:"short"})}),u.jsx("div",{className:"text-base",children:nh.getDate()}),zt&&u.jsx("div",{className:"text-[9px]",children:"Closed"})]},le)})}),c&&G&&u.jsxs("div",{className:"mt-3",children:[G.blocked&&u.jsxs("div",{className:"flex items-center gap-1.5 text-blush-500 text-xs mb-2",children:[u.jsx(RK,{size:13})," Delivery is unavailable on this date (peak season / closed)."]}),G.surgeMultiplier>1&&u.jsxs("div",{className:"text-xs text-amber-600 mb-2",children:["⚡ Peak-season surge pricing ×",G.surgeMultiplier," applied"]}),G.sameDayAvailable&&u.jsxs("div",{className:"text-xs text-leaf mb-2",children:["Same-Day Delivery available (order by ",G.sameDayCutoff,")"]}),u.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium mb-2",children:[u.jsx(ck,{size:14,className:"text-bloom"})," Delivery Time Slot"]}),u.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[(G.slots||[]).map(le=>{const zt=le.available===!1||le.capacity!=null&&le.booked>=le.capacity;return u.jsx("button",{disabled:zt,onClick:()=>h({id:le.id,label:le.slotLabel}),className:`py-2 rounded-lg border text-xs ${zt?"opacity-30 cursor-not-allowed":(d==null?void 0:d.id)===le.id?"border-bloom bg-petal text-bloom2 font-semibold":"border-blush-100 hover:border-bloom"}`,children:le.slotLabel},le.id)}),!(G.slots||[]).length&&u.jsx("div",{className:"col-span-3 text-gray-400 text-xs py-2",children:"No time slots available."})]})]})]}),i==="DELIVERY"&&u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3",children:[u.jsx("div",{className:"text-sm font-semibold",children:"Recipient Information"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx("input",{value:p,onChange:le=>m(le.target.value),placeholder:"Recipient Name",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:g,onChange:le=>b(le.target.value),placeholder:"Phone",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{value:y,onChange:le=>v(le.target.value),placeholder:"Delivery Address",className:"flex-1 px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:x,onChange:le=>w(le.target.value.replace(/\D/g,"").slice(0,5)),placeholder:"ZIP",className:"w-24 px-3 py-2 rounded-xl border border-blush-100 text-sm text-center outline-none focus:border-bloom"}),u.jsxs("button",{onClick:No,className:"px-3 rounded-xl border border-bloom text-bloom text-sm font-semibold flex items-center gap-1",children:[u.jsx(dm,{size:14})," Verify"]})]}),$&&u.jsx("div",{className:`text-xs ${$.valid?"text-leaf":"text-blush-500"}`,children:$.valid?`Verified: ${$.normalized||y} (${$.provider})`:`Address verification failed (${$.provider})`})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("div",{className:"text-sm font-semibold",children:"Gift Card Message"}),u.jsxs("span",{className:"text-xs text-bloom flex items-center gap-1",children:[u.jsx(xr,{size:12})," AI writing is on the product page"]})]}),u.jsx("textarea",{value:S,onChange:le=>j(le.target.value),rows:2,maxLength:200,placeholder:"Message for the recipient",className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:O,onChange:le=>E(le.target.value),placeholder:"Special Instructions (optional)",className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Payment Method"}),u.jsx(tW,{method:M,onMethod:C,onCardChange:D,cards:ke.cards,wallets:ke.wallets})]})]}),u.jsxs("aside",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 h-fit sticky top-20",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Order Summary"}),u.jsxs("div",{className:"space-y-1.5 text-sm",children:[u.jsx(fu,{k:"Subtotal",v:Ee(X)}),V>0&&u.jsx(fu,{k:"Surge Pricing",v:`+${Ee(V)}`,amber:!0}),u.jsx(fu,{k:"Tax",v:Ee(Xe),sub:k?`${k.provider} ${(k.rate*100).toFixed(1)}%`:""}),ge>0&&u.jsx(fu,{k:`Tier Discount (${(st==null?void 0:st.tierName)||""} ${_e}%)`,v:`-${Ee(ge)}`,green:!0}),T>0&&u.jsx(fu,{k:"Points Used",v:`-${Ee(T)}`,green:!0})]}),!!t&&u.jsxs("div",{className:"mt-4 bg-petal rounded-xl p-3",children:[u.jsxs("div",{className:"flex items-center justify-between text-xs text-bloom2 mb-1",children:[u.jsxs("span",{children:["Points Balance ",ot.toLocaleString()," pts"]}),u.jsx("button",{onClick:()=>N(dt),className:"text-bloom font-semibold",children:"Use All"})]}),u.jsx("input",{type:"range",min:0,max:dt,value:T,onChange:le=>N(Number(le.target.value)),className:"w-full accent-bloom"}),u.jsxs("div",{className:"text-xs text-gray-500 text-right",children:[T.toLocaleString()," pts used"]})]}),u.jsxs("div",{className:"border-t border-blush-100/60 mt-4 pt-3 flex justify-between font-bold text-base",children:[u.jsx("span",{children:"Order Total"}),u.jsx("span",{className:"text-bloom2",children:Ee(Rn)})]}),te&&u.jsx("div",{className:"text-blush-500 text-xs mt-3",children:te}),u.jsx("button",{onClick:ma,disabled:F,className:"w-full mt-4 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2 disabled:opacity-60",children:F?"Processing…":`Place Order · ${Ee(Rn)}`}),u.jsx("p",{className:"text-[11px] text-gray-400 text-center mt-2",children:"Payments processed via GUARDiA PaymentGateway (secure adapter) · Card details not stored"})]})]})]}):(e("/account"),null)}function fu({k:e,v:t,sub:n,amber:r,green:a}){return u.jsxs("div",{className:"flex justify-between",children:[u.jsxs("span",{className:"text-gray-500",children:[e,n&&u.jsx("span",{className:"text-[10px] text-gray-400 ml-1",children:n})]}),u.jsx("span",{className:r?"text-amber-600":a?"text-leaf":"font-medium",children:t})]})}const mW={PAID:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",CONFIRMED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",DELIVERED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",COMPLETED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",APPROVED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",PUBLISHED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",ACTIVE:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",RESOLVED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",SHIPPED:"bg-sky-500/15 text-sky-400 border-sky-500/30",PREPARING:"bg-sky-500/15 text-sky-400 border-sky-500/30",REQUESTED:"bg-sky-500/15 text-sky-400 border-sky-500/30",IN_PROGRESS:"bg-sky-500/15 text-sky-400 border-sky-500/30",PENDING:"bg-amber-500/15 text-amber-400 border-amber-500/30",PAUSED:"bg-amber-500/15 text-amber-400 border-amber-500/30",OPEN:"bg-amber-500/15 text-amber-400 border-amber-500/30",DRAFT:"bg-slate-500/15 text-slate-400 border-slate-500/30",ENDED:"bg-slate-600/20 text-slate-400 border-slate-600/30",CANCELLED:"bg-slate-600/20 text-slate-400 border-slate-600/30",REJECTED:"bg-rose-500/15 text-rose-400 border-rose-500/30",REFUNDED:"bg-rose-500/15 text-rose-400 border-rose-500/30",FAILED:"bg-rose-500/15 text-rose-400 border-rose-500/30",BASIC:"bg-slate-500/15 text-slate-300 border-slate-500/30",SILVER:"bg-slate-300/20 text-slate-200 border-slate-300/30",GOLD:"bg-amber-400/15 text-amber-300 border-amber-400/30",VIP:"bg-violet-500/15 text-violet-300 border-violet-500/30"},yW={PENDING:"Pending",PAID:"Paid",PREPARING:"Preparing",SHIPPED:"Out for Delivery",DELIVERED:"Delivered",CONFIRMED:"Confirmed",CANCELLED:"Cancelled",REFUNDED:"Refunded",ACTIVE:"Active",PAUSED:"Paused",REQUESTED:"Requested",APPROVED:"Approved",REJECTED:"Rejected",COMPLETED:"Completed",PUBLISHED:"Published",DRAFT:"Draft",ENDED:"Ended",OPEN:"Open",IN_PROGRESS:"Processing",RESOLVED:"Resolved"};function Ur({status:e}){if(!e)return null;const t=mW[e]||"bg-slate-500/15 text-slate-400 border-slate-500/30";return u.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs font-medium border ${t}`,children:yW[e]||e})}const vT=[["WEEKLY","Weekly"],["BIWEEKLY","Every 2 Weeks"],["MONTHLY","Monthly"]];function gW(){const e=nn(),t=Kt(),{custToken:n,storeId:r}=bn(),[a,i]=A.useState("WEEKLY"),[s,o]=A.useState(0),[l,c]=A.useState(!1),{data:f}=se({queryKey:["subs"],queryFn:HY,enabled:!!n}),{data:d}=se({queryKey:["stores"],queryFn:()=>So(!0)}),{data:h}=se({queryKey:["sub-prods"],queryFn:()=>Ql({size:12,sort:"sales"})}),p=(h==null?void 0:h.items)||[],m=async()=>{var x;if(!n){t("/account");return}const y=r||((x=d==null?void 0:d[0])==null?void 0:x.id),v=p.find(w=>w.id===s)||p[0];v&&(await qY({storeId:y,productId:v.id,sizeCode:"ORIGINAL",frequency:a,receiverName:"",receiverPhone:"",address:"",deliveryZip:"",price:v.price}).catch(()=>{}),c(!1),e.invalidateQueries({queryKey:["subs"]}))},g=async(y,v)=>{await mT(y,v==="ACTIVE"?"PAUSED":"ACTIVE").catch(()=>{}),e.invalidateQueries({queryKey:["subs"]})},b=async y=>{await mT(y,"CANCELLED").catch(()=>{}),e.invalidateQueries({queryKey:["subs"]})};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Qy,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"Flower Subscription"})]}),u.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Get fresh flowers delivered weekly, every two weeks, or monthly."}),!n&&u.jsxs("div",{className:"bg-petal rounded-2xl p-6 text-center text-sm text-gray-600 mb-6",children:["Please log in to start a subscription. ",u.jsx(Le,{to:"/account",className:"text-bloom font-semibold",children:"Log In →"})]}),u.jsx("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 mb-6",children:l?u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"Delivery Frequency"}),u.jsx("div",{className:"flex gap-2",children:vT.map(([y,v])=>u.jsx("button",{onClick:()=>i(y),className:`px-4 py-2 rounded-full text-sm border ${a===y?"bg-bloom text-white border-bloom":"border-blush-100"}`,children:v},y))})]}),u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"Choose a Product"}),u.jsxs("select",{value:s,onChange:y=>o(Number(y.target.value)),className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:[u.jsx("option",{value:0,children:"Best Seller (Recommended)"}),p.map(y=>u.jsxs("option",{value:y.id,children:[y.name," — ",Ee(y.price)]},y.id))]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{onClick:m,className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Start Subscription"}),u.jsx("button",{onClick:()=>c(!1),className:"border border-blush-100 px-6 py-2.5 rounded-full text-gray-600",children:"Cancel"})]})]}):u.jsx("button",{onClick:()=>n?c(!0):t("/account"),className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Start a New Subscription"})}),u.jsx("h2",{className:"font-serif text-lg font-bold mb-3",children:"My Subscriptions"}),u.jsxs("div",{className:"space-y-3",children:[(f||[]).map(y=>{var v;return u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex items-center gap-4",children:[u.jsx("div",{className:"w-14 h-14 bg-petal rounded-xl flex items-center justify-center",children:u.jsx(ft,{className:"text-bloom/40",size:26})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("div",{className:"font-medium text-sm",children:[y.productName||`상품 #${y.productId}`," · ",((v=vT.find(x=>x[0]===y.frequency))==null?void 0:v[1])||y.frequency]}),u.jsxs("div",{className:"text-xs text-gray-500",children:["다음 배송 ",y.nextDeliveryDate||"-"," · ",Ee(y.price)]})]}),u.jsx(Ur,{status:y.status}),y.status!=="CANCELLED"&&u.jsxs(u.Fragment,{children:[u.jsx("button",{onClick:()=>g(y.id,y.status),className:"text-xs text-bloom2 border border-blush-100 rounded-full px-3 py-1.5",children:y.status==="ACTIVE"?"일시정지":"재개"}),u.jsx("button",{onClick:()=>b(y.id),className:"text-xs text-blush-400 border border-blush-100 rounded-full px-3 py-1.5",children:"해지"})]})]},y.id)}),!(f||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-8 text-center",children:"아직 구독이 없습니다."})]})]})}function vW(){const{storeName:e}=bn(),{data:t}=se({queryKey:["daily-rec"],queryFn:()=>t5("daily","",8)}),{data:n}=se({queryKey:["daily-fresh"],queryFn:()=>Ql({sort:"rating",size:8})}),r=(t&&t.length?t:n==null?void 0:n.items)||[];return u.jsxs("div",{children:[u.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-sage-700 to-sage-800 text-white",children:[u.jsx(Kd,{count:12}),u.jsxs("div",{className:"relative z-10 max-w-6xl mx-auto px-4 py-16",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-200 text-[12px] tracking-[0.2em] uppercase mb-3",children:[u.jsx(ej,{size:15})," Fresh today, gone tomorrow"]}),u.jsx("h1",{className:"font-serif text-5xl font-bold mb-4",children:"Today's Designer Bouquet"}),u.jsxs("p",{className:"text-cream/85 max-w-xl leading-relaxed text-lg font-light",children:["Hand-designed each morning with the freshest stems in our cooler, then curated by ",u.jsx("b",{className:"font-medium",children:"GUARDiA AI"}),". Limited daily stock · ",e||"your nearest store"," same-day delivery."]})]})]}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-12",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(xr,{className:"text-blush-500",size:18}),u.jsx("h2",{className:"font-serif text-2xl font-bold text-blush-900",children:"Today's Picks"}),u.jsx("span",{className:"text-xs text-sage-600",children:"AI-curated"})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:r.map(a=>u.jsx(mm,{children:u.jsx(Zl,{p:a})},a.id))}),!r.length&&u.jsxs("div",{className:"text-center text-blush-300 py-20",children:[u.jsx(ft,{className:"mx-auto text-blush-200 mb-3",size:40}),"Today's bouquet is being designed. ",u.jsx(Le,{to:"/category",className:"text-blush-500",children:"Browse all flowers →"})]})]})]})}const bW={DISCOUNT:_K,POINT_BONUS:Mf,GIFT:mk,TIER_ONLY:Mf,SEASON:Df};function xW(){const{custToken:e}=bn(),t=Kt(),[n,r]=A.useState(""),{data:a}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!e}),i=(a==null?void 0:a.tier)||"",{data:s}=se({queryKey:["ongoing-events",i],queryFn:()=>TX(i)}),o=async l=>{var c,f;if(!e){t("/account");return}r("");try{const d=await NX(l);r(d!=null&&d.coupon?`참여 완료! 쿠폰 발급: ${d.coupon.name} (${d.coupon.code})`:"이벤트에 참여했습니다.")}catch(d){r(((f=(c=d==null?void 0:d.response)==null?void 0:c.data)==null?void 0:f.message)||"참여 자격이 없거나 이미 참여했습니다.")}};return u.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Df,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"이벤트 / 캠페인"})]}),i&&u.jsxs("p",{className:"text-sm text-gray-500 mb-2",children:["현재 등급 ",u.jsx("span",{className:"font-semibold text-bloom2",children:(a==null?void 0:a.tierName)||i})," · 등급 전용 이벤트가 함께 표시됩니다."]}),n&&u.jsx("div",{className:"bg-petal text-bloom2 text-sm rounded-xl px-4 py-2 mb-4",children:n}),u.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mt-4",children:[(s||[]).map(l=>{const c=bW[l.eventType]||Df,f=(l.banners||[])[0];return u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 overflow-hidden",children:[u.jsx("div",{className:"bg-gradient-to-r from-bloom2 to-bloom text-white p-5",children:f?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"font-serif text-lg font-bold",children:f.headline||l.title}),u.jsx("p",{className:"text-white/85 text-sm mt-1",children:f.subtext||l.description})]}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"font-serif text-lg font-bold",children:l.title}),u.jsx("p",{className:"text-white/85 text-sm mt-1",children:l.description})]})}),u.jsxs("div",{className:"p-4 flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[u.jsx(c,{size:16,className:"text-bloom"}),u.jsx("span",{children:l.eventType}),l.bonusPointRate>0&&u.jsxs("span",{className:"text-xs text-leaf",children:["+",l.bonusPointRate,"% 포인트"]}),l.targetTiers&&u.jsxs("span",{className:"text-xs bg-petal text-bloom2 px-2 py-0.5 rounded-full",children:[l.targetTiers," 전용"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ur,{status:l.status}),u.jsx("button",{onClick:()=>o(l.id),className:"bg-bloom text-white text-sm font-semibold px-4 py-2 rounded-full hover:bg-bloom2",children:"참여"})]})]}),u.jsxs("div",{className:"px-4 pb-3 text-[11px] text-gray-400",children:[l.startDate," ~ ",l.endDate]})]},l.id)}),!(s||[]).length&&u.jsx("div",{className:"col-span-2 text-center text-gray-400 py-16",children:"진행 중인 이벤트가 없습니다."})]})]})}function SW(){const{t:e}=ni(),t=nn(),n=Kt(),{custToken:r}=bn(),{data:a}=se({queryKey:["wishlist"],queryFn:nX,enabled:!!r});if(!r)return n("/account"),null;const i=a||[],s=async o=>{await aX(o).catch(()=>{}),t.invalidateQueries({queryKey:["wishlist"]})};return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(Rf,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:e("wishlist.title")})]}),i.length?u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:i.map(o=>u.jsxs("div",{className:"relative",children:[u.jsx(Zl,{p:{...o,id:o.productId||o.id}}),u.jsx("button",{onClick:()=>s(o.productId||o.id),className:"absolute top-2 right-2 bg-white/90 rounded-full p-1.5 text-bloom shadow",children:u.jsx(Rf,{size:16,fill:"currentColor"})})]},o.id||o.productId))}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:[e("wishlist.empty")," ",u.jsx(Le,{to:"/category",className:"text-bloom",children:e("wishlist.startShopping")})]})]})}const bT={BASIC:"from-slate-400 to-slate-500",SILVER:"from-slate-300 to-slate-400",GOLD:"from-amber-400 to-amber-500",VIP:"from-violet-500 to-fuchsia-500"};function wW(){const{custToken:e,setCustToken:t}=bn(),n=Kt(),{data:r}=se({queryKey:["member"],queryFn:JY,enabled:!!e}),{data:a}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!e}),{data:i}=se({queryKey:["point-history"],queryFn:()=>AX(20),enabled:!!e});if(!e)return n("/account"),null;const s=(a==null?void 0:a.tier)||"BASIC",o=a==null?void 0:a.nextTier,l=()=>{t(null),n("/home")};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center justify-between mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(wk,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"My Account"})]}),u.jsxs("button",{onClick:l,className:"flex items-center gap-1.5 text-sm text-gray-500 hover:text-bloom",children:[u.jsx(gk,{size:16})," Log Out"]})]}),u.jsxs("div",{className:`rounded-2xl bg-gradient-to-r ${bT[s]||bT.BASIC} text-white p-6 mb-5`,children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-xs uppercase tracking-widest text-white/70",children:"Membership Tier"}),u.jsxs("div",{className:"font-serif text-2xl font-bold flex items-center gap-2",children:[u.jsx(Mf,{size:24})," ",(a==null?void 0:a.tierName)||s]}),u.jsxs("div",{className:"text-sm text-white/85 mt-1",children:["Spent in last 12 months ",Ee(a==null?void 0:a.spend12m)," · ",(a==null?void 0:a.orderCount12m)||0," orders"]})]}),u.jsxs("div",{className:"text-right",children:[u.jsx("div",{className:"text-xs text-white/70",children:"Points Balance"}),u.jsxs("div",{className:"text-3xl font-bold",children:[((a==null?void 0:a.pointBalance)||0).toLocaleString(),u.jsx("span",{className:"text-base",children:"P"})]})]})]}),o&&!o.isTop&&u.jsxs("div",{className:"mt-4 text-xs text-white/85 bg-white/15 rounded-lg px-3 py-2",children:["Spend ",Ee(o.spendNeeded)," more or place ",o.ordersNeeded," more orders to reach ",u.jsx("b",{children:o.nextTierName}),"."]})]}),(a==null?void 0:a.benefit)&&u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 mb-5",children:[u.jsxs("div",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[u.jsx(mk,{size:16,className:"text-bloom"})," My Tier Benefits"]}),u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 text-sm",children:[u.jsx(_h,{label:"Discount",value:`${a.benefit.discountRate}%`}),u.jsx(_h,{label:"Earn Rate",value:`${a.benefit.pointEarnRate}%`}),u.jsx(_h,{label:"Free Shipping",value:a.benefit.freeShipThreshold===0?"Always":a.benefit.freeShipThreshold?Ee(a.benefit.freeShipThreshold)+"+":"None"}),u.jsx(_h,{label:"Priority Slot",value:a.benefit.prioritySlot?"Included":"–"})]})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-6",children:[u.jsx(cb,{to:"/orders",icon:vk,label:"Order History"}),u.jsx(cb,{to:"/wishlist",icon:Rf,label:"Wishlist"}),u.jsx(cb,{to:"/subscription",icon:Qy,label:"Manage Subscription"})]}),u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[u.jsx(uk,{size:16,className:"text-bloom"})," Points Earned / Used History"]}),u.jsxs("div",{className:"divide-y divide-blush-100/60",children:[(i||[]).map(c=>u.jsxs("div",{className:"flex items-center justify-between py-2 text-sm",children:[u.jsxs("div",{children:[u.jsx("span",{className:"text-gray-700",children:c.reason||c.entryType}),c.orderNo&&u.jsx("span",{className:"text-xs text-gray-400 ml-2",children:c.orderNo}),u.jsx("div",{className:"text-[11px] text-gray-400",children:(c.createdAt||"").slice(0,10)})]}),u.jsxs("span",{className:c.points>=0?"text-leaf font-semibold":"text-blush-500 font-semibold",children:[c.points>=0?"+":"",c.points,"P"]})]},c.id)),!(i||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-6 text-center",children:"No points history yet."})]})]}),(r==null?void 0:r.username)&&u.jsx("div",{className:"text-center text-xs text-gray-400 mt-6",children:r.displayName||r.username})]})}function _h({label:e,value:t}){return u.jsxs("div",{className:"bg-petal rounded-xl p-3 text-center",children:[u.jsx("div",{className:"text-[11px] text-gray-500",children:e}),u.jsx("div",{className:"font-bold text-bloom2",children:t})]})}function cb({to:e,icon:t,label:n}){return u.jsxs(Le,{to:e,className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex flex-col items-center gap-1.5 hover:border-bloom",children:[u.jsx(t,{size:22,className:"text-bloom"}),u.jsx("span",{className:"text-sm",children:n})]})}function jW(){const e=nn(),t=Kt(),{custToken:n}=bn(),{data:r}=se({queryKey:["my-orders"],queryFn:()=>BY(""),enabled:!!n});if(!n)return t("/account"),null;const a=r||[],i=async(s,o)=>{await Qk(s,o).catch(()=>{}),e.invalidateQueries({queryKey:["my-orders"]})};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(vk,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"주문 내역"})]}),a.length?u.jsx("div",{className:"space-y-3",children:a.map(s=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("div",{className:"font-semibold text-sm",children:s.orderNo||`주문 #${s.id}`}),u.jsx(Ur,{status:s.status})]}),u.jsxs("div",{className:"text-xs text-gray-500 mb-3",children:[(s.createdAt||"").slice(0,16).replace("T"," ")," · ",s.fulfillmentType==="PICKUP"?"매장 픽업":"배송"," · ",s.scheduledDate," ",s.slotLabel]}),u.jsx("div",{className:"space-y-1.5",children:(s.items||[]).map(o=>u.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[u.jsx("div",{className:"w-9 h-9 bg-petal rounded-lg flex items-center justify-center",children:u.jsx(ft,{className:"text-bloom/40",size:16})}),u.jsxs("span",{className:"flex-1",children:[o.productName||`상품 #${o.productId}`," ",o.sizeCode&&`· ${o.sizeCode}`," ×",o.quantity]}),u.jsx("span",{className:"text-gray-600",children:Ee(o.price||o.unitPrice)})]},o.id))}),u.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-blush-100/60",children:[u.jsx("span",{className:"font-bold text-bloom2",children:Ee(s.payAmount??s.totalAmount)}),u.jsxs("div",{className:"flex gap-2",children:[s.status==="DELIVERED"&&u.jsx("button",{onClick:()=>i(s.id,"CONFIRMED"),className:"text-xs bg-bloom text-white px-3 py-1.5 rounded-full",children:"구매확정"}),["PENDING","PAID"].includes(s.status)&&u.jsx("button",{onClick:()=>i(s.id,"CANCELLED"),className:"text-xs border border-blush-100 text-blush-400 px-3 py-1.5 rounded-full",children:"주문취소"})]})]})]},s.id))}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:["주문 내역이 없습니다. ",u.jsx(Le,{to:"/category",className:"text-bloom",children:"쇼핑하기 →"})]})]})}function AW(){const{productId:e}=o$(),t=Number(e),n=Kt(),{custToken:r}=bn(),[a,i]=A.useState(5),[s,o]=A.useState(""),[l,c]=A.useState(""),[f,d]=A.useState(""),[h,p]=A.useState("");if(!r)return n("/account"),null;const m=async g=>{g.preventDefault(),p("");try{await ZY({productId:t,rating:a,title:s,content:l,imageUrl:f}),p("리뷰가 등록되었습니다."),setTimeout(()=>n(`/product/${t}`),800)}catch{p("등록에 실패했습니다. (구매 이력이 필요할 수 있습니다)")}};return u.jsxs("div",{className:"max-w-lg mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(OK,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"리뷰 작성"})]}),u.jsxs("form",{onSubmit:m,className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"별점"}),u.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(g=>u.jsx("button",{type:"button",onClick:()=>i(g),className:"text-amber-400",children:u.jsx(Wa,{size:28,fill:g<=a?"currentColor":"none"})},g))})]}),u.jsx("input",{value:s,onChange:g=>o(g.target.value),placeholder:"제목",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("textarea",{value:l,onChange:g=>c(g.target.value),rows:5,required:!0,placeholder:"상품은 어떠셨나요? 신선도, 배송, 디자인 등을 적어주세요.",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:f,onChange:g=>d(g.target.value),placeholder:"사진 URL (선택)",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),h&&u.jsx("div",{className:"text-sm text-leaf",children:h}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{className:"flex-1 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2",children:"등록"}),u.jsx("button",{type:"button",onClick:()=>n(-1),className:"px-6 border border-blush-100 rounded-full text-gray-600",children:"취소"})]})]})]})}function OW(){const[e,t]=A.useState("login"),[n,r]=A.useState(""),[a,i]=A.useState(""),[s,o]=A.useState(""),[l,c]=A.useState(""),[f,d]=A.useState(!1),{setCustToken:h}=bn(),p=Kt(),m=async g=>{var b,y;g.preventDefault(),c(""),d(!0);try{const x=(y=(b=(e==="login"?await Yk(n,a):await EY(n,a,s||n)).data)==null?void 0:b.data)==null?void 0:y.token;if(!x)throw new Error("no token");h(x),p("/home")}catch{c(e==="login"?"Login failed — check your username and password.":"Sign-up failed — that username may already be taken.")}finally{d(!1)}};return u.jsxs("div",{className:"relative min-h-screen bg-gradient-to-br from-blush-100 via-cream to-sage-100 flex items-center justify-center px-4 overflow-hidden",children:[u.jsx(Kd,{count:12}),u.jsxs(Nt.form,{onSubmit:m,initial:{opacity:0,y:22},animate:{opacity:1,y:0},transition:{duration:.7,ease:[.22,1,.36,1]},className:"relative z-10 w-full max-w-sm bg-white/90 backdrop-blur rounded-4xl shadow-bloom p-8 border border-blush-100",children:[u.jsxs(Le,{to:"/home",className:"flex flex-col items-center gap-1 mb-6",children:[u.jsx(ft,{className:"text-blush-500",size:32}),u.jsx("span",{className:"font-serif text-xl font-bold text-blush-900",children:"Montvale Florist"})]}),u.jsx("div",{className:"flex gap-2 mb-6 bg-blush-50 rounded-full p-1 text-sm",children:["login","register"].map(g=>u.jsx("button",{type:"button",onClick:()=>{t(g),c("")},className:`flex-1 py-2 rounded-full font-medium transition-colors ${e===g?"bg-blush-500 text-white shadow-petal":"text-blush-700"}`,children:g==="login"?"Sign In":"Create Account"},g))}),u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Username"}),u.jsx("input",{value:n,onChange:g=>r(g.target.value),required:!0,className:"w-full mb-3 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"}),e==="register"&&u.jsxs(u.Fragment,{children:[u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Name"}),u.jsx("input",{value:s,onChange:g=>o(g.target.value),className:"w-full mb-3 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"})]}),u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Password"}),u.jsx("input",{type:"password",value:a,onChange:g=>i(g.target.value),required:!0,className:"w-full mb-4 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"}),l&&u.jsx("p",{className:"text-blush-500 text-xs mb-3",children:l}),u.jsx(Ua,{type:"submit",disabled:f,className:"w-full py-2.5 rounded-full bg-blush-500 text-white font-semibold hover:bg-blush-600 disabled:opacity-60",children:f?"Please wait…":e==="login"?"Sign In":"Create Account"}),u.jsxs("p",{className:"text-center text-[11px] text-[#a08a90] mt-4",children:["Store & owner staff → ",u.jsx("a",{href:"/admin/login",className:"text-blush-600",children:"Admin Console"})]}),u.jsx("p",{className:"text-center text-[11px] text-sage-600 mt-2",children:ke.tagline})]})]})}const EW=["DELIVERY","PRODUCT","PAYMENT","REFUND","OTHER"];function TW(){const e=nn(),t=Kt(),{custToken:n}=bn(),[r,a]=A.useState("DELIVERY"),[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(""),[d,h]=A.useState(""),[p,m]=A.useState("Birthday"),[g,b]=A.useState("Warm"),[y,v]=A.useState(""),[x,w]=A.useState([]),{data:S}=se({queryKey:["cs"],queryFn:eX,enabled:!!n}),j=async E=>{if(E.preventDefault(),h(""),!n){t("/account");return}try{const T=await tX({orderNo:i,category:r,subject:o,content:c});h(T!=null&&T.aiReply?`AI auto-reply: ${T.aiReply}`:"Your request has been submitted."),l(""),f(""),e.invalidateQueries({queryKey:["cs"]})}catch{h("Failed to submit your request.")}},O=async()=>{const E=await uX(p,g,y).catch(()=>null);w((E==null?void 0:E.messages)||[])};return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(jK,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"Customer Support (1:1)"})]}),u.jsxs("div",{className:"bg-petal rounded-2xl p-5 mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2 text-bloom2 font-medium text-sm mb-3",children:[u.jsx(xr,{size:16})," AI Card Message Helper"]}),u.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[u.jsx("input",{value:p,onChange:E=>m(E.target.value),placeholder:"Occasion (e.g. Birthday)",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"}),u.jsx("input",{value:g,onChange:E=>b(E.target.value),placeholder:"Tone",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"}),u.jsx("input",{value:y,onChange:E=>v(E.target.value),placeholder:"Recipient",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"})]}),u.jsx("button",{onClick:O,className:"bg-bloom text-white text-sm font-semibold px-4 py-2 rounded-full",children:"Suggest Messages"}),!!x.length&&u.jsx("ul",{className:"mt-3 space-y-2",children:x.map((E,T)=>u.jsx("li",{className:"bg-white rounded-lg px-3 py-2 text-sm text-gray-700",children:E},T))})]}),u.jsxs("form",{onSubmit:j,className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3 mb-8",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx("select",{value:r,onChange:E=>a(E.target.value),className:"px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:EW.map(E=>u.jsx("option",{value:E,children:E},E))}),u.jsx("input",{value:i,onChange:E=>s(E.target.value),placeholder:"Order number (optional)",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsx("input",{value:o,onChange:E=>l(E.target.value),required:!0,placeholder:"Subject",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("textarea",{value:c,onChange:E=>f(E.target.value),rows:4,required:!0,placeholder:"Tell us how we can help. Our AI will try to answer first.",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),d&&u.jsx("div",{className:"text-sm text-leaf bg-leaf/10 rounded-lg px-3 py-2",children:d}),u.jsxs("button",{className:"flex items-center gap-1.5 bg-bloom text-white font-semibold px-6 py-2.5 rounded-full hover:bg-bloom2",children:[u.jsx(NK,{size:16})," Submit Request"]}),!n&&u.jsxs("p",{className:"text-xs text-gray-400",children:["Please log in to submit a request. ",u.jsx(Le,{to:"/account",className:"text-bloom",children:"Log In"})]})]}),u.jsx("h2",{className:"font-serif text-lg font-bold mb-3",children:"My Requests"}),u.jsxs("div",{className:"space-y-2",children:[(S||[]).map(E=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"font-medium text-sm",children:E.subject}),u.jsx(Ur,{status:E.status})]}),u.jsx("p",{className:"text-sm text-gray-600 mt-1",children:E.content}),E.aiReply&&u.jsxs("div",{className:"mt-2 text-xs text-bloom2 bg-petal rounded-lg px-3 py-2",children:[u.jsx("b",{children:"AI Reply:"})," ",E.aiReply]}),E.itsmSrId&&u.jsxs("div",{className:"text-[11px] text-gray-400 mt-1",children:["ITSM SR: ",E.itsmSrId]})]},E.id)),!(S||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-6 text-center",children:"No requests submitted yet."})]})]})}const o5="https://itsm.zioinfo.co.kr",ub=e=>e==null?void 0:e.replace(/https?:\/\/zioinfo\.co\.kr:8443/g,o5);function NW(){const[e,t]=A.useState(null),[n,r]=A.useState(!0),[a,i]=A.useState(""),[s,o]=A.useState(!1),l=()=>{r(!0),i(""),fetch(`${o5}/api/app/public-latest`).then(f=>f.json()).then(f=>t({...f,qr_url:ub(f.qr_url),landing_url:ub(f.landing_url),download_url:ub(f.download_url)})).catch(()=>i("Unable to connect to the app store. Please try again in a moment.")).finally(()=>r(!1))};A.useEffect(()=>{l()},[]);const c=async()=>{if(e!=null&&e.landing_url)try{await navigator.clipboard.writeText(e.landing_url),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-10",children:[u.jsxs("div",{className:"text-center mb-8",children:[u.jsxs("div",{className:"flex items-center gap-2 justify-center mb-2",children:[u.jsx(bl,{className:"text-bloom",size:26}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-bloom2",children:"Order with the App"})]}),u.jsxs("p",{className:"text-sm text-gray-500",children:["Scan the QR code to open the ",u.jsx("span",{className:"text-bloom font-semibold",children:"GUARDiA Mall"})," customer app install page.",u.jsx("br",{}),"Enjoy same-day delivery alerts, easy reordering, and subscription management right in the app."]})]}),n&&u.jsx("div",{className:"text-center text-gray-400 py-10",children:"Loading…"}),a&&u.jsx("div",{className:"bg-petal border border-blush-100 rounded-2xl p-6 text-center text-blush-500 text-sm",children:a}),!n&&!a&&e&&!e.has_version&&u.jsxs("div",{className:"bg-white border border-blush-100/60 rounded-2xl p-10 text-center text-gray-400",children:[u.jsx(ft,{size:40,className:"mx-auto mb-3 text-bloom/30"}),"No app version has been published yet.",u.jsx("br",{}),u.jsx("span",{className:"text-xs",children:"App uploads and version management are handled in GUARDiA Manager."})]}),!n&&!a&&(e==null?void 0:e.has_version)&&u.jsxs("div",{className:"bg-white border border-blush-100/60 rounded-2xl p-6 grid md:grid-cols-[200px_1fr] gap-6 items-start shadow-sm",children:[u.jsx("div",{className:"bg-petal rounded-2xl p-3 flex items-center justify-center",children:e.qr_url?u.jsx("img",{src:e.qr_url,alt:"App install QR code",className:"w-44 h-44"}):u.jsx(bl,{size:64,className:"text-bloom/40"})}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[u.jsx("span",{className:"text-lg font-bold",children:e.app_name||"GUARDiA Mall"}),u.jsxs("span",{className:"px-2 py-0.5 rounded-md bg-bloom text-white text-xs font-semibold",children:["v",e.version]})]}),u.jsxs("div",{className:"text-xs text-gray-500 mb-4",children:[e.platform," ",e.file_size_mb?`· ${e.file_size_mb}MB`:"",e.download_count!=null&&` · ${e.download_count} downloads`]}),e.release_notes&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-[11px] font-semibold text-gray-400 uppercase tracking-wider mb-1",children:"What's New"}),u.jsx("div",{className:"text-sm text-gray-600 whitespace-pre-line bg-petal rounded-lg p-3 max-h-32 overflow-auto",children:e.release_notes})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.landing_url&&u.jsxs("a",{href:e.landing_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-4 py-2 rounded-full bg-bloom text-white text-sm font-semibold hover:bg-bloom2",children:[u.jsx(hk,{size:15})," Install Page"]}),e.download_url&&u.jsxs("a",{href:e.download_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-4 py-2 rounded-full border border-blush-100 text-bloom2 text-sm hover:bg-petal",children:[u.jsx(dk,{size:15})," Download APK"]}),u.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 px-4 py-2 rounded-full border border-blush-100 text-bloom2 text-sm hover:bg-petal",children:[s?u.jsx(lk,{size:15,className:"text-leaf"}):u.jsx(fk,{size:15}),s?"Copied":"Copy Link"]}),u.jsx("button",{onClick:l,className:"flex items-center gap-1.5 px-3 py-2 rounded-full border border-blush-100 text-gray-500 text-sm hover:bg-petal",children:u.jsx(nj,{size:15})})]})]})]})]})}function CW(){const{t:e}=ni(),[t,n]=A.useState("admin"),[r,a]=A.useState(""),[i,s]=A.useState(""),o=Kt();A.useEffect(()=>(document.documentElement.classList.add("admin-shell"),()=>document.documentElement.classList.remove("admin-shell")),[]);const l=async c=>{var f,d;c.preventDefault(),s("");try{const p=(d=(f=(await Yk(t,r)).data)==null?void 0:f.data)==null?void 0:d.token;if(!p)throw new Error("no token");localStorage.setItem("mall_admin_token",p);const m=await Xk().catch(()=>null);if(m!=null&&m.role&&localStorage.setItem("mall_role",m.role),m!=null&&m.username&&localStorage.setItem("mall_admin_user",m.username),(m==null?void 0:m.role)==="USER"){s(e("admin.login.errNoPriv")),localStorage.removeItem("mall_admin_token");return}o("/admin/dashboard")}catch{s(e("admin.login.errFailed"))}};return u.jsxs("div",{className:"admin-shell min-h-screen flex items-center justify-center bg-ink text-[#e6edf6]",children:[u.jsx("div",{className:"absolute top-5 right-5",children:u.jsx(ag,{variant:"admin"})}),u.jsxs("form",{onSubmit:l,className:"w-[360px] bg-panel border border-edge rounded-2xl p-8",children:[u.jsxs("div",{className:"flex items-center gap-2 justify-center mb-6",children:[u.jsx(ft,{className:"text-brand",size:28}),u.jsx("span",{className:"text-xl font-bold",children:e("admin.login.title")})]}),u.jsx("p",{className:"text-center text-sm text-slate-400 mb-6",children:e("admin.login.subtitle")}),u.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e("admin.login.username")}),u.jsx("input",{value:t,onChange:c=>n(c.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),u.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e("admin.login.password")}),u.jsx("input",{type:"password",value:r,onChange:c=>a(c.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),i&&u.jsx("p",{className:"text-rose-400 text-xs mb-3",children:i}),u.jsx("button",{className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90",children:e("admin.login.signIn")}),u.jsxs("p",{className:"text-center text-[11px] text-slate-500 mt-4",children:[e("admin.login.storefrontHere")," ",u.jsx("a",{href:"/",className:"text-brand",children:e("admin.login.here")})]})]})]})}const _W=[{to:"/admin/dashboard",key:"dashboard",icon:AK,roles:["ADMIN","MANAGER"]},{to:"/admin/stores",key:"stores",icon:Bd,roles:["ADMIN","MANAGER"]},{to:"/admin/products",key:"products",icon:ft,roles:["ADMIN","MANAGER"]},{to:"/admin/inventory",key:"inventory",icon:sk,roles:["ADMIN","MANAGER"]},{to:"/admin/orders",key:"orders",icon:ij,roles:["ADMIN","MANAGER"]},{to:"/admin/transfers",key:"transfers",icon:ik,roles:["ADMIN","MANAGER"]},{to:"/admin/members",key:"members",icon:jk,roles:["ADMIN","MANAGER"]},{to:"/admin/loyalty",key:"loyalty",icon:Mf,roles:["ADMIN","MANAGER"]},{to:"/admin/events",key:"events",icon:Df,roles:["ADMIN","MANAGER"]},{to:"/admin/subscriptions",key:"subscriptions",icon:Qy,roles:["ADMIN","MANAGER"]},{to:"/admin/schedule",key:"schedule",icon:ok,roles:["ADMIN","MANAGER"]},{to:"/admin/analytics",key:"analytics",icon:Jw,roles:["ADMIN","MANAGER"]}],PW=[{to:"/admin/users",key:"users",icon:Sk,roles:["ADMIN"]},{to:"/admin/audit",key:"audit",icon:bk,roles:["ADMIN","MANAGER"]},{to:"/admin/settings",key:"settings",icon:xk,roles:["ADMIN"]},{to:"/admin/app",key:"appInstall",icon:bl,roles:["ADMIN","MANAGER"]}],xT=({isActive:e})=>`flex items-center gap-3 px-5 py-2.5 text-sm transition-colors ${e?"bg-card text-brand border-r-2 border-brand":"text-slate-300 hover:bg-card/60"}`;function MW(){const{t:e}=ni(),t=localStorage.getItem("mall_admin_token"),[n,r]=A.useState(()=>localStorage.getItem("mall_role")||""),[a,i]=A.useState(()=>localStorage.getItem("mall_admin_user")||""),s=Kt();if(A.useEffect(()=>(document.documentElement.classList.add("admin-shell"),()=>document.documentElement.classList.remove("admin-shell")),[]),A.useEffect(()=>{t&&Xk().then(f=>{f!=null&&f.role&&(localStorage.setItem("mall_role",f.role),r(f.role)),f!=null&&f.username&&(localStorage.setItem("mall_admin_user",f.username),i(f.username))}).catch(()=>{})},[t]),!t)return u.jsx(em,{to:"/admin/login",replace:!0});if(n&&n==="USER")return u.jsx(em,{to:"/admin/login",replace:!0});const o=_W.filter(f=>!n||f.roles.includes(n)),l=PW.filter(f=>f.roles.includes(n)),c=()=>{localStorage.removeItem("mall_admin_token"),localStorage.removeItem("mall_role"),localStorage.removeItem("mall_admin_user"),s("/admin/login")};return u.jsxs("div",{className:"admin-shell flex h-screen bg-ink text-[#e6edf6]",children:[u.jsxs("aside",{className:"w-60 bg-panel border-r border-edge flex flex-col",children:[u.jsxs("div",{className:"h-16 flex items-center gap-2 px-5 border-b border-edge",children:[u.jsx(ft,{className:"text-brand",size:22}),u.jsxs("div",{children:[u.jsx("div",{className:"font-bold text-base leading-tight",children:"GUARDiA Mall"}),u.jsx("div",{className:"text-[11px] text-slate-400",children:e("admin.console")})]})]}),u.jsxs("nav",{className:"flex-1 py-2 overflow-auto",children:[o.map(({to:f,key:d,icon:h})=>u.jsxs(tx,{to:f,className:xT,children:[u.jsx(h,{size:18}),e(`admin.nav.${d}`)]},f)),l.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"px-5 pt-4 pb-1.5 text-[10px] font-semibold tracking-wider text-slate-500 uppercase border-t border-edge mt-3",children:e("admin.system")}),l.map(({to:f,key:d,icon:h})=>u.jsxs(tx,{to:f,className:xT,children:[u.jsx(h,{size:18}),e(`admin.nav.${d}`)]},f))]})]}),u.jsx("div",{className:"p-4 text-[11px] text-slate-500 border-t border-edge",children:e("admin.onPremiseTag")})]}),u.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[u.jsxs("header",{className:"h-16 bg-panel border-b border-edge flex items-center justify-between px-6",children:[u.jsx("div",{className:"text-sm text-slate-400 truncate",children:e("admin.header")}),u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(ag,{variant:"admin"}),u.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-slate-300",children:[u.jsx(bK,{size:18})," ",a||"admin"," ",u.jsx("span",{className:"text-[10px] text-brand",children:n})]}),u.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 text-sm text-slate-400 hover:text-brand",children:[u.jsx(gk,{size:16})," ",e("admin.signOut")]})]})]}),u.jsx("main",{className:"flex-1 overflow-auto p-6",children:u.jsx(f$,{})})]})]})}function l5(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t-1}var PZ=_Z,MZ=sg;function RZ(e,t){var n=this.__data__,r=MZ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var DZ=RZ,$Z=gZ,kZ=OZ,LZ=NZ,zZ=PZ,IZ=DZ;function Vc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Ns=function(t){return oo(t)&&t.indexOf("%")===t.length-1},K=function(t){return iee(t)&&!qc(t)},cee=function(t){return me(t)},$t=function(t){return K(t)||oo(t)},uee=0,jo=function(t){var n=++uee;return"".concat(t||"").concat(n)},pn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!K(t)&&!oo(t))return r;var i;if(Ns(t)){var s=t.indexOf("%");i=n*parseFloat(t.slice(0,s))/100}else i=+t;return qc(i)&&(i=r),a&&i>n&&(i=n),i},xi=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},fee=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Cx(e){"@babel/helpers - typeof";return Cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cx(e)}var MT={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Fa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},RT=null,hb=null,Ej=function e(t){if(t===RT&&Array.isArray(hb))return hb;var n=[];return A.Children.forEach(t,function(r){me(r)||(eee.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),hb=n,RT=t,n};function Wn(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Fa(a)}):r=[Fa(t)],Ej(e).forEach(function(a){var i=Xn(a,"type.displayName")||Xn(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function Ln(e,t){var n=Wn(e,t);return n&&n[0]}var DT=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!K(r)||r<=0||!K(a)||a<=0)},bee=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],xee=function(t){return t&&t.type&&oo(t.type)&&bee.indexOf(t.type)>=0},S5=function(t){return t&&Cx(t)==="object"&&"clipDot"in t},See=function(t,n,r,a){var i,s=(i=db==null?void 0:db[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!de(t)&&(a&&s.includes(n)||pee.includes(n))||r&&Oj.includes(n)},ie=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(A.isValidElement(t)&&(a=t.props),!Uc(a))return null;var i={};return Object.keys(a).forEach(function(s){var o;See((o=a)===null||o===void 0?void 0:o[s],s,n,r)&&(i[s]=a[s])}),i},_x=function e(t,n){if(t===n)return!0;var r=A.Children.count(t);if(r!==A.Children.count(n))return!1;if(r===0)return!0;if(r===1)return $T(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Eee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mx(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,s=e.style,o=e.title,l=e.desc,c=Oee(e,Aee),f=a||{width:n,height:r,x:0,y:0},d=ve("recharts-surface",i);return _.createElement("svg",Px({},ie(c,!0,"svg"),{className:d,width:n,height:r,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),_.createElement("title",null,o),_.createElement("desc",null,l),t)}var Tee=["children","className"];function Rx(){return Rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ae=_.forwardRef(function(e,t){var n=e.children,r=e.className,a=Nee(e,Tee),i=ve("recharts-layer",r);return _.createElement("g",Rx({className:i},ie(a,!0),{ref:t}),n)}),kr=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;ia?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r=r?e:Mee(e,t,n)}var Dee=Ree,$ee="\\ud800-\\udfff",kee="\\u0300-\\u036f",Lee="\\ufe20-\\ufe2f",zee="\\u20d0-\\u20ff",Iee=kee+Lee+zee,Bee="\\ufe0e\\ufe0f",Uee="\\u200d",Fee=RegExp("["+Uee+$ee+Iee+Bee+"]");function Vee(e){return Fee.test(e)}var w5=Vee;function Hee(e){return e.split("")}var qee=Hee,j5="\\ud800-\\udfff",Kee="\\u0300-\\u036f",Gee="\\ufe20-\\ufe2f",Yee="\\u20d0-\\u20ff",Xee=Kee+Gee+Yee,Wee="\\ufe0e\\ufe0f",Qee="["+j5+"]",Dx="["+Xee+"]",$x="\\ud83c[\\udffb-\\udfff]",Zee="(?:"+Dx+"|"+$x+")",A5="[^"+j5+"]",O5="(?:\\ud83c[\\udde6-\\uddff]){2}",E5="[\\ud800-\\udbff][\\udc00-\\udfff]",Jee="\\u200d",T5=Zee+"?",N5="["+Wee+"]?",ete="(?:"+Jee+"(?:"+[A5,O5,E5].join("|")+")"+N5+T5+")*",tte=N5+T5+ete,nte="(?:"+[A5+Dx+"?",Dx,O5,E5,Qee].join("|")+")",rte=RegExp($x+"(?="+$x+")|"+nte+tte,"g");function ate(e){return e.match(rte)||[]}var ite=ate,ste=qee,ote=w5,lte=ite;function cte(e){return ote(e)?lte(e):ste(e)}var ute=cte,fte=Dee,dte=w5,hte=ute,pte=m5;function mte(e){return function(t){t=pte(t);var n=dte(t)?hte(t):void 0,r=n?n[0]:t.charAt(0),a=n?fte(n,1).join(""):t.slice(1);return r[e]()+a}}var yte=mte,gte=yte,vte=gte("toUpperCase"),bte=vte;const xg=Ie(bte);function Qe(e){return function(){return e}}const C5=Math.cos,vm=Math.sin,Fr=Math.sqrt,bm=Math.PI,Sg=2*bm,kx=Math.PI,Lx=2*kx,xs=1e-6,xte=Lx-xs;function _5(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return _5;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;axs)if(!(Math.abs(d*l-c*f)>xs)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-s,m=a-o,g=l*l+c*c,b=p*p+m*m,y=Math.sqrt(g),v=Math.sqrt(h),x=i*Math.tan((kx-Math.acos((g+h-b)/(2*y*v)))/2),w=x/v,S=x/y;Math.abs(w-1)>xs&&this._append`L${t+w*f},${n+w*d}`,this._append`A${i},${i},0,0,${+(d*p>f*m)},${this._x1=t+S*l},${this._y1=n+S*c}`}}arc(t,n,r,a,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(a),l=r*Math.sin(a),c=t+o,f=n+l,d=1^s,h=s?a-i:i-a;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>xs||Math.abs(this._y1-f)>xs)&&this._append`L${c},${f}`,r&&(h<0&&(h=h%Lx+Lx),h>xte?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=f}`:h>xs&&this._append`A${r},${r},0,${+(h>=kx)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function Tj(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new wte(t)}function Nj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function P5(e){this._context=e}P5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function wg(e){return new P5(e)}function M5(e){return e[0]}function R5(e){return e[1]}function D5(e,t){var n=Qe(!0),r=null,a=wg,i=null,s=Tj(o);e=typeof e=="function"?e:e===void 0?M5:Qe(e),t=typeof t=="function"?t:t===void 0?R5:Qe(t);function o(l){var c,f=(l=Nj(l)).length,d,h=!1,p;for(r==null&&(i=a(p=s())),c=0;c<=f;++c)!(c=p;--m)o.point(x[m],w[m]);o.lineEnd(),o.areaEnd()}y&&(x[h]=+e(b,h,d),w[h]=+t(b,h,d),o.point(r?+r(b,h,d):x[h],n?+n(b,h,d):w[h]))}if(v)return o=null,v+""||null}function f(){return D5().defined(a).curve(s).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Qe(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Qe(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Qe(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:Qe(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Qe(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Qe(+d),c):n},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(n)},c.lineX1=function(){return f().x(r).y(t)},c.defined=function(d){return arguments.length?(a=typeof d=="function"?d:Qe(!!d),c):a},c.curve=function(d){return arguments.length?(s=d,i!=null&&(o=s(i)),c):s},c.context=function(d){return arguments.length?(d==null?i=o=null:o=s(i=d),c):i},c}class $5{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function jte(e){return new $5(e,!0)}function Ate(e){return new $5(e,!1)}const Cj={draw(e,t){const n=Fr(t/bm);e.moveTo(n,0),e.arc(0,0,n,0,Sg)}},Ote={draw(e,t){const n=Fr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},k5=Fr(1/3),Ete=k5*2,Tte={draw(e,t){const n=Fr(t/Ete),r=n*k5;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Nte={draw(e,t){const n=Fr(t),r=-n/2;e.rect(r,r,n,n)}},Cte=.8908130915292852,L5=vm(bm/10)/vm(7*bm/10),_te=vm(Sg/10)*L5,Pte=-C5(Sg/10)*L5,Mte={draw(e,t){const n=Fr(t*Cte),r=_te*n,a=Pte*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const s=Sg*i/5,o=C5(s),l=vm(s);e.lineTo(l*n,-o*n),e.lineTo(o*r-l*a,l*r+o*a)}e.closePath()}},pb=Fr(3),Rte={draw(e,t){const n=-Fr(t/(pb*3));e.moveTo(0,n*2),e.lineTo(-pb*n,-n),e.lineTo(pb*n,-n),e.closePath()}},nr=-.5,rr=Fr(3)/2,zx=1/Fr(12),Dte=(zx/2+1)*3,$te={draw(e,t){const n=Fr(t/Dte),r=n/2,a=n*zx,i=r,s=n*zx+n,o=-i,l=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(o,l),e.lineTo(nr*r-rr*a,rr*r+nr*a),e.lineTo(nr*i-rr*s,rr*i+nr*s),e.lineTo(nr*o-rr*l,rr*o+nr*l),e.lineTo(nr*r+rr*a,nr*a-rr*r),e.lineTo(nr*i+rr*s,nr*s-rr*i),e.lineTo(nr*o+rr*l,nr*l-rr*o),e.closePath()}};function kte(e,t){let n=null,r=Tj(a);e=typeof e=="function"?e:Qe(e||Cj),t=typeof t=="function"?t:Qe(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Qe(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Qe(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function xm(){}function Sm(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function z5(e){this._context=e}z5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Sm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lte(e){return new z5(e)}function I5(e){this._context=e}I5.prototype={areaStart:xm,areaEnd:xm,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zte(e){return new I5(e)}function B5(e){this._context=e}B5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ite(e){return new B5(e)}function U5(e){this._context=e}U5.prototype={areaStart:xm,areaEnd:xm,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Bte(e){return new U5(e)}function LT(e){return e<0?-1:1}function zT(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return(LT(i)+LT(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function IT(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function mb(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function wm(e){this._context=e}wm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mb(this,this._t0,IT(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,mb(this,IT(this,n=zT(this,e,t)),n);break;default:mb(this,this._t0,n=zT(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function F5(e){this._context=new V5(e)}(F5.prototype=Object.create(wm.prototype)).point=function(e,t){wm.prototype.point.call(this,t,e)};function V5(e){this._context=e}V5.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function Ute(e){return new wm(e)}function Fte(e){return new F5(e)}function H5(e){this._context=e}H5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=BT(e),a=BT(t),i=0,s=1;s=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Hte(e){return new jg(e,.5)}function qte(e){return new jg(e,0)}function Kte(e){return new jg(e,1)}function Jl(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,o=i.length;n=0;)n[t]=t;return n}function Gte(e,t){return e[t]}function Yte(e){const t=[];return t.key=e,t}function Xte(){var e=Qe([]),t=Ix,n=Jl,r=Gte;function a(i){var s=Array.from(e.apply(this,arguments),Yte),o,l=s.length,c=-1,f;for(const d of i)for(o=0,++c;o0){for(var n,r,a=0,i=e[0].length,s;a0){for(var n=0,r=e[t[0]],a,i=r.length;n0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ane(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var q5={symbolCircle:Cj,symbolCross:Ote,symbolDiamond:Tte,symbolSquare:Nte,symbolStar:Mte,symbolTriangle:Rte,symbolWye:$te},ine=Math.PI/180,sne=function(t){var n="symbol".concat(xg(t));return q5[n]||Cj},one=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*ine;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},lne=function(t,n){q5["symbol".concat(xg(t))]=n},_j=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,s=t.sizeType,o=s===void 0?"area":s,l=rne(t,Jte),c=FT(FT({},l),{},{type:r,size:i,sizeType:o}),f=function(){var b=sne(r),y=kte().type(b).size(one(i,o,r));return y()},d=c.className,h=c.cx,p=c.cy,m=ie(c,!0);return h===+h&&p===+p&&i===+i?_.createElement("path",Bx({},m,{className:ve("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(p,")"),d:f()})):null};_j.registerSymbol=lne;function ec(e){"@babel/helpers - typeof";return ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(e)}function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var v=p.inactive?c:p.color;return _.createElement("li",Ux({className:b,style:d,key:"legend-item-".concat(m)},lo(r.props,p,m)),_.createElement(Mx,{width:s,height:s,viewBox:f,style:h},r.renderIcon(p)),_.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},g?g(y,p,m):y))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,s=r.align;if(!a||!a.length)return null;var o={padding:0,margin:0,textAlign:i==="horizontal"?s:"left"};return _.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(A.PureComponent);kf(Pj,"displayName","Legend");kf(Pj,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var vne=og;function bne(){this.__data__=new vne,this.size=0}var xne=bne;function Sne(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var wne=Sne;function jne(e){return this.__data__.get(e)}var Ane=jne;function One(e){return this.__data__.has(e)}var Ene=One,Tne=og,Nne=vj,Cne=bj,_ne=200;function Pne(e,t){var n=this.__data__;if(n instanceof Tne){var r=n.__data__;if(!Nne||r.length<_ne-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Cne(r)}return n.set(e,t),this.size=n.size,this}var Mne=Pne,Rne=og,Dne=xne,$ne=wne,kne=Ane,Lne=Ene,zne=Mne;function Kc(e){var t=this.__data__=new Rne(e);this.size=t.size}Kc.prototype.clear=Dne;Kc.prototype.delete=$ne;Kc.prototype.get=kne;Kc.prototype.has=Lne;Kc.prototype.set=zne;var Y5=Kc,Ine="__lodash_hash_undefined__";function Bne(e){return this.__data__.set(e,Ine),this}var Une=Bne;function Fne(e){return this.__data__.has(e)}var Vne=Fne,Hne=bj,qne=Une,Kne=Vne;function Am(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Hne;++to))return!1;var c=i.get(e),f=i.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=n&Jne?new Xne:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=rae}var $j=aae,iae=ri,sae=$j,oae=ai,lae="[object Arguments]",cae="[object Array]",uae="[object Boolean]",fae="[object Date]",dae="[object Error]",hae="[object Function]",pae="[object Map]",mae="[object Number]",yae="[object Object]",gae="[object RegExp]",vae="[object Set]",bae="[object String]",xae="[object WeakMap]",Sae="[object ArrayBuffer]",wae="[object DataView]",jae="[object Float32Array]",Aae="[object Float64Array]",Oae="[object Int8Array]",Eae="[object Int16Array]",Tae="[object Int32Array]",Nae="[object Uint8Array]",Cae="[object Uint8ClampedArray]",_ae="[object Uint16Array]",Pae="[object Uint32Array]",tt={};tt[jae]=tt[Aae]=tt[Oae]=tt[Eae]=tt[Tae]=tt[Nae]=tt[Cae]=tt[_ae]=tt[Pae]=!0;tt[lae]=tt[cae]=tt[Sae]=tt[uae]=tt[wae]=tt[fae]=tt[dae]=tt[hae]=tt[pae]=tt[mae]=tt[yae]=tt[gae]=tt[vae]=tt[bae]=tt[xae]=!1;function Mae(e){return oae(e)&&sae(e.length)&&!!tt[iae(e)]}var Rae=Mae;function Dae(e){return function(t){return e(t)}}var n4=Dae,Em={exports:{}};Em.exports;(function(e,t){var n=c5,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i&&n.process,o=function(){try{var l=a&&a.require&&a.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(Em,Em.exports);var $ae=Em.exports,kae=Rae,Lae=n4,XT=$ae,WT=XT&&XT.isTypedArray,zae=WT?Lae(WT):kae,r4=zae,Iae=Fre,Bae=Rj,Uae=Mn,Fae=t4,Vae=Dj,Hae=r4,qae=Object.prototype,Kae=qae.hasOwnProperty;function Gae(e,t){var n=Uae(e),r=!n&&Bae(e),a=!n&&!r&&Fae(e),i=!n&&!r&&!a&&Hae(e),s=n||r||a||i,o=s?Iae(e.length,String):[],l=o.length;for(var c in e)(t||Kae.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vae(c,l)))&&o.push(c);return o}var Yae=Gae,Xae=Object.prototype;function Wae(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Xae;return e===n}var Qae=Wae;function Zae(e,t){return function(n){return e(t(n))}}var a4=Zae,Jae=a4,eie=Jae(Object.keys,Object),tie=eie,nie=Qae,rie=tie,aie=Object.prototype,iie=aie.hasOwnProperty;function sie(e){if(!nie(e))return rie(e);var t=[];for(var n in Object(e))iie.call(e,n)&&n!="constructor"&&t.push(n);return t}var oie=sie,lie=yj,cie=$j;function uie(e){return e!=null&&cie(e.length)&&!lie(e)}var Yd=uie,fie=Yae,die=oie,hie=Yd;function pie(e){return hie(e)?fie(e):die(e)}var Ag=pie,mie=_re,yie=Bre,gie=Ag;function vie(e){return mie(e,gie,yie)}var bie=vie,QT=bie,xie=1,Sie=Object.prototype,wie=Sie.hasOwnProperty;function jie(e,t,n,r,a,i){var s=n&xie,o=QT(e),l=o.length,c=QT(t),f=c.length;if(l!=f&&!s)return!1;for(var d=l;d--;){var h=o[d];if(!(s?h in t:wie.call(t,h)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var b=s;++d-1}var Soe=xoe;function woe(e,t,n){for(var r=-1,a=e==null?0:e.length;++r=Loe){var c=t?null:$oe(e);if(c)return koe(c);s=!1,a=Doe,l=new Poe}else l=t?[]:o;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Joe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ele(e){return e.value}function tle(e,t){if(_.isValidElement(e))return _.cloneElement(e,t);if(typeof e=="function")return _.createElement(e,t);t.ref;var n=Zoe(t,Hoe);return _.createElement(Pj,n)}var hN=1,Jr=function(e){function t(){var n;qoe(this,t);for(var r=arguments.length,a=new Array(r),i=0;ihN||Math.abs(a.height-this.lastBoundingBox.height)>hN)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Sa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,s=a.align,o=a.verticalAlign,l=a.margin,c=a.chartWidth,f=a.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((c||0)-p.width)/2}}else d=s==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var m=this.getBBoxSnapshot();h={top:((f||0)-m.height)/2}}else h=o==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Sa(Sa({},d),h)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,s=a.width,o=a.height,l=a.wrapperStyle,c=a.payloadUniqBy,f=a.payload,d=Sa(Sa({position:"absolute",width:s||"auto",height:o||"auto"},this.getDefaultPosition(l)),l);return _.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},tle(i,Sa(Sa({},this.props),{},{payload:f4(f,c,ele)})))}}],[{key:"getWithHeight",value:function(r,a){var i=Sa(Sa({},this.defaultProps),r.props),s=i.layout;return s==="vertical"&&K(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||a}:null}}])}(A.PureComponent);Og(Jr,"displayName","Legend");Og(Jr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var pN=Gd,nle=Rj,rle=Mn,mN=pN?pN.isConcatSpreadable:void 0;function ale(e){return rle(e)||nle(e)||!!(mN&&e&&e[mN])}var ile=ale,sle=J5,ole=ile;function p4(e,t,n,r,a){var i=-1,s=e.length;for(n||(n=ole),a||(a=[]);++i0&&n(o)?t>1?p4(o,t-1,n,r,a):sle(a,o):r||(a[a.length]=o)}return a}var m4=p4;function lle(e){return function(t,n,r){for(var a=-1,i=Object(t),s=r(t),o=s.length;o--;){var l=s[e?o:++a];if(n(i[l],l,i)===!1)break}return t}}var cle=lle,ule=cle,fle=ule(),dle=fle,hle=dle,ple=Ag;function mle(e,t){return e&&hle(e,t,ple)}var y4=mle,yle=Yd;function gle(e,t){return function(n,r){if(n==null)return n;if(!yle(n))return e(n,r);for(var a=n.length,i=t?a:-1,s=Object(n);(t?i--:++it||i&&s&&l&&!o&&!c||r&&s&&l||!n&&l||!a)return 1;if(!r&&!i&&!c&&e=o)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var Ple=_le,bb=Sj,Mle=wj,Rle=ha,Dle=g4,$le=Ele,kle=n4,Lle=Ple,zle=Yc,Ile=Mn;function Ble(e,t,n){t.length?t=bb(t,function(i){return Ile(i)?function(s){return Mle(s,i.length===1?i[0]:i)}:i}):t=[zle];var r=-1;t=bb(t,kle(Rle));var a=Dle(e,function(i,s,o){var l=bb(t,function(c){return c(i)});return{criteria:l,index:++r,value:i}});return $le(a,function(i,s){return Lle(i,s,n)})}var Ule=Ble;function Fle(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Vle=Fle,Hle=Vle,gN=Math.max;function qle(e,t,n){return t=gN(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=gN(r.length-t,0),s=Array(i);++a0){if(++t>=tce)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ice=ace,sce=ece,oce=ice,lce=oce(sce),cce=lce,uce=Yc,fce=Kle,dce=cce;function hce(e,t){return dce(fce(e,t,uce),e+"")}var pce=hce,mce=gj,yce=Yd,gce=Dj,vce=rs;function bce(e,t,n){if(!vce(n))return!1;var r=typeof t;return(r=="number"?yce(n)&&gce(t,n.length):r=="string"&&t in n)?mce(n[t],e):!1}var Eg=bce,xce=m4,Sce=Ule,wce=pce,bN=Eg,jce=wce(function(e,t){if(e==null)return[];var n=t.length;return n>1&&bN(e,t[0],t[1])?t=[]:n>2&&bN(t[0],t[1],t[2])&&(t=[t[0]]),Sce(e,xce(t,1),[])}),Ace=jce;const zj=Ie(Ace);function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function Xx(){return Xx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(hu,"-left"),K(n)&&t&&K(t.x)&&n=t.y),"".concat(hu,"-top"),K(r)&&t&&K(t.y)&&rg?Math.max(f,l[r]):Math.max(d,l[r])}function Ice(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Bce(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipBox,o=e.useTranslate3d,l=e.viewBox,c,f,d;return s.height>0&&s.width>0&&n?(f=wN({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),d=wN({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),c=Ice({translateX:f,translateY:d,useTranslate3d:o})):c=Lce,{cssProperties:c,cssClasses:zce({translateX:f,translateY:d,coordinate:n})}}function nc(e){"@babel/helpers - typeof";return nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nc(e)}function jN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function AN(e){for(var t=1;tON||Math.abs(r.height-this.state.lastBoundingBox.height)>ON)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,o=a.animationDuration,l=a.animationEasing,c=a.children,f=a.coordinate,d=a.hasPayload,h=a.isAnimationActive,p=a.offset,m=a.position,g=a.reverseDirection,b=a.useTranslate3d,y=a.viewBox,v=a.wrapperStyle,x=Bce({allowEscapeViewBox:s,coordinate:f,offsetTopLeft:p,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:y}),w=x.cssClasses,S=x.cssProperties,j=AN(AN({transition:h&&i?"transform ".concat(o,"ms ").concat(l):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},v);return _.createElement("div",{tabIndex:-1,className:w,style:j,ref:function(E){r.wrapperNode=E}},c)}}])}(A.PureComponent),Wce=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},as={isSsr:Wce()};function rc(e){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}function EN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function TN(e){for(var t=1;t0;return _.createElement(Xce,{allowEscapeViewBox:s,animationDuration:o,animationEasing:l,isAnimationActive:h,active:i,coordinate:f,hasPayload:j,offset:p,position:b,reverseDirection:y,useTranslate3d:v,viewBox:x,wrapperStyle:w},sue(c,TN(TN({},this.props),{},{payload:S})))}}])}(A.PureComponent);Ij(Bn,"displayName","Tooltip");Ij(Bn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!as.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var oue=da,lue=function(){return oue.Date.now()},cue=lue,uue=/\s/;function fue(e){for(var t=e.length;t--&&uue.test(e.charAt(t)););return t}var due=fue,hue=due,pue=/^\s+/;function mue(e){return e&&e.slice(0,hue(e)+1).replace(pue,"")}var yue=mue,gue=yue,NN=rs,vue=Bc,CN=NaN,bue=/^[-+]0x[0-9a-f]+$/i,xue=/^0b[01]+$/i,Sue=/^0o[0-7]+$/i,wue=parseInt;function jue(e){if(typeof e=="number")return e;if(vue(e))return CN;if(NN(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=NN(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gue(e);var n=xue.test(e);return n||Sue.test(e)?wue(e.slice(2),n?2:8):bue.test(e)?CN:+e}var j4=jue,Aue=rs,Sb=cue,_N=j4,Oue="Expected a function",Eue=Math.max,Tue=Math.min;function Nue(e,t,n){var r,a,i,s,o,l,c=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Oue);t=_N(t)||0,Aue(n)&&(f=!!n.leading,d="maxWait"in n,i=d?Eue(_N(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(j){var O=r,E=a;return r=a=void 0,c=j,s=e.apply(E,O),s}function m(j){return c=j,o=setTimeout(y,t),f?p(j):s}function g(j){var O=j-l,E=j-c,T=t-O;return d?Tue(T,i-E):T}function b(j){var O=j-l,E=j-c;return l===void 0||O>=t||O<0||d&&E>=i}function y(){var j=Sb();if(b(j))return v(j);o=setTimeout(y,g(j))}function v(j){return o=void 0,h&&r?p(j):(r=a=void 0,s)}function x(){o!==void 0&&clearTimeout(o),c=0,r=l=a=o=void 0}function w(){return o===void 0?s:v(Sb())}function S(){var j=Sb(),O=b(j);if(r=arguments,a=this,l=j,O){if(o===void 0)return m(l);if(d)return clearTimeout(o),o=setTimeout(y,t),p(l)}return o===void 0&&(o=setTimeout(y,t)),s}return S.cancel=x,S.flush=w,S}var Cue=Nue,_ue=Cue,Pue=rs,Mue="Expected a function";function Rue(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(Mue);return Pue(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),_ue(e,t,{leading:r,maxWait:t,trailing:a})}var Due=Rue;const A4=Ie(Due);function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function PN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Dh(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(L=A4(L,g,{trailing:!0,leading:!1}));var D=new ResizeObserver(L),$=S.current.getBoundingClientRect(),P=$.width,k=$.height;return M(P,k),D.observe(S.current),function(){D.disconnect()}},[M,g]);var C=A.useMemo(function(){var L=T.containerWidth,D=T.containerHeight;if(L<0||D<0)return null;kr(Ns(s)||Ns(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,s,l),kr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var $=Ns(s)?L:s,P=Ns(l)?D:l;n&&n>0&&($?P=$/n:P&&($=P*n),h&&P>h&&(P=h)),kr($>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,$,P,s,l,f,d,n);var k=!Array.isArray(p)&&Fa(p.type).endsWith("Chart");return _.Children.map(p,function(I){return _.isValidElement(I)?A.cloneElement(I,Dh({width:$,height:P},k?{style:Dh({height:"100%",width:"100%",maxHeight:P,maxWidth:$},I.props.style)}:{})):I})},[n,p,l,h,d,f,T,s]);return _.createElement("div",{id:b?"".concat(b):void 0,className:ve("recharts-responsive-container",y),style:Dh(Dh({},w),{},{width:s,height:l,minWidth:f,minHeight:d,maxHeight:h}),ref:S},C)}),Tg=function(t){return null};Tg.displayName="Cell";function Bf(e){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(e)}function RN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Jx(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||as.isSsr)return{width:0,height:0};var r=Yue(n),a=JSON.stringify({text:t,copyStyle:r});if(Ro.widthCache[a])return Ro.widthCache[a];try{var i=document.getElementById(DN);i||(i=document.createElement("span"),i.setAttribute("id",DN),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var s=Jx(Jx({},Gue),r);Object.assign(i.style,s),i.textContent="".concat(t);var o=i.getBoundingClientRect(),l={width:o.width,height:o.height};return Ro.widthCache[a]=l,++Ro.cacheCount>Kue&&(Ro.cacheCount=0,Ro.widthCache={}),l}catch{return{width:0,height:0}}},Xue=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Uf(e){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uf(e)}function _m(e,t){return Jue(e)||Zue(e,t)||Que(e,t)||Wue()}function Wue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Que(e,t){if(e){if(typeof e=="string")return $N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $N(e,t)}}function $N(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function UN(e,t){return gfe(e)||yfe(e,t)||mfe(e,t)||pfe()}function pfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mfe(e,t){if(e){if(typeof e=="string")return FN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FN(e,t)}}function FN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(P,k){var I=k.word,F=k.width,H=P[P.length-1];if(H&&(a==null||i||H.width+F+rk.width?P:k})};if(!f)return p;for(var g="…",b=function($){var P=d.slice(0,$),k=N4({breakAll:c,style:l,children:P+g}).wordsWithComputedWidth,I=h(k),F=I.length>s||m(I).width>Number(a);return[F,I]},y=0,v=d.length-1,x=0,w;y<=v&&x<=d.length-1;){var S=Math.floor((y+v)/2),j=S-1,O=b(j),E=UN(O,2),T=E[0],N=E[1],M=b(S),C=UN(M,1),L=C[0];if(!T&&!L&&(y=S+1),T&&L&&(v=S-1),!T&&L){w=N;break}x++}return w||p},VN=function(t){var n=me(t)?[]:t.toString().split(T4);return[{words:n}]},bfe=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,s=t.breakAll,o=t.maxLines;if((n||r)&&!as.isSsr){var l,c,f=N4({breakAll:s,children:a,style:i});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;l=d,c=h}else return VN(a);return vfe({breakAll:s,children:a,maxLines:o,style:i},l,c,n,r)}return VN(a)},HN="#808080",co=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,s=t.lineHeight,o=s===void 0?"1em":s,l=t.capHeight,c=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,g=m===void 0?"end":m,b=t.fill,y=b===void 0?HN:b,v=BN(t,ffe),x=A.useMemo(function(){return bfe({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:d,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,d,v.style,v.width]),w=v.dx,S=v.dy,j=v.angle,O=v.className,E=v.breakAll,T=BN(v,dfe);if(!$t(r)||!$t(i))return null;var N=r+(K(w)?w:0),M=i+(K(S)?S:0),C;switch(g){case"start":C=wb("calc(".concat(c,")"));break;case"middle":C=wb("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(c," / 2))"));break;default:C=wb("calc(".concat(x.length-1," * -").concat(o,")"));break}var L=[];if(d){var D=x[0].width,$=v.width;L.push("scale(".concat((K($)?$/D:1)/D,")"))}return j&&L.push("rotate(".concat(j,", ").concat(N,", ").concat(M,")")),L.length&&(T.transform=L.join(" ")),_.createElement("text",e1({},ie(T,!0),{x:N,y:M,className:ve("recharts-text",O),textAnchor:p,fill:y.includes("url")?HN:y}),x.map(function(P,k){var I=P.words.join(E?"":" ");return _.createElement("tspan",{x:N,dy:k===0?C:o,key:"".concat(I,"-").concat(k)},I)}))};function Ki(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function xfe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Bj(e){let t,n,r;e.length!==2?(t=Ki,n=(o,l)=>Ki(e(o),l),r=(o,l)=>e(o)-l):(t=e===Ki||e===xfe?e:Sfe,n=e,r=e);function a(o,l,c=0,f=o.length){if(c>>1;n(o[d],l)<0?c=d+1:f=d}while(c>>1;n(o[d],l)<=0?c=d+1:f=d}while(cc&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:a,center:s,right:i}}function Sfe(){return 0}function C4(e){return e===null?NaN:+e}function*wfe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const jfe=Bj(Ki),Xd=jfe.right;Bj(C4).center;class qN extends Map{constructor(t,n=Efe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(KN(this,t))}has(t){return super.has(KN(this,t))}set(t,n){return super.set(Afe(this,t),n)}delete(t){return super.delete(Ofe(this,t))}}function KN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Afe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Ofe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Efe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Tfe(e=Ki){if(e===Ki)return _4;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function _4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Nfe=Math.sqrt(50),Cfe=Math.sqrt(10),_fe=Math.sqrt(2);function Pm(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),s=i>=Nfe?10:i>=Cfe?5:i>=_fe?2:1;let o,l,c;return a<0?(c=Math.pow(10,-a)/s,o=Math.round(e*c),l=Math.round(t*c),o/ct&&--l,c=-c):(c=Math.pow(10,a)*s,o=Math.round(e/c),l=Math.round(t/c),o*ct&&--l),l0))return[];if(e===t)return[e];const r=t=a))return[];const o=i-a+1,l=new Array(o);if(r)if(s<0)for(let c=0;c=r)&&(n=r);return n}function YN(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function P4(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?_4:Tfe(a);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+h)),m=Math.min(r,Math.floor(t+(l-c)*d/l+h));P4(e,t,p,m,a)}const i=e[t];let s=n,o=r;for(pu(e,n,t),a(e[r],i)>0&&pu(e,n,r);s0;)--o}a(e[n],i)===0?pu(e,n,o):(++o,pu(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function pu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Pfe(e,t,n){if(e=Float64Array.from(wfe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return YN(e);if(t>=1)return GN(e);var r,a=(r-1)*t,i=Math.floor(a),s=GN(P4(e,i).subarray(0,i+1)),o=YN(e.subarray(i+1));return s+(o-s)*(a-i)}}function Mfe(e,t,n=C4){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return s+(o-s)*(a-i)}}function Rfe(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Lh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Lh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$fe.exec(e))?new Tn(t[1],t[2],t[3],1):(t=kfe.exec(e))?new Tn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Lfe.exec(e))?Lh(t[1],t[2],t[3],t[4]):(t=zfe.exec(e))?Lh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ife.exec(e))?tC(t[1],t[2]/100,t[3]/100,1):(t=Bfe.exec(e))?tC(t[1],t[2]/100,t[3]/100,t[4]):XN.hasOwnProperty(e)?ZN(XN[e]):e==="transparent"?new Tn(NaN,NaN,NaN,0):null}function ZN(e){return new Tn(e>>16&255,e>>8&255,e&255,1)}function Lh(e,t,n,r){return r<=0&&(e=t=n=NaN),new Tn(e,t,n,r)}function Vfe(e){return e instanceof Wd||(e=qf(e)),e?(e=e.rgb(),new Tn(e.r,e.g,e.b,e.opacity)):new Tn}function i1(e,t,n,r){return arguments.length===1?Vfe(e):new Tn(e,t,n,r??1)}function Tn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Fj(Tn,i1,R4(Wd,{brighter(e){return e=e==null?Mm:Math.pow(Mm,e),new Tn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Vf:Math.pow(Vf,e),new Tn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Tn(Xs(this.r),Xs(this.g),Xs(this.b),Rm(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JN,formatHex:JN,formatHex8:Hfe,formatRgb:eC,toString:eC}));function JN(){return`#${Cs(this.r)}${Cs(this.g)}${Cs(this.b)}`}function Hfe(){return`#${Cs(this.r)}${Cs(this.g)}${Cs(this.b)}${Cs((isNaN(this.opacity)?1:this.opacity)*255)}`}function eC(){const e=Rm(this.opacity);return`${e===1?"rgb(":"rgba("}${Xs(this.r)}, ${Xs(this.g)}, ${Xs(this.b)}${e===1?")":`, ${e})`}`}function Rm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cs(e){return e=Xs(e),(e<16?"0":"")+e.toString(16)}function tC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Dr(e,t,n,r)}function D4(e){if(e instanceof Dr)return new Dr(e.h,e.s,e.l,e.opacity);if(e instanceof Wd||(e=qf(e)),!e)return new Dr;if(e instanceof Dr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,l=(i+a)/2;return o?(t===i?s=(n-r)/o+(n0&&l<1?0:s,new Dr(s,o,l,e.opacity)}function qfe(e,t,n,r){return arguments.length===1?D4(e):new Dr(e,t,n,r??1)}function Dr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fj(Dr,qfe,R4(Wd,{brighter(e){return e=e==null?Mm:Math.pow(Mm,e),new Dr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Vf:Math.pow(Vf,e),new Dr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Tn(jb(e>=240?e-240:e+120,a,r),jb(e,a,r),jb(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Dr(nC(this.h),zh(this.s),zh(this.l),Rm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Rm(this.opacity);return`${e===1?"hsl(":"hsla("}${nC(this.h)}, ${zh(this.s)*100}%, ${zh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function nC(e){return e=(e||0)%360,e<0?e+360:e}function zh(e){return Math.max(0,Math.min(1,e||0))}function jb(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Vj=e=>()=>e;function Kfe(e,t){return function(n){return e+n*t}}function Gfe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Yfe(e){return(e=+e)==1?$4:function(t,n){return n-t?Gfe(t,n,e):Vj(isNaN(t)?n:t)}}function $4(e,t){var n=t-e;return n?Kfe(e,n):Vj(isNaN(e)?t:e)}const rC=function e(t){var n=Yfe(t);function r(a,i){var s=n((a=i1(a)).r,(i=i1(i)).r),o=n(a.g,i.g),l=n(a.b,i.b),c=$4(a.opacity,i.opacity);return function(f){return a.r=s(f),a.g=o(f),a.b=l(f),a.opacity=c(f),a+""}}return r.gamma=e,r}(1);function Xfe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;an&&(i=t.slice(n,i),o[s]?o[s]+=i:o[++s]=i),(r=r[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,l.push({i:s,x:Dm(r,a)})),n=Ab.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function sde(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a2?ode:sde,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?i:(l||(l=o(e.map(r),t,n)))(r(s(h)))}return d.invert=function(h){return s(a((c||(c=o(t,e.map(r),Dm)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,$m),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Hj,f()},d.clamp=function(h){return arguments.length?(s=h?!0:mn,f()):s!==mn},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(i=h,d):i},function(h,p){return r=h,a=p,f()}}function qj(){return Ng()(mn,mn)}function lde(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function km(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ac(e){return e=km(Math.abs(e)),e?e[1]:NaN}function cde(e,t){return function(n,r){for(var a=n.length,i=[],s=0,o=e[0],l=0;a>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),i.push(n.substring(a-=o,a+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function ude(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var fde=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kf(e){if(!(t=fde.exec(e)))throw new Error("invalid format: "+e);var t;return new Kj({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Kf.prototype=Kj.prototype;function Kj(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Kj.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function dde(e){e:for(var t=e.length,n=1,r=-1,a;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var Lm;function hde(e,t){var n=km(e,t);if(!n)return Lm=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(Lm=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+km(e,Math.max(0,t+i-1))[0]}function iC(e,t){var n=km(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const sC={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:lde,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>iC(e*100,t),r:iC,s:hde,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function oC(e){return e}var lC=Array.prototype.map,cC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pde(e){var t=e.grouping===void 0||e.thousands===void 0?oC:cde(lC.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?oC:ude(lC.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d,h){d=Kf(d);var p=d.fill,m=d.align,g=d.sign,b=d.symbol,y=d.zero,v=d.width,x=d.comma,w=d.precision,S=d.trim,j=d.type;j==="n"?(x=!0,j="g"):sC[j]||(w===void 0&&(w=12),S=!0,j="g"),(y||p==="0"&&m==="=")&&(y=!0,p="0",m="=");var O=(h&&h.prefix!==void 0?h.prefix:"")+(b==="$"?n:b==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),E=(b==="$"?r:/[%p]/.test(j)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),T=sC[j],N=/[defgprs%]/.test(j);w=w===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function M(C){var L=O,D=E,$,P,k;if(j==="c")D=T(C)+D,C="";else{C=+C;var I=C<0||1/C<0;if(C=isNaN(C)?l:T(Math.abs(C),w),S&&(C=dde(C)),I&&+C==0&&g!=="+"&&(I=!1),L=(I?g==="("?g:o:g==="-"||g==="("?"":g)+L,D=(j==="s"&&!isNaN(C)&&Lm!==void 0?cC[8+Lm/3]:"")+D+(I&&g==="("?")":""),N){for($=-1,P=C.length;++$k||k>57){D=(k===46?a+C.slice($+1):C.slice($))+D,C=C.slice(0,$);break}}}x&&!y&&(C=t(C,1/0));var F=L.length+C.length+D.length,H=F>1)+L+C+D+H.slice(F);break;default:C=H+L+C+D;break}return i(C)}return M.toString=function(){return d+""},M}function f(d,h){var p=Math.max(-8,Math.min(8,Math.floor(ac(h)/3)))*3,m=Math.pow(10,-p),g=c((d=Kf(d),d.type="f",d),{suffix:cC[8+p/3]});return function(b){return g(m*b)}}return{format:c,formatPrefix:f}}var Ih,Gj,k4;mde({thousands:",",grouping:[3],currency:["$",""]});function mde(e){return Ih=pde(e),Gj=Ih.format,k4=Ih.formatPrefix,Ih}function yde(e){return Math.max(0,-ac(Math.abs(e)))}function gde(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ac(t)/3)))*3-ac(Math.abs(e)))}function vde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ac(t)-ac(e))+1}function L4(e,t,n,r){var a=r1(e,t,n),i;switch(r=Kf(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=gde(a,s))&&(r.precision=i),k4(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=vde(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=yde(a))&&(r.precision=i-(r.type==="%")*2);break}}return Gj(r)}function is(e){var t=e.domain;return e.ticks=function(n){var r=t();return t1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return L4(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],o=r[i],l,c,f=10;for(o0;){if(c=n1(s,o,n),c===l)return r[a]=s,r[i]=o,t(r);if(c>0)s=Math.floor(s/c)*c,o=Math.ceil(o/c)*c;else if(c<0)s=Math.ceil(s*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function zm(){var e=qj();return e.copy=function(){return Qd(e,zm())},Or.apply(e,arguments),is(e)}function z4(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,$m),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return z4(e).unknown(t)},e=arguments.length?Array.from(e,$m):[0,1],is(n)}function I4(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return iMath.pow(e,t)}function jde(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function dC(e){return(t,n)=>-e(-t,n)}function Yj(e){const t=e(uC,fC),n=t.domain;let r=10,a,i;function s(){return a=jde(r),i=wde(r),n()[0]<0?(a=dC(a),i=dC(i),e(bde,xde)):e(uC,fC),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const l=n();let c=l[0],f=l[l.length-1];const d=f0){for(;h<=p;++h)for(m=1;mf)break;y.push(g)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(g=h>0?m/i(-h):m*i(h),!(gf)break;y.push(g)}y.length*2{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Kf(l)).precision==null&&(l.trim=!0),l=Gj(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return f=>{let d=f/i(Math.round(a(f)));return d*rn(I4(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function B4(){const e=Yj(Ng()).domain([1,10]);return e.copy=()=>Qd(e,B4()).base(e.base()),Or.apply(e,arguments),e}function hC(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function pC(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Xj(e){var t=1,n=e(hC(t),pC(t));return n.constant=function(r){return arguments.length?e(hC(t=+r),pC(t)):t},is(n)}function U4(){var e=Xj(Ng());return e.copy=function(){return Qd(e,U4()).constant(e.constant())},Or.apply(e,arguments)}function mC(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ade(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ode(e){return e<0?-e*e:e*e}function Wj(e){var t=e(mn,mn),n=1;function r(){return n===1?e(mn,mn):n===.5?e(Ade,Ode):e(mC(n),mC(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},is(t)}function Qj(){var e=Wj(Ng());return e.copy=function(){return Qd(e,Qj()).exponent(e.exponent())},Or.apply(e,arguments),e}function Ede(){return Qj.apply(null,arguments).exponent(.5)}function yC(e){return Math.sign(e)*e*e}function Tde(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function F4(){var e=qj(),t=[0,1],n=!1,r;function a(i){var s=Tde(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(yC(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,$m)).map(yC)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return F4(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Or.apply(a,arguments),is(a)}function V4(){var e=[],t=[],n=[],r;function a(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s0?n[o-1]:e[0],o=n?[r[n-1],t]:[r[c-1],r[c]]},s.unknown=function(l){return arguments.length&&(i=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return H4().domain([e,t]).range(a).unknown(i)},Or.apply(is(s),arguments)}function q4(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Xd(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return q4().domain(e).range(t).unknown(n)},Or.apply(a,arguments)}const Ob=new Date,Eb=new Date;function Lt(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const l=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i0))return l;let c;do l.push(c=new Date(+i)),t(i,o),e(i);while(cLt(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(Ob.setTime(+i),Eb.setTime(+s),e(Ob),e(Eb),Math.floor(n(Ob,Eb))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Im=Lt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Im.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Lt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Im);Im.range;const Ma=1e3,mr=Ma*60,Ra=mr*60,Qa=Ra*24,Zj=Qa*7,gC=Qa*30,Tb=Qa*365,_s=Lt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ma)},(e,t)=>(t-e)/Ma,e=>e.getUTCSeconds());_s.range;const Jj=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma)},(e,t)=>{e.setTime(+e+t*mr)},(e,t)=>(t-e)/mr,e=>e.getMinutes());Jj.range;const eA=Lt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*mr)},(e,t)=>(t-e)/mr,e=>e.getUTCMinutes());eA.range;const tA=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma-e.getMinutes()*mr)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getHours());tA.range;const nA=Lt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getUTCHours());nA.range;const Zd=Lt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*mr)/Qa,e=>e.getDate()-1);Zd.range;const Cg=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>e.getUTCDate()-1);Cg.range;const K4=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>Math.floor(e/Qa));K4.range;function Ao(e){return Lt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*mr)/Zj)}const _g=Ao(0),Bm=Ao(1),Nde=Ao(2),Cde=Ao(3),ic=Ao(4),_de=Ao(5),Pde=Ao(6);_g.range;Bm.range;Nde.range;Cde.range;ic.range;_de.range;Pde.range;function Oo(e){return Lt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Zj)}const Pg=Oo(0),Um=Oo(1),Mde=Oo(2),Rde=Oo(3),sc=Oo(4),Dde=Oo(5),$de=Oo(6);Pg.range;Um.range;Mde.range;Rde.range;sc.range;Dde.range;$de.range;const rA=Lt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());rA.range;const aA=Lt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());aA.range;const Za=Lt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Za.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Za.range;const Ja=Lt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ja.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ja.range;function G4(e,t,n,r,a,i){const s=[[_s,1,Ma],[_s,5,5*Ma],[_s,15,15*Ma],[_s,30,30*Ma],[i,1,mr],[i,5,5*mr],[i,15,15*mr],[i,30,30*mr],[a,1,Ra],[a,3,3*Ra],[a,6,6*Ra],[a,12,12*Ra],[r,1,Qa],[r,2,2*Qa],[n,1,Zj],[t,1,gC],[t,3,3*gC],[e,1,Tb]];function o(c,f,d){const h=fb).right(s,h);if(p===s.length)return e.every(r1(c/Tb,f/Tb,d));if(p===0)return Im.every(Math.max(r1(c,f,d),1));const[m,g]=s[h/s[p-1][2]53)return null;"w"in V||(V.w=1),"Z"in V?(ge=Cb(mu(V.y,0,1)),Xe=ge.getUTCDay(),ge=Xe>4||Xe===0?Um.ceil(ge):Um(ge),ge=Cg.offset(ge,(V.V-1)*7),V.y=ge.getUTCFullYear(),V.m=ge.getUTCMonth(),V.d=ge.getUTCDate()+(V.w+6)%7):(ge=Nb(mu(V.y,0,1)),Xe=ge.getDay(),ge=Xe>4||Xe===0?Bm.ceil(ge):Bm(ge),ge=Zd.offset(ge,(V.V-1)*7),V.y=ge.getFullYear(),V.m=ge.getMonth(),V.d=ge.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),Xe="Z"in V?Cb(mu(V.y,0,1)).getUTCDay():Nb(mu(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(Xe+5)%7:V.w+V.U*7-(Xe+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,Cb(V)):Nb(V)}}function E(G,oe,X,V){for(var _e=0,ge=oe.length,Xe=X.length,ot,dt;_e=Xe)return-1;if(ot=oe.charCodeAt(_e++),ot===37){if(ot=oe.charAt(_e++),dt=S[ot in vC?oe.charAt(_e++):ot],!dt||(V=dt(G,X,V))<0)return-1}else if(ot!=X.charCodeAt(V++))return-1}return V}function T(G,oe,X){var V=c.exec(oe.slice(X));return V?(G.p=f.get(V[0].toLowerCase()),X+V[0].length):-1}function N(G,oe,X){var V=p.exec(oe.slice(X));return V?(G.w=m.get(V[0].toLowerCase()),X+V[0].length):-1}function M(G,oe,X){var V=d.exec(oe.slice(X));return V?(G.w=h.get(V[0].toLowerCase()),X+V[0].length):-1}function C(G,oe,X){var V=y.exec(oe.slice(X));return V?(G.m=v.get(V[0].toLowerCase()),X+V[0].length):-1}function L(G,oe,X){var V=g.exec(oe.slice(X));return V?(G.m=b.get(V[0].toLowerCase()),X+V[0].length):-1}function D(G,oe,X){return E(G,t,oe,X)}function $(G,oe,X){return E(G,n,oe,X)}function P(G,oe,X){return E(G,r,oe,X)}function k(G){return s[G.getDay()]}function I(G){return i[G.getDay()]}function F(G){return l[G.getMonth()]}function H(G){return o[G.getMonth()]}function Y(G){return a[+(G.getHours()>=12)]}function q(G){return 1+~~(G.getMonth()/3)}function te(G){return s[G.getUTCDay()]}function Z(G){return i[G.getUTCDay()]}function ye(G){return l[G.getUTCMonth()]}function J(G){return o[G.getUTCMonth()]}function st(G){return a[+(G.getUTCHours()>=12)]}function Ve(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var oe=j(G+="",x);return oe.toString=function(){return G},oe},parse:function(G){var oe=O(G+="",!1);return oe.toString=function(){return G},oe},utcFormat:function(G){var oe=j(G+="",w);return oe.toString=function(){return G},oe},utcParse:function(G){var oe=O(G+="",!0);return oe.toString=function(){return G},oe}}}var vC={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,Ude=/^%/,Fde=/[\\^$*+?|[\]().{}]/g;function Pe(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i[t.toLowerCase(),n]))}function Hde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function qde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Kde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Gde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Yde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function bC(e,t,n){var r=Gt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function xC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xde(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Wde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Qde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function SC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zde(e,t,n){var r=Gt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function wC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Jde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ehe(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function the(e,t,n){var r=Gt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nhe(e,t,n){var r=Gt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rhe(e,t,n){var r=Ude.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ahe(e,t,n){var r=Gt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ihe(e,t,n){var r=Gt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function jC(e,t){return Pe(e.getDate(),t,2)}function she(e,t){return Pe(e.getHours(),t,2)}function ohe(e,t){return Pe(e.getHours()%12||12,t,2)}function lhe(e,t){return Pe(1+Zd.count(Za(e),e),t,3)}function Y4(e,t){return Pe(e.getMilliseconds(),t,3)}function che(e,t){return Y4(e,t)+"000"}function uhe(e,t){return Pe(e.getMonth()+1,t,2)}function fhe(e,t){return Pe(e.getMinutes(),t,2)}function dhe(e,t){return Pe(e.getSeconds(),t,2)}function hhe(e){var t=e.getDay();return t===0?7:t}function phe(e,t){return Pe(_g.count(Za(e)-1,e),t,2)}function X4(e){var t=e.getDay();return t>=4||t===0?ic(e):ic.ceil(e)}function mhe(e,t){return e=X4(e),Pe(ic.count(Za(e),e)+(Za(e).getDay()===4),t,2)}function yhe(e){return e.getDay()}function ghe(e,t){return Pe(Bm.count(Za(e)-1,e),t,2)}function vhe(e,t){return Pe(e.getFullYear()%100,t,2)}function bhe(e,t){return e=X4(e),Pe(e.getFullYear()%100,t,2)}function xhe(e,t){return Pe(e.getFullYear()%1e4,t,4)}function She(e,t){var n=e.getDay();return e=n>=4||n===0?ic(e):ic.ceil(e),Pe(e.getFullYear()%1e4,t,4)}function whe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Pe(t/60|0,"0",2)+Pe(t%60,"0",2)}function AC(e,t){return Pe(e.getUTCDate(),t,2)}function jhe(e,t){return Pe(e.getUTCHours(),t,2)}function Ahe(e,t){return Pe(e.getUTCHours()%12||12,t,2)}function Ohe(e,t){return Pe(1+Cg.count(Ja(e),e),t,3)}function W4(e,t){return Pe(e.getUTCMilliseconds(),t,3)}function Ehe(e,t){return W4(e,t)+"000"}function The(e,t){return Pe(e.getUTCMonth()+1,t,2)}function Nhe(e,t){return Pe(e.getUTCMinutes(),t,2)}function Che(e,t){return Pe(e.getUTCSeconds(),t,2)}function _he(e){var t=e.getUTCDay();return t===0?7:t}function Phe(e,t){return Pe(Pg.count(Ja(e)-1,e),t,2)}function Q4(e){var t=e.getUTCDay();return t>=4||t===0?sc(e):sc.ceil(e)}function Mhe(e,t){return e=Q4(e),Pe(sc.count(Ja(e),e)+(Ja(e).getUTCDay()===4),t,2)}function Rhe(e){return e.getUTCDay()}function Dhe(e,t){return Pe(Um.count(Ja(e)-1,e),t,2)}function $he(e,t){return Pe(e.getUTCFullYear()%100,t,2)}function khe(e,t){return e=Q4(e),Pe(e.getUTCFullYear()%100,t,2)}function Lhe(e,t){return Pe(e.getUTCFullYear()%1e4,t,4)}function zhe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?sc(e):sc.ceil(e),Pe(e.getUTCFullYear()%1e4,t,4)}function Ihe(){return"+0000"}function OC(){return"%"}function EC(e){return+e}function TC(e){return Math.floor(+e/1e3)}var Do,Z4,J4;Bhe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Bhe(e){return Do=Bde(e),Z4=Do.format,Do.parse,J4=Do.utcFormat,Do.utcParse,Do}function Uhe(e){return new Date(e)}function Fhe(e){return e instanceof Date?+e:+new Date(+e)}function iA(e,t,n,r,a,i,s,o,l,c){var f=qj(),d=f.invert,h=f.domain,p=c(".%L"),m=c(":%S"),g=c("%I:%M"),b=c("%I %p"),y=c("%a %d"),v=c("%b %d"),x=c("%B"),w=c("%Y");function S(j){return(l(j)t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Pfe(e,i/r))},n.copy=function(){return rL(t).domain(e)},ii.apply(n,arguments)}function Rg(){var e=0,t=.5,n=1,r=1,a,i,s,o,l,c=mn,f,d=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+f(g))-i)*(r*gt}var oL=Xhe,Whe=Dg,Qhe=oL,Zhe=Yc;function Jhe(e){return e&&e.length?Whe(e,Zhe,Qhe):void 0}var epe=Jhe;const Di=Ie(epe);function tpe(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*nt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ne.dividedBy=ne.div=function(e){return Va(this,new this.constructor(e))};ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,n=t.constructor;return Ge(Va(t,new n(e),0,1),n.precision)};ne.equals=ne.eq=function(e){return!this.cmp(e)};ne.exponent=function(){return _t(this)};ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0};ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0};ne.isInteger=ne.isint=function(){return this.e>this.d.length-2};ne.isNegative=ne.isneg=function(){return this.s<0};ne.isPositive=ne.ispos=function(){return this.s>0};ne.isZero=function(){return this.s===0};ne.lessThan=ne.lt=function(e){return this.cmp(e)<0};ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1};ne.logarithm=ne.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Vn))throw Error(Sr+"NaN");if(n.s<1)throw Error(Sr+(n.s?"NaN":"-Infinity"));return n.eq(Vn)?new r(0):(ct=!1,t=Va(Gf(n,i),Gf(e,i),i),ct=!0,Ge(t,a))};ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dL(t,e):uL(t,(e.s=-e.s,e))};ne.modulo=ne.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(Sr+"NaN");return n.s?(ct=!1,t=Va(n,e,0,1).times(e),ct=!0,n.minus(t)):Ge(new r(n),a)};ne.naturalExponential=ne.exp=function(){return fL(this)};ne.naturalLogarithm=ne.ln=function(){return Gf(this)};ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?uL(t,e):dL(t,(e.s=-e.s,e))};ne.precision=ne.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ws+e);if(t=_t(a)+1,r=a.d.length-1,n=r*nt+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ne.squareRoot=ne.sqrt=function(){var e,t,n,r,a,i,s,o=this,l=o.constructor;if(o.s<1){if(!o.s)return new l(0);throw Error(Sr+"NaN")}for(e=_t(o),ct=!1,a=Math.sqrt(+o),a==0||a==1/0?(t=ea(o.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Qc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(a.toString()),n=l.precision,a=s=n+3;;)if(i=r,r=i.plus(Va(o,i,s+2)).times(.5),ea(i.d).slice(0,s)===(t=ea(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Ge(i,n+1,0),i.times(i).eq(o)){r=i;break}}else if(t!="9999")break;s+=4}return ct=!0,Ge(r,n)};ne.times=ne.mul=function(e){var t,n,r,a,i,s,o,l,c,f=this,d=f.constructor,h=f.d,p=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=h.length,c=p.length,l=0;){for(t=0,a=l+r;a>r;)o=i[a]+p[r]*h[a-r-1]+t,i[a--]=o%Ut|0,t=o/Ut|0;i[a]=(i[a]+t)%Ut|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,ct?Ge(e,d.precision):e};ne.toDecimalPlaces=ne.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ca(e,0,Wc),t===void 0?t=r.rounding:ca(t,0,8),Ge(n,e+_t(n)+1,t))};ne.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=fo(r,!0):(ca(e,0,Wc),t===void 0?t=a.rounding:ca(t,0,8),r=Ge(new a(r),e+1,t),n=fo(r,!0,e+1)),n};ne.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?fo(a):(ca(e,0,Wc),t===void 0?t=i.rounding:ca(t,0,8),r=Ge(new i(a),e+_t(a)+1,t),n=fo(r.abs(),!1,e+_t(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return Ge(new t(e),_t(e)+1,t.rounding)};ne.toNumber=function(){return+this};ne.toPower=ne.pow=function(e){var t,n,r,a,i,s,o=this,l=o.constructor,c=12,f=+(e=new l(e));if(!e.s)return new l(Vn);if(o=new l(o),!o.s){if(e.s<1)throw Error(Sr+"Infinity");return o}if(o.eq(Vn))return o;if(r=l.precision,e.eq(Vn))return Ge(o,r);if(t=e.e,n=e.d.length-1,s=t>=n,i=o.s,s){if((n=f<0?-f:f)<=cL){for(a=new l(Vn),t=Math.ceil(r/nt+4),ct=!1;n%2&&(a=a.times(o),_C(a.d,t)),n=Qc(n/2),n!==0;)o=o.times(o),_C(o.d,t);return ct=!0,e.s<0?new l(Vn).div(a):Ge(a,r)}}else if(i<0)throw Error(Sr+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,ct=!1,a=e.times(Gf(o,r+c)),ct=!0,a=fL(a),a.s=i,a};ne.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=_t(a),r=fo(a,n<=i.toExpNeg||n>=i.toExpPos)):(ca(e,1,Wc),t===void 0?t=i.rounding:ca(t,0,8),a=Ge(new i(a),e,t),n=_t(a),r=fo(a,e<=n||n<=i.toExpNeg,e)),r};ne.toSignificantDigits=ne.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ca(e,1,Wc),t===void 0?t=r.rounding:ca(t,0,8)),Ge(new r(n),e,t)};ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=_t(e),n=e.constructor;return fo(e,t<=n.toExpNeg||t>=n.toExpPos)};function uL(e,t){var n,r,a,i,s,o,l,c,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),ct?Ge(t,d):t;if(l=e.d,c=t.d,s=e.e,a=t.e,l=l.slice(),i=s-a,i){for(i<0?(r=l,i=-i,o=c.length):(r=c,a=s,o=l.length),s=Math.ceil(d/nt),o=s>o?s+1:o+1,i>o&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(o=l.length,i=c.length,o-i<0&&(i=o,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/Ut|0,l[i]%=Ut;for(n&&(l.unshift(n),++a),o=l.length;l[--o]==0;)l.pop();return t.d=l,t.e=a,ct?Ge(t,d):t}function ca(e,t,n){if(e!==~~e||en)throw Error(Ws+e)}function ea(e){var t,n,r,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;ts?1:-1;else for(o=l=0;oa[o]?1:-1;break}return l}function n(r,a,i){for(var s=0;i--;)r[i]-=s,s=r[i]1;)r.shift()}return function(r,a,i,s){var o,l,c,f,d,h,p,m,g,b,y,v,x,w,S,j,O,E,T=r.constructor,N=r.s==a.s?1:-1,M=r.d,C=a.d;if(!r.s)return new T(r);if(!a.s)throw Error(Sr+"Division by zero");for(l=r.e-a.e,O=C.length,S=M.length,p=new T(N),m=p.d=[],c=0;C[c]==(M[c]||0);)++c;if(C[c]>(M[c]||0)&&--l,i==null?v=i=T.precision:s?v=i+(_t(r)-_t(a))+1:v=i,v<0)return new T(0);if(v=v/nt+2|0,c=0,O==1)for(f=0,C=C[0],v++;(c1&&(C=e(C,f),M=e(M,f),O=C.length,S=M.length),w=O,g=M.slice(0,O),b=g.length;b=Ut/2&&++j;do f=0,o=t(C,g,O,b),o<0?(y=g[0],O!=b&&(y=y*Ut+(g[1]||0)),f=y/j|0,f>1?(f>=Ut&&(f=Ut-1),d=e(C,f),h=d.length,b=g.length,o=t(d,g,h,b),o==1&&(f--,n(d,O16)throw Error(lA+_t(e));if(!e.s)return new f(Vn);for(ct=!1,o=d,s=new f(.03125);e.abs().gte(.1);)e=e.times(s),c+=5;for(r=Math.log(ws(2,c))/Math.LN10*2+5|0,o+=r,n=a=i=new f(Vn),f.precision=o;;){if(a=Ge(a.times(e),o),n=n.times(++l),s=i.plus(Va(a,n,o)),ea(s.d).slice(0,o)===ea(i.d).slice(0,o)){for(;c--;)i=Ge(i.times(i),o);return f.precision=d,t==null?(ct=!0,Ge(i,d)):i}i=s}}function _t(e){for(var t=e.e*nt,n=e.d[0];n>=10;n/=10)t++;return t}function _b(e,t,n){if(t>e.LN10.sd())throw ct=!0,n&&(e.precision=n),Error(Sr+"LN10 precision limit exceeded");return Ge(new e(e.LN10),t)}function mi(e){for(var t="";e--;)t+="0";return t}function Gf(e,t){var n,r,a,i,s,o,l,c,f,d=1,h=10,p=e,m=p.d,g=p.constructor,b=g.precision;if(p.s<1)throw Error(Sr+(p.s?"NaN":"-Infinity"));if(p.eq(Vn))return new g(0);if(t==null?(ct=!1,c=b):c=t,p.eq(10))return t==null&&(ct=!0),_b(g,c);if(c+=h,g.precision=c,n=ea(m),r=n.charAt(0),i=_t(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ea(p.d),r=n.charAt(0),d++;i=_t(p),r>1?(p=new g("0."+n),i++):p=new g(r+"."+n.slice(1))}else return l=_b(g,c+2,b).times(i+""),p=Gf(new g(r+"."+n.slice(1)),c-h).plus(l),g.precision=b,t==null?(ct=!0,Ge(p,b)):p;for(o=s=p=Va(p.minus(Vn),p.plus(Vn),c),f=Ge(p.times(p),c),a=3;;){if(s=Ge(s.times(f),c),l=o.plus(Va(s,new g(a),c)),ea(l.d).slice(0,c)===ea(o.d).slice(0,c))return o=o.times(2),i!==0&&(o=o.plus(_b(g,c+2,b).times(i+""))),o=Va(o,new g(d),c),g.precision=b,t==null?(ct=!0,Ge(o,b)):o;o=l,a+=2}}function CC(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=Qc(n/nt),e.d=[],r=(n+1)%nt,n<0&&(r+=nt),rFm||e.e<-Fm))throw Error(lA+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ge(e,t,n){var r,a,i,s,o,l,c,f,d=e.d;for(s=1,i=d[0];i>=10;i/=10)s++;if(r=t-s,r<0)r+=nt,a=t,c=d[f=0];else{if(f=Math.ceil((r+1)/nt),i=d.length,f>=i)return e;for(c=i=d[f],s=1;i>=10;i/=10)s++;r%=nt,a=r-nt+s}if(n!==void 0&&(i=ws(10,s-a-1),o=c/i%10|0,l=t<0||d[f+1]!==void 0||c%i,l=n<4?(o||l)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||l||n==6&&(r>0?a>0?c/ws(10,s-a):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=_t(e),d.length=1,t=t-i-1,d[0]=ws(10,(nt-t%nt)%nt),e.e=Qc(-t/nt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,i=1,f--):(d.length=f+1,i=ws(10,nt-r),d[f]=a>0?(c/ws(10,s-a)%ws(10,a)|0)*i:0),l)for(;;)if(f==0){(d[0]+=i)==Ut&&(d[0]=1,++e.e);break}else{if(d[f]+=i,d[f]!=Ut)break;d[f--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(ct&&(e.e>Fm||e.e<-Fm))throw Error(lA+_t(e));return e}function dL(e,t){var n,r,a,i,s,o,l,c,f,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ct?Ge(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),s=c-r,s){for(f=s<0,f?(n=l,s=-s,o=d.length):(n=d,r=c,o=l.length),a=Math.max(Math.ceil(p/nt),o)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,o=d.length,f=a0;--a)l[o++]=0;for(a=d.length;a>s;){if(l[--a]0?i=i.charAt(0)+"."+i.slice(1)+mi(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+mi(-a-1)+i,n&&(r=n-s)>0&&(i+=mi(r))):a>=s?(i+=mi(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+mi(r))):((r=a+1)
★ 고객/운영 분리: Mall 은 {@code mall_account} 단일 테이블/단일 로그인이지만 역할로 구분된다. - *
보안 불변: 이메일·전화번호는 매퍼에서 마스킹된 값만, 상세 주소는 비포함(MallMemberSummary). - * 주문수·누적결제액 집계 동반. 키워드(아이디/이름)·등급 필터 지원. - */ - @GetMapping("/admin") - @PreAuthorize("hasAnyRole('ADMIN','MANAGER')") - public ApiResponse> adminList( - @RequestParam(required = false) String keyword, - @RequestParam(required = false) String tier, - @RequestParam(defaultValue = "100") int limit) { - int safeLimit = (limit <= 0 || limit > 500) ? 100 : limit; - List items = mapper.adminList(keyword, tier, safeLimit); - int total = mapper.countAdminList(keyword, tier); - Map out = new LinkedHashMap<>(); - out.put("items", items); - out.put("total", total); - return ApiResponse.ok(out); - } - /** CRM 고객 인사이트(구매 성향) — 응답은 ItsmSecuritySanitizer로 정제. */ @GetMapping("/me/insight") public ApiResponse> insight(Authentication auth) { diff --git a/backend/src/main/java/com/zioinfo/mall/member/mapper/MemberMapper.java b/backend/src/main/java/com/zioinfo/mall/member/mapper/MemberMapper.java index 30ceac8..b0d8f86 100644 --- a/backend/src/main/java/com/zioinfo/mall/member/mapper/MemberMapper.java +++ b/backend/src/main/java/com/zioinfo/mall/member/mapper/MemberMapper.java @@ -1,21 +1,11 @@ package com.zioinfo.mall.member.mapper; import com.zioinfo.mall.member.MallMember; -import com.zioinfo.mall.member.MallMemberSummary; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import java.util.List; - @Mapper public interface MemberMapper { MallMember findByUsername(@Param("username") String username); int upsert(MallMember m); - - /** 관리자 회원 목록(검색·등급 필터). 주문수/매출 집계 포함, PII 비노출. */ - List adminList(@Param("keyword") String keyword, - @Param("tier") String tier, - @Param("limit") int limit); - - int countAdminList(@Param("keyword") String keyword, @Param("tier") String tier); } diff --git a/backend/src/main/java/com/zioinfo/mall/subscription/SubscriptionController.java b/backend/src/main/java/com/zioinfo/mall/subscription/SubscriptionController.java index 5a8b4ac..5760da9 100644 --- a/backend/src/main/java/com/zioinfo/mall/subscription/SubscriptionController.java +++ b/backend/src/main/java/com/zioinfo/mall/subscription/SubscriptionController.java @@ -47,33 +47,11 @@ public class SubscriptionController { if (s == null || !s.getOwner().equals(auth.getName())) { throw new RuntimeException("ERR-SUB-403: 본인 구독만 변경할 수 있습니다"); } - mapper.updateStatus(id, normalizeStatus(req.get("status"))); + String to = req.getOrDefault("status", "ACTIVE").toUpperCase(); + mapper.updateStatus(id, to); return ApiResponse.ok(mapper.findById(id)); } - /** - * 관리자 구독 상태 변경(일시정지/재개/취소) — MANAGER+ 전용. 소유자 제한 없음. - */ - @PutMapping("/admin/{id}/status") - @PreAuthorize("hasAnyRole('ADMIN','MANAGER')") - public ApiResponse adminStatus(@PathVariable Long id, @RequestBody Map req) { - MallSubscription s = mapper.findById(id); - if (s == null) { - throw new RuntimeException("ERR-SUB-404: 구독을 찾을 수 없습니다"); - } - mapper.updateStatus(id, normalizeStatus(req.get("status"))); - return ApiResponse.ok(mapper.findById(id)); - } - - /** 허용 상태(ACTIVE/PAUSED/CANCELLED)만 통과. */ - private String normalizeStatus(String raw) { - String to = raw == null ? "ACTIVE" : raw.toUpperCase(); - if (!to.equals("ACTIVE") && !to.equals("PAUSED") && !to.equals("CANCELLED")) { - throw new IllegalArgumentException("ERR-SUB-400: 허용되지 않는 상태입니다"); - } - return to; - } - private LocalDate nextDate(String freq) { LocalDate base = LocalDate.now(); if ("MONTHLY".equalsIgnoreCase(freq)) return base.plusMonths(1); diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index a0595f7..393865a 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -8,20 +8,12 @@ spring: username: ${DB_USER:mall_user} password: ${DB_PASS:mall_pass2026} driver-class-name: org.postgresql.Driver - # UIWS 이식: 부팅 시 91_uiws_port.sql(업무 9테이블 + mall_account 2FA ALTER) 멱등 적용. - # 전부 IF NOT EXISTS / ADD COLUMN IF NOT EXISTS / ON CONFLICT DO NOTHING → mode:always 재실행 안전. - # schema.sql 은 deploy_server 가 psql 로 별도 적용(비멱등 시드 충돌 회피 위해 여기 미포함). - sql: - init: - mode: ${SQL_INIT_MODE:always} - schema-locations: classpath:db/91_uiws_port.sql,classpath:db/92_uiws_system.sql,classpath:db/93_auth_otp.sql,classpath:db/104_seed_ai_config.sql - continue-on-error: true servlet: multipart: max-file-size: 20MB max-request-size: 20MB mybatis: - mapper-locations: classpath:mapper/**/*.xml # ** : 하위 mapper/uiws/*.xml(UIWS 이식) 포함 + mapper-locations: classpath:mapper/*.xml configuration: map-underscore-to-camel-case: true log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl @@ -42,34 +34,13 @@ mall: provider: ${MALL_SMS_PROVIDER:mock} # mock | twilio email: provider: ${MALL_EMAIL_PROVIDER:mock} # mock | sendgrid - # ── UIWS 이식: 2FA(운영 로그인) + 첨부 업로드 설정 (mall.uiws.*) ────────────── - uiws: - auth: - twofa-enabled: ${UIWS_2FA:true} # off=운영 로그인도 단일 JWT(회귀 0). 고객(USER)은 항상 미적용. - verify-token-validity-seconds: 300 # 1차 통과 후 verify-token 5분 - email-code-validity-seconds: 300 # 이메일 인증코드 5분 - max-login-fail: 5 # 실패 5회 시 운영 계정 잠금 - mail: - mode: ${UIWS_MAIL_MODE:log} # LogMailSender 폴백(외부 API 0). smtp 는 설정 시만. - upload: - upload-dir: ${UIWS_UPLOAD_DIR:./uploads/uiws} guardia: itsm-url: ${ITSM_URL:http://localhost:9001} erp-url: ${ERP_URL:http://localhost:8003} crm-url: ${CRM_URL:http://localhost:8004} ocr-url: ${OCR_URL:http://localhost:8005} ollama-url: ${OLLAMA_URL:http://localhost:11434} - ollama-text-model: ${OLLAMA_TEXT_MODEL:llama3.2:1b} - # 로컬 임베디드 DuckDB 학습 저장소 파일(솔루션 격리). 경로 미가용/드라이버 부재 시 자동 비활성(no-op). - mall: - learning: - duckdb-path: ${MALL_LEARNING_DUCKDB:/opt/guardia-mall/data/mall_learning.duckdb} - # 중앙 guardia-rag(온프레미스 전용) — 최신 AI 기법 경유. 미가용 시 Mall 로컬 폴백(degraded) - rag: - base-url: ${RAG_URL:http://127.0.0.1:8020} - timeout-ms: ${RAG_TIMEOUT_MS:120000} - enabled: ${RAG_ENABLED:true} - solution: mall + ollama-text-model: ${OLLAMA_TEXT_MODEL:llama3} crypto: secret: ${CRYPTO_SECRET:guardia-mall-aes-256-gcm-master-key-2026-zioinfo} jwt: diff --git a/backend/src/main/resources/db/schema.sql b/backend/src/main/resources/db/schema.sql index e73723d..e8783cf 100644 --- a/backend/src/main/resources/db/schema.sql +++ b/backend/src/main/resources/db/schema.sql @@ -47,20 +47,7 @@ INSERT INTO mall_setting (key, value) VALUES ('hours_saturday','Sat 9:00 AM - 4:00 PM'), ('hours_sunday','Sun 9:00 AM - 12:00 PM'), ('payment_provider','mock'),('tax_provider','mock'),('address_provider','mock'), -('sms_provider','mock'),('email_provider','mock'), --- 최신 AI 기법(중앙 guardia-rag) 토글 — 무거운 기법(graphrag·rerank·tool_use·stream)은 서버 RAM 제약상 기본 off -('rag.enabled','true'), -('rag.retrieval_mode','vector'), -('rag.rerank','false'), -('rag.graphrag','false'), -('rag.tool_use','false'), -('rag.structured','true'), -('rag.stream','false'), -('rag.top_k','6'), -('rag.agent_max_steps','4'), -('rag.faithfulness_threshold','0.5'), -('rag.temperature','0.2'), -('rag.generation_model','llama3.2:1b') +('sms_provider','mock'),('email_provider','mock') ON CONFLICT (key) DO NOTHING; CREATE TABLE IF NOT EXISTS mall_ai_result ( diff --git a/backend/src/main/resources/mapper/AdminUserMapper.xml b/backend/src/main/resources/mapper/AdminUserMapper.xml index 37a801c..0279811 100644 --- a/backend/src/main/resources/mapper/AdminUserMapper.xml +++ b/backend/src/main/resources/mapper/AdminUserMapper.xml @@ -32,7 +32,6 @@ UPDATE mall_account SET role = #{role} WHERE id = #{id} UPDATE mall_account SET is_active = #{active} WHERE id = #{id} UPDATE mall_account SET password_hash = #{passwordHash} WHERE id = #{id} - UPDATE mall_account SET otp_secret = NULL, otp_enabled = false WHERE id = #{id} DELETE FROM mall_account WHERE id = #{id} diff --git a/backend/src/main/resources/mapper/MemberMapper.xml b/backend/src/main/resources/mapper/MemberMapper.xml index a6e7e01..9430eb6 100644 --- a/backend/src/main/resources/mapper/MemberMapper.xml +++ b/backend/src/main/resources/mapper/MemberMapper.xml @@ -11,44 +11,4 @@ display_name = EXCLUDED.display_name, email = EXCLUDED.email, phone = EXCLUDED.phone, default_zip = EXCLUDED.default_zip, default_address = EXCLUDED.default_address - - - - - - AND (m.username ILIKE '%' || #{keyword} || '%' OR m.display_name ILIKE '%' || #{keyword} || '%') - - AND m.tier = #{tier} - - - - - SELECT - m.id, m.username, m.display_name AS displayName, - CASE WHEN m.email IS NULL OR m.email = '' THEN NULL - WHEN POSITION('@' IN m.email) > 2 - THEN SUBSTRING(m.email FROM 1 FOR 2) || '***' || SUBSTRING(m.email FROM POSITION('@' IN m.email)) - ELSE '***' || SUBSTRING(m.email FROM POSITION('@' IN m.email)) END AS emailMasked, - CASE WHEN m.phone IS NULL OR LENGTH(m.phone) < 4 THEN NULL - ELSE '***-****-' || SUBSTRING(m.phone FROM LENGTH(m.phone) - 3) END AS phoneMasked, - m.default_zip AS defaultZip, m.tier, m.created_at AS createdAt, - COALESCE(o.order_count, 0) AS orderCount, - COALESCE(o.total_spent, 0) AS totalSpent - FROM mall_member m - LEFT JOIN ( - SELECT owner, COUNT(*) AS order_count, SUM(COALESCE(pay_amount, total_amount, 0)) AS total_spent - FROM mall_order WHERE status NOT IN ('CANCELLED','REFUNDED','FAILED') GROUP BY owner - ) o ON o.owner = m.username - - ORDER BY m.created_at DESC - LIMIT #{limit} - - - - SELECT COUNT(*) FROM mall_member m - diff --git a/backend/src/main/resources/mapper/UserMapper.xml b/backend/src/main/resources/mapper/UserMapper.xml index 6982967..a9d98da 100644 --- a/backend/src/main/resources/mapper/UserMapper.xml +++ b/backend/src/main/resources/mapper/UserMapper.xml @@ -11,21 +11,10 @@ - - - - - - - - - - - SELECT id, username, password_hash, role, display_name, is_active, created_at, - email, email_verify_code, email_verify_expire, login_fail_count, locked, otp_secret, otp_enabled, approved + SELECT id, username, password_hash, role, display_name, is_active, created_at FROM mall_account WHERE username = #{username} @@ -40,42 +29,4 @@ SELECT COUNT(*) FROM mall_account WHERE username = #{username} - - - - SELECT COUNT(*) FROM mall_account WHERE email = #{email} - - - - - INSERT INTO mall_account (username, password_hash, display_name, role, email, - is_active, approved, login_fail_count, locked) - VALUES (#{username}, #{passwordHash}, #{displayName}, 'MANAGER', #{email}, - true, false, 0, false) - - - - SELECT id, username, password_hash, role, display_name, is_active, created_at, - email, email_verify_code, email_verify_expire, login_fail_count, locked, otp_secret, otp_enabled, approved - FROM mall_account - WHERE display_name = #{displayName} AND email = #{email} - ORDER BY id - LIMIT 1 - - - - SELECT id, username, password_hash, role, display_name, is_active, created_at, - email, email_verify_code, email_verify_expire, login_fail_count, locked, otp_secret, otp_enabled, approved - FROM mall_account - WHERE username = #{username} AND email = #{email} - - - - - UPDATE mall_account - SET password_hash = #{passwordHash}, locked = false, login_fail_count = 0 - WHERE username = #{username} - - diff --git a/backend/src/main/resources/static/assets/index-BzL8NSpt.css b/backend/src/main/resources/static/assets/index-BzL8NSpt.css new file mode 100644 index 0000000..c3c6ffa --- /dev/null +++ b/backend/src/main/resources/static/assets/index-BzL8NSpt.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.-bottom-24{bottom:-6rem}.-bottom-6{bottom:-1.5rem}.-bottom-\[1px\]{bottom:-1px}.-left-20{left:-5rem}.-right-1{right:-.25rem}.-right-16{right:-4rem}.-top-1{top:-.25rem}.-top-20{top:-5rem}.bottom-0{bottom:0}.bottom-7{bottom:1.75rem}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-5{right:1.25rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.top-5{top:1.25rem}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-\[1\]{z-index:1}.z-\[2\]{z-index:2}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.m-auto{margin:auto}.mx-auto{margin-left:auto;margin-right:auto}.-mt-0\.5{margin-top:-.125rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-7{margin-bottom:1.75rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[4\/5\]{aspect-ratio:4/5}.aspect-\[5\/4\]{aspect-ratio:5/4}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-44{height:11rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-9{height:2.25rem}.h-\[18px\]{height:18px}.h-\[2px\]{height:2px}.h-\[72px\]{height:72px}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:8rem}.min-h-\[78vh\]{min-height:78vh}.min-h-screen{min-height:100vh}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-32{width:8rem}.w-44{width:11rem}.w-48{width:12rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[360px\]{width:360px}.w-auto{width:auto}.w-full{width:100%}.min-w-\[18px\]{min-width:18px}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes heartbeat{0%,to{transform:scale(1)}30%{transform:scale(1.3)}60%{transform:scale(.95)}}.animate-heartbeat{animation:heartbeat .6s ease-in-out}.cursor-not-allowed{cursor:not-allowed}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.gap-8{gap:2rem}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-20>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-blush-100\/60>:not([hidden])~:not([hidden]){border-color:#fbe8ef99}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.75rem}.rounded-4xl{border-radius:2.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-amber-400\/30{border-color:#fbbf244d}.border-amber-500\/30{border-color:#f59e0b4d}.border-bloom{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.border-blush-100{--tw-border-opacity: 1;border-color:rgb(251 232 239 / var(--tw-border-opacity, 1))}.border-blush-100\/60{border-color:#fbe8ef99}.border-blush-100\/70{border-color:#fbe8efb3}.border-blush-400{--tw-border-opacity: 1;border-color:rgb(224 122 156 / var(--tw-border-opacity, 1))}.border-blush-50{--tw-border-opacity: 1;border-color:rgb(253 244 247 / var(--tw-border-opacity, 1))}.border-blush-500{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.border-brand{--tw-border-opacity: 1;border-color:rgb(0 160 200 / var(--tw-border-opacity, 1))}.border-cream\/10{border-color:#fdfaf51a}.border-edge{--tw-border-opacity: 1;border-color:rgb(38 48 74 / var(--tw-border-opacity, 1))}.border-edge\/50{border-color:#26304a80}.border-emerald-500\/30{border-color:#10b9814d}.border-rose-500\/30{border-color:#f43f5e4d}.border-sky-500\/30{border-color:#0ea5e94d}.border-slate-300\/30{border-color:#cbd5e14d}.border-slate-500\/30{border-color:#64748b4d}.border-slate-600\/30{border-color:#4755694d}.border-violet-500\/30{border-color:#8b5cf64d}.border-white\/70{border-color:#ffffffb3}.bg-amber-400\/15{background-color:#fbbf2426}.bg-amber-500\/15{background-color:#f59e0b26}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-bloom{--tw-bg-opacity: 1;background-color:rgb(208 90 130 / var(--tw-bg-opacity, 1))}.bg-blush-50{--tw-bg-opacity: 1;background-color:rgb(253 244 247 / var(--tw-bg-opacity, 1))}.bg-blush-500{--tw-bg-opacity: 1;background-color:rgb(208 90 130 / var(--tw-bg-opacity, 1))}.bg-brand{--tw-bg-opacity: 1;background-color:rgb(0 160 200 / var(--tw-bg-opacity, 1))}.bg-brand2{--tw-bg-opacity: 1;background-color:rgb(0 90 140 / var(--tw-bg-opacity, 1))}.bg-card{--tw-bg-opacity: 1;background-color:rgb(26 34 52 / var(--tw-bg-opacity, 1))}.bg-card\/60{background-color:#1a223499}.bg-cream{--tw-bg-opacity: 1;background-color:rgb(253 250 245 / var(--tw-bg-opacity, 1))}.bg-cream\/10{background-color:#fdfaf51a}.bg-cream\/90{background-color:#fdfaf5e6}.bg-emerald-500\/15{background-color:#10b98126}.bg-gold{--tw-bg-opacity: 1;background-color:rgb(196 163 90 / var(--tw-bg-opacity, 1))}.bg-ink{--tw-bg-opacity: 1;background-color:rgb(11 15 23 / var(--tw-bg-opacity, 1))}.bg-ivory{--tw-bg-opacity: 1;background-color:rgb(251 246 238 / var(--tw-bg-opacity, 1))}.bg-leaf\/10{background-color:#4e6e431a}.bg-panel{--tw-bg-opacity: 1;background-color:rgb(19 25 39 / var(--tw-bg-opacity, 1))}.bg-petal{--tw-bg-opacity: 1;background-color:rgb(251 232 239 / var(--tw-bg-opacity, 1))}.bg-rose-500\/15{background-color:#f43f5e26}.bg-sage-700{--tw-bg-opacity: 1;background-color:rgb(64 88 55 / var(--tw-bg-opacity, 1))}.bg-sage-800{--tw-bg-opacity: 1;background-color:rgb(54 72 47 / var(--tw-bg-opacity, 1))}.bg-sky-500\/15{background-color:#0ea5e926}.bg-slate-300\/20{background-color:#cbd5e133}.bg-slate-500\/15{background-color:#64748b26}.bg-slate-600\/20{background-color:#47556933}.bg-transparent{background-color:transparent}.bg-violet-500\/15{background-color:#8b5cf626}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/15{background-color:#ffffff26}.bg-white\/45{background-color:#ffffff73}.bg-white\/60{background-color:#fff9}.bg-white\/70{background-color:#ffffffb3}.bg-white\/85{background-color:#ffffffd9}.bg-white\/90{background-color:#ffffffe6}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from: #fbbf24 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 191 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bloom2{--tw-gradient-from: #993456 var(--tw-gradient-from-position);--tw-gradient-to: rgb(153 52 86 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-100{--tw-gradient-from: #fbe8ef var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 232 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-50{--tw-gradient-from: #fdf4f7 var(--tw-gradient-from-position);--tw-gradient-to: rgb(253 244 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-900\/10{--tw-gradient-from: rgb(107 42 65 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-900\/70{--tw-gradient-from: rgb(107 42 65 / .7) var(--tw-gradient-from-position);--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blush-900\/75{--tw-gradient-from: rgb(107 42 65 / .75) var(--tw-gradient-from-position);--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-sage-700{--tw-gradient-from: #405837 var(--tw-gradient-from-position);--tw-gradient-to: rgb(64 88 55 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-sage-900\/40{--tw-gradient-from: rgb(46 61 41 / .4) var(--tw-gradient-from-position);--tw-gradient-to: rgb(46 61 41 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-300{--tw-gradient-from: #cbd5e1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(203 213 225 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-400{--tw-gradient-from: #94a3b8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(148 163 184 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500{--tw-gradient-from: #8b5cf6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-blush-900\/20{--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(107 42 65 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blush-900\/40{--tw-gradient-to: rgb(107 42 65 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(107 42 65 / .4) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cream{--tw-gradient-to: rgb(253 250 245 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #fdfaf5 var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-amber-500{--tw-gradient-to: #f59e0b var(--tw-gradient-to-position)}.to-bloom{--tw-gradient-to: #d05a82 var(--tw-gradient-to-position)}.to-fuchsia-500{--tw-gradient-to: #d946ef var(--tw-gradient-to-position)}.to-ivory{--tw-gradient-to: #fbf6ee var(--tw-gradient-to-position)}.to-sage-100{--tw-gradient-to: #e6ede2 var(--tw-gradient-to-position)}.to-sage-50{--tw-gradient-to: #f4f7f3 var(--tw-gradient-to-position)}.to-sage-800{--tw-gradient-to: #36482f var(--tw-gradient-to-position)}.to-slate-400{--tw-gradient-to: #94a3b8 var(--tw-gradient-to-position)}.to-slate-500{--tw-gradient-to: #64748b var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-14{padding-top:3.5rem;padding-bottom:3.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1\.5{padding-bottom:.375rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.text-\[20px\]{font-size:20px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-\[1\.05\]{line-height:1.05}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[0\.12em\]{letter-spacing:.12em}.tracking-\[0\.25em\]{letter-spacing:.25em}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-\[0\.35em\]{letter-spacing:.35em}.tracking-\[0\.3em\]{letter-spacing:.3em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#3c4043\]{--tw-text-opacity: 1;color:rgb(60 64 67 / var(--tw-text-opacity, 1))}.text-\[\#43343a\]{--tw-text-opacity: 1;color:rgb(67 52 58 / var(--tw-text-opacity, 1))}.text-\[\#5a474d\]{--tw-text-opacity: 1;color:rgb(90 71 77 / var(--tw-text-opacity, 1))}.text-\[\#6b5258\]{--tw-text-opacity: 1;color:rgb(107 82 88 / var(--tw-text-opacity, 1))}.text-\[\#8a7077\]{--tw-text-opacity: 1;color:rgb(138 112 119 / var(--tw-text-opacity, 1))}.text-\[\#a08a90\]{--tw-text-opacity: 1;color:rgb(160 138 144 / var(--tw-text-opacity, 1))}.text-\[\#e6edf6\]{--tw-text-opacity: 1;color:rgb(230 237 246 / var(--tw-text-opacity, 1))}.text-accent{--tw-text-opacity: 1;color:rgb(61 220 151 / var(--tw-text-opacity, 1))}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-bloom{--tw-text-opacity: 1;color:rgb(208 90 130 / var(--tw-text-opacity, 1))}.text-bloom\/30{color:#d05a824d}.text-bloom\/40{color:#d05a8266}.text-bloom2{--tw-text-opacity: 1;color:rgb(153 52 86 / var(--tw-text-opacity, 1))}.text-blush-200{--tw-text-opacity: 1;color:rgb(246 205 218 / var(--tw-text-opacity, 1))}.text-blush-200\/40{color:#f6cdda66}.text-blush-300{--tw-text-opacity: 1;color:rgb(238 167 190 / var(--tw-text-opacity, 1))}.text-blush-400{--tw-text-opacity: 1;color:rgb(224 122 156 / var(--tw-text-opacity, 1))}.text-blush-500{--tw-text-opacity: 1;color:rgb(208 90 130 / var(--tw-text-opacity, 1))}.text-blush-600{--tw-text-opacity: 1;color:rgb(184 67 107 / var(--tw-text-opacity, 1))}.text-blush-700{--tw-text-opacity: 1;color:rgb(153 52 86 / var(--tw-text-opacity, 1))}.text-blush-900{--tw-text-opacity: 1;color:rgb(107 42 65 / var(--tw-text-opacity, 1))}.text-brand{--tw-text-opacity: 1;color:rgb(0 160 200 / var(--tw-text-opacity, 1))}.text-cream\/50{color:#fdfaf580}.text-cream\/60{color:#fdfaf599}.text-cream\/70{color:#fdfaf5b3}.text-cream\/75{color:#fdfaf5bf}.text-cream\/80{color:#fdfaf5cc}.text-cream\/85{color:#fdfaf5d9}.text-cream\/90{color:#fdfaf5e6}.text-cream\/95{color:#fdfaf5f2}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-gold{--tw-text-opacity: 1;color:rgb(196 163 90 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-ink{--tw-text-opacity: 1;color:rgb(11 15 23 / var(--tw-text-opacity, 1))}.text-leaf{--tw-text-opacity: 1;color:rgb(78 110 67 / var(--tw-text-opacity, 1))}.text-rose-400{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.text-sage-200{--tw-text-opacity: 1;color:rgb(205 221 198 / var(--tw-text-opacity, 1))}.text-sage-300{--tw-text-opacity: 1;color:rgb(168 195 158 / var(--tw-text-opacity, 1))}.text-sage-300\/40{color:#a8c39e66}.text-sage-600{--tw-text-opacity: 1;color:rgb(78 110 67 / var(--tw-text-opacity, 1))}.text-sage-700{--tw-text-opacity: 1;color:rgb(64 88 55 / var(--tw-text-opacity, 1))}.text-sage-800{--tw-text-opacity: 1;color:rgb(54 72 47 / var(--tw-text-opacity, 1))}.text-sky-400{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-violet-300{--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/20{color:#fff3}.text-white\/70{color:#ffffffb3}.text-white\/85{color:#ffffffd9}.line-through{text-decoration-line:line-through}.underline-offset-2{text-underline-offset:2px}.accent-bloom{accent-color:#d05a82}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-bloom{--tw-shadow: 0 20px 60px -18px rgba(153,52,86,.3);--tw-shadow-colored: 0 20px 60px -18px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-petal{--tw-shadow: 0 10px 40px -12px rgba(208,90,130,.25);--tw-shadow-colored: 0 10px 40px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-soft{--tw-shadow: 0 8px 30px -10px rgba(110,80,90,.18);--tw-shadow-colored: 0 8px 30px -10px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-bloom{--tw-shadow-color: #d05a82;--tw-shadow: var(--tw-shadow-colored)}.shadow-petal{--tw-shadow-color: #fbe8ef;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}:root{--blush: #d05a82;--blush-deep: #993456;--sage: #4e6e43;--cream: #fdfaf5;--gold: #c4a35a}body{margin:0;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:#43343a;background:var(--cream);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}*{box-sizing:border-box}html.lang-ko body,html.lang-ko .admin-shell,html.lang-ko input,html.lang-ko textarea,html.lang-ko select,html.lang-ko button,html.lang-ko p,html.lang-ko span,html.lang-ko a,html.lang-ko li,html.lang-ko td,html.lang-ko th,html.lang-ko label,html.lang-ko h1,html.lang-ko h2,html.lang-ko h3,html.lang-ko h4{font-family:Malgun Gothic,맑은 고딕,Apple SD Gothic Neo,Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}html.lang-ko .font-display{font-family:Cormorant Garamond,Malgun Gothic,맑은 고딕,Georgia,serif}html.lang-ko .font-serif{font-family:Playfair Display,Malgun Gothic,맑은 고딕,Georgia,serif}.admin-shell{color-scheme:dark;background:#0b0f17;color:#e6edf6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.font-display{font-family:Cormorant Garamond,Georgia,serif}.font-serif{font-family:Playfair Display,Georgia,serif}html{scroll-behavior:smooth}::-moz-selection{background:#d05a822e}::selection{background:#d05a822e}.botanical-divider{display:flex;align-items:center;justify-content:center;gap:.75rem;color:#a8c39e}.botanical-divider:before,.botanical-divider:after{content:"";height:1px;flex:1;max-width:7rem;background:linear-gradient(to var(--dir, right),transparent,rgba(168,195,158,.7))}.botanical-divider:before{--dir: left}.petal-layer{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;pointer-events:none;z-index:0}.petal{position:absolute;top:-8vh;border-radius:50% 0 50% 50%;background:radial-gradient(circle at 30% 30%,#eea7bef2,#d05a828c);opacity:0;will-change:transform,opacity;animation:petalfall linear infinite}.petal.sage{background:radial-gradient(circle at 30% 30%,#a8c39ee6,#648a5680)}.petal.cream{background:radial-gradient(circle at 30% 30%,#fdf6eef2,#c4a35a66)}.zoom-frame{overflow:hidden}.zoom-frame img{transition:transform .9s cubic-bezier(.22,1,.36,1)}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}.petal-layer{display:none}}.thin-scroll::-webkit-scrollbar{height:6px}.thin-scroll::-webkit-scrollbar-thumb{background:#d05a8240;border-radius:999px}.placeholder\:text-blush-300::-moz-placeholder{--tw-text-opacity: 1;color:rgb(238 167 190 / var(--tw-text-opacity, 1))}.placeholder\:text-blush-300::placeholder{--tw-text-opacity: 1;color:rgb(238 167 190 / var(--tw-text-opacity, 1))}.focus-within\:border-bloom:focus-within{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.hover\:border-bloom:hover{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.hover\:border-blush-300:hover{--tw-border-opacity: 1;border-color:rgb(238 167 190 / var(--tw-border-opacity, 1))}.hover\:bg-bloom2:hover{--tw-bg-opacity: 1;background-color:rgb(153 52 86 / var(--tw-bg-opacity, 1))}.hover\:bg-blush-100:hover{--tw-bg-opacity: 1;background-color:rgb(251 232 239 / var(--tw-bg-opacity, 1))}.hover\:bg-blush-50:hover{--tw-bg-opacity: 1;background-color:rgb(253 244 247 / var(--tw-bg-opacity, 1))}.hover\:bg-blush-600:hover{--tw-bg-opacity: 1;background-color:rgb(184 67 107 / var(--tw-bg-opacity, 1))}.hover\:bg-brand\/90:hover{background-color:#00a0c8e6}.hover\:bg-card\/60:hover{background-color:#1a223499}.hover\:bg-cream:hover{--tw-bg-opacity: 1;background-color:rgb(253 250 245 / var(--tw-bg-opacity, 1))}.hover\:bg-panel\/50:hover{background-color:#13192780}.hover\:bg-petal:hover{--tw-bg-opacity: 1;background-color:rgb(251 232 239 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/30:hover{background-color:#ffffff4d}.hover\:bg-white\/70:hover{background-color:#ffffffb3}.hover\:text-bloom:hover,.hover\:text-blush-500:hover{--tw-text-opacity: 1;color:rgb(208 90 130 / var(--tw-text-opacity, 1))}.hover\:text-blush-600:hover{--tw-text-opacity: 1;color:rgb(184 67 107 / var(--tw-text-opacity, 1))}.hover\:text-blush-700:hover{--tw-text-opacity: 1;color:rgb(153 52 86 / var(--tw-text-opacity, 1))}.hover\:text-brand:hover{--tw-text-opacity: 1;color:rgb(0 160 200 / var(--tw-text-opacity, 1))}.hover\:text-cream\/80:hover{color:#fdfaf5cc}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-bloom:hover{--tw-shadow: 0 20px 60px -18px rgba(153,52,86,.3);--tw-shadow-colored: 0 20px 60px -18px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-shadow-color: #d05a82;--tw-shadow: var(--tw-shadow-colored)}.focus\:border-bloom:focus{--tw-border-opacity: 1;border-color:rgb(208 90 130 / var(--tw-border-opacity, 1))}.focus\:border-blush-300:focus{--tw-border-opacity: 1;border-color:rgb(238 167 190 / var(--tw-border-opacity, 1))}.focus\:border-blush-400:focus{--tw-border-opacity: 1;border-color:rgb(224 122 156 / var(--tw-border-opacity, 1))}.focus\:border-brand:focus{--tw-border-opacity: 1;border-color:rgb(0 160 200 / var(--tw-border-opacity, 1))}.disabled\:opacity-60:disabled{opacity:.6}.group:hover .group-hover\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:gap-2{gap:.5rem}.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width: 640px){.sm\:flex{display:flex}.sm\:flex-row{flex-direction:row}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:.75rem}}@media (min-width: 768px){.md\:left-5{left:1.25rem}.md\:right-5{right:1.25rem}.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:block{display:block}.md\:flex{display:flex}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[200px_1fr\]{grid-template-columns:200px 1fr}.md\:flex-row{flex-direction:row}.md\:p-10{padding:2.5rem}.md\:p-12{padding:3rem}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}.md\:text-6xl{font-size:3.75rem;line-height:1}}@media (min-width: 1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}} diff --git a/backend/src/main/resources/static/assets/index-CUN395kM.js b/backend/src/main/resources/static/assets/index-CUN395kM.js new file mode 100644 index 0000000..f0e4756 --- /dev/null +++ b/backend/src/main/resources/static/assets/index-CUN395kM.js @@ -0,0 +1,489 @@ +var wA=e=>{throw TypeError(e)};var Qg=(e,t,n)=>t.has(e)||wA("Cannot "+n);var R=(e,t,n)=>(Qg(e,t,"read from private field"),n?n.call(e):t.get(e)),ce=(e,t,n)=>t.has(e)?wA("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ee=(e,t,n,r)=>(Qg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Oe=(e,t,n)=>(Qg(e,t,"access private method"),n);var rh=(e,t,n,r)=>({set _(a){ee(e,t,a,n)},get _(){return R(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var ah=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $P={exports:{}},xy={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var az=Symbol.for("react.transitional.element"),iz=Symbol.for("react.fragment");function kP(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:az,type:e,key:r,ref:t!==void 0?t:null,props:n}}xy.Fragment=iz;xy.jsx=kP;xy.jsxs=kP;$P.exports=xy;var u=$P.exports,LP={exports:{}},be={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var aS=Symbol.for("react.transitional.element"),sz=Symbol.for("react.portal"),oz=Symbol.for("react.fragment"),lz=Symbol.for("react.strict_mode"),cz=Symbol.for("react.profiler"),uz=Symbol.for("react.consumer"),fz=Symbol.for("react.context"),dz=Symbol.for("react.forward_ref"),hz=Symbol.for("react.suspense"),pz=Symbol.for("react.memo"),zP=Symbol.for("react.lazy"),mz=Symbol.for("react.activity"),jA=Symbol.iterator;function yz(e){return e===null||typeof e!="object"?null:(e=jA&&e[jA]||e["@@iterator"],typeof e=="function"?e:null)}var IP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},BP=Object.assign,UP={};function Oc(e,t,n){this.props=e,this.context=t,this.refs=UP,this.updater=n||IP}Oc.prototype.isReactComponent={};Oc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Oc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function FP(){}FP.prototype=Oc.prototype;function iS(e,t,n){this.props=e,this.context=t,this.refs=UP,this.updater=n||IP}var sS=iS.prototype=new FP;sS.constructor=iS;BP(sS,Oc.prototype);sS.isPureReactComponent=!0;var AA=Array.isArray;function Fb(){}var at={H:null,A:null,T:null,S:null},VP=Object.prototype.hasOwnProperty;function oS(e,t,n){var r=n.ref;return{$$typeof:aS,type:e,key:t,ref:r!==void 0?r:null,props:n}}function gz(e,t){return oS(e.type,t,e.props)}function lS(e){return typeof e=="object"&&e!==null&&e.$$typeof===aS}function vz(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var OA=/\/+/g;function Zg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?vz(""+e.key):t.toString(36)}function bz(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Fb,Fb):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Bo(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case aS:case sz:s=!0;break;case zP:return s=e._init,Bo(s(e._payload),t,n,r,a)}}if(s)return a=a(e),s=r===""?"."+Zg(e,0):r,AA(a)?(n="",s!=null&&(n=s.replace(OA,"$&/")+"/"),Bo(a,t,n,"",function(c){return c})):a!=null&&(lS(a)&&(a=gz(a,n+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(OA,"$&/")+"/")+s)),t.push(a)),1;s=0;var o=r===""?".":r+":";if(AA(e))for(var l=0;l>>1,H=P[F];if(0>>1;Fa(te,I))Za(ye,te)?(P[F]=ye,P[Z]=I,F=Z):(P[F]=te,P[q]=I,F=q);else if(Za(ye,I))P[F]=ye,P[Z]=I,F=Z;else break e}}return k}function a(P,k){var I=P.sortIndex-k.sortIndex;return I!==0?I:P.id-k.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],c=[],f=1,d=null,h=3,p=!1,m=!1,g=!1,b=!1,y=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function w(P){for(var k=n(c);k!==null;){if(k.callback===null)r(c);else if(k.startTime<=P)r(c),k.sortIndex=k.expirationTime,t(l,k);else break;k=n(c)}}function S(P){if(g=!1,w(P),!m)if(n(l)!==null)m=!0,j||(j=!0,C());else{var k=n(c);k!==null&&$(S,k.startTime-P)}}var j=!1,O=-1,E=5,T=-1;function N(){return b?!0:!(e.unstable_now()-TP&&N());){var F=d.callback;if(typeof F=="function"){d.callback=null,h=d.priorityLevel;var H=F(d.expirationTime<=P);if(P=e.unstable_now(),typeof H=="function"){d.callback=H,w(P),k=!0;break t}d===n(l)&&r(l),w(P)}else r(l);d=n(l)}if(d!==null)k=!0;else{var Y=n(c);Y!==null&&$(S,Y.startTime-P),k=!1}}break e}finally{d=null,h=I,p=!1}k=void 0}}finally{k?C():j=!1}}}var C;if(typeof x=="function")C=function(){x(M)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,D=L.port2;L.port1.onmessage=M,C=function(){D.postMessage(null)}}else C=function(){y(M,0)};function $(P,k){O=y(function(){P(e.unstable_now())},k)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125F?(P.sortIndex=I,t(c,P),n(l)===null&&P===n(c)&&(g?(v(O),O=-1):g=!0,$(S,I-F))):(P.sortIndex=H,t(l,P),m||p||(m=!0,j||(j=!0,C()))),P},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(P){var k=h;return function(){var I=h;h=k;try{return P.apply(this,arguments)}finally{h=I}}}})(KP);qP.exports=KP;var wz=qP.exports,GP={exports:{}},vn={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var jz=A;function YP(e){var t="https://react.dev/errors/"+e;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(XP)}catch(e){console.error(e)}}XP(),GP.exports=vn;var Ez=GP.exports;/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var kt=wz,WP=A,Tz=Ez;function U(e){var t="https://react.dev/errors/"+e;if(1Ho||(e.current=Yb[Ho],Yb[Ho]=null,Ho--)}function Ze(e,t){Ho++,Yb[Ho]=e.current,e.current=t}var na=ua(null),cf=ua(null),ki=ua(null),wp=ua(null);function jp(e,t){switch(Ze(ki,t),Ze(cf,e),Ze(na,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?D2(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=D2(t),e=wD(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}qt(na),Ze(na,e)}function kl(){qt(na),qt(cf),qt(ki)}function Xb(e){e.memoizedState!==null&&Ze(wp,e);var t=na.current,n=wD(t,e.type);t!==n&&(Ze(cf,e),Ze(na,n))}function Ap(e){cf.current===e&&(qt(na),qt(cf)),wp.current===e&&(qt(wp),xf._currentValue=Fs)}var Jg,CA;function ps(e){if(Jg===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jg=t&&t[1]||"",CA=-1)":-1a||l[r]!==c[a]){var f=` +`+l[r].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=r&&0<=a);break}}}finally{ev=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ps(n):""}function Mz(e,t){switch(e.tag){case 26:case 27:case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return e.child!==t&&t!==null?ps("Suspense Fallback"):ps("Suspense");case 19:return ps("SuspenseList");case 0:case 15:return tv(e.type,!1);case 11:return tv(e.type.render,!1);case 1:return tv(e.type,!0);case 31:return ps("Activity");default:return""}}function _A(e){try{var t="",n=null;do t+=Mz(e,n),n=e,e=e.return;while(e);return t}catch(r){return` +Error generating stack: `+r.message+` +`+r.stack}}var Wb=Object.prototype.hasOwnProperty,fS=kt.unstable_scheduleCallback,nv=kt.unstable_cancelCallback,Rz=kt.unstable_shouldYield,Dz=kt.unstable_requestPaint,qn=kt.unstable_now,$z=kt.unstable_getCurrentPriorityLevel,rM=kt.unstable_ImmediatePriority,aM=kt.unstable_UserBlockingPriority,Op=kt.unstable_NormalPriority,kz=kt.unstable_LowPriority,iM=kt.unstable_IdlePriority,Lz=kt.log,zz=kt.unstable_setDisableYieldValue,wd=null,Kn=null;function Ci(e){if(typeof Lz=="function"&&zz(e),Kn&&typeof Kn.setStrictMode=="function")try{Kn.setStrictMode(wd,e)}catch{}}var Gn=Math.clz32?Math.clz32:Uz,Iz=Math.log,Bz=Math.LN2;function Uz(e){return e>>>=0,e===0?32:31-(Iz(e)/Bz|0)|0}var oh=256,lh=262144,ch=4194304;function ms(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function jy(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var a=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~i,r!==0?a=ms(r):(s&=o,s!==0?a=ms(s):n||(n=o&~e,n!==0&&(a=ms(n))))):(o=r&~i,o!==0?a=ms(o):s!==0?a=ms(s):n||(n=r&~e,n!==0&&(a=ms(n)))),a===0?0:t!==0&&t!==a&&!(t&i)&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function jd(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fz(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sM(){var e=ch;return ch<<=1,!(ch&62914560)&&(ch=4194304),e}function rv(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ad(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Vz(e,t,n,r,a,i){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Xz=/[\n"\\]/g;function fr(e){return e.replace(Xz,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Jb(e,t,n,r,a,i,s,o){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+lr(t)):e.value!==""+lr(t)&&(e.value=""+lr(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?e0(e,s,lr(t)):n!=null?e0(e,s,lr(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+lr(o):e.removeAttribute("name")}function mM(e,t,n,r,a,i,s,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Zb(e);return}n=n!=null?""+lr(n):"",t=t!=null?""+lr(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Zb(e)}function e0(e,t,n){t==="number"&&Ep(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function dl(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),n0=!1;if(Ha)try{var eu={};Object.defineProperty(eu,"passive",{get:function(){n0=!0}}),window.addEventListener("test",eu,eu),window.removeEventListener("test",eu,eu)}catch{n0=!1}var _i=null,gS=null,Qh=null;function xM(){if(Qh)return Qh;var e,t=gS,n=t.length,r,a="value"in _i?_i.value:_i.textContent,i=a.length;for(e=0;e=Du),UA=" ",FA=!1;function wM(e,t){switch(e){case"keyup":return jI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Go=!1;function OI(e,t){switch(e){case"compositionend":return jM(t);case"keypress":return t.which!==32?null:(FA=!0,UA);case"textInput":return e=t.data,e===UA&&FA?null:e;default:return null}}function EI(e,t){if(Go)return e==="compositionend"||!bS&&wM(e,t)?(e=xM(),Qh=gS=_i=null,Go=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=GA(n)}}function TM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?TM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function NM(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ep(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ep(e.document)}return t}function xS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var DI=Ha&&"documentMode"in document&&11>=document.documentMode,Yo=null,r0=null,ku=null,a0=!1;function XA(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;a0||Yo==null||Yo!==Ep(r)||(r=Yo,"selectionStart"in r&&xS(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ku&&df(ku,r)||(ku=r,r=Hp(r0,"onSelect"),0>=s,a-=s,Yr=1<<32-Gn(t)+a|n<E?(T=O,O=null):T=O.sibling;var N=h(y,O,x[E],w);if(N===null){O===null&&(O=T);break}e&&O&&N.alternate===null&&t(y,O),v=i(N,v,E),j===null?S=N:j.sibling=N,j=N,O=T}if(E===x.length)return n(y,O),Ce&&Oa(y,E),S;if(O===null){for(;EE?(T=O,O=null):T=O.sibling;var M=h(y,O,N.value,w);if(M===null){O===null&&(O=T);break}e&&O&&M.alternate===null&&t(y,O),v=i(M,v,E),j===null?S=M:j.sibling=M,j=M,O=T}if(N.done)return n(y,O),Ce&&Oa(y,E),S;if(O===null){for(;!N.done;E++,N=x.next())N=d(y,N.value,w),N!==null&&(v=i(N,v,E),j===null?S=N:j.sibling=N,j=N);return Ce&&Oa(y,E),S}for(O=r(O);!N.done;E++,N=x.next())N=p(O,y,E,N.value,w),N!==null&&(e&&N.alternate!==null&&O.delete(N.key===null?E:N.key),v=i(N,v,E),j===null?S=N:j.sibling=N,j=N);return e&&O.forEach(function(C){return t(y,C)}),Ce&&Oa(y,E),S}function b(y,v,x,w){if(typeof x=="object"&&x!==null&&x.type===Vo&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case sh:e:{for(var S=x.key;v!==null;){if(v.key===S){if(S=x.type,S===Vo){if(v.tag===7){n(y,v.sibling),w=a(v,x.props.children),w.return=y,y=w;break e}}else if(v.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===hi&&ys(S)===v.type){n(y,v.sibling),w=a(v,x.props),nu(w,x),w.return=y,y=w;break e}n(y,v);break}else t(y,v);v=v.sibling}x.type===Vo?(w=Vs(x.props.children,y.mode,w,x.key),w.return=y,y=w):(w=Jh(x.type,x.key,x.props,null,y.mode,w),nu(w,x),w.return=y,y=w)}return s(y);case wu:e:{for(S=x.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){n(y,v.sibling),w=a(v,x.children||[]),w.return=y,y=w;break e}else{n(y,v);break}else t(y,v);v=v.sibling}w=dv(x,y.mode,w),w.return=y,y=w}return s(y);case hi:return x=ys(x),b(y,v,x,w)}if(ju(x))return m(y,v,x,w);if(Jc(x)){if(S=Jc(x),typeof S!="function")throw Error(U(150));return x=S.call(x),g(y,v,x,w)}if(typeof x.then=="function")return b(y,v,hh(x),w);if(x.$$typeof===Ca)return b(y,v,dh(y,x),w);ph(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,v!==null&&v.tag===6?(n(y,v.sibling),w=a(v,x),w.return=y,y=w):(n(y,v),w=fv(x,y.mode,w),w.return=y,y=w),s(y)):n(y,v)}return function(y,v,x,w){try{mf=0;var S=b(y,v,x,w);return ml=null,S}catch(O){if(O===Cc||O===Cy)throw O;var j=Fn(29,O,null,y.mode);return j.lanes=w,j.return=y,j}finally{}}}var eo=VM(!0),HM=VM(!1),pi=!1;function CS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function f0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function zi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ii(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Me&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Np(e),$M(e,null,n),t}return Ny(e,r,t,n),Np(e)}function zu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lM(e,n)}}function pv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var d0=!1;function Iu(){if(d0){var e=pl;if(e!==null)throw e}}function Bu(e,t,n,r){d0=!1;var a=e.updateQueue;pi=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var l=o,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==s&&(o===null?f.firstBaseUpdate=c:o.next=c,f.lastBaseUpdate=l))}if(i!==null){var d=a.baseState;s=0,f=c=l=null,o=i;do{var h=o.lane&-536870913,p=h!==o.lane;if(p?(Te&h)===h:(r&h)===h){h!==0&&h===Il&&(d0=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,g=o;h=t;var b=n;switch(g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(b,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,h=typeof m=="function"?m.call(b,d,h):m,h==null)break e;d=it({},d,h);break e;case 2:pi=!0}}h=o.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=a.callbacks,p===null?a.callbacks=[h]:p.push(h))}else p={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(c=f=p,l=d):f=f.next=p,s|=h;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);f===null&&(l=d),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=f,i===null&&(a.shared.lanes=0),Zi|=s,e.lanes=s,e.memoizedState=d}}function qM(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function KM(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ei?i:8;var s=he.T,o={};he.T=o,FS(e,!1,t,n);try{var l=a(),c=he.S;if(c!==null&&c(o,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var f=VI(l,r);Uu(e,t,f,Yn(e))}else Uu(e,t,r,Yn(e))}catch(d){Uu(e,t,{then:function(){},status:"rejected",reason:d},Yn())}finally{De.p=i,s!==null&&o.types!==null&&(s.types=o.types),he.T=s}}function XI(){}function g0(e,t,n,r){if(e.tag!==5)throw Error(U(476));var a=gR(e).queue;yR(e,a,t,Fs,n===null?XI:function(){return vR(e),n(r)})}function gR(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Fs,baseState:Fs,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:Fs},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vR(e){var t=gR(e);t.next===null&&(t=e.alternate.memoizedState),Uu(e,t.next.queue,{},Yn())}function US(){return en(xf)}function bR(){return wt().memoizedState}function xR(){return wt().memoizedState}function WI(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Yn();e=zi(n);var r=Ii(t,e,n);r!==null&&(Nn(r,t,n),zu(r,t,n)),t={cache:ES()},e.payload=t;return}t=t.return}}function QI(e,t,n){var r=Yn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ry(e)?wR(t,n):(n=wS(e,t,n,r),n!==null&&(Nn(n,e,r),jR(n,t,r)))}function SR(e,t,n){var r=Yn();Uu(e,t,n,r)}function Uu(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ry(e))wR(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,o=i(s,n);if(a.hasEagerState=!0,a.eagerState=o,Qn(o,s))return Ny(e,t,a,0),Ye===null&&Ty(),!1}catch{}finally{}if(n=wS(e,t,a,r),n!==null)return Nn(n,e,r),jR(n,t,r),!0}return!1}function FS(e,t,n,r){if(r={lane:2,revertLane:QS(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ry(e)){if(t)throw Error(U(479))}else t=wS(e,n,r,2),t!==null&&Nn(t,e,2)}function Ry(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function wR(e,t){yl=Dp=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function jR(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lM(e,n)}}var gf={readContext:en,use:Py,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};gf.useEffectEvent=pt;var AR={readContext:en,use:Py,useCallback:function(e,t){return fn().memoizedState=[e,t===void 0?null:t],e},useContext:en,useEffect:u2,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,np(4194308,4,fR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return np(4194308,4,e,t)},useInsertionEffect:function(e,t){np(4,2,e,t)},useMemo:function(e,t){var n=fn();t=t===void 0?null:t;var r=e();if(to){Ci(!0);try{e()}finally{Ci(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=fn();if(n!==void 0){var a=n(t);if(to){Ci(!0);try{n(t)}finally{Ci(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=QI.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=fn();return e={current:e},t.memoizedState=e},useState:function(e){e=m0(e);var t=e.queue,n=SR.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:IS,useDeferredValue:function(e,t){var n=fn();return BS(n,e,t)},useTransition:function(){var e=m0(!1);return e=yR.bind(null,xe,e.queue,!0,!1),fn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=xe,a=fn();if(Ce){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ye===null)throw Error(U(349));Te&127||QM(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,u2(JM.bind(null,r,i,e),[e]),r.flags|=2048,Ul(9,{destroy:void 0},ZM.bind(null,r,i,n,t),null),n},useId:function(){var e=fn(),t=Ye.identifierPrefix;if(Ce){var n=Xr,r=Yr;n=(r&~(1<<32-Gn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=$p++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?s.createElement(a,{is:r.is}):s.createElement(a)}}i[Qt]=t,i[_n]=r;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)i.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(tn(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ga(t)}}return et(t),wv(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ga(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(e=ki.current,_o(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Zt,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Qt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||SD(e.nodeValue,n)),e||Wi(t,!0)}else e=qp(e).createTextNode(r),e[Qt]=t,t.stateNode=e}return et(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=_o(t),n!==null){if(e===null){if(!r)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[Qt]=t}else Zs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;et(t),e=!1}else n=hv(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Un(t),t):(Un(t),null);if(t.flags&128)throw Error(U(558))}return et(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=_o(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(U(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(U(317));a[Qt]=t}else Zs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;et(t),a=!1}else a=hv(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Un(t),t):(Un(t),null)}return Un(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),mh(t,t.updateQueue),et(t),null);case 4:return kl(),e===null&&ZS(t.stateNode.containerInfo),et(t),null;case 10:return La(t.type),et(t),null;case 19:if(qt(xt),r=t.memoizedState,r===null)return et(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)ru(r,!1);else{if(vt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Rp(e),i!==null){for(t.flags|=128,ru(r,!1),e=i.updateQueue,t.updateQueue=e,mh(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)kM(n,e),n=n.sibling;return Ze(xt,xt.current&1|2),Ce&&Oa(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&qn()>Ip&&(t.flags|=128,a=!0,ru(r,!1),t.lanes=4194304)}else{if(!a)if(e=Rp(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,mh(t,e),ru(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Ce)return et(t),null}else 2*qn()-r.renderingStartTime>Ip&&n!==536870912&&(t.flags|=128,a=!0,ru(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=qn(),e.sibling=null,n=xt.current,Ze(xt,a?n&1|2:n&1),Ce&&Oa(t,r.treeForkCount),e):(et(t),null);case 22:case 23:return Un(t),_S(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),n=t.updateQueue,n!==null&&mh(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&qt(Hs),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),La(Tt),et(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function nB(e,t){switch(OS(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return La(Tt),kl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ap(t),null;case 31:if(t.memoizedState!==null){if(Un(t),t.alternate===null)throw Error(U(340));Zs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Un(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Zs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qt(xt),null;case 4:return kl(),null;case 10:return La(t.type),null;case 22:case 23:return Un(t),_S(),e!==null&&qt(Hs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return La(Tt),null;case 25:return null;default:return null}}function kR(e,t){switch(OS(t),t.tag){case 3:La(Tt),kl();break;case 26:case 27:case 5:Ap(t);break;case 4:kl();break;case 31:t.memoizedState!==null&&Un(t);break;case 13:Un(t);break;case 19:qt(xt);break;case 10:La(t.type);break;case 22:case 23:Un(t),_S(),e!==null&&qt(Hs);break;case 24:La(Tt)}}function Cd(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,s=n.inst;r=i(),s.destroy=r}n=n.next}while(n!==a)}}catch(o){Ue(t,t.return,o)}}function Qi(e,t,n){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var i=a.next;r=i;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(o!==void 0){s.destroy=void 0,a=t;var l=n,c=o;try{c()}catch(f){Ue(a,l,f)}}}r=r.next}while(r!==i)}}catch(f){Ue(t,t.return,f)}}function LR(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{KM(t,n)}catch(r){Ue(e,e.return,r)}}}function zR(e,t,n){n.props=no(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Ue(e,t,r)}}function Fu(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(a){Ue(e,t,a)}}function Wr(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){Ue(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Ue(e,t,a)}else n.current=null}function IR(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Ue(e,e.return,a)}}function jv(e,t,n){try{var r=e.stateNode;AB(r,e.type,n,t),r[_n]=t}catch(a){Ue(e,e.return,a)}}function BR(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ts(e.type)||e.tag===4}function Av(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||BR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ts(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function w0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_a));else if(r!==4&&(r===27&&ts(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(w0(e,t,n),e=e.sibling;e!==null;)w0(e,t,n),e=e.sibling}function zp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ts(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(zp(e,t,n),e=e.sibling;e!==null;)zp(e,t,n),e=e.sibling}function UR(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);tn(t,r,n),t[Qt]=e,t[_n]=n}catch(i){Ue(e,e.return,i)}}var Na=!1,Et=!1,Ov=!1,j2=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function rB(e,t){if(e=e.containerInfo,C0=Xp,e=NM(e),xS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,o=-1,l=-1,c=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==n||a!==0&&d.nodeType!==3||(o=s+a),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===a&&(o=s),h===i&&++f===r&&(l=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(_0={focusedElem:e,selectionRange:n},Xp=!1,Ft=t;Ft!==null;)if(t=Ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ft=e;else for(;Ft!==null;){switch(t=Ft,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),tn(i,r,n),i[Qt]=e,Vt(i),r=i;break e;case"link":var s=V2("link","href",a).get(r+(n.href||""));if(s){for(var o=0;ob&&(s=b,b=g,g=s);var y=YA(o,g),v=YA(o,b);if(y&&v&&(p.rangeCount!==1||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var x=d.createRange();x.setStart(y.node,y.offset),p.removeAllRanges(),g>b?(p.addRange(x),p.extend(v.node,v.offset)):(x.setEnd(v.node,v.offset),p.addRange(x))}}}}for(d=[],p=o;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;on?32:n,he.T=null,n=O0,O0=null;var i=Ui,s=za;if(Dt=0,Vl=Ui=null,za=0,Me&6)throw Error(U(331));var o=Me;if(Me|=4,ZR(i.current),XR(i,i.current,s,n),Me=o,_d(0,!1),Kn&&typeof Kn.onPostCommitFiberRoot=="function")try{Kn.onPostCommitFiberRoot(wd,i)}catch{}return!0}finally{De.p=a,he.T=r,hD(e,t)}}function T2(e,t,n){t=dr(n,t),t=b0(e.stateNode,t,2),e=Ii(e,t,2),e!==null&&(Ad(e,2),fa(e))}function Ue(e,t,n){if(e.tag===3)T2(e,e,n);else for(;t!==null;){if(t.tag===3){T2(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Bi===null||!Bi.has(r))){e=dr(n,e),n=CR(2),r=Ii(t,n,2),r!==null&&(_R(n,r,t,e),Ad(r,2),fa(r));break}}t=t.return}}function Tv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new sB;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(YS=!0,a.add(n),e=fB.bind(null,e,t,n),t.then(e,e))}function fB(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ye===e&&(Te&n)===n&&(vt===4||vt===3&&(Te&62914560)===Te&&300>qn()-Dy?!(Me&2)&&Hl(e,0):XS|=n,Fl===Te&&(Fl=0)),fa(e)}function mD(e,t){t===0&&(t=sM()),e=vo(e,t),e!==null&&(Ad(e,t),fa(e))}function dB(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),mD(e,n)}function hB(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(U(314))}r!==null&&r.delete(t),mD(e,n)}function pB(e,t){return fS(e,t)}var Fp=null,Fo=null,T0=!1,Vp=!1,Nv=!1,Ri=0;function fa(e){e!==Fo&&e.next===null&&(Fo===null?Fp=Fo=e:Fo=Fo.next=e),Vp=!0,T0||(T0=!0,yB())}function _d(e,t){if(!Nv&&Vp){Nv=!0;do for(var n=!1,r=Fp;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var s=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-Gn(42|e)+1)-1,i&=a&~(s&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,N2(r,i))}else i=Te,i=jy(r,r===Ye?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||jd(r,i)||(n=!0,N2(r,i));r=r.next}while(n);Nv=!1}}function mB(){yD()}function yD(){Vp=T0=!1;var e=0;Ri!==0&&EB()&&(e=Ri);for(var t=qn(),n=null,r=Fp;r!==null;){var a=r.next,i=gD(r,t);i===0?(r.next=null,n===null?Fp=a:n.next=a,a===null&&(Fo=n)):(n=r,(e!==0||i&3)&&(Vp=!0)),r=a}Dt!==0&&Dt!==5||_d(e),Ri!==0&&(Ri=0)}function gD(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0o)break;var f=l.transferSize,d=l.initiatorType;f&&R2(d)&&(l=l.responseEnd,s+=f*(l"u"?null:document;function ED(e,t,n){var r=Pc;if(r&&typeof t=="string"&&t){var a=fr(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),B2.has(a)||(B2.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),tn(t,"link",e),Vt(t),r.head.appendChild(t)))}}function $B(e){ei.D(e),ED("dns-prefetch",e,null)}function kB(e,t){ei.C(e,t),ED("preconnect",e,t)}function LB(e,t,n){ei.L(e,t,n);var r=Pc;if(r&&e&&t){var a='link[rel="preload"][as="'+fr(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+fr(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+fr(n.imageSizes)+'"]')):a+='[href="'+fr(e)+'"]';var i=a;switch(t){case"style":i=ql(e);break;case"script":i=Mc(e)}vr.has(i)||(e=it({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),vr.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(Pd(i))||t==="script"&&r.querySelector(Md(i))||(t=r.createElement("link"),tn(t,"link",e),Vt(t),r.head.appendChild(t)))}}function zB(e,t){ei.m(e,t);var n=Pc;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+fr(r)+'"][href="'+fr(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Mc(e)}if(!vr.has(i)&&(e=it({rel:"modulepreload",href:e},t),vr.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Md(i)))return}r=n.createElement("link"),tn(r,"link",e),Vt(r),n.head.appendChild(r)}}}function IB(e,t,n){ei.S(e,t,n);var r=Pc;if(r&&e){var a=fl(r).hoistableStyles,i=ql(e);t=t||"default";var s=a.get(i);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(Pd(i)))o.loading=5;else{e=it({rel:"stylesheet",href:e,"data-precedence":t},n),(n=vr.get(i))&&JS(e,n);var l=s=r.createElement("link");Vt(l),tn(l,"link",e),l._p=new Promise(function(c,f){l.onload=c,l.onerror=f}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,sp(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},a.set(i,s)}}}function BB(e,t){ei.X(e,t);var n=Pc;if(n&&e){var r=fl(n).hoistableScripts,a=Mc(e),i=r.get(a);i||(i=n.querySelector(Md(a)),i||(e=it({src:e,async:!0},t),(t=vr.get(a))&&ew(e,t),i=n.createElement("script"),Vt(i),tn(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function UB(e,t){ei.M(e,t);var n=Pc;if(n&&e){var r=fl(n).hoistableScripts,a=Mc(e),i=r.get(a);i||(i=n.querySelector(Md(a)),i||(e=it({src:e,async:!0,type:"module"},t),(t=vr.get(a))&&ew(e,t),i=n.createElement("script"),Vt(i),tn(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function U2(e,t,n,r){var a=(a=ki.current)?Kp(a):null;if(!a)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=ql(n.href),n=fl(a).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ql(n.href);var i=fl(a).hoistableStyles,s=i.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=a.querySelector(Pd(e)))&&!i._p&&(s.instance=i,s.state.loading=5),vr.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vr.set(e,n),i||FB(a,e,n,s.state))),t&&r===null)throw Error(U(528,""));return s}if(t&&r!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Mc(n),n=fl(a).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function ql(e){return'href="'+fr(e)+'"'}function Pd(e){return'link[rel="stylesheet"]['+e+"]"}function TD(e){return it({},e,{"data-precedence":e.precedence,precedence:null})}function FB(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),tn(t,"link",n),Vt(t),e.head.appendChild(t))}function Mc(e){return'[src="'+fr(e)+'"]'}function Md(e){return"script[async]"+e}function F2(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+fr(n.href)+'"]');if(r)return t.instance=r,Vt(r),r;var a=it({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Vt(r),tn(r,"style",a),sp(r,n.precedence,e),t.instance=r;case"stylesheet":a=ql(n.href);var i=e.querySelector(Pd(a));if(i)return t.state.loading|=4,t.instance=i,Vt(i),i;r=TD(n),(a=vr.get(a))&&JS(r,a),i=(e.ownerDocument||e).createElement("link"),Vt(i);var s=i;return s._p=new Promise(function(o,l){s.onload=o,s.onerror=l}),tn(i,"link",r),t.state.loading|=4,sp(i,n.precedence,e),t.instance=i;case"script":return i=Mc(n.src),(a=e.querySelector(Md(i)))?(t.instance=a,Vt(a),a):(r=n,(a=vr.get(i))&&(r=it({},n),ew(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),Vt(a),tn(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,sp(r,n.precedence,e));return t.instance}function sp(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,s=0;s title"):null)}function VB(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ND(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function HB(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=ql(r.href),i=t.querySelector(Pd(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Gp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Vt(i);return}i=t.ownerDocument||t,r=TD(r),(a=vr.get(a))&&JS(r,a),i=i.createElement("link"),Vt(i);var s=i;s._p=new Promise(function(o,l){s.onload=o,s.onerror=l}),tn(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Gp.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Dv=0;function qB(e,t){return e.stylesheets&&e.count===0&&lp(e,e.stylesheets),0Dv?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function Gp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yp=null;function lp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yp=new Map,t.forEach(KB,e),Yp=null,Gp.call(e))}function KB(e,t){if(!(t.state.loading&4)){var n=Yp.get(e);if(n)var r=n.get(null);else{n=new Map,Yp.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kD)}catch(e){console.error(e)}}kD(),HP.exports=Sy;var e8=HP.exports;const t8=Ie(e8);var Rd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Rs,Si,jl,OP,n8=(OP=class extends Rd{constructor(){super();ce(this,Rs);ce(this,Si);ce(this,jl);ee(this,jl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,Si)||this.setEventListener(R(this,jl))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Si))==null||t.call(this),ee(this,Si,void 0))}setEventListener(t){var n;ee(this,jl,t),(n=R(this,Si))==null||n.call(this),ee(this,Si,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){R(this,Rs)!==t&&(ee(this,Rs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof R(this,Rs)=="boolean"?R(this,Rs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Rs=new WeakMap,Si=new WeakMap,jl=new WeakMap,OP),iw=new n8,r8={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},wi,rS,EP,a8=(EP=class{constructor(){ce(this,wi,r8);ce(this,rS,!1)}setTimeoutProvider(e){ee(this,wi,e)}setTimeout(e,t){return R(this,wi).setTimeout(e,t)}clearTimeout(e){R(this,wi).clearTimeout(e)}setInterval(e,t){return R(this,wi).setInterval(e,t)}clearInterval(e){R(this,wi).clearInterval(e)}},wi=new WeakMap,rS=new WeakMap,EP),As=new a8;function i8(e){setTimeout(e,0)}var s8=typeof window>"u"||"Deno"in globalThis;function En(){}function o8(e,t){return typeof e=="function"?e(t):e}function z0(e){return typeof e=="number"&&e>=0&&e!==1/0}function LD(e,t){return Math.max(e+(t||0)-Date.now(),0)}function qi(e,t){return typeof e=="function"?e(t):e}function In(e,t){return typeof e=="function"?e(t):e}function Q2(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:s,stale:o}=e;if(s){if(r){if(t.queryHash!==sw(s,t.options))return!1}else if(!Af(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function Z2(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(jf(t.options.mutationKey)!==jf(i))return!1}else if(!Af(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function sw(e,t){return((t==null?void 0:t.queryKeyHashFn)||jf)(e)}function jf(e){return JSON.stringify(e,(t,n)=>B0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Af(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Af(e[n],t[n])):!1}var l8=Object.prototype.hasOwnProperty;function zD(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=J2(e)&&J2(t);if(!r&&!(B0(e)&&B0(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),o=s.length,l=r?new Array(o):{};let c=0;for(let f=0;f{As.setTimeout(t,e)})}function U0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?zD(e,t):t}function u8(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function f8(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ow=Symbol();function ID(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ow?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function BD(e,t){return typeof e=="function"?e(...t):!!e}function d8(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var Of=(()=>{let e=()=>s8;return{isServer(){return e()},setIsServer(t){e=t}}})();function F0(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var h8=i8;function p8(){let e=[],t=0,n=o=>{o()},r=o=>{o()},a=h8;const i=o=>{t?e.push(o):a(()=>{n(o)})},s=()=>{const o=e;e=[],o.length&&a(()=>{r(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{a=o}}}var Wt=p8(),Al,ji,Ol,TP,m8=(TP=class extends Rd{constructor(){super();ce(this,Al,!0);ce(this,ji);ce(this,Ol);ee(this,Ol,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){R(this,ji)||this.setEventListener(R(this,Ol))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,ji))==null||t.call(this),ee(this,ji,void 0))}setEventListener(t){var n;ee(this,Ol,t),(n=R(this,ji))==null||n.call(this),ee(this,ji,t(this.setOnline.bind(this)))}setOnline(t){R(this,Al)!==t&&(ee(this,Al,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return R(this,Al)}},Al=new WeakMap,ji=new WeakMap,Ol=new WeakMap,TP),Qp=new m8;function y8(e){return Math.min(1e3*2**e,3e4)}function UD(e){return(e??"online")==="online"?Qp.isOnline():!0}var V0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function FD(e){let t=!1,n=0,r;const a=F0(),i=()=>a.status!=="pending",s=g=>{var b;if(!i()){const y=new V0(g);h(y),(b=e.onCancel)==null||b.call(e,y)}},o=()=>{t=!0},l=()=>{t=!1},c=()=>iw.isFocused()&&(e.networkMode==="always"||Qp.isOnline())&&e.canRun(),f=()=>UD(e.networkMode)&&e.canRun(),d=g=>{i()||(r==null||r(),a.resolve(g))},h=g=>{i()||(r==null||r(),a.reject(g))},p=()=>new Promise(g=>{var b;r=y=>{(i()||c())&&g(y)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;r=void 0,i()||(g=e.onContinue)==null||g.call(e)}),m=()=>{if(i())return;let g;const b=n===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(d).catch(y=>{var j;if(i())return;const v=e.retry??(Of.isServer()?0:3),x=e.retryDelay??y8,w=typeof x=="function"?x(n,y):x,S=v===!0||typeof v=="number"&&nc()?void 0:p()).then(()=>{t?h(y):m()})})};return{promise:a,status:()=>a.status,cancel:s,continue:()=>(r==null||r(),a),cancelRetry:o,continueRetry:l,canStart:f,start:()=>(f()?m():p().then(m),a)}}var Ds,NP,VD=(NP=class{constructor(){ce(this,Ds)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),z0(this.gcTime)&&ee(this,Ds,As.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Of.isServer()?1/0:5*60*1e3))}clearGcTimeout(){R(this,Ds)!==void 0&&(As.clearTimeout(R(this,Ds)),ee(this,Ds,void 0))}},Ds=new WeakMap,NP);function g8(e){return{onFetch:(t,n)=>{var f,d,h,p,m;const r=t.options,a=(h=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((m=t.state.data)==null?void 0:m.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const b=x=>{d8(x,()=>t.signal,()=>g=!0)},y=ID(t.options,t.fetchOptions),v=async(x,w,S)=>{if(g)return Promise.reject(t.signal.reason);if(w==null&&x.pages.length)return Promise.resolve(x);const O=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:w,direction:S?"backward":"forward",meta:t.options.meta};return b(M),M})(),E=await y(O),{maxPages:T}=t.options,N=S?f8:u8;return{pages:N(x.pages,E,T),pageParams:N(x.pageParams,w,T)}};if(a&&i.length){const x=a==="backward",w=x?v8:tO,S={pages:i,pageParams:s},j=w(r,S);o=await v(S,j,x)}else{const x=e??i.length;do{const w=l===0?s[0]??r.initialPageParam:tO(r,o);if(l>0&&w==null)break;o=await v(o,w),l++}while(l{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function tO(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function v8(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var El,$s,Tl,sr,ks,It,yd,Ls,zn,HD,ja,CP,b8=(CP=class extends VD{constructor(t){super();ce(this,zn);ce(this,El);ce(this,$s);ce(this,Tl);ce(this,sr);ce(this,ks);ce(this,It);ce(this,yd);ce(this,Ls);ee(this,Ls,!1),ee(this,yd,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,ks,t.client),ee(this,sr,R(this,ks).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,$s,rO(this.options)),this.state=t.state??R(this,$s),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return R(this,El)}get promise(){var t;return(t=R(this,It))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,yd),...t},t!=null&&t._type&&ee(this,El,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=rO(this.options);n.data!==void 0&&(this.setState(nO(n.data,n.dataUpdatedAt)),ee(this,$s,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,sr).remove(this)}setData(t,n){const r=U0(this.state.data,t,this.options);return Oe(this,zn,ja).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Oe(this,zn,ja).call(this,{type:"setState",state:t})}cancel(t){var r,a;const n=(r=R(this,It))==null?void 0:r.promise;return(a=R(this,It))==null||a.cancel(t),n?n.then(En).catch(En):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return R(this,$s)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>In(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ow||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>qi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!LD(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,It))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,It))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,sr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(R(this,It)&&(R(this,Ls)||Oe(this,zn,HD).call(this)?R(this,It).cancel({revert:!0}):R(this,It).cancelRetry()),this.scheduleGc()),R(this,sr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Oe(this,zn,ja).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,d,h,p,m,g,b,y,v,x;if(this.state.fetchStatus!=="idle"&&((c=R(this,It))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,It))return R(this,It).continueRetry(),R(this,It).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(S=>S.options.queryFn);w&&this.setOptions(w.options)}const r=new AbortController,a=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(ee(this,Ls,!0),r.signal)})},i=()=>{const w=ID(this.options,n),j=(()=>{const O={client:R(this,ks),queryKey:this.queryKey,meta:this.meta};return a(O),O})();return ee(this,Ls,!1),this.options.persister?this.options.persister(w,j,this):w(j)},o=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:R(this,ks),state:this.state,fetchFn:i};return a(w),w})(),l=R(this,El)==="infinite"?g8(this.options.pages):this.options.behavior;l==null||l.onFetch(o,this),ee(this,Tl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Oe(this,zn,ja).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),ee(this,It,FD({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:w=>{w instanceof V0&&w.revert&&this.setState({...R(this,Tl),fetchStatus:"idle"}),r.abort()},onFail:(w,S)=>{Oe(this,zn,ja).call(this,{type:"failed",failureCount:w,error:S})},onPause:()=>{Oe(this,zn,ja).call(this,{type:"pause"})},onContinue:()=>{Oe(this,zn,ja).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const w=await R(this,It).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(p=(h=R(this,sr).config).onSuccess)==null||p.call(h,w,this),(g=(m=R(this,sr).config).onSettled)==null||g.call(m,w,this.state.error,this),w}catch(w){if(w instanceof V0){if(w.silent)return R(this,It).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Oe(this,zn,ja).call(this,{type:"error",error:w}),(y=(b=R(this,sr).config).onError)==null||y.call(b,w,this),(x=(v=R(this,sr).config).onSettled)==null||x.call(v,this.state.data,w,this),w}finally{this.scheduleGc()}}},El=new WeakMap,$s=new WeakMap,Tl=new WeakMap,sr=new WeakMap,ks=new WeakMap,It=new WeakMap,yd=new WeakMap,Ls=new WeakMap,zn=new WeakSet,HD=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ja=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...qD(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...nO(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,Tl,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Wt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,sr).notify({query:this,type:"updated",action:t})})},CP);function qD(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:UD(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function rO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var jn,Ne,gd,un,zs,Nl,Ea,Ai,vd,Cl,_l,Is,Bs,Oi,Pl,ze,Tu,H0,q0,K0,G0,Y0,X0,W0,KD,_P,x8=(_P=class extends Rd{constructor(t,n){super();ce(this,ze);ce(this,jn);ce(this,Ne);ce(this,gd);ce(this,un);ce(this,zs);ce(this,Nl);ce(this,Ea);ce(this,Ai);ce(this,vd);ce(this,Cl);ce(this,_l);ce(this,Is);ce(this,Bs);ce(this,Oi);ce(this,Pl,new Set);this.options=n,ee(this,jn,t),ee(this,Ai,null),ee(this,Ea,F0()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Ne).addObserver(this),aO(R(this,Ne),this.options)?Oe(this,ze,Tu).call(this):this.updateResult(),Oe(this,ze,G0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Q0(R(this,Ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Q0(R(this,Ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Oe(this,ze,Y0).call(this),Oe(this,ze,X0).call(this),R(this,Ne).removeObserver(this)}setOptions(t){const n=this.options,r=R(this,Ne);if(this.options=R(this,jn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof In(this.options.enabled,R(this,Ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Oe(this,ze,W0).call(this),R(this,Ne).setOptions(this.options),n._defaulted&&!I0(this.options,n)&&R(this,jn).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Ne),observer:this});const a=this.hasListeners();a&&iO(R(this,Ne),r,this.options,n)&&Oe(this,ze,Tu).call(this),this.updateResult(),a&&(R(this,Ne)!==r||In(this.options.enabled,R(this,Ne))!==In(n.enabled,R(this,Ne))||qi(this.options.staleTime,R(this,Ne))!==qi(n.staleTime,R(this,Ne)))&&Oe(this,ze,H0).call(this);const i=Oe(this,ze,q0).call(this);a&&(R(this,Ne)!==r||In(this.options.enabled,R(this,Ne))!==In(n.enabled,R(this,Ne))||i!==R(this,Oi))&&Oe(this,ze,K0).call(this,i)}getOptimisticResult(t){const n=R(this,jn).getQueryCache().build(R(this,jn),t),r=this.createResult(n,t);return w8(this,r)&&(ee(this,un,r),ee(this,Nl,this.options),ee(this,zs,R(this,Ne).state)),r}getCurrentResult(){return R(this,un)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,Ea).status==="pending"&&R(this,Ea).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){R(this,Pl).add(t)}getCurrentQuery(){return R(this,Ne)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=R(this,jn).defaultQueryOptions(t),r=R(this,jn).getQueryCache().build(R(this,jn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Oe(this,ze,Tu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,un)))}createResult(t,n){var T;const r=R(this,Ne),a=this.options,i=R(this,un),s=R(this,zs),o=R(this,Nl),c=t!==r?t.state:R(this,gd),{state:f}=t;let d={...f},h=!1,p;if(n._optimisticResults){const N=this.hasListeners(),M=!N&&aO(t,n),C=N&&iO(t,r,n,a);(M||C)&&(d={...d,...qD(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:b}=d;p=d.data;let y=!1;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let N;i!=null&&i.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(N=i.data,y=!0):N=typeof n.placeholderData=="function"?n.placeholderData((T=R(this,_l))==null?void 0:T.state.data,R(this,_l)):n.placeholderData,N!==void 0&&(b="success",p=U0(i==null?void 0:i.data,N,n),h=!0)}if(n.select&&p!==void 0&&!y)if(i&&p===(s==null?void 0:s.data)&&n.select===R(this,vd))p=R(this,Cl);else try{ee(this,vd,n.select),p=n.select(p),p=U0(i==null?void 0:i.data,p,n),ee(this,Cl,p),ee(this,Ai,null)}catch(N){ee(this,Ai,N)}R(this,Ai)&&(m=R(this,Ai),p=R(this,Cl),g=Date.now(),b="error");const v=d.fetchStatus==="fetching",x=b==="pending",w=b==="error",S=x&&v,j=p!==void 0,E={status:b,fetchStatus:d.fetchStatus,isPending:x,isSuccess:b==="success",isError:w,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:w&&!j,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&j,isStale:lw(t,n),refetch:this.refetch,promise:R(this,Ea),isEnabled:In(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const N=E.data!==void 0,M=E.status==="error"&&!N,C=$=>{M?$.reject(E.error):N&&$.resolve(E.data)},L=()=>{const $=ee(this,Ea,E.promise=F0());C($)},D=R(this,Ea);switch(D.status){case"pending":t.queryHash===r.queryHash&&C(D);break;case"fulfilled":(M||E.data!==D.value)&&L();break;case"rejected":(!M||E.error!==D.reason)&&L();break}}return E}updateResult(){const t=R(this,un),n=this.createResult(R(this,Ne),this.options);if(ee(this,zs,R(this,Ne).state),ee(this,Nl,this.options),R(this,zs).data!==void 0&&ee(this,_l,R(this,Ne)),I0(n,t))return;ee(this,un,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!R(this,Pl).size)return!0;const s=new Set(i??R(this,Pl));return this.options.throwOnError&&s.add("error"),Object.keys(R(this,un)).some(o=>{const l=o;return R(this,un)[l]!==t[l]&&s.has(l)})};Oe(this,ze,KD).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Oe(this,ze,G0).call(this)}},jn=new WeakMap,Ne=new WeakMap,gd=new WeakMap,un=new WeakMap,zs=new WeakMap,Nl=new WeakMap,Ea=new WeakMap,Ai=new WeakMap,vd=new WeakMap,Cl=new WeakMap,_l=new WeakMap,Is=new WeakMap,Bs=new WeakMap,Oi=new WeakMap,Pl=new WeakMap,ze=new WeakSet,Tu=function(t){Oe(this,ze,W0).call(this);let n=R(this,Ne).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(En)),n},H0=function(){Oe(this,ze,Y0).call(this);const t=qi(this.options.staleTime,R(this,Ne));if(Of.isServer()||R(this,un).isStale||!z0(t))return;const r=LD(R(this,un).dataUpdatedAt,t)+1;ee(this,Is,As.setTimeout(()=>{R(this,un).isStale||this.updateResult()},r))},q0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Ne)):this.options.refetchInterval)??!1},K0=function(t){Oe(this,ze,X0).call(this),ee(this,Oi,t),!(Of.isServer()||In(this.options.enabled,R(this,Ne))===!1||!z0(R(this,Oi))||R(this,Oi)===0)&&ee(this,Bs,As.setInterval(()=>{(this.options.refetchIntervalInBackground||iw.isFocused())&&Oe(this,ze,Tu).call(this)},R(this,Oi)))},G0=function(){Oe(this,ze,H0).call(this),Oe(this,ze,K0).call(this,Oe(this,ze,q0).call(this))},Y0=function(){R(this,Is)!==void 0&&(As.clearTimeout(R(this,Is)),ee(this,Is,void 0))},X0=function(){R(this,Bs)!==void 0&&(As.clearInterval(R(this,Bs)),ee(this,Bs,void 0))},W0=function(){const t=R(this,jn).getQueryCache().build(R(this,jn),this.options);if(t===R(this,Ne))return;const n=R(this,Ne);ee(this,Ne,t),ee(this,gd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},KD=function(t){Wt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(R(this,un))}),R(this,jn).getQueryCache().notify({query:R(this,Ne),type:"observerResultsUpdated"})})},_P);function S8(e,t){return In(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&In(t.retryOnMount,e)===!1)}function aO(e,t){return S8(e,t)||e.state.data!==void 0&&Q0(e,t,t.refetchOnMount)}function Q0(e,t,n){if(In(t.enabled,e)!==!1&&qi(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&lw(e,t)}return!1}function iO(e,t,n,r){return(e!==t||In(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&lw(e,n)}function lw(e,t){return In(t.enabled,e)!==!1&&e.isStaleByTime(qi(t.staleTime,e))}function w8(e,t){return!I0(e.getCurrentResult(),t)}var bd,Hr,an,Us,qr,ci,PP,j8=(PP=class extends VD{constructor(t){super();ce(this,qr);ce(this,bd);ce(this,Hr);ce(this,an);ce(this,Us);ee(this,bd,t.client),this.mutationId=t.mutationId,ee(this,an,t.mutationCache),ee(this,Hr,[]),this.state=t.state||A8(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,Hr).includes(t)||(R(this,Hr).push(t),this.clearGcTimeout(),R(this,an).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,Hr,R(this,Hr).filter(n=>n!==t)),this.scheduleGc(),R(this,an).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,Hr).length||(this.state.status==="pending"?this.scheduleGc():R(this,an).remove(this))}continue(){var t;return((t=R(this,Us))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,l,c,f,d,h,p,m,g,b,y,v,x,w,S,j,O;const n=()=>{Oe(this,qr,ci).call(this,{type:"continue"})},r={client:R(this,bd),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Us,FD({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(E,T)=>{Oe(this,qr,ci).call(this,{type:"failed",failureCount:E,error:T})},onPause:()=>{Oe(this,qr,ci).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,an).canRun(this)}));const a=this.state.status==="pending",i=!R(this,Us).canStart();try{if(a)n();else{Oe(this,qr,ci).call(this,{type:"pending",variables:t,isPaused:i}),R(this,an).config.onMutate&&await R(this,an).config.onMutate(t,this,r);const T=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,r));T!==this.state.context&&Oe(this,qr,ci).call(this,{type:"pending",context:T,variables:t,isPaused:i})}const E=await R(this,Us).start();return await((c=(l=R(this,an).config).onSuccess)==null?void 0:c.call(l,E,t,this.state.context,this,r)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,E,t,this.state.context,r)),await((p=(h=R(this,an).config).onSettled)==null?void 0:p.call(h,E,null,this.state.variables,this.state.context,this,r)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,E,null,t,this.state.context,r)),Oe(this,qr,ci).call(this,{type:"success",data:E}),E}catch(E){try{await((y=(b=R(this,an).config).onError)==null?void 0:y.call(b,E,t,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((x=(v=this.options).onError)==null?void 0:x.call(v,E,t,this.state.context,r))}catch(T){Promise.reject(T)}try{await((S=(w=R(this,an).config).onSettled)==null?void 0:S.call(w,void 0,E,this.state.variables,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((O=(j=this.options).onSettled)==null?void 0:O.call(j,void 0,E,t,this.state.context,r))}catch(T){Promise.reject(T)}throw Oe(this,qr,ci).call(this,{type:"error",error:E}),E}finally{R(this,an).runNext(this)}}},bd=new WeakMap,Hr=new WeakMap,an=new WeakMap,Us=new WeakMap,qr=new WeakSet,ci=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Wt.batch(()=>{R(this,Hr).forEach(r=>{r.onMutationUpdate(t)}),R(this,an).notify({mutation:this,type:"updated",action:t})})},PP);function A8(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ta,_r,xd,MP,O8=(MP=class extends Rd{constructor(t={}){super();ce(this,Ta);ce(this,_r);ce(this,xd);this.config=t,ee(this,Ta,new Set),ee(this,_r,new Map),ee(this,xd,0)}build(t,n,r){const a=new j8({client:t,mutationCache:this,mutationId:++rh(this,xd)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){R(this,Ta).add(t);const n=Sh(t);if(typeof n=="string"){const r=R(this,_r).get(n);r?r.push(t):R(this,_r).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Ta).delete(t)){const n=Sh(t);if(typeof n=="string"){const r=R(this,_r).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&R(this,_r).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Sh(t);if(typeof n=="string"){const r=R(this,_r).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=Sh(t);if(typeof n=="string"){const a=(r=R(this,_r).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wt.batch(()=>{R(this,Ta).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Ta).clear(),R(this,_r).clear()})}getAll(){return Array.from(R(this,Ta))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Z2(n,r))}findAll(t={}){return this.getAll().filter(n=>Z2(t,n))}notify(t){Wt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Wt.batch(()=>Promise.all(t.map(n=>n.continue().catch(En))))}},Ta=new WeakMap,_r=new WeakMap,xd=new WeakMap,MP);function Sh(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Kr,RP,E8=(RP=class extends Rd{constructor(t={}){super();ce(this,Kr);this.config=t,ee(this,Kr,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??sw(a,n);let s=this.get(i);return s||(s=new b8({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){R(this,Kr).has(t.queryHash)||(R(this,Kr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=R(this,Kr).get(t.queryHash);n&&(t.destroy(),n===t&&R(this,Kr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,Kr).get(t)}getAll(){return[...R(this,Kr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Q2(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Q2(t,r)):n}notify(t){Wt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kr=new WeakMap,RP),mt,Ei,Ti,Ml,Rl,Ni,Dl,$l,DP,T8=(DP=class{constructor(e={}){ce(this,mt);ce(this,Ei);ce(this,Ti);ce(this,Ml);ce(this,Rl);ce(this,Ni);ce(this,Dl);ce(this,$l);ee(this,mt,e.queryCache||new E8),ee(this,Ei,e.mutationCache||new O8),ee(this,Ti,e.defaultOptions||{}),ee(this,Ml,new Map),ee(this,Rl,new Map),ee(this,Ni,0)}mount(){rh(this,Ni)._++,R(this,Ni)===1&&(ee(this,Dl,iw.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,mt).onFocus())})),ee(this,$l,Qp.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,mt).onOnline())})))}unmount(){var e,t;rh(this,Ni)._--,R(this,Ni)===0&&((e=R(this,Dl))==null||e.call(this),ee(this,Dl,void 0),(t=R(this,$l))==null||t.call(this),ee(this,$l,void 0))}isFetching(e){return R(this,mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,Ei).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,mt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=R(this,mt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(qi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return R(this,mt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=R(this,mt).get(r.queryHash),i=a==null?void 0:a.state.data,s=o8(t,i);if(s!==void 0)return R(this,mt).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Wt.batch(()=>R(this,mt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,mt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=R(this,mt);Wt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=R(this,mt);return Wt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Wt.batch(()=>R(this,mt).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(En).catch(En)}invalidateQueries(e,t={}){return Wt.batch(()=>(R(this,mt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Wt.batch(()=>R(this,mt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(En)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(En)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=R(this,mt).build(this,t);return n.isStaleByTime(qi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(En).catch(En)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(En).catch(En)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Qp.isOnline()?R(this,Ei).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,mt)}getMutationCache(){return R(this,Ei)}getDefaultOptions(){return R(this,Ti)}setDefaultOptions(e){ee(this,Ti,e)}setQueryDefaults(e,t){R(this,Ml).set(jf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,Ml).values()],n={};return t.forEach(r=>{Af(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){R(this,Rl).set(jf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,Rl).values()],n={};return t.forEach(r=>{Af(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,Ti).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sw(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ow&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,Ti).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,mt).clear(),R(this,Ei).clear()}},mt=new WeakMap,Ei=new WeakMap,Ti=new WeakMap,Ml=new WeakMap,Rl=new WeakMap,Ni=new WeakMap,Dl=new WeakMap,$l=new WeakMap,DP),GD=A.createContext(void 0),nn=e=>{const t=A.useContext(GD);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},N8=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(GD.Provider,{value:e,children:t})),YD=A.createContext(!1),C8=()=>A.useContext(YD);YD.Provider;function _8(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var P8=A.createContext(_8()),M8=()=>A.useContext(P8),R8=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?BD(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},D8=e=>{A.useEffect(()=>{e.clearReset()},[e])},$8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||BD(n,[e.error,r])),k8=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},L8=(e,t)=>e.isLoading&&e.isFetching&&!t,z8=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,sO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function I8(e,t,n){var p,m,g,b;const r=C8(),a=M8(),i=nn(),s=i.defaultQueryOptions(e);(m=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||m.call(p,s);const o=i.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=r?"isRestoring":l?"optimistic":void 0,k8(s),R8(s,a,o),D8(a);const c=!i.getQueryCache().get(s.queryHash),[f]=A.useState(()=>new t(i,s)),d=f.getOptimisticResult(s),h=!r&&l;if(A.useSyncExternalStore(A.useCallback(y=>{const v=h?f.subscribe(Wt.batchCalls(y)):En;return f.updateResult(),v},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),A.useEffect(()=>{f.setOptions(s)},[s,f]),z8(s,d))throw sO(s,f,a);if($8({result:d,errorResetBoundary:a,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((b=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||b.call(g,s,d),s.experimental_prefetchInRender&&!Of.isServer()&&L8(d,r)){const y=c?sO(s,f,a):o==null?void 0:o.promise;y==null||y.catch(En).finally(()=>{f.updateResult()})}return s.notifyOnChangeProps?d:f.trackResult(d)}function se(e,t){return I8(e,x8)}/** + * react-router v7.17.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */var oO="popstate";function lO(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function B8(e={}){function t(r,a){var c;let i=(c=a.state)==null?void 0:c.masked,{pathname:s,search:o,hash:l}=i||r.location;return Z0("",{pathname:s,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Ef(a)}return F8(t,n,null,e)}function ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function br(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function U8(){return Math.random().toString(36).substring(2,10)}function cO(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Z0(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Rc(t):t,state:n,key:t&&t.key||r||U8(),mask:a}}function Ef({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Rc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function F8(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,s=a.history,o="POP",l=null,c=f();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function f(){return(s.state||{idx:null}).idx}function d(){o="POP";let b=f(),y=b==null?null:b-c;c=b,l&&l({action:o,location:g.location,delta:y})}function h(b,y){o="PUSH";let v=lO(b)?b:Z0(g.location,b,y);c=f()+1;let x=cO(v,c),w=g.createHref(v.mask||v);try{s.pushState(x,"",w)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;a.location.assign(w)}i&&l&&l({action:o,location:g.location,delta:1})}function p(b,y){o="REPLACE";let v=lO(b)?b:Z0(g.location,b,y);c=f();let x=cO(v,c),w=g.createHref(v.mask||v);s.replaceState(x,"",w),i&&l&&l({action:o,location:g.location,delta:0})}function m(b){return V8(a,b)}let g={get action(){return o},get location(){return e(a,s)},listen(b){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(oO,d),l=b,()=>{a.removeEventListener(oO,d),l=null}},createHref(b){return t(a,b)},createURL:m,encodeLocation(b){let y=m(b);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(b){return s.go(b)}};return g}function V8(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),ut(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ef(t);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function XD(e,t,n="/"){return H8(e,t,n,!1)}function H8(e,t,n,r,a){let i=typeof t=="string"?Rc(t):t,s=Xa(i.pathname||"/",n);if(s==null)return null;let o=q8(e),l=null,c=rU(s);for(let f=0;l==null&&f{let f={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&l)return;ut(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=$r([r,f.relativePath]),h=n.concat(f);s.children&&s.children.length>0&&(ut(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),WD(s.children,t,h,d,l)),!(s.path==null&&!s.index)&&t.push({path:d,score:J8(d,s.index),routesMeta:h})};return e.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let c of QD(s.path))i(s,o,!0,c)}),t}function QD(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let s=QD(r.join("/")),o=[];return o.push(...s.map(l=>l===""?i:[i,l].join("/"))),a&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function K8(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:eU(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var G8=/^:[\w-]+$/,Y8=3,X8=2,W8=1,Q8=10,Z8=-2,uO=e=>e==="*";function J8(e,t){let n=e.split("/"),r=n.length;return n.some(uO)&&(r+=Z8),t&&(r+=X8),n.filter(a=>!uO(a)).reduce((a,i)=>a+(G8.test(i)?Y8:i===""?W8:Q8),r)}function eU(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function tU(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",s=[];for(let o=0;o{if(f==="*"){let m=o[h]||"";s=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const p=o[h];return d&&!p?c[f]=void 0:c[f]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:e}}function nU(e,t=!1,n=!0){br(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l,c,f)=>{if(r.push({paramName:o,isOptional:l!=null}),l){let d=f.charAt(c+s.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function rU(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return br(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Xa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var aU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function iU(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Rc(e):e,i;return n?(n=ZD(n),n.startsWith("/")?i=fO(n.substring(1),"/"):i=fO(n,t)):i=t,{pathname:i,search:lU(r),hash:cU(a)}}function fO(e,t){let n=Jp(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function $v(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function sU(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function cw(e){let t=sU(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Iy(e,t,n,r=!1){let a;typeof e=="string"?a=Rc(e):(a={...e},ut(!a.pathname||!a.pathname.includes("?"),$v("?","pathname","search",a)),ut(!a.pathname||!a.pathname.includes("#"),$v("#","pathname","hash",a)),ut(!a.search||!a.search.includes("#"),$v("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,o;if(s==null)o=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;a.pathname=h.join("/")}o=d>=0?t[d]:"/"}let l=iU(a,o),c=s&&s!=="/"&&s.endsWith("/"),f=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}var ZD=e=>e.replace(/\/\/+/g,"/"),$r=e=>ZD(e.join("/")),Jp=e=>e.replace(/\/+$/,""),oU=e=>Jp(e).replace(/^\/*/,"/"),lU=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cU=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,uU=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function fU(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function dU(e){let t=e.map(n=>n.route.path).filter(Boolean);return $r(t)||"/"}var JD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function e$(e,t){let n=e;if(typeof n!="string"||!aU.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(JD)try{let i=new URL(window.location.href),s=n.startsWith("//")?new URL(i.protocol+n):new URL(n),o=Xa(s.pathname,t);s.origin===i.origin&&o!=null?n=o+s.search+s.hash:a=!0}catch{br(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var t$=["POST","PUT","PATCH","DELETE"];new Set(t$);var hU=["GET",...t$];new Set(hU);var Dc=A.createContext(null);Dc.displayName="DataRouter";var By=A.createContext(null);By.displayName="DataRouterState";var n$=A.createContext(!1);function pU(){return A.useContext(n$)}var r$=A.createContext({isTransitioning:!1});r$.displayName="ViewTransition";var mU=A.createContext(new Map);mU.displayName="Fetchers";var yU=A.createContext(null);yU.displayName="Await";var er=A.createContext(null);er.displayName="Navigation";var Dd=A.createContext(null);Dd.displayName="Location";var wr=A.createContext({outlet:null,matches:[],isDataRoute:!1});wr.displayName="Route";var uw=A.createContext(null);uw.displayName="RouteError";var a$="REACT_ROUTER_ERROR",gU="REDIRECT",vU="ROUTE_ERROR_RESPONSE";function bU(e){if(e.startsWith(`${a$}:${gU}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function xU(e){if(e.startsWith(`${a$}:${vU}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new uU(t.status,t.statusText,t.data)}catch{}}function SU(e,{relative:t}={}){ut($c(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=A.useContext(er),{hash:a,pathname:i,search:s}=$d(e,{relative:t}),o=i;return n!=="/"&&(o=i==="/"?n:$r([n,i])),r.createHref({pathname:o,search:s,hash:a})}function $c(){return A.useContext(Dd)!=null}function jr(){return ut($c(),"useLocation() may be used only in the context of a component."),A.useContext(Dd).location}var i$="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function s$(e){A.useContext(er).static||A.useLayoutEffect(e)}function Kt(){let{isDataRoute:e}=A.useContext(wr);return e?kU():wU()}function wU(){ut($c(),"useNavigate() may be used only in the context of a component.");let e=A.useContext(Dc),{basename:t,navigator:n}=A.useContext(er),{matches:r}=A.useContext(wr),{pathname:a}=jr(),i=JSON.stringify(cw(r)),s=A.useRef(!1);return s$(()=>{s.current=!0}),A.useCallback((l,c={})=>{if(br(s.current,i$),!s.current)return;if(typeof l=="number"){n.go(l);return}let f=Iy(l,JSON.parse(i),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:$r([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,i,a,e])}var jU=A.createContext(null);function AU(e){let t=A.useContext(wr).outlet;return A.useMemo(()=>t&&A.createElement(jU.Provider,{value:e},t),[t,e])}function o$(){let{matches:e}=A.useContext(wr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function $d(e,{relative:t}={}){let{matches:n}=A.useContext(wr),{pathname:r}=jr(),a=JSON.stringify(cw(n));return A.useMemo(()=>Iy(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function OU(e,t){return l$(e,t)}function l$(e,t,n){var b;ut($c(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=A.useContext(er),{matches:a}=A.useContext(wr),i=a[a.length-1],s=i?i.params:{},o=i?i.pathname:"/",l=i?i.pathnameBase:"/",c=i&&i.route;{let y=c&&c.path||"";u$(o,!c||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${o}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let f=jr(),d;if(t){let y=typeof t=="string"?Rc(t):t;ut(l==="/"||((b=y.pathname)==null?void 0:b.startsWith(l)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=f;let h=d.pathname||"/",p=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let m=n&&n.state.matches.length?n.state.matches.map(y=>Object.assign(y,{route:n.manifest[y.route.id]||y.route})):XD(e,{pathname:p});br(c||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),br(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let g=_U(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:$r([l,r.encodeLocation?r.encodeLocation(y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:$r([l,r.encodeLocation?r.encodeLocation(y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),a,n);return t&&g?A.createElement(Dd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},g):g}function EU(){let e=$U(),t=fU(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:i},"ErrorBoundary")," or"," ",A.createElement("code",{style:i},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),n?A.createElement("pre",{style:a},n):null,s)}var TU=A.createElement(EU,null),c$=class extends A.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=xU(e.digest);n&&(e=n)}let t=e!==void 0?A.createElement(wr.Provider,{value:this.props.routeContext},A.createElement(uw.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?A.createElement(NU,{error:e},t):t}};c$.contextType=n$;var kv=new WeakMap;function NU({children:e,error:t}){let{basename:n}=A.useContext(er);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=bU(t.digest);if(r){let a=kv.get(t);if(a)throw a;let i=e$(r.location,n);if(JD&&!kv.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw kv.set(t,s),s}return A.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function CU({routeContext:e,match:t,children:n}){let r=A.useContext(Dc);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(wr.Provider,{value:e},n)}function _U(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let f=a.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);ut(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let s=!1,o=-1;if(n&&r){s=r.renderFallback;for(let f=0;f=0?a=a.slice(0,o+1):a=[a[0]];break}}}}let l=n==null?void 0:n.onError,c=r&&l?(f,d)=>{var h,p;l(f,{location:r.location,params:((p=(h=r.matches)==null?void 0:h[0])==null?void 0:p.params)??{},pattern:dU(r.matches),errorInfo:d})}:void 0;return a.reduceRight((f,d,h)=>{let p,m=!1,g=null,b=null;r&&(p=i&&d.route.id?i[d.route.id]:void 0,g=d.route.errorElement||TU,s&&(o<0&&h===0?(u$("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,b=null):o===h&&(m=!0,b=d.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,h+1)),v=()=>{let x;return p?x=g:m?x=b:d.route.Component?x=A.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=f,A.createElement(CU,{match:d,routeContext:{outlet:f,matches:y,isDataRoute:r!=null},children:x})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?A.createElement(c$,{location:r.location,revalidation:r.revalidation,component:g,error:p,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:c}):v()},null)}function fw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function PU(e){let t=A.useContext(Dc);return ut(t,fw(e)),t}function MU(e){let t=A.useContext(By);return ut(t,fw(e)),t}function RU(e){let t=A.useContext(wr);return ut(t,fw(e)),t}function dw(e){let t=RU(e),n=t.matches[t.matches.length-1];return ut(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function DU(){return dw("useRouteId")}function $U(){var r;let e=A.useContext(uw),t=MU("useRouteError"),n=dw("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function kU(){let{router:e}=PU("useNavigate"),t=dw("useNavigate"),n=A.useRef(!1);return s$(()=>{n.current=!0}),A.useCallback(async(a,i={})=>{br(n.current,i$),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var dO={};function u$(e,t,n){!t&&!dO[e]&&(dO[e]=!0,br(!1,n))}A.memo(LU);function LU({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:i}){return l$(e,void 0,{manifest:t,state:r,isStatic:a,onError:i})}function em({to:e,replace:t,state:n,relative:r}){ut($c()," may be used only in the context of a component.");let{static:a}=A.useContext(er);br(!a," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:i}=A.useContext(wr),{pathname:s}=jr(),o=Kt(),l=Iy(e,cw(i),s,r==="path"),c=JSON.stringify(l);return A.useEffect(()=>{o(JSON.parse(c),{replace:t,state:n,relative:r})},[o,c,r,t,n]),null}function f$(e){return AU(e.context)}function Se(e){ut(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function zU({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,useTransitions:s}){ut(!$c(),"You cannot render a inside another . You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=A.useMemo(()=>({basename:o,navigator:a,static:i,useTransitions:s,future:{}}),[o,a,i,s]);typeof n=="string"&&(n=Rc(n));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:p="default",mask:m}=n,g=A.useMemo(()=>{let b=Xa(c,o);return b==null?null:{location:{pathname:b,search:f,hash:d,state:h,key:p,mask:m},navigationType:r}},[o,c,f,d,h,p,r,m]);return br(g!=null,` is not able to match the URL "${c}${f}${d}" because it does not start with the basename, so the won't render anything.`),g==null?null:A.createElement(er.Provider,{value:l},A.createElement(Dd.Provider,{children:t,value:g}))}function IU({children:e,location:t}){return OU(J0(e),t)}function J0(e,t=[]){let n=[];return A.Children.forEach(e,(r,a)=>{if(!A.isValidElement(r))return;let i=[...t,a];if(r.type===A.Fragment){n.push.apply(n,J0(r.props.children,i));return}ut(r.type===Se,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),ut(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=J0(r.props.children,i)),n.push(s)}),n}var up="get",fp="application/x-www-form-urlencoded";function Uy(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function BU(e){return Uy(e)&&e.tagName.toLowerCase()==="button"}function UU(e){return Uy(e)&&e.tagName.toLowerCase()==="form"}function FU(e){return Uy(e)&&e.tagName.toLowerCase()==="input"}function VU(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HU(e,t){return e.button===0&&(!t||t==="_self")&&!VU(e)}function ex(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function qU(e,t){let n=ex(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var wh=null;function KU(){if(wh===null)try{new FormData(document.createElement("form"),0),wh=!1}catch{wh=!0}return wh}var GU=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lv(e){return e!=null&&!GU.has(e)?(br(!1,`"${e}" is not a valid \`encType\` for \`\`/\`\` and will default to "${fp}"`),null):e}function YU(e,t){let n,r,a,i,s;if(UU(e)){let o=e.getAttribute("action");r=o?Xa(o,t):null,n=e.getAttribute("method")||up,a=Lv(e.getAttribute("enctype"))||fp,i=new FormData(e)}else if(BU(e)||FU(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a or without a ');let l=e.getAttribute("formaction")||o.getAttribute("action");if(r=l?Xa(l,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||up,a=Lv(e.getAttribute("formenctype"))||Lv(o.getAttribute("enctype"))||fp,i=new FormData(o,e),!KU()){let{name:c,type:f,value:d}=e;if(f==="image"){let h=c?`${c}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else c&&i.append(c,d)}}else{if(Uy(e))throw new Error('Cannot submit element that is not , , or ');n=up,r=null,a=fp,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function hw(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function d$(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&Xa(a.pathname,t)==="/"?a.pathname=`${Jp(t)}/_root.${r}`:a.pathname=`${Jp(a.pathname)}.${r}`,a}async function XU(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function WU(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function QU(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await XU(i,n);return s.links?s.links():[]}return[]}));return t7(r.flat(1).filter(WU).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function hO(e,t,n,r,a,i){let s=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,o=(l,c)=>{var f;return n[c].pathname!==l.pathname||((f=n[c].route.path)==null?void 0:f.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,c)=>s(l,c)||o(l,c)):i==="data"?t.filter((l,c)=>{var d;let f=r.routes[l.route.id];if(!f||!f.hasLoader)return!1;if(s(l,c)||o(l,c))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function ZU(e,t,{includeHydrateFallback:n}={}){return JU(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function JU(e){return[...new Set(e)]}function e7(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function t7(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(e7(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function pw(){let e=A.useContext(Dc);return hw(e,"You must render this element inside a element"),e}function n7(){let e=A.useContext(By);return hw(e,"You must render this element inside a element"),e}var mw=A.createContext(void 0);mw.displayName="FrameworkContext";function yw(){let e=A.useContext(mw);return hw(e,"You must render this element inside a element"),e}function r7(e,t){let n=A.useContext(mw),[r,a]=A.useState(!1),[i,s]=A.useState(!1),{onFocus:o,onBlur:l,onMouseEnter:c,onMouseLeave:f,onTouchStart:d}=t,h=A.useRef(null);A.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let g=y=>{y.forEach(v=>{s(v.isIntersecting)})},b=new IntersectionObserver(g,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),A.useEffect(()=>{if(r){let g=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(g)}}},[r]);let p=()=>{a(!0)},m=()=>{a(!1),s(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:su(o,p),onBlur:su(l,m),onMouseEnter:su(c,p),onMouseLeave:su(f,m),onTouchStart:su(d,p)}]:[!1,h,{}]}function su(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function a7({page:e,...t}){let n=pU(),{router:r}=pw(),a=A.useMemo(()=>XD(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?A.createElement(s7,{page:e,matches:a,...t}):A.createElement(o7,{page:e,matches:a,...t}):null}function i7(e){let{manifest:t,routeModules:n}=yw(),[r,a]=A.useState([]);return A.useEffect(()=>{let i=!1;return QU(e,t,n).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,n]),r}function s7({page:e,matches:t,...n}){let r=jr(),{future:a}=yw(),{basename:i}=pw(),s=A.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let o=d$(e,i,a.v8_trailingSlashAwareDataRequests,"rsc"),l=!1,c=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?l=!0:c.push(f.route.id);return l&&c.length>0&&o.searchParams.set("_routes",c.join(",")),[o.pathname+o.search]},[i,a.v8_trailingSlashAwareDataRequests,e,r,t]);return A.createElement(A.Fragment,null,s.map(o=>A.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...n})))}function o7({page:e,matches:t,...n}){let r=jr(),{future:a,manifest:i,routeModules:s}=yw(),{basename:o}=pw(),{loaderData:l,matches:c}=n7(),f=A.useMemo(()=>hO(e,t,c,i,r,"data"),[e,t,c,i,r]),d=A.useMemo(()=>hO(e,t,c,i,r,"assets"),[e,t,c,i,r]),h=A.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,b=!1;if(t.forEach(v=>{var w;let x=i.routes[v.route.id];!x||!x.hasLoader||(!f.some(S=>S.route.id===v.route.id)&&v.route.id in l&&((w=s[v.route.id])!=null&&w.shouldRevalidate)||x.hasClientLoader?b=!0:g.add(v.route.id))}),g.size===0)return[];let y=d$(e,o,a.v8_trailingSlashAwareDataRequests,"data");return b&&g.size>0&&y.searchParams.set("_routes",t.filter(v=>g.has(v.route.id)).map(v=>v.route.id).join(",")),[y.pathname+y.search]},[o,a.v8_trailingSlashAwareDataRequests,l,r,i,f,t,e,s]),p=A.useMemo(()=>ZU(d,i),[d,i]),m=i7(d);return A.createElement(A.Fragment,null,h.map(g=>A.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),p.map(g=>A.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),m.map(({key:g,link:b})=>A.createElement("link",{key:g,nonce:n.nonce,...b,crossOrigin:b.crossOrigin??n.crossOrigin})))}function l7(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var c7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{c7&&(window.__reactRouterVersion="7.17.0")}catch{}function u7({basename:e,children:t,useTransitions:n,window:r}){let a=A.useRef();a.current==null&&(a.current=B8({window:r,v5Compat:!0}));let i=a.current,[s,o]=A.useState({action:i.action,location:i.location}),l=A.useCallback(c=>{n===!1?o(c):A.startTransition(()=>o(c))},[n]);return A.useLayoutEffect(()=>i.listen(l),[i,l]),A.createElement(zU,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,useTransitions:n})}var h$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Le=A.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:i,replace:s,mask:o,state:l,target:c,to:f,preventScrollReset:d,viewTransition:h,defaultShouldRevalidate:p,...m},g){let{basename:b,navigator:y,useTransitions:v}=A.useContext(er),x=typeof f=="string"&&h$.test(f),w=e$(f,b);f=w.to;let S=SU(f,{relative:a}),j=jr(),O=null;if(o){let $=Iy(o,[],j.mask?j.mask.pathname:"/",!0);b!=="/"&&($.pathname=$.pathname==="/"?b:$r([b,$.pathname])),O=y.createHref($)}let[E,T,N]=r7(r,m),M=h7(f,{replace:s,mask:o,state:l,target:c,preventScrollReset:d,relative:a,viewTransition:h,defaultShouldRevalidate:p,useTransitions:v});function C($){t&&t($),$.defaultPrevented||M($)}let L=!(w.isExternal||i),D=A.createElement("a",{...m,...N,href:(L?O:void 0)||w.absoluteURL||S,onClick:L?C:t,ref:l7(g,T),target:c,"data-discover":!x&&n==="render"?"true":void 0});return E&&!x?A.createElement(A.Fragment,null,D,A.createElement(a7,{page:S})):D});Le.displayName="Link";var tx=A.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:i,to:s,viewTransition:o,children:l,...c},f){let d=$d(s,{relative:c.relative}),h=jr(),p=A.useContext(By),{navigator:m,basename:g}=A.useContext(er),b=p!=null&&v7(d)&&o===!0,y=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=h.pathname,x=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(v=v.toLowerCase(),x=x?x.toLowerCase():null,y=y.toLowerCase()),x&&g&&(x=Xa(x,g)||x);const w=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let S=v===y||!a&&v.startsWith(y)&&v.charAt(w)==="/",j=x!=null&&(x===y||!a&&x.startsWith(y)&&x.charAt(y.length)==="/"),O={isActive:S,isPending:j,isTransitioning:b},E=S?t:void 0,T;typeof r=="function"?T=r(O):T=[r,S?"active":null,j?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let N=typeof i=="function"?i(O):i;return A.createElement(Le,{...c,"aria-current":E,className:T,ref:f,style:N,to:s,viewTransition:o},typeof l=="function"?l(O):l)});tx.displayName="NavLink";var f7=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:s=up,action:o,onSubmit:l,relative:c,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h,...p},m)=>{let{useTransitions:g}=A.useContext(er),b=y7(),y=g7(o,{relative:c}),v=s.toLowerCase()==="get"?"get":"post",x=typeof o=="string"&&h$.test(o),w=S=>{if(l&&l(S),S.defaultPrevented)return;S.preventDefault();let j=S.nativeEvent.submitter,O=(j==null?void 0:j.getAttribute("formmethod"))||s,E=()=>b(j||S.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:a,state:i,relative:c,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h});g&&n!==!1?A.startTransition(()=>E()):E()};return A.createElement("form",{ref:m,method:v,action:y,onSubmit:r?l:w,...p,"data-discover":!x&&e==="render"?"true":void 0})});f7.displayName="Form";function d7(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function p$(e){let t=A.useContext(Dc);return ut(t,d7(e)),t}function h7(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:o,defaultShouldRevalidate:l,useTransitions:c}={}){let f=Kt(),d=jr(),h=$d(e,{relative:s});return A.useCallback(p=>{if(HU(p,t)){p.preventDefault();let m=n!==void 0?n:Ef(d)===Ef(h),g=()=>f(e,{replace:m,mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:o,defaultShouldRevalidate:l});c?A.startTransition(()=>g()):g()}},[d,f,h,n,r,a,t,e,i,s,o,l,c])}function m$(e){br(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=A.useRef(ex(e)),n=A.useRef(!1),r=jr(),a=A.useMemo(()=>qU(r.search,n.current?null:t.current),[r.search]),i=Kt(),s=A.useCallback((o,l)=>{const c=ex(typeof o=="function"?o(new URLSearchParams(a)):o);n.current=!0,i("?"+c,l)},[i,a]);return[a,s]}var p7=0,m7=()=>`__${String(++p7)}__`;function y7(){let{router:e}=p$("useSubmit"),{basename:t}=A.useContext(er),n=DU(),r=e.fetch,a=e.navigate;return A.useCallback(async(i,s={})=>{let{action:o,method:l,encType:c,formData:f,body:d}=YU(i,t);if(s.navigate===!1){let h=s.fetcherKey||m7();await r(h,n,s.action||o,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:f,body:d,formMethod:s.method||l,formEncType:s.encType||c,flushSync:s.flushSync})}else await a(s.action||o,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:f,body:d,formMethod:s.method||l,formEncType:s.encType||c,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,a,t,n])}function g7(e,{relative:t}={}){let{basename:n}=A.useContext(er),r=A.useContext(wr);ut(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...$d(e||".",{relative:t})},s=jr();if(e==null){i.search=s.search;let o=new URLSearchParams(i.search),l=o.getAll("index");if(l.some(f=>f==="")){o.delete("index"),l.filter(d=>d).forEach(d=>o.append("index",d));let f=o.toString();i.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:$r([n,i.pathname])),Ef(i)}function v7(e,{relative:t}={}){let n=A.useContext(r$);ut(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=p$("useViewTransitionState"),a=$d(e,{relative:t});if(!n.isTransitioning)return!1;let i=Xa(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Xa(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Zp(a.pathname,s)!=null||Zp(a.pathname,i)!=null}const y$=A.createContext(null);function b7({children:e}){const[t,n]=A.useState(()=>localStorage.getItem("mall_zip")||""),[r,a]=A.useState(()=>{const m=localStorage.getItem("mall_store_id");return m?Number(m):null}),[i,s]=A.useState(()=>localStorage.getItem("mall_store_name")||""),[o,l]=A.useState(()=>localStorage.getItem("mall_token")),[c,f]=A.useState(0),d=(m,g,b)=>{n(m),a(g),s(b),localStorage.setItem("mall_zip",m),localStorage.setItem("mall_store_id",String(g)),localStorage.setItem("mall_store_name",b)},h=()=>{n(""),a(null),s(""),localStorage.removeItem("mall_zip"),localStorage.removeItem("mall_store_id"),localStorage.removeItem("mall_store_name")},p=m=>{l(m),m?localStorage.setItem("mall_token",m):localStorage.removeItem("mall_token")};return A.useEffect(()=>{const m=()=>l(localStorage.getItem("mall_token"));return window.addEventListener("storage",m),()=>window.removeEventListener("storage",m)},[]),u.jsx(y$.Provider,{value:{zip:t,storeId:r,storeName:i,setZone:d,clearZone:h,custToken:o,setCustToken:p,cartCount:c,setCartCount:f},children:e})}const bn=()=>A.useContext(y$),Ee=e=>`$${(Number(e)||0).toFixed(2)}`,gw=A.createContext({});function kc(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const Fy=A.createContext(null),Vy=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class x7 extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function S7({children:e,isPresent:t}){const n=A.useId(),r=A.useRef(null),a=A.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=A.useContext(Vy);return A.useInsertionEffect(()=>{const{width:s,height:o,top:l,left:c}=a.current;if(t||!r.current||!s||!o)return;r.current.dataset.motionPopId=n;const f=document.createElement("style");return i&&(f.nonce=i),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${s}px !important; + height: ${o}px !important; + top: ${l}px !important; + left: ${c}px !important; + } + `),()=>{document.head.removeChild(f)}},[t]),u.jsx(x7,{isPresent:t,childRef:r,sizeRef:a,children:A.cloneElement(e,{ref:r})})}const w7=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:i,mode:s})=>{const o=kc(j7),l=A.useId(),c=A.useCallback(d=>{o.set(d,!0);for(const h of o.values())if(!h)return;r&&r()},[o,r]),f=A.useMemo(()=>({id:l,initial:t,isPresent:n,custom:a,onExitComplete:c,register:d=>(o.set(d,!1),()=>o.delete(d))}),i?[Math.random(),c]:[n,c]);return A.useMemo(()=>{o.forEach((d,h)=>o.set(h,!1))},[n]),A.useEffect(()=>{!n&&!o.size&&r&&r()},[n]),s==="popLayout"&&(e=u.jsx(S7,{isPresent:n,children:e})),u.jsx(Fy.Provider,{value:f,children:e})};function j7(){return new Map}function g$(e=!0){const t=A.useContext(Fy);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,i=A.useId();A.useEffect(()=>{e&&a(i)},[e]);const s=A.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const jh=e=>e.key||"";function pO(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const vw=typeof window<"u",Hy=vw?A.useLayoutEffect:A.useEffect,nx=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:i="sync",propagate:s=!1})=>{const[o,l]=g$(s),c=A.useMemo(()=>pO(e),[e]),f=s&&!o?[]:c.map(jh),d=A.useRef(!0),h=A.useRef(c),p=kc(()=>new Map),[m,g]=A.useState(c),[b,y]=A.useState(c);Hy(()=>{d.current=!1,h.current=c;for(let w=0;w{const S=jh(w),j=s&&!o?!1:c===b||f.includes(S),O=()=>{if(p.has(S))p.set(S,!0);else return;let E=!0;p.forEach(T=>{T||(E=!1)}),E&&(x==null||x(),y(h.current),s&&(l==null||l()),r&&r())};return u.jsx(w7,{isPresent:j,initial:!d.current||n?void 0:!1,custom:j?void 0:t,presenceAffectsLayout:a,mode:i,onExitComplete:j?void 0:O,children:w},S)})})},yn=e=>e;let A7=yn,v$=yn;function bw(e){let t;return()=>(t===void 0&&(t=e()),t)}const ro=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ia=e=>e*1e3,Ba=e=>e/1e3,O7={useManualTiming:!1};function E7(e){let t=new Set,n=new Set,r=!1,a=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function o(c){i.has(c)&&(l.schedule(c),e()),c(s)}const l={schedule:(c,f=!1,d=!1)=>{const p=d&&r?t:n;return f&&i.add(c),p.has(c)||p.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(s=c,r){a=!0;return}r=!0,[t,n]=[n,t],t.forEach(o),t.clear(),r=!1,a&&(a=!1,l.process(c))}};return l}const Ah=["read","resolveKeyframes","update","preRender","render","postRender"],T7=40;function b$(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Ah.reduce((y,v)=>(y[v]=E7(i),y),{}),{read:o,resolveKeyframes:l,update:c,preRender:f,render:d,postRender:h}=s,p=()=>{const y=performance.now();n=!1,a.delta=r?1e3/60:Math.max(Math.min(y-a.timestamp,T7),1),a.timestamp=y,a.isProcessing=!0,o.process(a),l.process(a),c.process(a),f.process(a),d.process(a),h.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,a.isProcessing||e(p)};return{schedule:Ah.reduce((y,v)=>{const x=s[v];return y[v]=(w,S=!1,j=!1)=>(n||m(),x.schedule(w,S,j)),y},{}),cancel:y=>{for(let v=0;vmO[e].some(n=>!!t[n])};function N7(e){for(const t in e)Gl[t]={...Gl[t],...e[t]}}const C7=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function tm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||C7.has(e)}let S$=e=>!tm(e);function _7(e){e&&(S$=t=>t.startsWith("on")?!tm(t):e(t))}try{_7(require("@emotion/is-prop-valid").default)}catch{}function P7(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(S$(a)||n===!0&&tm(a)||!t&&!tm(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function M7(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}const qy=A.createContext({});function Tf(e){return typeof e=="string"||Array.isArray(e)}function Ky(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const xw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sw=["initial",...xw];function Gy(e){return Ky(e.animate)||Sw.some(t=>Tf(e[t]))}function w$(e){return!!(Gy(e)||e.variants)}function R7(e,t){if(Gy(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Tf(n)?n:void 0,animate:Tf(r)?r:void 0}}return e.inherit!==!1?t:{}}function D7(e){const{initial:t,animate:n}=R7(e,A.useContext(qy));return A.useMemo(()=>({initial:t,animate:n}),[yO(t),yO(n)])}function yO(e){return Array.isArray(e)?e.join(" "):e}const $7=Symbol.for("motionComponentSymbol");function tl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function k7(e,t,n){return A.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):tl(n)&&(n.current=r))},[t])}const ww=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),L7="framerAppearId",j$="data-"+ww(L7),{schedule:jw}=b$(queueMicrotask,!1),A$=A.createContext({});function z7(e,t,n,r,a){var i,s;const{visualElement:o}=A.useContext(qy),l=A.useContext(x$),c=A.useContext(Fy),f=A.useContext(Vy).reducedMotion,d=A.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f}));const h=d.current,p=A.useContext(A$);h&&!h.projection&&a&&(h.type==="html"||h.type==="svg")&&I7(d.current,n,a,p);const m=A.useRef(!1);A.useInsertionEffect(()=>{h&&m.current&&h.update(n,c)});const g=n[j$],b=A.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,g)));return Hy(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),jw.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),A.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),b.current=!1))}),h}function I7(e,t,n,r){const{layoutId:a,layout:i,drag:s,dragConstraints:o,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:O$(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!s||o&&tl(o),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function O$(e){if(e)return e.options.allowProjection!==!1?e.projection:O$(e.parent)}function B7({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){var i,s;e&&N7(e);function o(c,f){let d;const h={...A.useContext(Vy),...c,layoutId:U7(c)},{isStatic:p}=h,m=D7(c),g=r(c,p);if(!p&&vw){F7();const b=V7(h);d=b.MeasureLayout,m.visualElement=z7(a,g,h,t,b.ProjectionNode)}return u.jsxs(qy.Provider,{value:m,children:[d&&m.visualElement?u.jsx(d,{visualElement:m.visualElement,...h}):null,n(a,c,k7(g,m.visualElement,f),g,p,m.visualElement)]})}o.displayName=`motion.${typeof a=="string"?a:`create(${(s=(i=a.displayName)!==null&&i!==void 0?i:a.name)!==null&&s!==void 0?s:""})`}`;const l=A.forwardRef(o);return l[$7]=a,l}function U7({layoutId:e}){const t=A.useContext(gw).id;return t&&e!==void 0?t+"-"+e:e}function F7(e,t){A.useContext(x$).strict}function V7(e){const{drag:t,layout:n}=Gl;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const H7=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Aw(e){return typeof e!="string"||e.includes("-")?!1:!!(H7.indexOf(e)>-1||/[A-Z]/u.test(e))}function gO(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ow(e,t,n,r){if(typeof t=="function"){const[a,i]=gO(r);t=t(n!==void 0?n:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=gO(r);t=t(n!==void 0?n:e.custom,a,i)}return t}const rx=e=>Array.isArray(e),q7=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),K7=e=>rx(e)?e[e.length-1]||0:e,cn=e=>!!(e&&e.getVelocity);function dp(e){const t=cn(e)?e.get():e;return q7(t)?t.toValue():t}function G7({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,a,i){const s={latestValues:Y7(r,a,i,e),renderState:t()};return n&&(s.onMount=o=>n({props:r,current:o,...s}),s.onUpdate=o=>n(o)),s}const E$=e=>(t,n)=>{const r=A.useContext(qy),a=A.useContext(Fy),i=()=>G7(e,t,r,a);return n?i():kc(i)};function Y7(e,t,n,r){const a={},i=r(e,{});for(const h in i)a[h]=dp(i[h]);let{initial:s,animate:o}=e;const l=Gy(e),c=w$(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),o===void 0&&(o=t.animate));let f=n?n.initial===!1:!1;f=f||s===!1;const d=f?o:s;if(d&&typeof d!="boolean"&&!Ky(d)){const h=Array.isArray(d)?d:[d];for(let p=0;pt=>typeof t=="string"&&t.startsWith(e),N$=T$("--"),X7=T$("var(--"),Ew=e=>X7(e)?W7.test(e.split("/*")[0].trim()):!1,W7=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,C$=(e,t)=>t&&typeof e=="number"?t.transform(e):e,la=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Nf={...zc,transform:e=>la(0,1,e)},Oh={...zc,default:1},kd=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ui=kd("deg"),ra=kd("%"),fe=kd("px"),Q7=kd("vh"),Z7=kd("vw"),vO={...ra,parse:e=>ra.parse(e)/100,transform:e=>ra.transform(e*100)},J7={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,backgroundPositionX:fe,backgroundPositionY:fe},eF={rotate:ui,rotateX:ui,rotateY:ui,rotateZ:ui,scale:Oh,scaleX:Oh,scaleY:Oh,scaleZ:Oh,skew:ui,skewX:ui,skewY:ui,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:Nf,originX:vO,originY:vO,originZ:fe},bO={...zc,transform:Math.round},Tw={...J7,...eF,zIndex:bO,size:fe,fillOpacity:Nf,strokeOpacity:Nf,numOctaves:bO},tF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nF=Lc.length;function rF(e,t,n){let r="",a=!0;for(let i=0;i({style:{},transform:{},transformOrigin:{},vars:{}}),_$=()=>({..._w(),attrs:{}}),Pw=e=>typeof e=="string"&&e.toLowerCase()==="svg";function P$(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const M$=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function R$(e,t,n,r){P$(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(M$.has(a)?a:ww(a),t.attrs[a])}const nm={};function lF(e){Object.assign(nm,e)}function D$(e,{layout:t,layoutId:n}){return xo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!nm[e]||e==="opacity")}function Mw(e,t,n){var r;const{style:a}=e,i={};for(const s in a)(cn(a[s])||t.style&&cn(t.style[s])||D$(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=a[s]);return i}function $$(e,t,n){const r=Mw(e,t,n);for(const a in e)if(cn(e[a])||cn(t[a])){const i=Lc.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=e[a]}return r}function cF(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const SO=["x","y","width","height","cx","cy","r"],uF={useVisualState:E$({scrapeMotionValuesFromProps:$$,createRenderState:_$,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:a})=>{if(!n)return;let i=!!e.drag;if(!i){for(const o in a)if(xo.has(o)){i=!0;break}}if(!i)return;let s=!t;if(t)for(let o=0;o{cF(n,r),Re.render(()=>{Cw(r,a,Pw(n.tagName),e.transformTemplate),R$(n,r)})})}})},fF={useVisualState:E$({scrapeMotionValuesFromProps:Mw,createRenderState:_w})};function k$(e,t,n){for(const r in t)!cn(t[r])&&!D$(r,n)&&(e[r]=t[r])}function dF({transformTemplate:e},t){return A.useMemo(()=>{const n=_w();return Nw(n,t,e),Object.assign({},n.vars,n.style)},[t])}function hF(e,t){const n=e.style||{},r={};return k$(r,n,e),Object.assign(r,dF(e,t)),r}function pF(e,t){const n={},r=hF(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function mF(e,t,n,r){const a=A.useMemo(()=>{const i=_$();return Cw(i,t,Pw(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};k$(i,e.style,e),a.style={...i,...a.style}}return a}function yF(e=!1){return(n,r,a,{latestValues:i},s)=>{const l=(Aw(n)?mF:pF)(r,i,s,n),c=P7(r,typeof n=="string",e),f=n!==A.Fragment?{...c,...l,ref:a}:{},{children:d}=r,h=A.useMemo(()=>cn(d)?d.get():d,[d]);return A.createElement(n,{...f,children:h})}}function gF(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const s={...Aw(r)?uF:fF,preloadedFeatures:e,useRender:yF(a),createVisualElement:t,Component:r};return B7(s)}}function L$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rwindow.ScrollTimeline!==void 0);class vF{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(z$()&&a.attachTimeline)return a.attachTimeline(t);if(typeof n=="function")return n(a)});return()=>{r.forEach((a,i)=>{a&&a(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class bF extends vF{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Rw(e,t){return e?e[t]||e.default||e:void 0}const ax=2e4;function I$(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=ax?1/0:t}function Dw(e){return typeof e=="function"}function wO(e,t){e.timeline=t,e.onfinish=null}const $w=e=>Array.isArray(e)&&typeof e[0]=="number",xF={linearEasing:void 0};function SF(e,t){const n=bw(e);return()=>{var r;return(r=xF[t])!==null&&r!==void 0?r:n()}}const rm=SF(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),B$=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let i=0;i`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ix={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nu([0,.65,.55,1]),circOut:Nu([.55,0,1,.45]),backIn:Nu([.31,.01,.66,-.59]),backOut:Nu([.33,1.53,.69,.99])};function F$(e,t){if(e)return typeof e=="function"&&rm()?B$(e,t):$w(e)?Nu(e):Array.isArray(e)?e.map(n=>F$(n,t)||ix.easeOut):ix[e]}const Cr={x:!1,y:!1};function V$(){return Cr.x||Cr.y}function H$(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let a=document;const i=(r=void 0)!==null&&r!==void 0?r:a.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function q$(e,t){const n=H$(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function jO(e){return t=>{t.pointerType==="touch"||V$()||e(t)}}function wF(e,t,n={}){const[r,a,i]=q$(e,n),s=jO(o=>{const{target:l}=o,c=t(o);if(typeof c!="function"||!l)return;const f=jO(d=>{c(d),l.removeEventListener("pointerleave",f)});l.addEventListener("pointerleave",f,a)});return r.forEach(o=>{o.addEventListener("pointerenter",s,a)}),i}const K$=(e,t)=>t?e===t?!0:K$(e,t.parentElement):!1,kw=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,jF=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function AF(e){return jF.has(e.tagName)||e.tabIndex!==-1}const Cu=new WeakSet;function AO(e){return t=>{t.key==="Enter"&&e(t)}}function Iv(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const OF=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=AO(()=>{if(Cu.has(n))return;Iv(n,"down");const a=AO(()=>{Iv(n,"up")}),i=()=>Iv(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function OO(e){return kw(e)&&!V$()}function EF(e,t,n={}){const[r,a,i]=q$(e,n),s=o=>{const l=o.currentTarget;if(!OO(o)||Cu.has(l))return;Cu.add(l);const c=t(o),f=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),!(!OO(p)||!Cu.has(l))&&(Cu.delete(l),typeof c=="function"&&c(p,{success:m}))},d=p=>{f(p,n.useGlobalTarget||K$(l,p.target))},h=p=>{f(p,!1)};window.addEventListener("pointerup",d,a),window.addEventListener("pointercancel",h,a)};return r.forEach(o=>{!AF(o)&&o.getAttribute("tabindex")===null&&(o.tabIndex=0),(n.useGlobalTarget?window:o).addEventListener("pointerdown",s,a),o.addEventListener("focus",c=>OF(c,a),a)}),i}function TF(e){return e==="x"||e==="y"?Cr[e]?null:(Cr[e]=!0,()=>{Cr[e]=!1}):Cr.x||Cr.y?null:(Cr.x=Cr.y=!0,()=>{Cr.x=Cr.y=!1})}const G$=new Set(["width","height","top","left","right","bottom",...Lc]);let hp;function NF(){hp=void 0}const aa={now:()=>(hp===void 0&&aa.set(Bt.isProcessing||O7.useManualTiming?Bt.timestamp:performance.now()),hp),set:e=>{hp=e,queueMicrotask(NF)}};function Lw(e,t){e.indexOf(t)===-1&&e.push(t)}function zw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Iw{constructor(){this.subscriptions=[]}add(t){return Lw(this.subscriptions,t),()=>zw(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e)),Gu={current:void 0};class _F{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{const i=aa.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=aa.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=CF(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Iw);const r=this.events[t].add(n);return t==="change"?()=>{r(),Re.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Gu.current&&Gu.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=aa.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>EO)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,EO);return Bw(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qr(e,t){return new _F(e,t)}function PF(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qr(n))}function MF(e,t){const n=Yy(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const s in i){const o=K7(i[s]);PF(e,s,o)}}function RF(e){return!!(cn(e)&&e.add)}function sx(e,t){const n=e.getValue("willChange");if(RF(n))return n.add(t)}function Y$(e){return e.props[j$]}const X$=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,DF=1e-7,$F=12;function kF(e,t,n,r,a){let i,s,o=0;do s=t+(n-t)/2,i=X$(s,r,a)-e,i>0?n=s:t=s;while(Math.abs(i)>DF&&++o<$F);return s}function Ld(e,t,n,r){if(e===t&&n===r)return yn;const a=i=>kF(i,0,1,e,n);return i=>i===0||i===1?i:X$(a(i),t,r)}const W$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Q$=e=>t=>1-e(1-t),Z$=Ld(.33,1.53,.69,.99),Uw=Q$(Z$),J$=W$(Uw),e3=e=>(e*=2)<1?.5*Uw(e):.5*(2-Math.pow(2,-10*(e-1))),Fw=e=>1-Math.sin(Math.acos(e)),t3=Q$(Fw),n3=W$(Fw),r3=e=>/^0[^.\s]+$/u.test(e);function LF(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||r3(e):!0}const Yu=e=>Math.round(e*1e5)/1e5,Vw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zF(e){return e==null}const IF=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hw=(e,t)=>n=>!!(typeof n=="string"&&IF.test(n)&&n.startsWith(e)||t&&!zF(n)&&Object.prototype.hasOwnProperty.call(n,t)),a3=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,i,s,o]=r.match(Vw);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},BF=e=>la(0,255,e),Bv={...zc,transform:e=>Math.round(BF(e))},Os={test:Hw("rgb","red"),parse:a3("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Bv.transform(e)+", "+Bv.transform(t)+", "+Bv.transform(n)+", "+Yu(Nf.transform(r))+")"};function UF(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const ox={test:Hw("#"),parse:UF,transform:Os.transform},nl={test:Hw("hsl","hue"),parse:a3("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ra.transform(Yu(t))+", "+ra.transform(Yu(n))+", "+Yu(Nf.transform(r))+")"},sn={test:e=>Os.test(e)||ox.test(e)||nl.test(e),parse:e=>Os.test(e)?Os.parse(e):nl.test(e)?nl.parse(e):ox.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Os.transform(e):nl.transform(e)},FF=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function VF(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vw))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(FF))===null||n===void 0?void 0:n.length)||0)>0}const i3="number",s3="color",HF="var",qF="var(",TO="${}",KF=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Cf(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(KF,l=>(sn.test(l)?(r.color.push(i),a.push(s3),n.push(sn.parse(l))):l.startsWith(qF)?(r.var.push(i),a.push(HF),n.push(l)):(r.number.push(i),a.push(i3),n.push(parseFloat(l))),++i,TO)).split(TO);return{values:n,split:o,indexes:r,types:a}}function o3(e){return Cf(e).values}function l3(e){const{split:t,types:n}=Cf(e),r=t.length;return a=>{let i="";for(let s=0;stypeof e=="number"?0:e;function YF(e){const t=o3(e);return l3(e)(t.map(GF))}const Ji={test:VF,parse:o3,createTransformer:l3,getAnimatableNone:YF},XF=new Set(["brightness","contrast","saturate","opacity"]);function WF(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vw)||[];if(!r)return e;const a=n.replace(r,"");let i=XF.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+a+")"}const QF=/\b([a-z-]*)\(.*?\)/gu,lx={...Ji,getAnimatableNone:e=>{const t=e.match(QF);return t?t.map(WF).join(" "):e}},ZF={...Tw,color:sn,backgroundColor:sn,outlineColor:sn,fill:sn,stroke:sn,borderColor:sn,borderTopColor:sn,borderRightColor:sn,borderBottomColor:sn,borderLeftColor:sn,filter:lx,WebkitFilter:lx},qw=e=>ZF[e];function c3(e,t){let n=qw(e);return n!==lx&&(n=Ji),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const JF=new Set(["auto","none","0"]);function eV(e,t,n){let r=0,a;for(;re===zc||e===fe,CO=(e,t)=>parseFloat(e.split(", ")[t]),_O=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const a=r.match(/^matrix3d\((.+)\)$/u);if(a)return CO(a[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?CO(i[1],e):0}},tV=new Set(["x","y","z"]),nV=Lc.filter(e=>!tV.has(e));function rV(e){const t=[];return nV.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Yl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:_O(4,13),y:_O(5,14)};Yl.translateX=Yl.x;Yl.translateY=Yl.y;const Gs=new Set;let cx=!1,ux=!1;function u3(){if(ux){const e=Array.from(Gs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=rV(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([i,s])=>{var o;(o=r.getValue(i))===null||o===void 0||o.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ux=!1,cx=!1,Gs.forEach(e=>e.complete()),Gs.clear()}function f3(){Gs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ux=!0)})}function aV(){f3(),u3()}class Kw{constructor(t,n,r,a,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Gs.add(this),cx||(cx=!0,Re.read(f3),Re.resolveKeyframes(u3))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;for(let i=0;i/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),iV=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sV(e){const t=iV.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function h3(e,t,n=1){const[r,a]=sV(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return d3(s)?parseFloat(s):s}return Ew(a)?h3(a,t,n+1):a}const p3=e=>t=>t.test(e),oV={test:e=>e==="auto",parse:e=>e},m3=[zc,fe,ra,ui,Z7,Q7,oV],PO=e=>m3.find(p3(e));class y3 extends Kw{constructor(t,n,r,a,i){super(t,n,r,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const MO=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ji.test(e)||e==="0")&&!e.startsWith("url("));function lV(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function Xy(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(uV),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const fV=40;class g3{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=aa.now(),this.options={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:i,repeatType:s,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>fV?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&aV(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=aa.now(),this.hasAttemptedResolve=!0;const{name:r,type:a,velocity:i,delay:s,onComplete:o,onUpdate:l,isGenerator:c}=this.options;if(!c&&!cV(t,r,a,i))if(s)this.options.duration=0;else{l&&l(Xy(t,this.options,n)),o&&o(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ht=(e,t,n)=>e+(t-e)*n;function Uv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function dV({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,i=0,s=0;if(!t)a=i=s=n;else{const o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;a=Uv(l,o,e+1/3),i=Uv(l,o,e),s=Uv(l,o,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function am(e,t){return n=>n>0?t:e}const Fv=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},hV=[ox,Os,nl],pV=e=>hV.find(t=>t.test(e));function RO(e){const t=pV(e);if(!t)return!1;let n=t.parse(e);return t===nl&&(n=dV(n)),n}const DO=(e,t)=>{const n=RO(e),r=RO(t);if(!n||!r)return am(e,t);const a={...n};return i=>(a.red=Fv(n.red,r.red,i),a.green=Fv(n.green,r.green,i),a.blue=Fv(n.blue,r.blue,i),a.alpha=ht(n.alpha,r.alpha,i),Os.transform(a))},mV=(e,t)=>n=>t(e(n)),zd=(...e)=>e.reduce(mV),fx=new Set(["none","hidden"]);function yV(e,t){return fx.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gV(e,t){return n=>ht(e,t,n)}function Gw(e){return typeof e=="number"?gV:typeof e=="string"?Ew(e)?am:sn.test(e)?DO:xV:Array.isArray(e)?v3:typeof e=="object"?sn.test(e)?DO:vV:am}function v3(e,t){const n=[...e],r=n.length,a=e.map((i,s)=>Gw(i)(i,t[s]));return i=>{for(let s=0;s{for(const i in r)n[i]=r[i](a);return n}}function bV(e,t){var n;const r=[],a={color:0,var:0,number:0};for(let i=0;i{const n=Ji.createTransformer(t),r=Cf(e),a=Cf(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?fx.has(e)&&!a.values.length||fx.has(t)&&!r.values.length?yV(e,t):zd(v3(bV(r,a),a.values),n):am(e,t)};function b3(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ht(e,t,n):Gw(e)(e,t)}const SV=5;function x3(e,t,n){const r=Math.max(t-SV,0);return Bw(n-e(r),t-r)}const yt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Vv=.001;function wV({duration:e=yt.duration,bounce:t=yt.bounce,velocity:n=yt.velocity,mass:r=yt.mass}){let a,i,s=1-t;s=la(yt.minDamping,yt.maxDamping,s),e=la(yt.minDuration,yt.maxDuration,Ba(e)),s<1?(a=c=>{const f=c*s,d=f*e,h=f-n,p=dx(c,s),m=Math.exp(-d);return Vv-h/p*m},i=c=>{const d=c*s*e,h=d*n+n,p=Math.pow(s,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=dx(Math.pow(c,2),s);return(-a(c)+Vv>0?-1:1)*((h-p)*m)/g}):(a=c=>{const f=Math.exp(-c*e),d=(c-n)*e+1;return-Vv+f*d},i=c=>{const f=Math.exp(-c*e),d=(n-c)*(e*e);return f*d});const o=5/e,l=AV(a,i,o);if(e=Ia(e),isNaN(l))return{stiffness:yt.stiffness,damping:yt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const jV=12;function AV(e,t,n){let r=n;for(let a=1;ae[n]!==void 0)}function TV(e){let t={velocity:yt.velocity,stiffness:yt.stiffness,damping:yt.damping,mass:yt.mass,isResolvedFromDuration:!1,...e};if(!$O(e,EV)&&$O(e,OV))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,i=2*la(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:yt.mass,stiffness:a,damping:i}}else{const n=wV(e);t={...t,...n,mass:yt.mass},t.isResolvedFromDuration=!0}return t}function S3(e=yt.visualDuration,t=yt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:l,damping:c,mass:f,duration:d,velocity:h,isResolvedFromDuration:p}=TV({...n,velocity:-Ba(n.velocity||0)}),m=h||0,g=c/(2*Math.sqrt(l*f)),b=s-i,y=Ba(Math.sqrt(l/f)),v=Math.abs(b)<5;r||(r=v?yt.restSpeed.granular:yt.restSpeed.default),a||(a=v?yt.restDelta.granular:yt.restDelta.default);let x;if(g<1){const S=dx(y,g);x=j=>{const O=Math.exp(-g*y*j);return s-O*((m+g*y*b)/S*Math.sin(S*j)+b*Math.cos(S*j))}}else if(g===1)x=S=>s-Math.exp(-y*S)*(b+(m+y*b)*S);else{const S=y*Math.sqrt(g*g-1);x=j=>{const O=Math.exp(-g*y*j),E=Math.min(S*j,300);return s-O*((m+g*y*b)*Math.sinh(E)+S*b*Math.cosh(E))/S}}const w={calculatedDuration:p&&d||null,next:S=>{const j=x(S);if(p)o.done=S>=d;else{let O=0;g<1&&(O=S===0?Ia(m):x3(x,S,j));const E=Math.abs(O)<=r,T=Math.abs(s-j)<=a;o.done=E&&T}return o.value=o.done?s:j,o},toString:()=>{const S=Math.min(I$(w),ax),j=B$(O=>w.next(S*O).value,S,30);return S+"ms "+j}};return w}function kO({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:l,restDelta:c=.5,restSpeed:f}){const d=e[0],h={done:!1,value:d},p=E=>o!==void 0&&El,m=E=>o===void 0?l:l===void 0||Math.abs(o-E)-g*Math.exp(-E/r),x=E=>y+v(E),w=E=>{const T=v(E),N=x(E);h.done=Math.abs(T)<=c,h.value=h.done?y:N};let S,j;const O=E=>{p(h.value)&&(S=E,j=S3({keyframes:[h.value,m(h.value)],velocity:x3(x,E,h.value),damping:a,stiffness:i,restDelta:c,restSpeed:f}))};return O(0),{calculatedDuration:null,next:E=>{let T=!1;return!j&&S===void 0&&(T=!0,w(E),O(E)),S!==void 0&&E>=S?j.next(E-S):(!T&&w(E),h)}}}const NV=Ld(.42,0,1,1),CV=Ld(0,0,.58,1),w3=Ld(.42,0,.58,1),_V=e=>Array.isArray(e)&&typeof e[0]!="number",PV={linear:yn,easeIn:NV,easeInOut:w3,easeOut:CV,circIn:Fw,circInOut:n3,circOut:t3,backIn:Uw,backInOut:J$,backOut:Z$,anticipate:e3},LO=e=>{if($w(e)){v$(e.length===4);const[t,n,r,a]=e;return Ld(t,n,r,a)}else if(typeof e=="string")return PV[e];return e};function MV(e,t,n){const r=[],a=n||b3,i=e.length-1;for(let s=0;st[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=MV(t,r,a),l=o.length,c=f=>{if(s&&f1)for(;dc(la(e[0],e[i-1],f)):c}function RV(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=ro(0,t,r);e.push(ht(n,1,a))}}function j3(e){const t=[0];return RV(t,e.length-1),t}function DV(e,t){return e.map(n=>n*t)}function $V(e,t){return e.map(()=>t||w3).splice(0,e.length-1)}function im({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=_V(r)?r.map(LO):LO(r),i={done:!1,value:t[0]},s=DV(n&&n.length===t.length?n:j3(t),e),o=Yw(s,t,{ease:Array.isArray(a)?a:$V(t,a)});return{calculatedDuration:e,next:l=>(i.value=o(l),i.done=l>=e,i)}}const kV=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Re.update(t,!0),stop:()=>Lr(t),now:()=>Bt.isProcessing?Bt.timestamp:aa.now()}},LV={decay:kO,inertia:kO,tween:im,keyframes:im,spring:S3},zV=e=>e/100;class Xw extends g3{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:a,keyframes:i}=this.options,s=(a==null?void 0:a.KeyframeResolver)||Kw,o=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new s(i,o,n,r,a),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=this.options,o=Dw(n)?n:LV[n]||im;let l,c;o!==im&&typeof t[0]!="number"&&(l=zd(zV,b3(t[0],t[1])),t=[0,100]);const f=o({...this.options,keyframes:t});i==="mirror"&&(c=o({...this.options,keyframes:[...t].reverse(),velocity:-s})),f.calculatedDuration===null&&(f.calculatedDuration=I$(f));const{calculatedDuration:d}=f,h=d+a,p=h*(r+1)-a;return{generator:f,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:E}=this.options;return{done:!0,value:E[E.length-1]}}const{finalKeyframe:a,generator:i,mirroredGenerator:s,mapPercentToKeyframes:o,keyframes:l,calculatedDuration:c,totalDuration:f,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:p,repeatType:m,repeatDelay:g,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>f;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let x=this.currentTime,w=i;if(p){const E=Math.min(this.currentTime,f)/d;let T=Math.floor(E),N=E%1;!N&&E>=1&&(N=1),N===1&&T--,T=Math.min(T,p+1),!!(T%2)&&(m==="reverse"?(N=1-N,g&&(N-=g/d)):m==="mirror"&&(w=s)),x=la(0,1,N)*d}const S=v?{done:!1,value:l[0]}:w.next(x);o&&(S.value=o(S.value));let{done:j}=S;!v&&c!==null&&(j=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return O&&a!==void 0&&(S.value=Xy(l,this.options,a)),b&&b(S.value),O&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Ba(t.calculatedDuration):0}get time(){return Ba(this.currentTime)}set time(t){t=Ia(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ba(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=kV,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const IV=new Set(["opacity","clipPath","filter","transform"]);function BV(e,t,n,{delay:r=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const f=F$(o,a);return Array.isArray(f)&&(c.easing=f),e.animate(c,{delay:r,duration:a,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const UV=bw(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sm=10,FV=2e4;function VV(e){return Dw(e.type)||e.type==="spring"||!U$(e.ease)}function HV(e,t){const n=new Xw({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const a=[];let i=0;for(;!r.done&&ithis.onKeyframesResolved(s,o),n,r,a),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:a,ease:i,type:s,motionValue:o,name:l,startTime:c}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof i=="string"&&rm()&&qV(i)&&(i=A3[i]),VV(this.options)){const{onComplete:d,onUpdate:h,motionValue:p,element:m,...g}=this.options,b=HV(t,g);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,a=b.times,i=b.ease,s="keyframes"}const f=BV(o.owner.current,l,t,{...this.options,duration:r,times:a,ease:i});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(wO(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:d}=this.options;o.set(Xy(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:a,type:s,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ba(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ba(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ia(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return yn;const{animation:r}=n;wO(r,t)}return yn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:a,type:i,ease:s,times:o}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:f,onComplete:d,element:h,...p}=this.options,m=new Xw({...p,keyframes:r,duration:a,type:i,ease:s,times:o,isGenerator:!0}),g=Ia(this.time);c.setWithVelocity(m.sample(g-sm).value,m.sample(g).value,sm)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:a,repeatType:i,damping:s,type:o}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return UV()&&r&&IV.has(r)&&!l&&!c&&!a&&i!=="mirror"&&s!==0&&o!=="inertia"}}const KV={type:"spring",stiffness:500,damping:25,restSpeed:10},GV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),YV={type:"keyframes",duration:.8},XV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WV=(e,{keyframes:t})=>t.length>2?YV:xo.has(e)?e.startsWith("scale")?GV(t[1]):KV:XV;function QV({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:l,elapsed:c,...f}){return!!Object.keys(f).length}const Ww=(e,t,n,r={},a,i)=>s=>{const o=Rw(r,e)||{},l=o.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Ia(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-c,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:a};QV(o)||(f={...f,...WV(e,f)}),f.duration&&(f.duration=Ia(f.duration)),f.repeatDelay&&(f.repeatDelay=Ia(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!i&&t.get()!==void 0){const h=Xy(f.keyframes,o);if(h!==void 0)return Re.update(()=>{f.onUpdate(h),f.onComplete()}),new bF([])}return!i&&zO.supports(f)?new zO(f):new Xw(f)};function ZV({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function O3(e,t,{delay:n=0,transitionOverride:r,type:a}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:o,...l}=t;r&&(s=r);const c=[],f=a&&e.animationState&&e.animationState.getState()[a];for(const d in l){const h=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),p=l[d];if(p===void 0||f&&ZV(f,d))continue;const m={delay:n,...Rw(s||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=Y$(e);if(y){const v=window.MotionHandoffAnimation(y,d,Re);v!==null&&(m.startTime=v,g=!0)}}sx(e,d),h.start(Ww(d,h,p,e.shouldReduceMotion&&G$.has(d)?{type:!1}:m,e,g));const b=h.animation;b&&c.push(b)}return o&&Promise.all(c).then(()=>{Re.update(()=>{o&&MF(e,o)})}),c}function hx(e,t,n={}){var r;const a=Yy(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(i=n.transitionOverride);const s=a?()=>Promise.all(O3(e,a,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:h}=i;return JV(e,t,f+c,d,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,f]=l==="beforeChildren"?[s,o]:[o,s];return c().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function JV(e,t,n=0,r=0,a=1,i){const s=[],o=(e.variantChildren.size-1)*r,l=a===1?(c=0)=>c*r:(c=0)=>o-c*r;return Array.from(e.variantChildren).sort(e9).forEach((c,f)=>{c.notify("AnimationStart",t),s.push(hx(c,t,{...i,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function e9(e,t){return e.sortNodePosition(t)}function t9(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(i=>hx(e,i,n));r=Promise.all(a)}else if(typeof t=="string")r=hx(e,t,n);else{const a=typeof t=="function"?Yy(e,t,n.custom):t;r=Promise.all(O3(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const n9=Sw.length;function E3(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?E3(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>t9(e,n,r)))}function s9(e){let t=i9(e),n=IO(),r=!0;const a=l=>(c,f)=>{var d;const h=Yy(e,f,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:p,transitionEnd:m,...g}=h;c={...c,...g,...m}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,f=E3(e.parent)||{},d=[],h=new Set;let p={},m=1/0;for(let b=0;bm&&w,T=!1;const N=Array.isArray(x)?x:[x];let M=N.reduce(a(y),{});S===!1&&(M={});const{prevResolvedValues:C={}}=v,L={...C,...M},D=k=>{E=!0,h.has(k)&&(T=!0,h.delete(k)),v.needsAnimating[k]=!0;const I=e.getValue(k);I&&(I.liveStyle=!1)};for(const k in L){const I=M[k],F=C[k];if(p.hasOwnProperty(k))continue;let H=!1;rx(I)&&rx(F)?H=!L$(I,F):H=I!==F,H?I!=null?D(k):h.add(k):I!==void 0&&h.has(k)?D(k):v.protectedKeys[k]=!0}v.prevProp=x,v.prevResolvedValues=M,v.isActive&&(p={...p,...M}),r&&e.blockInitialAnimation&&(E=!1),E&&(!(j&&O)||T)&&d.push(...N.map(k=>({animation:k,options:{type:y}})))}if(h.size){const b={};h.forEach(y=>{const v=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),b[y]=v??null}),d.push({animation:b})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function o(l,c){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=s(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:s,setActive:o,setAnimateFunction:i,getState:()=>n,reset:()=>{n=IO(),r=!0}}}function o9(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!L$(t,e):!1}function us(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function IO(){return{animate:us(!0),whileInView:us(),whileHover:us(),whileTap:us(),whileDrag:us(),whileFocus:us(),exit:us()}}class ns{constructor(t){this.isMounted=!1,this.node=t}update(){}}class l9 extends ns{constructor(t){super(t),t.animationState||(t.animationState=s9(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ky(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let c9=0;class u9 extends ns{constructor(){super(...arguments),this.id=c9++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const f9={animation:{Feature:l9},exit:{Feature:u9}};function _f(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Id(e){return{point:{x:e.pageX,y:e.pageY}}}const d9=e=>t=>kw(t)&&e(t,Id(t));function Xu(e,t,n,r){return _f(e,t,d9(n),r)}const BO=(e,t)=>Math.abs(e-t);function h9(e,t){const n=BO(e.x,t.x),r=BO(e.y,t.y);return Math.sqrt(n**2+r**2)}class T3{constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=qv(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=h9(d.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=d,{timestamp:g}=Bt;this.history.push({...m,timestamp:g});const{onStart:b,onMove:y}=this.handlers;h||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Hv(h,this.transformPagePoint),Re.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=qv(d.type==="pointercancel"?this.lastMoveEventInfo:Hv(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,b),m&&m(d,b)},!kw(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const s=Id(t),o=Hv(s,this.transformPagePoint),{point:l}=o,{timestamp:c}=Bt;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,qv(o,this.history)),this.removeListeners=zd(Xu(this.contextWindow,"pointermove",this.handlePointerMove),Xu(this.contextWindow,"pointerup",this.handlePointerUp),Xu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Lr(this.updatePoint)}}function Hv(e,t){return t?{point:t(e.point)}:e}function UO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qv({point:e},t){return{point:e,delta:UO(e,N3(t)),offset:UO(e,p9(t)),velocity:m9(t,.1)}}function p9(e){return e[0]}function N3(e){return e[e.length-1]}function m9(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=N3(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Ia(t)));)n--;if(!r)return{x:0,y:0};const i=Ba(a.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const C3=1e-4,y9=1-C3,g9=1+C3,_3=.01,v9=0-_3,b9=0+_3;function Jn(e){return e.max-e.min}function x9(e,t,n){return Math.abs(e-t)<=n}function FO(e,t,n,r=.5){e.origin=r,e.originPoint=ht(t.min,t.max,e.origin),e.scale=Jn(n)/Jn(t),e.translate=ht(n.min,n.max,e.origin)-e.originPoint,(e.scale>=y9&&e.scale<=g9||isNaN(e.scale))&&(e.scale=1),(e.translate>=v9&&e.translate<=b9||isNaN(e.translate))&&(e.translate=0)}function Wu(e,t,n,r){FO(e.x,t.x,n.x,r?r.originX:void 0),FO(e.y,t.y,n.y,r?r.originY:void 0)}function VO(e,t,n){e.min=n.min+t.min,e.max=e.min+Jn(t)}function S9(e,t,n){VO(e.x,t.x,n.x),VO(e.y,t.y,n.y)}function HO(e,t,n){e.min=t.min-n.min,e.max=e.min+Jn(t)}function Qu(e,t,n){HO(e.x,t.x,n.x),HO(e.y,t.y,n.y)}function w9(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ht(n,e,r.max):Math.min(e,n)),e}function qO(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function j9(e,{top:t,left:n,bottom:r,right:a}){return{x:qO(e.x,n,a),y:qO(e.y,t,r)}}function KO(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=ro(t.min,t.max-r,e.min):r>a&&(n=ro(e.min,e.max-a,t.min)),la(0,1,n)}function E9(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const px=.35;function T9(e=px){return e===!1?e=0:e===!0&&(e=px),{x:GO(e,"left","right"),y:GO(e,"top","bottom")}}function GO(e,t,n){return{min:YO(e,t),max:YO(e,n)}}function YO(e,t){return typeof e=="number"?e:e[t]||0}const XO=()=>({translate:0,scale:1,origin:0,originPoint:0}),rl=()=>({x:XO(),y:XO()}),WO=()=>({min:0,max:0}),bt=()=>({x:WO(),y:WO()});function ir(e){return[e("x"),e("y")]}function P3({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function N9({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function C9(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Kv(e){return e===void 0||e===1}function mx({scale:e,scaleX:t,scaleY:n}){return!Kv(e)||!Kv(t)||!Kv(n)}function vs(e){return mx(e)||M3(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function M3(e){return QO(e.x)||QO(e.y)}function QO(e){return e&&e!=="0%"}function om(e,t,n){const r=e-n,a=t*r;return n+a}function ZO(e,t,n,r,a){return a!==void 0&&(e=om(e,a,r)),om(e,n,r)+t}function yx(e,t=0,n=1,r,a){e.min=ZO(e.min,t,n,r,a),e.max=ZO(e.max,t,n,r,a)}function R3(e,{x:t,y:n}){yx(e.x,t.translate,t.scale,t.originPoint),yx(e.y,n.translate,n.scale,n.originPoint)}const JO=.999999999999,eE=1.0000000000001;function _9(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let i,s;for(let o=0;oJO&&(t.x=1),t.yJO&&(t.y=1)}function al(e,t){e.min=e.min+t,e.max=e.max+t}function tE(e,t,n,r,a=.5){const i=ht(e.min,e.max,a);yx(e,t,n,i,r)}function il(e,t){tE(e.x,t.x,t.scaleX,t.scale,t.originX),tE(e.y,t.y,t.scaleY,t.scale,t.originY)}function D3(e,t){return P3(C9(e.getBoundingClientRect(),t))}function P9(e,t,n){const r=D3(e,n),{scroll:a}=t;return a&&(al(r.x,a.offset.x),al(r.y,a.offset.y)),r}const $3=({current:e})=>e?e.ownerDocument.defaultView:null,M9=new WeakMap;class R9{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=bt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Id(f).point)},i=(f,d)=>{const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=TF(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ir(b=>{let y=this.getAxisMotionValue(b).get()||0;if(ra.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[b];x&&(y=Jn(x)*(parseFloat(y)/100))}}this.originPoint[b]=y}),m&&Re.postRender(()=>m(f,d)),sx(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(f,d)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=d;if(p&&this.currentDirection===null){this.currentDirection=D9(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),g&&g(f,d)},o=(f,d)=>this.stop(f,d),l=()=>ir(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new T3(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:o,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:$3(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&Re.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!Eh(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=w9(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&tl(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&a?this.constraints=j9(a.layoutBox,n):this.constraints=!1,this.elastic=T9(r),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&ir(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=E9(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tl(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=P9(r,a.root,this.visualElement.getTransformPagePoint());let s=A9(a.layout.layoutBox,i);if(n){const o=n(N9(s));this.hasMutatedConstraints=!!o,o&&(s=P3(o))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},c=ir(f=>{if(!Eh(f,n,this.currentDirection))return;let d=l&&l[f]||{};s&&(d={min:0,max:0});const h=a?200:1e6,p=a?40:1e7,m={type:"inertia",velocity:r?t[f]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(f,m)});return Promise.all(c).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return sx(this.visualElement,t),r.start(Ww(t,r,0,n,this.visualElement,!1))}stopAnimation(){ir(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ir(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ir(n=>{const{drag:r}=this.getProps();if(!Eh(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(n);if(a&&a.layout){const{min:s,max:o}=a.layout.layoutBox[n];i.set(t[n]-ht(s,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!tl(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};ir(s=>{const o=this.getAxisMotionValue(s);if(o&&this.constraints!==!1){const l=o.get();a[s]=O9({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ir(s=>{if(!Eh(s,t,null))return;const o=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];o.set(ht(l,c,a[s]))})}addListeners(){if(!this.visualElement.current)return;M9.set(this.visualElement,this);const t=this.visualElement.current,n=Xu(t,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();tl(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Re.read(r);const s=_f(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ir(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=l[f].translate,d.set(d.get()+l[f].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:s=px,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:i,dragElastic:s,dragMomentum:o}}}function Eh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function D9(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $9 extends ns{constructor(t){super(t),this.removeGroupControls=yn,this.removeListeners=yn,this.controls=new R9(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yn}unmount(){this.removeGroupControls(),this.removeListeners()}}const nE=e=>(t,n)=>{e&&Re.postRender(()=>e(t,n))};class k9 extends ns{constructor(){super(...arguments),this.removePointerDownListener=yn}onPointerDown(t){this.session=new T3(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$3(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:nE(t),onStart:nE(n),onMove:r,onEnd:(i,s)=>{delete this.session,a&&Re.postRender(()=>a(i,s))}}}mount(){this.removePointerDownListener=Xu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const pp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ou={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=rE(e,t.target.x),r=rE(e,t.target.y);return`${n}% ${r}%`}},L9={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=Ji.parse(e);if(a.length>5)return r;const i=Ji.createTransformer(e),s=typeof a[0]!="number"?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;a[0+s]/=o,a[1+s]/=l;const c=ht(o,l,.5);return typeof a[2+s]=="number"&&(a[2+s]/=c),typeof a[3+s]=="number"&&(a[3+s]/=c),i(a)}};class z9 extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:i}=t;lF(I9),i&&(n.group&&n.group.add(i),r&&r.register&&a&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),pp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,a||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Re.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),jw.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function k3(e){const[t,n]=g$(),r=A.useContext(gw);return u.jsx(z9,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(A$),isPresent:t,safeToRemove:n})}const I9={borderRadius:{...ou,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ou,borderTopRightRadius:ou,borderBottomLeftRadius:ou,borderBottomRightRadius:ou,boxShadow:L9};function B9(e,t,n){const r=cn(e)?e:Qr(e);return r.start(Ww("",r,t,n)),r.animation}function U9(e){return e instanceof SVGElement&&e.tagName!=="svg"}const F9=(e,t)=>e.depth-t.depth;class V9{constructor(){this.children=[],this.isDirty=!1}add(t){Lw(this.children,t),this.isDirty=!0}remove(t){zw(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(F9),this.isDirty=!1,this.children.forEach(t)}}function H9(e,t){const n=aa.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(Lr(r),e(i-t))};return Re.read(r,!0),()=>Lr(r)}const L3=["TopLeft","TopRight","BottomLeft","BottomRight"],q9=L3.length,aE=e=>typeof e=="string"?parseFloat(e):e,iE=e=>typeof e=="number"||fe.test(e);function K9(e,t,n,r,a,i){a?(e.opacity=ht(0,n.opacity!==void 0?n.opacity:1,G9(r)),e.opacityExit=ht(t.opacity!==void 0?t.opacity:1,0,Y9(r))):i&&(e.opacity=ht(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(ro(e,t,r))}function oE(e,t){e.min=t.min,e.max=t.max}function tr(e,t){oE(e.x,t.x),oE(e.y,t.y)}function lE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function cE(e,t,n,r,a){return e-=t,e=om(e,1/n,r),a!==void 0&&(e=om(e,1/a,r)),e}function X9(e,t=0,n=1,r=.5,a,i=e,s=e){if(ra.test(t)&&(t=parseFloat(t),t=ht(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=ht(i.min,i.max,r);e===i&&(o-=t),e.min=cE(e.min,t,n,o,a),e.max=cE(e.max,t,n,o,a)}function uE(e,t,[n,r,a],i,s){X9(e,t[n],t[r],t[a],t.scale,i,s)}const W9=["x","scaleX","originX"],Q9=["y","scaleY","originY"];function fE(e,t,n,r){uE(e.x,t,W9,n?n.x:void 0,r?r.x:void 0),uE(e.y,t,Q9,n?n.y:void 0,r?r.y:void 0)}function dE(e){return e.translate===0&&e.scale===1}function I3(e){return dE(e.x)&&dE(e.y)}function hE(e,t){return e.min===t.min&&e.max===t.max}function Z9(e,t){return hE(e.x,t.x)&&hE(e.y,t.y)}function pE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function B3(e,t){return pE(e.x,t.x)&&pE(e.y,t.y)}function mE(e){return Jn(e.x)/Jn(e.y)}function yE(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class J9{constructor(){this.members=[]}add(t){Lw(this.members,t),t.scheduleRender()}remove(t){if(zw(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function eH(e,t,n){let r="";const a=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((a||i||s)&&(r=`translate3d(${a}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:f,rotateX:d,rotateY:h,skewX:p,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const o=e.x.scale*t.x,l=e.y.scale*t.y;return(o!==1||l!==1)&&(r+=`scale(${o}, ${l})`),r||"none"}const bs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},_u=typeof window<"u"&&window.MotionDebug!==void 0,Gv=["","X","Y","Z"],tH={visibility:"hidden"},gE=1e3;let nH=0;function Yv(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function U3(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Y$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Re,!(a||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&U3(r)}function F3({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(s={},o=t==null?void 0:t()){this.id=nH++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,_u&&(bs.totalNodes=bs.resolvedTargetDeltas=bs.recalculatedProjection=0),this.nodes.forEach(iH),this.nodes.forEach(uH),this.nodes.forEach(fH),this.nodes.forEach(sH),_u&&window.MotionDebug.record(bs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=H9(h,250),pp.hasAnimatedSinceResize&&(pp.hasAnimatedSinceResize=!1,this.nodes.forEach(bE))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||f.getDefaultTransition()||yH,{onLayoutAnimationStart:b,onLayoutAnimationComplete:y}=f.getProps(),v=!this.targetLayout||!B3(this.targetLayout,m)||p,x=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const w={...Rw(g,"layout"),onPlay:b,onComplete:y};(f.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else h||bE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Lr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(dH),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&U3(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const S=w/1e3;xE(d.x,s.x,S),xE(d.y,s.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qu(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pH(this.relativeTarget,this.relativeTargetOrigin,h,S),x&&Z9(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=bt()),tr(x,this.relativeTarget)),g&&(this.animationValues=f,K9(f,c,this.latestValues,S,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Lr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Re.update(()=>{pp.hasAnimatedSinceResize=!0,this.currentAnimation=B9(0,gE,{...s,onUpdate:o=>{this.mixTargetDelta(o),s.onUpdate&&s.onUpdate(o)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:l,layout:c,latestValues:f}=s;if(!(!o||!l||!c)){if(this!==s&&this.layout&&c&&V3(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||bt();const d=Jn(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const h=Jn(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}tr(o,l),il(o,f),Wu(this.projectionDeltaWithTransform,this.layoutCorrected,o,f)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new J9),this.sharedNodes.get(s).add(o);const c=o.options.initialPromotionConfig;o.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const c={};l.z&&Yv("z",s,c,this.animationValues);for(let f=0;f{var o;return(o=s.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(vE),this.root.sharedNodes.clear()}}}function rH(e){e.updateLayout()}function aH(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?ir(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],p=Jn(h);h.min=r[d].min,h.max=h.min+p}):V3(i,n.layoutBox,r)&&ir(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],p=Jn(r[d]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const o=rl();Wu(o,r,n.layoutBox);const l=rl();s?Wu(l,e.applyTransform(a,!0),n.measuredBox):Wu(l,r,n.layoutBox);const c=!I3(o);let f=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:p}=d;if(h&&p){const m=bt();Qu(m,n.layoutBox,h.layoutBox);const g=bt();Qu(g,r,p.layoutBox),B3(m,g)||(f=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:o,hasLayoutChanged:c,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function iH(e){_u&&bs.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function sH(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function oH(e){e.clearSnapshot()}function vE(e){e.clearMeasurements()}function lH(e){e.isLayoutDirty=!1}function cH(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function bE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function uH(e){e.resolveTargetDelta()}function fH(e){e.calcProjection()}function dH(e){e.resetSkewAndRotation()}function hH(e){e.removeLeadSnapshot()}function xE(e,t,n){e.translate=ht(t.translate,0,n),e.scale=ht(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function SE(e,t,n,r){e.min=ht(t.min,n.min,r),e.max=ht(t.max,n.max,r)}function pH(e,t,n,r){SE(e.x,t.x,n.x,r),SE(e.y,t.y,n.y,r)}function mH(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yH={duration:.45,ease:[.4,0,.1,1]},wE=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),jE=wE("applewebkit/")&&!wE("chrome/")?Math.round:yn;function AE(e){e.min=jE(e.min),e.max=jE(e.max)}function gH(e){AE(e.x),AE(e.y)}function V3(e,t,n){return e==="position"||e==="preserve-aspect"&&!x9(mE(t),mE(n),.2)}function vH(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const bH=F3({attachResizeListener:(e,t)=>_f(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xv={current:void 0},H3=F3({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xv.current){const e=new bH({});e.mount(window),e.setOptions({layoutScroll:!0}),Xv.current=e}return Xv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),xH={pan:{Feature:k9},drag:{Feature:$9,ProjectionNode:H3,MeasureLayout:k3}};function OE(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,i=r[a];i&&Re.postRender(()=>i(t,Id(t)))}class SH extends ns{mount(){const{current:t}=this.node;t&&(this.unmount=wF(t,n=>(OE(this.node,n,"Start"),r=>OE(this.node,r,"End"))))}unmount(){}}class wH extends ns{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=zd(_f(this.node.current,"focus",()=>this.onFocus()),_f(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function EE(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),i=r[a];i&&Re.postRender(()=>i(t,Id(t)))}class jH extends ns{mount(){const{current:t}=this.node;t&&(this.unmount=EF(t,n=>(EE(this.node,n,"Start"),(r,{success:a})=>EE(this.node,r,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const gx=new WeakMap,Wv=new WeakMap,AH=e=>{const t=gx.get(e.target);t&&t(e)},OH=e=>{e.forEach(AH)};function EH({root:e,...t}){const n=e||document;Wv.has(n)||Wv.set(n,{});const r=Wv.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(OH,{root:e,...t})),r[a]}function TH(e,t,n){const r=EH(t);return gx.set(e,n),r.observe(e),()=>{gx.delete(e),r.unobserve(e)}}const NH={some:0,all:1};class CH extends ns{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:NH[a]},o=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),h=c?f:d;h&&h(l)};return TH(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_H(t,n))&&this.startObserver()}unmount(){}}function _H({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const PH={inView:{Feature:CH},tap:{Feature:jH},focus:{Feature:wH},hover:{Feature:SH}},MH={layout:{ProjectionNode:H3,MeasureLayout:k3}},lm={current:null},Qw={current:!1};function q3(){if(Qw.current=!0,!!vw)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>lm.current=e.matches;e.addListener(t),t()}else lm.current=!1}const RH=[...m3,sn,Ji],DH=e=>RH.find(p3(e)),TE=new WeakMap;function $H(e,t,n){for(const r in t){const a=t[r],i=n[r];if(cn(a))e.addValue(r,a);else if(cn(i))e.addValue(r,Qr(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=e.getStaticValue(r);e.addValue(r,Qr(s!==void 0?s:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const NE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class kH{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=aa.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),Qw.current||q3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:lm.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){TE.delete(this.current),this.projection&&this.projection.unmount(),Lr(this.notifyUpdate),Lr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=xo.has(t),a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Re.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Gl){const n=Gl[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):bt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Qr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(d3(a)||r3(a))?a=parseFloat(a):!DH(a)&&Ji.test(n)&&(a=c3(t,n)),this.setBaseTarget(t,cn(a)?a.get():a)),cn(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let a;if(typeof r=="string"||typeof r=="object"){const s=Ow(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(a=s[t])}if(r&&a!==void 0)return a;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!cn(i)?i:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Iw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class K3 extends kH{constructor(){super(...arguments),this.KeyframeResolver=y3}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;cn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function LH(e){return window.getComputedStyle(e)}class zH extends K3{constructor(){super(...arguments),this.type="html",this.renderInstance=P$}readValueFromInstance(t,n){if(xo.has(n)){const r=qw(n);return r&&r.default||0}else{const r=LH(t),a=(N$(n)?r.getPropertyValue(n):r[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return D3(t,n)}build(t,n,r){Nw(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Mw(t,n,r)}}class IH extends K3{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=bt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(xo.has(n)){const r=qw(n);return r&&r.default||0}return n=M$.has(n)?n:ww(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return $$(t,n,r)}build(t,n,r){Cw(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,a){R$(t,n,r,a)}mount(t){this.isSVGTag=Pw(t.tagName),super.mount(t)}}const BH=(e,t)=>Aw(e)?new IH(t):new zH(t,{allowProjection:e!==A.Fragment}),UH=gF({...f9,...PH,...xH,...MH},BH),Nt=M7(UH);function G3(e,t){let n;const r=()=>{const{currentTime:a}=t,s=(a===null?0:a.value)/100;n!==s&&e(s),n=s};return Re.update(r,!0),()=>Lr(r)}const mp=new WeakMap;let fi;function FH(e,t){if(t){const{inlineSize:n,blockSize:r}=t[0];return{width:n,height:r}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function VH({target:e,contentRect:t,borderBoxSize:n}){var r;(r=mp.get(e))===null||r===void 0||r.forEach(a=>{a({target:e,contentSize:t,get size(){return FH(e,n)}})})}function HH(e){e.forEach(VH)}function qH(){typeof ResizeObserver>"u"||(fi=new ResizeObserver(HH))}function KH(e,t){fi||qH();const n=H$(e);return n.forEach(r=>{let a=mp.get(r);a||(a=new Set,mp.set(r,a)),a.add(t),fi==null||fi.observe(r)}),()=>{n.forEach(r=>{const a=mp.get(r);a==null||a.delete(t),a!=null&&a.size||fi==null||fi.unobserve(r)})}}const yp=new Set;let Zu;function GH(){Zu=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};yp.forEach(n=>n(t))},window.addEventListener("resize",Zu)}function YH(e){return yp.add(e),Zu||GH(),()=>{yp.delete(e),!yp.size&&Zu&&(Zu=void 0)}}function XH(e,t){return typeof e=="function"?YH(e):KH(e,t)}const WH=50,CE=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),QH=()=>({time:0,x:CE(),y:CE()}),ZH={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function _E(e,t,n,r){const a=n[t],{length:i,position:s}=ZH[t],o=a.current,l=n.time;a.current=e[`scroll${s}`],a.scrollLength=e[`scroll${i}`]-e[`client${i}`],a.offset.length=0,a.offset[0]=0,a.offset[1]=a.scrollLength,a.progress=ro(0,a.scrollLength,a.current);const c=r-l;a.velocity=c>WH?0:Bw(a.current-o,c)}function JH(e,t,n){_E(e,"x",t,n),_E(e,"y",t,n),t.time=n}function eq(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const a=r.getBoundingClientRect();r=r.parentElement;const i=r.getBoundingClientRect();n.x+=a.left-i.left,n.y+=a.top-i.top}else if(r instanceof SVGGraphicsElement){const{x:a,y:i}=r.getBBox();n.x+=a,n.y+=i;let s=null,o=r.parentNode;for(;!s;)o.tagName==="svg"&&(s=o),o=r.parentNode;r=s}else break;return n}const vx={start:0,center:.5,end:1};function PE(e,t,n=0){let r=0;if(e in vx&&(e=vx[e]),typeof e=="string"){const a=parseFloat(e);e.endsWith("px")?r=a:e.endsWith("%")?e=a/100:e.endsWith("vw")?r=a/100*document.documentElement.clientWidth:e.endsWith("vh")?r=a/100*document.documentElement.clientHeight:e=a}return typeof e=="number"&&(r=t*e),n+r}const tq=[0,0];function nq(e,t,n,r){let a=Array.isArray(e)?e:tq,i=0,s=0;return typeof e=="number"?a=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?a=e.split(" "):a=[e,vx[e]?e:"0"]),i=PE(a[0],n,r),s=PE(a[1],t),i-s}const rq={All:[[0,0],[1,1]]},aq={x:0,y:0};function iq(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function sq(e,t,n){const{offset:r=rq.All}=n,{target:a=e,axis:i="y"}=n,s=i==="y"?"height":"width",o=a!==e?eq(a,e):aq,l=a===e?{width:e.scrollWidth,height:e.scrollHeight}:iq(a),c={width:e.clientWidth,height:e.clientHeight};t[i].offset.length=0;let f=!t[i].interpolate;const d=r.length;for(let h=0;hoq(e,r.target,n),update:a=>{JH(e,n,a),(r.offset||r.target)&&sq(e,n,r)},notify:()=>t(n)}}const lu=new WeakMap,ME=new WeakMap,Qv=new WeakMap,RE=e=>e===document.documentElement?window:e;function Zw(e,{container:t=document.documentElement,...n}={}){let r=Qv.get(t);r||(r=new Set,Qv.set(t,r));const a=QH(),i=lq(t,e,a,n);if(r.add(i),!lu.has(t)){const o=()=>{for(const h of r)h.measure()},l=()=>{for(const h of r)h.update(Bt.timestamp)},c=()=>{for(const h of r)h.notify()},f=()=>{Re.read(o,!1,!0),Re.read(l,!1,!0),Re.update(c,!1,!0)};lu.set(t,f);const d=RE(t);window.addEventListener("resize",f,{passive:!0}),t!==document.documentElement&&ME.set(t,XH(t,f)),d.addEventListener("scroll",f,{passive:!0})}const s=lu.get(t);return Re.read(s,!1,!0),()=>{var o;Lr(s);const l=Qv.get(t);if(!l||(l.delete(i),l.size))return;const c=lu.get(t);lu.delete(t),c&&(RE(t).removeEventListener("scroll",c),(o=ME.get(t))===null||o===void 0||o(),window.removeEventListener("resize",c))}}function cq({source:e,container:t,axis:n="y"}){e&&(t=e);const r={value:0},a=Zw(i=>{r.value=i[n].progress*100},{container:t,axis:n});return{currentTime:r,cancel:a}}const Zv=new Map;function Y3({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),Zv.has(t)||Zv.set(t,{});const r=Zv.get(t);return r[n]||(r[n]=z$()?new ScrollTimeline({source:t,axis:n}):cq({source:t,axis:n})),r[n]}function uq(e){return e.length===2}function X3(e){return e&&(e.target||e.offset)}function fq(e,t){return uq(e)||X3(t)?Zw(n=>{e(n[t.axis].progress,n)},t):G3(e,Y3(t))}function dq(e,t){if(e.flatten(),X3(t))return e.pause(),Zw(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=Y3(t);return e.attachTimeline?e.attachTimeline(n,r=>(r.pause(),G3(a=>{r.time=r.duration*a},n))):yn}}function hq(e,{axis:t="y",...n}={}){const r={axis:t,...n};return typeof e=="function"?fq(e,r):dq(e,r)}function DE(e,t){A7(!!(!t||t.current))}const pq=()=>({scrollX:Qr(0),scrollY:Qr(0),scrollXProgress:Qr(0),scrollYProgress:Qr(0)});function mq({container:e,target:t,layoutEffect:n=!0,...r}={}){const a=kc(pq);return(n?Hy:A.useEffect)(()=>(DE("target",t),DE("container",e),hq((s,{x:o,y:l})=>{a.scrollX.set(o.current),a.scrollXProgress.set(o.progress),a.scrollY.set(l.current),a.scrollYProgress.set(l.progress)},{...r,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0})),[e,t,JSON.stringify(r.offset)]),a}function yq(e){const t=kc(()=>Qr(e)),{isStatic:n}=A.useContext(Vy);if(n){const[,r]=A.useState(e);A.useEffect(()=>t.on("change",r),[])}return t}function W3(e,t){const n=yq(t()),r=()=>n.set(t());return r(),Hy(()=>{const a=()=>Re.preRender(r,!1,!0),i=e.map(s=>s.on("change",a));return()=>{i.forEach(s=>s()),Lr(r)}}),n}const gq=e=>e&&typeof e=="object"&&e.mix,vq=e=>gq(e)?e.mix:void 0;function bq(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],a=e[1+n],i=e[2+n],s=e[3+n],o=Yw(a,i,{mixer:vq(i[0]),...s});return t?o(r):o}function xq(e){Gu.current=[],e();const t=W3(Gu.current,e);return Gu.current=void 0,t}function Jv(e,t,n,r){if(typeof e=="function")return xq(e);const a=typeof t=="function"?t:bq(t,n,r);return Array.isArray(e)?$E(e,a):$E([e],([i])=>a(i))}function $E(e,t){const n=kc(()=>[]);return W3(e,()=>{n.length=0;const r=e.length;for(let a=0;atypeof e=="string",cu=()=>{let e,t;const n=new Promise((r,a)=>{e=r,t=a});return n.resolve=e,n.reject=t,n},kE=e=>e==null?"":String(e),Sq=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},wq=/###/g,LE=e=>e&&e.includes("###")?e.replace(wq,"."):e,zE=e=>!e||pe(e),Ju=(e,t,n)=>{const r=pe(t)?t.split("."):t;let a=0;for(;a{const{obj:r,k:a}=Ju(e,t,Object);if(r!==void 0||t.length===1){r[a]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),o=Ju(e,s,Object);for(;o.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),o=Ju(e,s,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${i}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${i}`]=n},jq=(e,t,n,r)=>{const{obj:a,k:i}=Ju(e,t,Object);a[i]=a[i]||[],a[i].push(n)},cm=(e,t)=>{const{obj:n,k:r}=Ju(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Aq=(e,t,n)=>{const r=cm(e,n);return r!==void 0?r:cm(t,n)},Q3=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?pe(e[r])||e[r]instanceof String||pe(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Q3(e[r],t[r],n):e[r]=t[r]);return e},xa=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Oq={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Eq=e=>pe(e)?e.replace(/[&<>"'\/]/g,t=>Oq[t]):e;class Tq{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Nq=[" ",",","?","!",";"],Cq=new Tq(20),_q=(e,t,n)=>{t=t||"",n=n||"";const r=Nq.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const a=Cq.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!a.test(e);if(!i){const s=e.indexOf(n);s>0&&!a.test(e.substring(0,s))&&(i=!0)}return i},bx=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let a=e;for(let i=0;ie==null?void 0:e.replace(/_/g,"-"),Pq={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class um{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Pq,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,a){return a&&!this.debug?null:(t=t.map(i=>pe(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),pe(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new um(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new um(this.logger,t)}}var Zr=new um;let Wy=class{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const a=this.observers[r].get(n)||0;this.observers[r].set(n,a+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...a)=>{n(...a),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([a,i])=>{for(let s=0;s{for(let s=0;s-1&&this.options.ns.splice(n,1)}getResource(t,n,r,a={}){var c,f;const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;t.includes(".")?o=t.split("."):(o=[t,n],r&&(Array.isArray(r)?o.push(...r):pe(r)&&i?o.push(...r.split(i)):o.push(r)));const l=cm(this.data,o);return!l&&!n&&!r&&t.includes(".")&&(t=o[0],n=o[1],r=o.slice(2).join(".")),l||!s||!pe(r)?l:bx((f=(c=this.data)==null?void 0:c[t])==null?void 0:f[n],r,i)}addResource(t,n,r,a,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let o=[t,n];r&&(o=o.concat(s?r.split(s):r)),t.includes(".")&&(o=t.split("."),a=n,n=o[1]),this.addNamespaces(n),IE(this.data,o,a),i.silent||this.emit("added",t,n,r,a)}addResources(t,n,r,a={silent:!1}){for(const i in r)(pe(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});a.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,a,i,s={silent:!1,skipCopy:!1}){let o=[t,n];t.includes(".")&&(o=t.split("."),a=r,r=n,n=o[1]),this.addNamespaces(n);let l=cm(this.data,o)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),a?Q3(l,r,i):l={...l,...r},IE(this.data,o,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(a=>n[a]&&Object.keys(n[a]).length>0)}toJSON(){return this.data}}var Z3={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,a){return e.forEach(i=>{var s;t=((s=this.processors[i])==null?void 0:s.process(t,n,r,a))??t}),t}};const J3=Symbol("i18next/PATH_KEY");function Mq(){const e=[],t=Object.create(null);let n;return t.get=(r,a)=>{var i;return(i=n==null?void 0:n.revoke)==null||i.call(n),a===J3?e:(e.push(a),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function vl(e,t){const{[J3]:n}=e(Mq()),r=(t==null?void 0:t.keySeparator)??".",a=(t==null?void 0:t.nsSeparator)??":",i=(t==null?void 0:t.enableSelector)==="strict";if(n.length>1&&a){const s=t==null?void 0:t.ns,o=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(o&&(i?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${a}${n.slice(1).join(r)}`}return n.join(r)}const eb=e=>!pe(e)&&typeof e!="boolean"&&typeof e!="number";class fm extends Wy{constructor(t,n={}){super(),Sq(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zr.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const a=this.resolve(t,r);if((a==null?void 0:a.res)===void 0)return!1;const i=eb(a.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!_q(t,r,a);if(s&&!o){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:pe(i)?[i]:i};const c=t.split(r);(r!==a||r===a&&this.options.ns.includes(c[0]))&&(i=c.shift()),t=c.join(a)}return{key:t,namespaces:pe(i)?[i]:i}}translate(t,n,r){let a=typeof n=="object"?{...n}:n;if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";typeof t=="function"&&(t=vl(t,{...this.options,...a})),Array.isArray(t)||(t=[String(t)]),t=t.map(L=>typeof L=="function"?vl(L,{...this.options,...a}):String(L));const i=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(t[t.length-1],a),c=l[l.length-1];let f=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const d=a.lng||this.language,h=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return h?i?{res:`${c}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:`${c}${f}${o}`:i?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:o;const p=this.resolve(t,a);let m=p==null?void 0:p.res;const g=(p==null?void 0:p.usedKey)||o,b=(p==null?void 0:p.exactUsedKey)||o,y=["[object Number]","[object Function]","[object RegExp]"],v=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,w=a.count!==void 0&&!pe(a.count),S=fm.hasDefaultValue(a),j=w?this.pluralResolver.getSuffix(d,a.count,a):"",O=a.ordinal&&w?this.pluralResolver.getSuffix(d,a.count,{ordinal:!1}):"",E=w&&!a.ordinal&&a.count===0,T=E&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${j}`]||a[`defaultValue${O}`]||a.defaultValue;let N=m;x&&!m&&S&&(N=T);const M=eb(N),C=Object.prototype.toString.apply(N);if(x&&N&&M&&!y.includes(C)&&!(pe(v)&&Array.isArray(N))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,N,{...a,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(p.res=L,p.usedParams=this.getUsedParamsDetails(a),p):L}if(s){const L=Array.isArray(N),D=L?[]:{},$=L?b:g;for(const P in N)if(Object.prototype.hasOwnProperty.call(N,P)){const k=`${$}${s}${P}`;S&&!m?D[P]=this.translate(k,{...a,defaultValue:eb(T)?T[P]:void 0,joinArrays:!1,ns:l}):D[P]=this.translate(k,{...a,joinArrays:!1,ns:l}),D[P]===k&&(D[P]=N[P])}m=D}}else if(x&&pe(v)&&Array.isArray(m))m=m.join(v),m&&(m=this.extendTranslation(m,t,a,r));else{let L=!1,D=!1;!this.isValidLookup(m)&&S&&(L=!0,m=T),this.isValidLookup(m)||(D=!0,m=o);const P=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:m,k=S&&T!==m&&this.options.updateMissing;if(D||L||k){if(this.logger.log(k?"updateKey":"missingKey",d,c,w&&!k?`${o}${this.pluralResolver.getSuffix(d,a.count,a)}`:o,k?T:m),s){const Y=this.resolve(o,{...a,keySeparator:!1});Y&&Y.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let I=[];const F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(let Y=0;Y{var ye;const Z=S&&te!==m?te:P;this.options.missingKeyHandler?this.options.missingKeyHandler(Y,c,q,Z,k,a):(ye=this.backendConnector)!=null&&ye.saveMissing&&this.backendConnector.saveMissing(Y,c,q,Z,k,a),this.emit("missingKey",Y,c,q,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?I.forEach(Y=>{const q=this.pluralResolver.getSuffixes(Y,a);E&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!q.includes(`${this.options.pluralSeparator}zero`)&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(te=>{H([Y],o+te,a[`defaultValue${te}`]||T)})}):H(I,o,T))}m=this.extendTranslation(m,t,a,p,r),D&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${c}${f}${o}`),(D||L)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${o}`:o,L?m:void 0,a))}return i?(p.res=m,p.usedParams=this.getUsedParamsDetails(a),p):m}extendTranslation(t,n,r,a,i){var l,c;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=pe(t)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(f){const p=t.match(this.interpolator.nestingRegexp);d=p&&p.length}let h=r.replace&&!pe(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||a.usedLng,r),f){const p=t.match(this.interpolator.nestingRegexp),m=p&&p.length;d(i==null?void 0:i[0])===p[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):this.translate(...p,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,o=pe(s)?[s]:s;return t!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(t=Z3.handle(o,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,a,i,s,o;return pe(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(l=>typeof l=="function"?vl(l,{...this.options,...n}):l)),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),f=c.key;a=f;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=n.count!==void 0&&!pe(n.count),p=h&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(pe(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(b=>{var y,v;this.isValidLookup(r)||(o=b,!this.checkedLoadedFor[`${g[0]}-${b}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((v=this.utils)!=null&&v.hasLoadedNamespace(o))&&(this.checkedLoadedFor[`${g[0]}-${b}`]=!0,this.logger.warn(`key "${a}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(x=>{var j;if(this.isValidLookup(r))return;s=x;const w=[f];if((j=this.i18nFormat)!=null&&j.addLookupKeys)this.i18nFormat.addLookupKeys(w,f,x,b,n);else{let O;h&&(O=this.pluralResolver.getSuffix(x,n.count,n));const E=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&O.startsWith(T)&&w.push(f+O.replace(T,this.options.pluralSeparator)),w.push(f+O),p&&w.push(f+E)),m){const N=`${f}${this.options.contextSeparator||"_"}${n.context}`;w.push(N),h&&(n.ordinal&&O.startsWith(T)&&w.push(N+O.replace(T,this.options.pluralSeparator)),w.push(N+O),p&&w.push(N+E))}}let S;for(;S=w.pop();)this.isValidLookup(r)||(i=S,r=this.getResource(x,b,S,n))}))})}),{res:r,usedKey:a,exactUsedKey:i,usedLng:s,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,a={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,a):this.resourceStore.getResource(t,n,r,a)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!pe(t.replace);let a=r?t.replace:t;if(r&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!r){a={...a};for(const i of n)delete a[i]}return a}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class UE{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zr.create("languageUtils")}getScriptPartFromCode(t){if(t=Pf(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Pf(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(pe(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const a=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const a=this.getScriptPartFromCode(r);if(this.isSupportedCode(a))return n=a;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),pe(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),a=[],i=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return pe(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):pe(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{a.includes(s)||i(this.formatLanguageCode(s))}),a}}const FE={zero:0,one:1,two:2,few:3,many:4,other:5},VE={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Rq{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Zr.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Pf(t==="dev"?"en":t),a=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:a});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:a})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),VE;if(!t.match(/-|_/))return VE;const l=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(l,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(a=>`${n}${a}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((a,i)=>FE[a]-FE[i]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,n,r={}){const a=this.getRule(t,r);return a?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const HE=(e,t,n,r=".",a=!0)=>{let i=Aq(e,t,n);return!i&&a&&pe(n)&&(i=bx(e,n,r),i===void 0&&(i=bx(t,n,r))),i},tb=e=>e.replace(/\$/g,"$$$$");class qE{constructor(t={}){var n;this.logger=Zr.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:a,prefix:i,prefixEscaped:s,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:f,unescapePrefix:d,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:b,maxReplaces:y,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:Eq,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=i?xa(i):s||"{{",this.suffix=o?xa(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":d?xa(d):"-",this.unescapeSuffix=this.unescapePrefix?"":f?xa(f):"",this.nestingPrefix=h?xa(h):p||xa("$t("),this.nestingSuffix=m?xa(m):g||xa(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=y||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,a){var p;let i,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=m=>{if(!m.includes(this.formatSeparator)){const v=HE(n,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...a,...n,interpolationkey:m}):v}const g=m.split(this.formatSeparator),b=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(HE(n,l,b,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...a,...n,interpolationkey:b})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const f=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((p=a==null?void 0:a.interpolation)==null?void 0:p.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>tb(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?tb(this.escape(m)):tb(m)}].forEach(m=>{for(o=0;i=m.regex.exec(t);){const g=i[1].trim();if(s=c(g),s===void 0)if(typeof f=="function"){const y=f(t,i,a);s=pe(y)?y:""}else if(a&&Object.prototype.hasOwnProperty.call(a,g))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else!pe(s)&&!this.useRawValueToEscape&&(s=kE(s));const b=m.safeValue(s);if(t=t.replace(i[0],b),d?(m.regex.lastIndex+=s.length,m.regex.lastIndex-=i[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,n,r={}){let a,i,s;const o=(l,c)=>{const f=this.nestingOptionsSeparator;if(!l.includes(f))return l;const d=l.split(new RegExp(`${xa(f)}[ ]*{`));let h=`{${d[1]}`;l=d[0],h=this.interpolate(h,s);const p=h.match(/'/g),m=h.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!m||((m==null?void 0:m.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),c&&(s={...c,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${f}${h}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,l};for(;a=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&!pe(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(c!==-1&&(l=a[1].slice(c).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),a[1]=a[1].slice(0,c)),i=n(o.call(this,a[1].trim(),s),s),i&&a[0]===t&&!pe(i))return i;pe(i)||(i=kE(i)),i||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),i=""),l.length&&(i=l.reduce((f,d)=>this.format(f,d,r.lng,{...r,interpolationkey:a[1].trim()}),i.trim())),t=t.replace(a[0],i),this.regexp.lastIndex=0}return t}}const Dq=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const a=r[1].slice(0,-1);t==="currency"&&!a.includes(":")?n.currency||(n.currency=a.trim()):t==="relativetime"&&!a.includes(":")?n.range||(n.range=a.trim()):a.split(";").forEach(s=>{if(s){const[o,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();n[f]||(n[f]=c),c==="false"&&(n[f]=!1),c==="true"&&(n[f]=!0),isNaN(c)||(n[f]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},KE=e=>{const t={};return(n,r,a)=>{let i=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(i={...i,[a.interpolationkey]:void 0});const s=r+JSON.stringify(i);let o=t[s];return o||(o=e(Pf(r),a),t[s]=o),o(n)}},$q=e=>(t,n,r)=>e(Pf(n),r)(t);class kq{constructor(t={}){this.logger=Zr.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?KE:$q;this.formats={number:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i});return o=>s.format(o)}),currency:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i,style:"currency"});return o=>s.format(o)}),datetime:r((a,i)=>{const s=new Intl.DateTimeFormat(a,{...i});return o=>s.format(o)}),relativetime:r((a,i)=>{const s=new Intl.RelativeTimeFormat(a,{...i});return o=>s.format(o,i.range||"day")}),list:r((a,i)=>{const s=new Intl.ListFormat(a,{...i});return o=>s.format(o)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=KE(n)}format(t,n,r,a={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&!i[0].includes(")")&&i.find(o=>o.includes(")"))){const o=i.findIndex(l=>l.includes(")"));i[0]=[i[0],...i.splice(1,o)].join(this.formatSeparator)}return i.reduce((o,l)=>{var d;const{formatName:c,formatOptions:f}=Dq(l);if(this.formats[c]){let h=o;try{const p=((d=a==null?void 0:a.formatParams)==null?void 0:d[a.interpolationkey])||{},m=p.locale||p.lng||a.locale||a.lng||r;h=this.formats[c](o,m,{...f,...a,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn(`there was no format function for ${c}`);return o},t)}}const Lq=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class zq extends Wy{constructor(t,n,r,a={}){var i,s;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=a,this.logger=Zr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(s=(i=this.backend)==null?void 0:i.init)==null||s.call(i,r,a.backend,a)}queueLoad(t,n,r,a){const i={},s={},o={},l={};return t.forEach(c=>{let f=!0;n.forEach(d=>{const h=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,f=!1,s[h]===void 0&&(s[h]=!0),i[h]===void 0&&(i[h]=!0),l[d]===void 0&&(l[d]=!0)))}),f||(o[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const a=t.split("|"),i=a[0],s=a[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const o={};this.queue.forEach(l=>{jq(l.loaded,[i],s),Lq(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const f=l.loaded[c];f.length&&f.forEach(d=>{o[c][d]===void 0&&(o[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r,a=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:a,wait:i,callback:s});return}this.readingCalls++;const o=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&f&&a{this.read(t,n,r,a+1,i*2,s)},i);return}s(c,f)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}return}return l(t,n,o)}prepareLoading(t,n,r={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();pe(t)&&(t=this.languageUtils.toResolveHierarchy(t)),pe(n)&&(n=[n]);const i=this.queueLoad(t,n,r,a);if(!i.toLoad.length)return i.pending.length||a(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),a=r[0],i=r[1];this.read(a,i,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${a} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${i} for language ${a}`,o),this.loaded(t,s,o)})}saveMissing(t,n,r,a,i,s={},o=()=>{}){var l,c,f,d,h;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((d=(f=this.services)==null?void 0:f.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((h=this.backend)!=null&&h.create){const p={...s,isUpdate:i},m=this.backend.create.bind(this.backend);if(m.length<6)try{let g;m.length===5?g=m(t,n,r,a,p):g=m(t,n,r,a),g&&typeof g.then=="function"?g.then(b=>o(null,b)).catch(o):o(null,g)}catch(g){o(g)}else m(t,n,r,a,o,p)}!t||!t[0]||this.store.addResource(t[0],n,r,a)}}}const nb=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),pe(e[1])&&(t.defaultValue=e[1]),pe(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),GE=e=>(pe(e.ns)&&(e.ns=[e.ns]),pe(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),pe(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Th=()=>{},Iq=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ef extends Wy{constructor(t={},n){if(super(),this.options=GE(t),this.services={},this.logger=Zr,this.modules={external:[]},Iq(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(pe(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=nb();this.options={...r,...this.options,...GE(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const a=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Zr.init(a(this.modules.logger),this.options):Zr.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=kq;const f=new UE(this.options);this.store=new BE(this.options.resources,this.options);const d=this.services;d.logger=Zr,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new Rq(f,{prepend:this.options.pluralSeparator}),c&&(d.formatter=a(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new qE(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new zq(a(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(d.languageDetector=a(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=a(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new fm(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Th),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...f)=>this.store[c](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...f)=>(this.store[c](...f),this)});const o=cu(),l=()=>{const c=(f,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(d),n(f,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(t,n=Th){var i,s;let r=n;const a=pe(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((a==null?void 0:a.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(d=>{d!=="cimode"&&(o.includes(d)||o.push(d))})};a?l(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>l(f)),(s=(i=this.options.preload)==null?void 0:i.forEach)==null||s.call(i,c=>l(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const a=cu();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Th),this.services.backendConnector.reload(t,n,i=>{a.resolve(),r(i)}),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Z3.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},i=(o,l)=>{l?this.isLanguageChangingTo===t&&(a(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(o,(...c)=>this.t(...c))},s=o=>{var f,d;!t&&!o&&this.services.languageDetector&&(o=[]);const l=pe(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(pe(o)?[o]:o);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),(d=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||d.call(f,c)),this.loadResources(c,h=>{i(h,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,a){const i=a==null?void 0:a.scopeNs,s=(o,l,...c)=>{let f;typeof l!="object"?f=this.options.overloadTranslationOptionHandler([o,l].concat(c)):f={...l},f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs;const d=f.ns!==void 0&&f.ns!==null;f.ns=f.ns||s.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||r||s.keyPrefix);const h={...this.options,...f};Array.isArray(i)&&!d&&(h.ns=i),typeof f.keyPrefix=="function"&&(f.keyPrefix=vl(f.keyPrefix,h));const p=this.options.keySeparator||".";let m;return f.keyPrefix&&Array.isArray(o)?m=o.map(g=>(typeof g=="function"&&(g=vl(g,h)),`${f.keyPrefix}${p}${g}`)):(typeof o=="function"&&(o=vl(o,h)),m=f.keyPrefix?`${f.keyPrefix}${p}${o}`:o),this.t(m,f)};return pe(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!a||s(i,t)))}loadNamespaces(t,n){const r=cu();return this.options.ns?(pe(t)&&(t=[t]),t.forEach(a=>{this.options.ns.includes(a)||this.options.ns.push(a)}),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=cu();pe(t)&&(t=[t]);const a=this.options.preload||[],i=t.filter(s=>!a.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=a.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var a,i;if(t||(t=this.resolvedLanguage||(((a=this.languages)==null?void 0:a.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const s=new Intl.Locale(t);if(s&&s.getTextInfo){const o=s.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new UE(nb());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new ef(t,n);return r.createInstance=ef.createInstance,r}cloneInstance(t={},n=Th){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const a={...this.options,...t,isClone:!0},i=new ef(a);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(o=>{i[o]=this[o]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((f,d)=>(f[d]={...l[c][d]},f),l[c]),l),{});i.store=new BE(o,a),i.services.resourceStore=i.store}if(t.interpolation){const l={...nb().interpolation,...this.options.interpolation,...t.interpolation},c={...a,interpolation:l};i.services.interpolator=new qE(c)}return i.translator=new fm(i.services,a),i.translator.on("*",(o,...l)=>{i.emit(o,...l)}),i.init(a,n),i.translator.options=a,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const rn=ef.createInstance();rn.createInstance;rn.dir;rn.init;rn.loadResources;rn.reloadResources;rn.use;rn.changeLanguage;rn.getFixedT;rn.t;rn.exists;rn.setDefaultNamespace;rn.hasLoadedNamespace;rn.loadNamespaces;rn.loadLanguages;const Bq=(e,t,n,r)=>{var i,s,o,l;const a=[n,{code:t,...r||{}}];if((s=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&s.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);ao(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(l=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&l.warn?e.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},YE={},xx=(e,t,n,r)=>{ao(n)&&YE[n]||(ao(n)&&(YE[n]=new Date),Bq(e,t,n,r))},ek=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Sx=(e,t,n)=>{e.loadNamespaces(t,ek(e,n))},XE=(e,t,n,r)=>{if(ao(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Sx(e,n,r);n.forEach(a=>{e.options.ns.indexOf(a)<0&&e.options.ns.push(a)}),e.loadLanguages(t,ek(e,r))},Uq=(e,t,n={})=>!t.languages||!t.languages.length?(xx(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!a(r.isLanguageChangingTo,e))return!1}}),ao=e=>typeof e=="string",Fq=e=>typeof e=="object"&&e!==null,Vq=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Hq={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},qq=e=>Hq[e],Kq=e=>e.replace(Vq,qq);let wx={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Kq,transDefaultProps:void 0};const Gq=(e={})=>{wx={...wx,...e}},Yq=()=>wx;let tk;const Xq=e=>{tk=e},Wq=()=>tk,Qq={type:"3rdParty",init(e){Gq(e.options.react),Xq(e)}},Zq=A.createContext();class Jq{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var nk={exports:{}},rk={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Xl=A;function eK(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tK=typeof Object.is=="function"?Object.is:eK,nK=Xl.useState,rK=Xl.useEffect,aK=Xl.useLayoutEffect,iK=Xl.useDebugValue;function sK(e,t){var n=t(),r=nK({inst:{value:n,getSnapshot:t}}),a=r[0].inst,i=r[1];return aK(function(){a.value=n,a.getSnapshot=t,rb(a)&&i({inst:a})},[e,n,t]),rK(function(){return rb(a)&&i({inst:a}),e(function(){rb(a)&&i({inst:a})})},[e]),iK(n),n}function rb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tK(e,n)}catch{return!0}}function oK(e,t){return t()}var lK=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oK:sK;rk.useSyncExternalStore=Xl.useSyncExternalStore!==void 0?Xl.useSyncExternalStore:lK;nk.exports=rk;var cK=nk.exports;const uK=(e,t)=>{if(ao(t))return t;if(Fq(t)&&ao(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const n=e[e.length-1];return typeof n=="function"?"":n}return e},fK={t:uK,ready:!1},dK=()=>()=>{},ni=(e,t={})=>{var T,N,M;const{i18n:n}=t,{i18n:r,defaultNS:a}=A.useContext(Zq)||{},i=n||r||Wq();i&&!i.reportNamespaces&&(i.reportNamespaces=new Jq),i||xx(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const s=A.useMemo(()=>{var C;return{...Yq(),...(C=i==null?void 0:i.options)==null?void 0:C.react,...t}},[i,t]),{useSuspense:o,keyPrefix:l}=s,c=a||((T=i==null?void 0:i.options)==null?void 0:T.defaultNS),f=ao(c)?[c]:c||["translation"],d=A.useMemo(()=>f,f);(M=(N=i==null?void 0:i.reportNamespaces)==null?void 0:N.addUsedNamespaces)==null||M.call(N,d);const h=A.useRef(0),p=A.useCallback(C=>{if(!i)return dK;const{bindI18n:L,bindI18nStore:D}=s,$=()=>{h.current+=1,C()};return L&&i.on(L,$),D&&i.store.on(D,$),()=>{L&&L.split(" ").forEach(P=>i.off(P,$)),D&&D.split(" ").forEach(P=>i.store.off(P,$))}},[i,s]),m=A.useRef(),g=A.useCallback(()=>{if(!i)return fK;const C=!!(i.isInitialized||i.initializedStoreOnce)&&d.every(I=>Uq(I,i,s)),L=t.lng||i.language,D=h.current,$=m.current;if($&&$.ready===C&&$.lng===L&&$.keyPrefix===l&&$.revision===D)return $;const k={t:i.getFixedT(L,s.nsMode==="fallback"?d:d[0],l,{scopeNs:d}),ready:C,lng:L,keyPrefix:l,revision:D};return m.current=k,k},[i,d,l,s,t.lng]),[b,y]=A.useState(0),{t:v,ready:x}=cK.useSyncExternalStore(p,g,g);A.useEffect(()=>{if(i&&!x&&!o){const C=()=>y(L=>L+1);t.lng?XE(i,t.lng,d,C):Sx(i,d,C)}},[i,t.lng,d,x,o,b]);const w=i||{},S=A.useRef(null),j=A.useRef(),O=C=>{const L=Object.getOwnPropertyDescriptors(C);L.__original&&delete L.__original;const D=Object.create(Object.getPrototypeOf(C),L);if(!Object.prototype.hasOwnProperty.call(D,"__original"))try{Object.defineProperty(D,"__original",{value:C,writable:!1,enumerable:!1,configurable:!1})}catch{}return D},E=A.useMemo(()=>{const C=w,L=C==null?void 0:C.language;let D=C;C&&(S.current&&S.current.__original===C?j.current!==L?(D=O(C),S.current=D,j.current=L):D=S.current:(D=O(C),S.current=D,j.current=L));const $=!x&&!o?(...k)=>(xx(i,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),v(...k)):v,P=[$,D,x];return P.t=$,P.i18n=D,P.ready=x,P},[v,w,x,w.resolvedLanguage,w.language,w.languages]);if(i&&o&&!x)throw new Promise(C=>{const L=()=>C();t.lng?XE(i,t.lng,d,L):Sx(i,d,L)});return E};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hK=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ak=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var pK={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mK=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...o},l)=>A.createElement("svg",{ref:l,...pK,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ak("lucide",a),...o},[...s.map(([c,f])=>A.createElement(c,f)),...Array.isArray(i)?i:[i]]));/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ae=(e,t)=>{const n=A.forwardRef(({className:r,...a},i)=>A.createElement(mK,{ref:i,iconNode:t,className:ak(`lucide-${hK(e)}`,r),...a}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ik=ae("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Es=ae("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jw=ae("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sk=ae("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ok=ae("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yK=ae("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lk=ae("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gK=ae("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pu=ae("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vK=ae("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bK=ae("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ck=ae("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uk=ae("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fk=ae("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WE=ae("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mf=ae("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xK=ae("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dk=ae("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hk=ae("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pk=ae("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ft=ae("Flower2",[["path",{d:"M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1",key:"3pnvol"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M12 10v12",key:"6ubwww"}],["path",{d:"M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z",key:"9hd38g"}],["path",{d:"M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z",key:"ufn41s"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mk=ae("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SK=ae("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wK=ae("HandHeart",[["path",{d:"M11 14h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 16",key:"1ifwr1"}],["path",{d:"m7 20 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"17abbs"}],["path",{d:"m2 15 6 6",key:"10dquu"}],["path",{d:"M19.5 8.5c.7-.7 1.5-1.6 1.5-2.7A2.73 2.73 0 0 0 16 4a2.78 2.78 0 0 0-5 1.8c0 1.2.8 2 1.5 2.8L16 12Z",key:"1h3036"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jK=ae("Headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rf=ae("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yk=ae("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const AK=ae("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ej=ae("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QE=ae("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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gk=ae("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dm=ae("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Df=ae("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vk=ae("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OK=ae("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZE=ae("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EK=ae("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tj=ae("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const TK=ae("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JE=ae("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nj=ae("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qy=ae("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bk=ae("ScrollText",[["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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rj=ae("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NK=ae("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xk=ae("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aj=ae("ShieldCheck",[["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",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ij=ae("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sj=ae("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CK=ae("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bl=ae("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xr=ae("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wa=ae("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bd=ae("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _K=ae("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PK=ae("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MK=ae("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const RK=ae("TriangleAlert",[["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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ud=ae("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sk=ae("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wk=ae("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jk=ae("Users",[["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"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);function Ak(e,t){return function(){return e.apply(t,arguments)}}const{toString:DK}=Object.prototype,{getPrototypeOf:Zy}=Object,{iterator:Jy,toStringTag:Ok}=Symbol,eg=(e=>t=>{const n=DK.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Br=e=>(e=e.toLowerCase(),t=>eg(t)===e),tg=e=>t=>typeof t===e,{isArray:io}=Array,Wl=tg("undefined");function Ic(e){return e!==null&&!Wl(e)&&e.constructor!==null&&!Wl(e.constructor)&&Cn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ek=Br("ArrayBuffer");function $K(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ek(e.buffer),t}const kK=tg("string"),Cn=tg("function"),Tk=tg("number"),Fd=e=>e!==null&&typeof e=="object",LK=e=>e===!0||e===!1,gp=e=>{if(eg(e)!=="object")return!1;const t=Zy(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ok in e)&&!(Jy in e)},zK=e=>{if(!Fd(e)||Ic(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},IK=Br("Date"),BK=Br("File"),UK=e=>!!(e&&typeof e.uri<"u"),FK=e=>e&&typeof e.getParts<"u",VK=Br("Blob"),HK=Br("FileList"),qK=e=>Fd(e)&&Cn(e.pipe);function KK(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const eT=KK(),tT=typeof eT.FormData<"u"?eT.FormData:void 0,GK=e=>{if(!e)return!1;if(tT&&e instanceof tT)return!0;const t=Zy(e);if(!t||t===Object.prototype||!Cn(e.append))return!1;const n=eg(e);return n==="formdata"||n==="object"&&Cn(e.toString)&&e.toString()==="[object FormData]"},YK=Br("URLSearchParams"),[XK,WK,QK,ZK]=["ReadableStream","Request","Response","Headers"].map(Br),JK=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vd(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),io(e))for(r=0,a=e.length;r0;)if(a=n[r],t===a.toLowerCase())return a;return null}const Ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ck=e=>!Wl(e)&&e!==Ts;function jx(...e){const{caseless:t,skipUndefined:n}=Ck(this)&&this||{},r={},a=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const o=t&&typeof s=="string"&&Nk(r,s)||s,l=Ax(r,o)?r[o]:void 0;gp(l)&&gp(i)?r[o]=jx(l,i):gp(i)?r[o]=jx({},i):io(i)?r[o]=i.slice():(!n||!Wl(i))&&(r[o]=i)};for(let i=0,s=e.length;i(Vd(t,(a,i)=>{n&&Cn(a)?Object.defineProperty(e,i,{__proto__:null,value:Ak(a,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),tG=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),nG=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},rG=(e,t,n,r)=>{let a,i,s;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!r||r(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=n!==!1&&Zy(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},aG=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},iG=e=>{if(!e)return null;if(io(e))return e;let t=e.length;if(!Tk(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sG=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zy(Uint8Array)),oG=(e,t)=>{const r=(e&&e[Jy]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},lG=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},cG=Br("HTMLFormElement"),uG=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),Ax=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),{propertyIsEnumerable:fG}=Object.prototype,dG=Br("RegExp"),_k=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Vd(n,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(r[i]=s||a)}),Object.defineProperties(e,r)},hG=e=>{_k(e,(t,n)=>{if(Cn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Cn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},pG=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return io(e)?r(e):r(String(e).split(t)),n},mG=()=>{},yG=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function gG(e){return!!(e&&Cn(e.append)&&e[Ok]==="FormData"&&e[Jy])}const vG=e=>{const t=new WeakSet,n=r=>{if(Fd(r)){if(t.has(r))return;if(Ic(r))return r;if(!("toJSON"in r)){t.add(r);const a=io(r)?[]:{};return Vd(r,(i,s)=>{const o=n(i);!Wl(o)&&(a[s]=o)}),t.delete(r),a}}return r};return n(e)},bG=Br("AsyncFunction"),xG=e=>e&&(Fd(e)||Cn(e))&&Cn(e.then)&&Cn(e.catch),Pk=((e,t)=>e?setImmediate:t?((n,r)=>(Ts.addEventListener("message",({source:a,data:i})=>{a===Ts&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Ts.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Cn(Ts.postMessage)),SG=typeof queueMicrotask<"u"?queueMicrotask.bind(Ts):typeof process<"u"&&process.nextTick||Pk,wG=e=>e!=null&&Cn(e[Jy]),z={isArray:io,isArrayBuffer:Ek,isBuffer:Ic,isFormData:GK,isArrayBufferView:$K,isString:kK,isNumber:Tk,isBoolean:LK,isObject:Fd,isPlainObject:gp,isEmptyObject:zK,isReadableStream:XK,isRequest:WK,isResponse:QK,isHeaders:ZK,isUndefined:Wl,isDate:IK,isFile:BK,isReactNativeBlob:UK,isReactNative:FK,isBlob:VK,isRegExp:dG,isFunction:Cn,isStream:qK,isURLSearchParams:YK,isTypedArray:sG,isFileList:HK,forEach:Vd,merge:jx,extend:eG,trim:JK,stripBOM:tG,inherits:nG,toFlatObject:rG,kindOf:eg,kindOfTest:Br,endsWith:aG,toArray:iG,forEachEntry:oG,matchAll:lG,isHTMLForm:cG,hasOwnProperty:Ax,hasOwnProp:Ax,reduceDescriptors:_k,freezeMethods:hG,toObjectSet:pG,toCamelCase:uG,noop:mG,toFiniteNumber:yG,findKey:Nk,global:Ts,isContextDefined:Ck,isSpecCompliantForm:gG,toJSONObject:vG,isAsyncFn:bG,isThenable:xG,setImmediate:Pk,asap:SG,isIterable:wG},jG=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),AG=e=>{const t={};let n,r,a;return e&&e.split(` +`).forEach(function(s){a=s.indexOf(":"),n=s.substring(0,a).trim().toLowerCase(),r=s.substring(a+1).trim(),!(!n||t[n]&&jG[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function OG(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const EG=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),TG=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function oj(e,t){return z.isArray(e)?e.map(n=>oj(n,t)):OG(String(e).replace(t,""))}const NG=e=>oj(e,EG),CG=e=>oj(e,TG);function Mk(e){const t=Object.create(null);return z.forEach(e.toJSON(),(n,r)=>{t[r]=CG(n)}),t}const nT=Symbol("internals");function uu(e){return e&&String(e).trim().toLowerCase()}function vp(e){return e===!1||e==null?e:z.isArray(e)?e.map(vp):NG(String(e))}function _G(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const PG=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ab(e,t,n,r,a){if(z.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!z.isString(t)){if(z.isString(r))return t.indexOf(r)!==-1;if(z.isRegExp(r))return r.test(t)}}function MG(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function RG(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(a,i,s){return this[r].call(this,t,a,i,s)},configurable:!0})})}let gn=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(o,l,c){const f=uu(l);if(!f)return;const d=z.findKey(a,f);(!d||a[d]===void 0||c===!0||c===void 0&&a[d]!==!1)&&(a[d||l]=vp(o))}const s=(o,l)=>z.forEach(o,(c,f)=>i(c,f,l));if(z.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(z.isString(t)&&(t=t.trim())&&!PG(t))s(AG(t),n);else if(z.isObject(t)&&z.isIterable(t)){let o={},l,c;for(const f of t){if(!z.isArray(f))throw new TypeError("Object iterator must return a key-value pair");o[c=f[0]]=(l=o[c])?z.isArray(l)?[...l,f[1]]:[l,f[1]]:f[1]}s(o,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=uu(t),t){const r=z.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return _G(a);if(z.isFunction(n))return n.call(this,a,r);if(z.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=uu(t),t){const r=z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ab(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(s){if(s=uu(s),s){const o=z.findKey(r,s);o&&(!n||ab(r,r[o],o,n))&&(delete r[o],a=!0)}}return z.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||ab(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return z.forEach(this,(a,i)=>{const s=z.findKey(r,i);if(s){n[s]=vp(a),delete n[i];return}const o=t?MG(i):String(i).trim();o!==i&&delete n[i],n[o]=vp(a),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return z.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&z.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[nT]=this[nT]={accessors:{}}).accessors,a=this.prototype;function i(s){const o=uu(s);r[o]||(RG(a,s),r[o]=!0)}return z.isArray(t)?t.forEach(i):i(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});z.freezeMethods(gn);const DG="[REDACTED ****]";function $G(e){if(z.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function kG(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],a=i=>{if(i===null||typeof i!="object"||z.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof gn&&(i=i.toJSON()),r.push(i);let s;if(z.isArray(i))s=[],i.forEach((o,l)=>{const c=a(o);z.isUndefined(c)||(s[l]=c)});else{if(!z.isPlainObject(i)&&$G(i))return r.pop(),i;s=Object.create(null);for(const[o,l]of Object.entries(i)){const c=n.has(o.toLowerCase())?DG:a(l);z.isUndefined(c)||(s[o]=c)}}return r.pop(),s};return a(e)}let re=class Rk extends Error{static from(t,n,r,a,i,s){const o=new Rk(t.message,n||t.code,r,a,i);return o.cause=t,o.name=t.name,t.status!=null&&o.status==null&&(o.status=t.status),s&&Object.assign(o,s),o}constructor(t,n,r,a,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&z.hasOwnProp(t,"redact")?t.redact:void 0,r=z.isArray(n)&&n.length>0?kG(t,n):z.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};re.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";re.ERR_BAD_OPTION="ERR_BAD_OPTION";re.ECONNABORTED="ECONNABORTED";re.ETIMEDOUT="ETIMEDOUT";re.ECONNREFUSED="ECONNREFUSED";re.ERR_NETWORK="ERR_NETWORK";re.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";re.ERR_DEPRECATED="ERR_DEPRECATED";re.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";re.ERR_BAD_REQUEST="ERR_BAD_REQUEST";re.ERR_CANCELED="ERR_CANCELED";re.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";re.ERR_INVALID_URL="ERR_INVALID_URL";re.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const LG=null;function Ox(e){return z.isPlainObject(e)||z.isArray(e)}function Dk(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function ib(e,t,n){return e?e.concat(t).map(function(a,i){return a=Dk(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function zG(e){return z.isArray(e)&&!e.some(Ox)}const IG=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function ng(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,y){return!z.isUndefined(y[b])});const r=n.metaTokens,a=n.visitor||d,i=n.dots,s=n.indexes,o=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,c=o&&z.isSpecCompliantForm(t);if(!z.isFunction(a))throw new TypeError("visitor must be a function");function f(g){if(g===null)return"";if(z.isDate(g))return g.toISOString();if(z.isBoolean(g))return g.toString();if(!c&&z.isBlob(g))throw new re("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(g)||z.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,b,y){let v=g;if(z.isReactNative(t)&&z.isReactNativeBlob(g))return t.append(ib(y,b,i),f(g)),!1;if(g&&!y&&typeof g=="object"){if(z.endsWith(b,"{}"))b=r?b:b.slice(0,-2),g=JSON.stringify(g);else if(z.isArray(g)&&zG(g)||(z.isFileList(g)||z.endsWith(b,"[]"))&&(v=z.toArray(g)))return b=Dk(b),v.forEach(function(w,S){!(z.isUndefined(w)||w===null)&&t.append(s===!0?ib([b],S,i):s===null?b:b+"[]",f(w))}),!1}return Ox(g)?!0:(t.append(ib(y,b,i),f(g)),!1)}const h=[],p=Object.assign(IG,{defaultVisitor:d,convertValue:f,isVisitable:Ox});function m(g,b,y=0){if(!z.isUndefined(g)){if(y>l)throw new re("Object is too deeply nested ("+y+" levels). Max depth: "+l,re.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(g)!==-1)throw new Error("Circular reference detected in "+b.join("."));h.push(g),z.forEach(g,function(x,w){(!(z.isUndefined(x)||x===null)&&a.call(t,x,z.isString(w)?w.trim():w,b,p))===!0&&m(x,b?b.concat(w):[w],y+1)}),h.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return m(e),t}function rT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function lj(e,t){this._pairs=[],e&&ng(e,this,t)}const $k=lj.prototype;$k.append=function(t,n){this._pairs.push([t,n])};$k.toString=function(t){const n=t?function(r){return t.call(this,r,rT)}:rT;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function BG(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function kk(e,t,n){if(!t)return e;const r=n&&n.encode||BG,a=z.isFunction(n)?{serialize:n}:n,i=a&&a.serialize;let s;if(i?s=i(t,a):s=z.isURLSearchParams(t)?t.toString():new lj(t,a).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class aT{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const cj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},UG=typeof URLSearchParams<"u"?URLSearchParams:lj,FG=typeof FormData<"u"?FormData:null,VG=typeof Blob<"u"?Blob:null,HG={isBrowser:!0,classes:{URLSearchParams:UG,FormData:FG,Blob:VG},protocols:["http","https","file","blob","url","data"]},uj=typeof window<"u"&&typeof document<"u",Ex=typeof navigator=="object"&&navigator||void 0,qG=uj&&(!Ex||["ReactNative","NativeScript","NS"].indexOf(Ex.product)<0),KG=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",GG=uj&&window.location.href||"http://localhost",YG=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:uj,hasStandardBrowserEnv:qG,hasStandardBrowserWebWorkerEnv:KG,navigator:Ex,origin:GG},Symbol.toStringTag,{value:"Module"})),Jt={...YG,...HG};function XG(e,t){return ng(e,new Jt.classes.URLSearchParams,{visitor:function(n,r,a,i){return Jt.isNode&&z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function WG(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function QG(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r=n.length;return s=!s&&z.isArray(a)?a.length:s,l?(z.hasOwnProp(a,s)?a[s]=z.isArray(a[s])?a[s].concat(r):[a[s],r]:a[s]=r,!o):((!z.hasOwnProp(a,s)||!z.isObject(a[s]))&&(a[s]=[]),t(n,r,a[s],i)&&z.isArray(a[s])&&(a[s]=QG(a[s])),!o)}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,(r,a)=>{t(WG(r),a,n,0)}),n}return null}const Mo=(e,t)=>e!=null&&z.hasOwnProp(e,t)?e[t]:void 0;function ZG(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Hd={transitional:cj,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=z.isObject(t);if(i&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return a?JSON.stringify(Lk(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){const l=Mo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return XG(t,l).toString();if((o=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=Mo(this,"env"),f=c&&c.FormData;return ng(o?{"files[]":t}:t,f&&new f,l)}}return i||a?(n.setContentType("application/json",!1),ZG(t)):t}],transformResponse:[function(t){const n=Mo(this,"transitional")||Hd.transitional,r=n&&n.forcedJSONParsing,a=Mo(this,"responseType"),i=a==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(r&&!a||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,Mo(this,"parseReviver"))}catch(l){if(o)throw l.name==="SyntaxError"?re.from(l,re.ERR_BAD_RESPONSE,this,null,Mo(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Jt.classes.FormData,Blob:Jt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch","query"],e=>{Hd.headers[e]={}});function sb(e,t){const n=this||Hd,r=t||n,a=gn.from(r.headers);let i=r.data;return z.forEach(e,function(o){i=o.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function zk(e){return!!(e&&e.__CANCEL__)}let qd=class extends re{constructor(t,n,r){super(t??"canceled",re.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ik(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new re("Request failed with status code "+n.status,n.status>=400&&n.status<500?re.ERR_BAD_REQUEST:re.ERR_BAD_RESPONSE,n.config,n.request,n))}function JG(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function eY(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),f=r[i];s||(s=c),n[a]=l,r[a]=c;let d=i,h=0;for(;d!==a;)h+=n[d++],d=d%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-s{n=f,a=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{const f=Date.now(),d=f-n;d>=r?s(c,f):(a=c,i||(i=setTimeout(()=>{i=null,s(a)},r-d)))},()=>a&&s(a)]}const hm=(e,t,n=3)=>{let r=0;const a=eY(50,250);return tY(i=>{if(!i||typeof i.loaded!="number")return;const s=i.loaded,o=i.lengthComputable?i.total:void 0,l=o!=null?Math.min(s,o):s,c=Math.max(0,l-r),f=a(c);r=Math.max(r,l);const d={loaded:l,total:o,progress:o?l/o:void 0,bytes:c,rate:f||void 0,estimated:f&&o?(o-l)/f:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(d)},n)},iT=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},sT=e=>(...t)=>z.asap(()=>e(...t)),nY=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,rY=Jt.hasStandardBrowserEnv?{write(e,t,n,r,a,i,s){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];z.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),z.isString(r)&&o.push(`path=${r}`),z.isString(a)&&o.push(`domain=${a}`),i===!0&&o.push("secure"),z.isString(s)&&o.push(`SameSite=${s}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof gn?{...e}:e;function so(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,f,d,h){return z.isPlainObject(c)&&z.isPlainObject(f)?z.merge.call({caseless:h},c,f):z.isPlainObject(f)?z.merge({},f):z.isArray(f)?f.slice():f}function a(c,f,d,h){if(z.isUndefined(f)){if(!z.isUndefined(c))return r(void 0,c,d,h)}else return r(c,f,d,h)}function i(c,f){if(!z.isUndefined(f))return r(void 0,f)}function s(c,f){if(z.isUndefined(f)){if(!z.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function o(c,f,d){if(z.hasOwnProp(t,d))return r(c,f);if(z.hasOwnProp(e,d))return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:o,headers:(c,f,d)=>a(oT(c),oT(f),d,!0)};return z.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const d=z.hasOwnProp(l,f)?l[f]:a,h=z.hasOwnProp(e,f)?e[f]:void 0,p=z.hasOwnProp(t,f)?t[f]:void 0,m=d(h,p,f);z.isUndefined(m)&&d!==o||(n[f]=m)}),n}const sY=["content-type","content-length"];function oY(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,a])=>{sY.includes(r.toLowerCase())&&e.set(r,a)})}const lY=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Uk(e){const t=so({},e),n=h=>z.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let a=n("withXSRFToken");const i=n("xsrfHeaderName"),s=n("xsrfCookieName");let o=n("headers");const l=n("auth"),c=n("baseURL"),f=n("allowAbsoluteUrls"),d=n("url");if(t.headers=o=gn.from(o),t.url=kk(Bk(c,d,f),n("params"),n("paramsSerializer")),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?lY(l.password):""))),z.isFormData(r)&&(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv||z.isReactNative(r)?o.setContentType(void 0):z.isFunction(r.getHeaders)&&oY(o,r.getHeaders(),n("formDataHeaderPolicy"))),Jt.hasStandardBrowserEnv&&(z.isFunction(a)&&(a=a(t)),a===!0||a==null&&nY(t.url))){const p=i&&s&&rY.read(s);p&&o.set(i,p)}return t}const cY=typeof XMLHttpRequest<"u",uY=cY&&function(e){return new Promise(function(n,r){const a=Uk(e);let i=a.data;const s=gn.from(a.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=a,f,d,h,p,m;function g(){p&&p(),m&&m(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(a.method.toUpperCase(),a.url,!0),b.timeout=a.timeout;function y(){if(!b)return;const x=gn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),S={data:!o||o==="text"||o==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:x,config:e,request:b};Ik(function(O){n(O),g()},function(O){r(O),g()},S),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(y)},b.onabort=function(){b&&(r(new re("Request aborted",re.ECONNABORTED,e,b)),g(),b=null)},b.onerror=function(w){const S=w&&w.message?w.message:"Network Error",j=new re(S,re.ERR_NETWORK,e,b);j.event=w||null,r(j),g(),b=null},b.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const S=a.transitional||cj;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),r(new re(w,S.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,b)),g(),b=null},i===void 0&&s.setContentType(null),"setRequestHeader"in b&&z.forEach(Mk(s),function(w,S){b.setRequestHeader(S,w)}),z.isUndefined(a.withCredentials)||(b.withCredentials=!!a.withCredentials),o&&o!=="json"&&(b.responseType=a.responseType),c&&([h,m]=hm(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,p]=hm(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(f=x=>{b&&(r(!x||x.type?new qd(null,e,b):x),b.abort(),g(),b=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const v=JG(a.url);if(v&&!Jt.protocols.includes(v)){r(new re("Unsupported protocol "+v+":",re.ERR_BAD_REQUEST,e));return}b.send(i||null)})},fY=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const a=function(l){if(!r){r=!0,s();const c=l instanceof Error?l:this.reason;n.abort(c instanceof re?c:new qd(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,a(new re(`timeout of ${t}ms exceeded`,re.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),e=null)};e.forEach(l=>l.addEventListener("abort",a));const{signal:o}=n;return o.unsubscribe=()=>z.asap(s),o},dY=function*(e,t){let n=e.byteLength;if(n{const a=hY(e,t);let i=0,s,o=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:f}=await a.next();if(c){o(),l.close();return}let d=f.byteLength;if(n){let h=i+=d;n(h)}l.enqueue(new Uint8Array(f))}catch(c){throw o(c),c}},cancel(l){return o(l),a.return()}},{highWaterMark:2})};function mY(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let s=r.length;const o=r.length;for(let p=0;p=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(s-=2,p+=2)}let l=0,c=o-1;const f=p=>p>=2&&r.charCodeAt(p-2)===37&&r.charCodeAt(p-1)===51&&(r.charCodeAt(p)===68||r.charCodeAt(p)===100);c>=0&&(r.charCodeAt(c)===61?(l++,c--):f(c)&&(l++,c-=3)),l===1&&c>=0&&(r.charCodeAt(c)===61||f(c))&&l++;const h=Math.floor(s/4)*3-(l||0);return h>0?h:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let i=0;for(let s=0,o=r.length;s=55296&&l<=56319&&s+1=56320&&c<=57343?(i+=4,s++):i+=3}else i+=3}return i}const fj="1.17.0",cT=64*1024,{isFunction:Nh}=z,yY=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),uT=e=>{if(!z.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},fT=(e,...t)=>{try{return!!e(...t)}catch{return!1}},gY=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},vY=e=>{const t=z.global!==void 0&&z.global!==null?z.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:i,Response:s}=e,o=a?Nh(a):typeof fetch=="function",l=Nh(i),c=Nh(s);if(!o)return!1;const f=o&&Nh(n),d=o&&(typeof r=="function"?(y=>v=>y.encode(v))(new r):async y=>new Uint8Array(await new i(y).arrayBuffer())),h=l&&f&&fT(()=>{let y=!1;const v=new i(Jt.origin,{body:new n,method:"POST",get duplex(){return y=!0,"half"}}),x=v.headers.has("Content-Type");return v.body!=null&&v.body.cancel(),y&&!x}),p=c&&f&&fT(()=>z.isReadableStream(new s("").body)),m={stream:p&&(y=>y.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!m[y]&&(m[y]=(v,x)=>{let w=v&&v[y];if(w)return w.call(v);throw new re(`Response type '${y}' is not supported`,re.ERR_NOT_SUPPORT,x)})});const g=async y=>{if(y==null)return 0;if(z.isBlob(y))return y.size;if(z.isSpecCompliantForm(y))return(await new i(Jt.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(z.isArrayBufferView(y)||z.isArrayBuffer(y))return y.byteLength;if(z.isURLSearchParams(y)&&(y=y+""),z.isString(y))return(await d(y)).byteLength},b=async(y,v)=>{const x=z.toFiniteNumber(y.getContentLength());return x??g(v)};return async y=>{let{url:v,method:x,data:w,signal:S,cancelToken:j,timeout:O,onDownloadProgress:E,onUploadProgress:T,responseType:N,headers:M,withCredentials:C="same-origin",fetchOptions:L,maxContentLength:D,maxBodyLength:$}=Uk(y);const P=z.isNumber(D)&&D>-1,k=z.isNumber($)&&$>-1,I=Z=>z.hasOwnProp(y,Z)?y[Z]:void 0;let F=a||fetch;N=N?(N+"").toLowerCase():"text";let H=fY([S,j&&j.toAbortSignal()],O),Y=null;const q=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let te;try{let Z;const ye=I("auth");if(ye){const X=ye.username||"",V=ye.password||"";Z={username:X,password:V}}if(gY(v)){const X=new URL(v,Jt.origin);if(!Z&&(X.username||X.password)){const V=uT(X.username),_e=uT(X.password);Z={username:V,password:_e}}(X.username||X.password)&&(X.username="",X.password="",v=X.href)}if(Z&&(M.delete("authorization"),M.set("Authorization","Basic "+btoa(yY((Z.username||"")+":"+(Z.password||""))))),P&&typeof v=="string"&&v.startsWith("data:")&&mY(v)>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y);if(k&&x!=="get"&&x!=="head"){const X=await b(M,w);if(typeof X=="number"&&isFinite(X)&&X>$)throw new re("Request body larger than maxBodyLength limit",re.ERR_BAD_REQUEST,y,Y)}if(T&&h&&x!=="get"&&x!=="head"&&(te=await b(M,w))!==0){let X=new i(v,{method:"POST",body:w,duplex:"half"}),V;if(z.isFormData(w)&&(V=X.headers.get("content-type"))&&M.setContentType(V),X.body){const[_e,ge]=iT(te,hm(sT(T)));w=lT(X.body,cT,_e,ge)}}z.isString(C)||(C=C?"include":"omit");const J=l&&"credentials"in i.prototype;if(z.isFormData(w)){const X=M.getContentType();X&&/^multipart\/form-data/i.test(X)&&!/boundary=/i.test(X)&&M.delete("content-type")}M.set("User-Agent","axios/"+fj,!1);const st={...L,signal:H,method:x.toUpperCase(),headers:Mk(M.normalize()),body:w,duplex:"half",credentials:J?C:void 0};Y=l&&new i(v,st);let Ve=await(l?F(Y,L):F(v,st));if(P){const X=z.toFiniteNumber(Ve.headers.get("content-length"));if(X!=null&&X>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y)}const G=p&&(N==="stream"||N==="response");if(p&&Ve.body&&(E||P||G&&q)){const X={};["status","statusText","headers"].forEach(dt=>{X[dt]=Ve[dt]});const V=z.toFiniteNumber(Ve.headers.get("content-length")),[_e,ge]=E&&iT(V,hm(sT(E),!0))||[];let Xe=0;const ot=dt=>{if(P&&(Xe=dt,Xe>D))throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y);_e&&_e(dt)};Ve=new s(lT(Ve.body,cT,ot,()=>{ge&&ge(),q&&q()}),X)}N=N||"text";let oe=await m[z.findKey(m,N)||"text"](Ve,y);if(P&&!p&&!G){let X;if(oe!=null&&(typeof oe.byteLength=="number"?X=oe.byteLength:typeof oe.size=="number"?X=oe.size:typeof oe=="string"&&(X=typeof r=="function"?new r().encode(oe).byteLength:oe.length)),typeof X=="number"&&X>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y)}return!G&&q&&q(),await new Promise((X,V)=>{Ik(X,V,{data:oe,headers:gn.from(Ve.headers),status:Ve.status,statusText:Ve.statusText,config:y,request:Y})})}catch(Z){if(q&&q(),H&&H.aborted&&H.reason instanceof re){const ye=H.reason;throw ye.config=y,Y&&(ye.request=Y),Z!==ye&&(ye.cause=Z),ye}throw Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)?Object.assign(new re("Network Error",re.ERR_NETWORK,y,Y,Z&&Z.response),{cause:Z.cause||Z}):re.from(Z,Z&&Z.code,y,Y,Z&&Z.response)}}},bY=new Map,Fk=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let s=i.length,o=s,l,c,f=bY;for(;o--;)l=i[o],c=f.get(l),c===void 0&&f.set(l,c=o?new Map:vY(t)),f=c;return c};Fk();const dj={http:LG,xhr:uY,fetch:{get:Fk}};z.forEach(dj,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const dT=e=>`- ${e}`,xY=e=>z.isFunction(e)||e===null||e===!1;function SY(e,t){e=z.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let s=0;s`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=n?s.length>1?`since : +`+s.map(dT).join(` +`):" "+dT(s[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return a}const Vk={getAdapter:SY,adapters:dj};function ob(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qd(null,e)}function hT(e){return ob(e),e.headers=gn.from(e.headers),e.data=sb.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vk.getAdapter(e.adapter||Hd.adapter,e)(e).then(function(r){ob(e),e.response=r;try{r.data=sb.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=gn.from(r.headers),r},function(r){if(!zk(r)&&(ob(e),r&&r.response)){e.response=r.response;try{r.response.data=sb.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=gn.from(r.response.headers)}return Promise.reject(r)})}const rg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rg[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pT={};rg.transitional=function(t,n,r){function a(i,s){return"[Axios v"+fj+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,o)=>{if(t===!1)throw new re(a(s," has been removed"+(n?" in "+n:"")),re.ERR_DEPRECATED);return n&&!pT[s]&&(pT[s]=!0,console.warn(a(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,o):!0}};rg.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function wY(e,t,n){if(typeof e!="object")throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],s=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(s){const o=e[i],l=o===void 0||s(o,i,e);if(l!==!0)throw new re("option "+i+" must be "+l,re.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new re("Unknown option "+i,re.ERR_BAD_OPTION)}}const bp={assertOptions:wY,validators:rg},wn=bp.validators;let Ys=class{constructor(t){this.defaults=t||{},this.interceptors={request:new aT,response:new aT}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=(()=>{if(!a.stack)return"";const s=a.stack.indexOf(` +`);return s===-1?"":a.stack.slice(s+1)})();try{if(!r.stack)r.stack=i;else if(i){const s=i.indexOf(` +`),o=s===-1?-1:i.indexOf(` +`,s+1),l=o===-1?"":i.slice(o+1);String(r.stack).endsWith(l)||(r.stack+=` +`+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=so(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&bp.assertOptions(r,{silentJSONParsing:wn.transitional(wn.boolean),forcedJSONParsing:wn.transitional(wn.boolean),clarifyTimeoutError:wn.transitional(wn.boolean),legacyInterceptorReqResOrdering:wn.transitional(wn.boolean),advertiseZstdAcceptEncoding:wn.transitional(wn.boolean)},!1),a!=null&&(z.isFunction(a)?n.paramsSerializer={serialize:a}:bp.assertOptions(a,{encode:wn.function,serialize:wn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),bp.assertOptions(n,{baseUrl:wn.spelling("baseURL"),withXsrfToken:wn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&z.merge(i.common,i[n.method]);i&&z.forEach(["delete","get","head","post","put","patch","query","common"],m=>{delete i[m]}),n.headers=gn.concat(s,i);const o=[];let l=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;l=l&&g.synchronous;const b=n.transitional||cj;b&&b.legacyInterceptorReqResOrdering?o.unshift(g.fulfilled,g.rejected):o.push(g.fulfilled,g.rejected)});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let f,d=0,h;if(!l){const m=[hT.bind(this),void 0];for(m.unshift(...o),m.push(...c),h=m.length,f=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const s=new Promise(o=>{r.subscribe(o),i=o}).then(a);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,o){r.reason||(r.reason=new qd(i,s,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Hk(function(a){t=a}),cancel:t}}};function AY(e){return function(n){return e.apply(null,n)}}function OY(e){return z.isObject(e)&&e.isAxiosError===!0}const Tx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Tx).forEach(([e,t])=>{Tx[t]=e});function qk(e){const t=new Ys(e),n=Ak(Ys.prototype.request,t);return z.extend(n,Ys.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return qk(so(e,a))},n}const jt=qk(Hd);jt.Axios=Ys;jt.CanceledError=qd;jt.CancelToken=jY;jt.isCancel=zk;jt.VERSION=fj;jt.toFormData=ng;jt.AxiosError=re;jt.Cancel=jt.CanceledError;jt.all=function(t){return Promise.all(t)};jt.spread=AY;jt.isAxiosError=OY;jt.mergeConfig=so;jt.AxiosHeaders=gn;jt.formToJSON=e=>Lk(z.isHTMLForm(e)?new FormData(e):e);jt.getAdapter=Vk.getAdapter;jt.HttpStatusCode=Tx;jt.default=jt;const{Axios:YAe,AxiosError:XAe,CanceledError:WAe,isCancel:QAe,CancelToken:ZAe,VERSION:JAe,all:e2e,Cancel:t2e,isAxiosError:n2e,spread:r2e,toFormData:a2e,AxiosHeaders:i2e,HttpStatusCode:s2e,formToJSON:o2e,getAdapter:l2e,mergeConfig:c2e,create:u2e}=jt,W=jt.create({baseURL:""}),Kk=()=>location.pathname.startsWith("/admin"),Gk=()=>Kk()?"mall_admin_token":"mall_token";W.interceptors.request.use(e=>{const t=localStorage.getItem(Gk());return t&&(e.headers.Authorization=`Bearer ${t}`),e});W.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem(Gk()),Kk()&&location.pathname!=="/admin/login"&&(location.href="/admin/login")),Promise.reject(e)});const Q=e=>e.then(t=>{var n;return(n=t.data)==null?void 0:n.data}),Yk=(e,t)=>W.post("/api/mall/auth/login",{username:e,password:t}),EY=(e,t,n)=>W.post("/api/mall/auth/register",{username:e,password:t,displayName:n}),Xk=()=>Q(W.get("/api/mall/auth/me")),So=(e=!0)=>Q(W.get(`/api/mall/store?activeOnly=${e}`)),TY=(e,t)=>Q(W.put(`/api/mall/store/${e}/active`,{active:t})),NY=e=>Q(W.get(`/api/mall/zone/lookup?zip=${encodeURIComponent(e)}`)),Ql=(e={})=>{const t=new URLSearchParams;return Object.entries(e).forEach(([n,r])=>{r!==void 0&&r!==""&&r!==null&&t.set(n,String(r))}),Q(W.get(`/api/mall/product?${t}`))},CY=e=>Q(W.get(`/api/mall/product/${e}`)),_Y=(e,t)=>Q(W.put(`/api/mall/product/${e}/status`,{status:t})),PY=()=>Q(W.get("/api/mall/category")),MY=e=>Q(W.get(`/api/mall/store-inventory/store/${e}`)),RY=(e,t,n)=>Q(W.put(`/api/mall/store-inventory/store/${e}/product/${t}/toggle`,{available:n})),DY=(e,t,n)=>Q(W.put(`/api/mall/store-inventory/store/${e}/product/${t}/adjust`,{delta:n})),$Y=(e,t)=>Q(W.get(`/api/mall/schedule/availability?storeId=${e}&date=${t}`)),Wk=()=>Q(W.get("/api/mall/schedule/holidays")),kY=e=>Q(W.post("/api/mall/schedule/holiday",e)),hj=()=>Q(W.get("/api/mall/cart")),LY=e=>Q(W.post("/api/mall/cart",e)),zY=(e,t)=>Q(W.put(`/api/mall/cart/${e}`,{quantity:t})),IY=e=>W.delete(`/api/mall/cart/${e}`),BY=(e="")=>Q(W.get(`/api/mall/order?status=${e}`)),UY=e=>Q(W.post("/api/mall/order/checkout",e)),Qk=(e,t)=>Q(W.put(`/api/mall/order/${e}/status`,{status:t})),FY=(e="",t=100)=>Q(W.get(`/api/mall/order/admin?status=${e}&limit=${t}`)),VY=e=>Q(W.post("/api/mall/payment",e)),HY=()=>Q(W.get("/api/mall/subscription")),qY=e=>Q(W.post("/api/mall/subscription",e)),mT=(e,t)=>Q(W.put(`/api/mall/subscription/${e}/status`,{status:t})),KY=()=>Q(W.get("/api/mall/subscription/admin")),GY=(e="",t="")=>{const n=new URLSearchParams;return e&&n.set("status",e),t&&n.set("storeId",t),Q(W.get(`/api/mall/transfer?${n}`))},YY=e=>Q(W.put(`/api/mall/transfer/${e}/approve`,{})),XY=e=>Q(W.put(`/api/mall/transfer/${e}/reject`,{})),WY=e=>Q(W.get(`/api/mall/review/product/${e}`)),QY=e=>Q(W.get(`/api/mall/review/product/${e}/stats`)),ZY=e=>Q(W.post("/api/mall/review",e)),JY=()=>Q(W.get("/api/mall/member/me")),eX=()=>Q(W.get("/api/mall/cs")),tX=e=>Q(W.post("/api/mall/cs",e)),nX=()=>Q(W.get("/api/mall/wishlist")),rX=e=>Q(W.post(`/api/mall/wishlist/${e}`,{})),aX=e=>W.delete(`/api/mall/wishlist/${e}`),iX=(e=1,t=500)=>Q(W.get(`/api/mall/analytics/dashboard?days=${e}&bigOrderThreshold=${t}`)),Zk=(e=7)=>Q(W.get(`/api/mall/analytics/store-sales?days=${e}`)),Jk=(e=14)=>Q(W.get(`/api/mall/analytics/trend?days=${e}`)),e5=(e=10)=>Q(W.get(`/api/mall/analytics/top-products?limit=${e}`)),sX=(e,t,n)=>Q(W.post("/api/mall/gateway/tax/quote",{amount:e,zip:t,state:n})),oX=(e,t)=>Q(W.post("/api/mall/gateway/address/verify",{address:e,zip:t})),lX=()=>Q(W.get("/api/mall/gateway/providers")),t5=(e="",t="",n=6)=>{const r=new URLSearchParams;return e&&r.set("occasion",e),t&&r.set("keyword",t),r.set("limit",String(n)),Q(W.get(`/api/mall/ai/recommend?${r}`))},cX=e=>Q(W.get(`/api/mall/ai/review-summary/${e}`)),n5=e=>Q(W.post("/api/mall/ai/nl-search",{query:e})),uX=(e,t,n)=>Q(W.post("/api/mall/ai/card-message",{occasion:e,tone:t,recipient:n})),fX=(e="valentine",t=14)=>Q(W.get(`/api/mall/ai/demand-forecast?season=${e}&days=${t}`)),dX=e=>Q(W.post("/api/mall/ai/transfer-recommend",{storeIds:e})),hX=()=>Q(W.get("/api/admin/users")),pX=e=>Q(W.post("/api/admin/users",e)),mX=(e,t)=>Q(W.put(`/api/admin/users/${e}/role`,{role:t})),yX=(e,t)=>Q(W.put(`/api/admin/users/${e}/active`,{active:t})),gX=(e,t)=>Q(W.put(`/api/admin/users/${e}/password`,{password:t})),vX=e=>W.delete(`/api/admin/users/${e}`),bX=(e="",t="",n=100)=>{const r=new URLSearchParams;return e&&r.set("action",e),t&&r.set("actor",t),r.set("limit",String(n)),Q(W.get(`/api/admin/audit?${r}`))},xX=()=>Q(W.get("/api/admin/settings")),SX=(e,t)=>Q(W.put(`/api/admin/settings/${encodeURIComponent(e)}`,{value:t})),wX=(e=!0)=>Q(W.get(`/api/mall/loyalty/tiers?activeOnly=${e}`)),jX=(e,t)=>Q(W.put(`/api/mall/loyalty/tiers/${e}`,t)),pj=()=>Q(W.get("/api/mall/loyalty/me")),AX=(e=100)=>Q(W.get(`/api/mall/loyalty/points/history?limit=${e}`)),OX=(e,t,n)=>Q(W.post("/api/mall/loyalty/points/adjust",{owner:e,points:t,reason:n})),EX=()=>Q(W.post("/api/mall/loyalty/recalc-all",{})),r5=(e=30)=>Q(W.get(`/api/mall/loyalty/analytics/by-tier?days=${e}`)),TX=(e="")=>Q(W.get(`/api/mall/event/ongoing${e?`?tier=${e}`:""}`)),NX=e=>Q(W.post(`/api/mall/event/${e}/join`,{})),CX=(e="",t="",n=!1)=>{const r=new URLSearchParams;return e&&r.set("status",e),t&&r.set("type",t),r.set("activeOnly",String(n)),Q(W.get(`/api/mall/event?${r}`))},_X=e=>Q(W.post("/api/mall/event",e)),PX=e=>Q(W.post(`/api/mall/event/${e}/publish`,{})),MX=e=>Q(W.post(`/api/mall/event/${e}/end`,{})),RX=e=>W.delete(`/api/mall/event/${e}`),DX=e=>Q(W.get(`/api/mall/event/${e}/performance`)),$X=(e,t,n)=>Q(W.post("/api/mall/event/ai/copy",{eventType:e,theme:t,tone:n}));function Gr({children:e,delay:t=0,y:n=24,className:r="",as:a="div"}){const i=ti(),s=Nt[a];return u.jsx(s,{className:r,initial:i?!1:{opacity:0,y:n},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7,delay:t,ease:[.22,1,.36,1]},children:e})}const kX={hidden:{},show:{transition:{staggerChildren:.07,delayChildren:.05}}},LX={hidden:{opacity:0,y:22},show:{opacity:1,y:0,transition:{duration:.6,ease:[.22,1,.36,1]}}};function pm({children:e,className:t=""}){const n=ti();return u.jsx(Nt.div,{className:t,variants:n?void 0:kX,initial:n?!1:"hidden",whileInView:"show",viewport:{once:!0,margin:"-40px"},children:e})}function mm({children:e,className:t=""}){const n=ti();return u.jsx(Nt.div,{className:t,variants:n?void 0:LX,children:e})}const yT=["","sage","cream"];function Kd({count:e=14,className:t=""}){const n=ti(),r=A.useMemo(()=>Array.from({length:e}).map((a,i)=>{const s=8+Math.round(Math.random()*14);return{left:Math.round(Math.random()*100),size:s,delay:+(Math.random()*12).toFixed(2),duration:+(10+Math.random()*10).toFixed(2),kind:yT[i%yT.length]}}),[e]);return n?null:u.jsx("div",{className:`petal-layer ${t}`,"aria-hidden":"true",children:r.map((a,i)=>u.jsx("span",{className:`petal ${a.kind}`,style:{left:`${a.left}%`,width:`${a.size}px`,height:`${a.size}px`,animationDelay:`${a.delay}s`,animationDuration:`${a.duration}s`}},i))})}function Ua({children:e,className:t="",onClick:n,type:r="button",disabled:a}){const i=ti();return u.jsx(Nt.button,{type:r,onClick:n,disabled:a,className:t,whileHover:i||a?void 0:{scale:1.03,y:-1},whileTap:i||a?void 0:{scale:.97},transition:{type:"spring",stiffness:380,damping:22},children:e})}const ke={name:"Montvale Florist",tagline:"100% Florist-Designed and Hand-Delivered!",founded:2010,address:"6 Railroad Ave, Montvale, NJ 07645",phone:"(201) 690-6721",phoneTel:"+12016906721",email:"wecare@montvalefloristnj.com",rating:4.9,reviewCount:44893,promise:[{title:"100% Florist-Designed",desc:"Every arrangement is crafted by hand in our shop — never mass-produced."},{title:"Locally Independent",desc:"A real, community-focused florist in Montvale since 2010 — not an online middleman."},{title:"100% Satisfaction",desc:"We stand behind every bouquet with our satisfaction guarantee."}],hours:[{day:"Mon – Fri",open:"9:00 AM – 5:30 PM",cutoff:"Same-day by 1:00 PM"},{day:"Saturday",open:"9:00 AM – 4:00 PM",cutoff:"Same-day by 12:00 PM"},{day:"Sunday",open:"9:00 AM – 12:00 PM",cutoff:"Same-day by 10:00 AM"}],social:{instagram:"https://instagram.com/themontvaleflorist",instagramHandle:"@themontvaleflorist",facebook:"https://facebook.com/montvaleflorist1",pinterest:"https://pinterest.com/montvaleflorist",google:"https://www.google.com/search?q=Montvale+Florist",yelp:"https://yelp.com/biz/montvale-florist-montvale-3"},payments:["Visa","Mastercard","Amex","Discover","Apple Pay","Google Pay"],wallets:["Apple Pay","Google Pay"],cards:["Visa","Mastercard","Amex","Discover"],policies:["Terms of Service","Privacy Policy","Accessibility Statement","Delivery Policy"],about:"Montvale Florist is your go-to local florist, delivering not just flowers, but joy, comfort, and memories. An independent, community-focused florist dedicated to craftsmanship and personal service since 2010."},lb=[{img:"/img/hero/slide-1.jpg",eyebrow:"Birthday Blooms",headline:`Make Their Birthday +Unforgettable`,subtext:"Florist-designed bouquets, hand-delivered the same day — a celebration in every petal.",cta:"Find the Perfect Gift",to:"/category?occasion=BIRTHDAY"},{img:"/img/hero/slide-2.jpg",eyebrow:"Sympathy & Comfort",headline:`Honor Their Memory +with Heartfelt Flowers`,subtext:"Thoughtful tributes, gently arranged and delivered with care and compassion.",cta:"Send Your Condolences",to:"/category?occasion=SYMPATHY"},{img:"/img/hero/slide-3.jpg",eyebrow:"Just Because",headline:`Brighten Their Day, +Just Because`,subtext:"No occasion needed — send a smile with fresh, locally designed blooms.",cta:"Send a Smile",to:"/category?occasion=JUST_BECAUSE"}],zX=[{code:"en",label:"EN"},{code:"ko",label:"한국어"}];function ag({variant:e="shop"}){const{i18n:t}=ni(),n=(t.language||"en").split("-")[0],r=s=>{s!==n&&t.changeLanguage(s)},a=e==="admin",i=a?"flex items-center gap-0.5 rounded-lg border border-edge bg-card/60 p-0.5":"flex items-center gap-0.5 rounded-full border border-blush-100 bg-white/70 p-0.5 shadow-soft";return u.jsxs("div",{className:"flex items-center gap-1.5","aria-label":"Language",children:[u.jsx(SK,{size:15,className:a?"text-slate-400":"text-sage-600"}),u.jsx("div",{className:i,role:"group",children:zX.map(s=>{const o=s.code===n,l="px-2 py-0.5 text-[11px] font-medium rounded-full transition-colors",c=a?o?"bg-brand text-ink":"text-slate-300 hover:text-brand":o?"bg-blush-500 text-white":"text-sage-700 hover:text-blush-600";return u.jsx("button",{type:"button",onClick:()=>r(s.code),"aria-pressed":o,className:`${l} ${a?"rounded-md":""} ${c}`,children:s.label},s.code)})})]})}function IX(){const{t:e}=ni(),[t,n]=A.useState(""),[r,a]=A.useState(null),[i,s]=A.useState(!1),[o,l]=A.useState(""),{setZone:c}=bn(),f=Kt(),d=async p=>{if(p.preventDefault(),l(""),a(null),!/^\d{5}$/.test(t)){l(e("zip.errInvalid"));return}s(!0);try{const m=await NY(t);a(m),m!=null&&m.deliverable||l(e("zip.errNotDeliverable"))}catch{l(e("zip.errFailed"))}finally{s(!1)}},h=p=>{c(t,p.storeId,p.storeName),f("/home")};return u.jsxs("div",{className:"relative min-h-screen bg-gradient-to-br from-blush-100 via-cream to-sage-100 flex items-center justify-center px-4 overflow-hidden",children:[u.jsx("div",{className:"absolute top-5 right-5 z-20",children:u.jsx(ag,{variant:"shop"})}),u.jsx(Kd,{count:18}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -top-20 -left-20 text-blush-200/40",animate:{rotate:[0,360]},transition:{duration:80,repeat:1/0,ease:"linear"},children:u.jsx(ft,{size:320,strokeWidth:.5})}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -bottom-24 -right-16 text-sage-300/40",animate:{rotate:[360,0]},transition:{duration:90,repeat:1/0,ease:"linear"},children:u.jsx(ft,{size:260,strokeWidth:.5})}),u.jsxs(Nt.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"relative z-10 w-full max-w-lg text-center",children:[u.jsxs("div",{className:"flex flex-col items-center mb-5",children:[u.jsx(Nt.span,{animate:{rotate:[0,8,-6,0]},transition:{duration:7,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{className:"text-blush-500",size:44})}),u.jsx("h1",{className:"font-serif text-4xl font-bold text-blush-900 mt-3",children:"Montvale Florist"}),u.jsx("p",{className:"font-display text-[13px] tracking-[0.35em] uppercase text-sage-600 mt-1",children:e("zip.since",{year:ke.founded})})]}),u.jsx("p",{className:"font-display text-2xl text-[#6b5258] mb-1",children:ke.tagline}),u.jsx("p",{className:"text-[#8a7077] text-sm mb-8",children:e("zip.lead")}),u.jsxs("form",{onSubmit:d,className:"bg-white/90 backdrop-blur rounded-4xl shadow-bloom p-7 border border-blush-100",children:[u.jsxs("label",{className:"flex items-center gap-2 text-sm text-blush-700 font-medium mb-3 justify-center",children:[u.jsx(dm,{size:16})," ",e("zip.enterZip")]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{value:t,onChange:p=>n(p.target.value.replace(/\D/g,"").slice(0,5)),placeholder:e("zip.placeholder"),inputMode:"numeric",autoFocus:!0,className:"flex-1 px-4 py-3.5 rounded-2xl bg-blush-50 border border-blush-100 text-center text-lg tracking-[0.3em] outline-none focus:border-blush-400 transition-colors"}),u.jsx(Ua,{type:"submit",disabled:i,className:"px-7 rounded-2xl bg-blush-500 text-white font-semibold hover:bg-blush-600 disabled:opacity-60 flex items-center gap-1",children:i?"…":u.jsxs(u.Fragment,{children:[e("zip.go")," ",u.jsx(Es,{size:16})]})})]}),o&&u.jsx("p",{className:"text-blush-500 text-xs mt-3",children:o}),(r==null?void 0:r.deliverable)&&u.jsxs(Nt.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-6 text-left overflow-hidden",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-sage-700 font-medium mb-3",children:[u.jsx(Ud,{size:15})," ",e("zip.availableStores")]}),u.jsx("div",{className:"space-y-2",children:(r.stores||[]).map(p=>u.jsxs(Ua,{onClick:()=>h(p),className:"w-full flex items-center justify-between bg-blush-50 hover:bg-blush-100 border border-blush-100 rounded-2xl px-4 py-3.5 text-left",children:[u.jsxs("span",{children:[u.jsxs("span",{className:"font-medium text-sm flex items-center gap-1.5 text-blush-900",children:[u.jsx(Bd,{size:14,className:"text-blush-500"}),p.storeName]}),u.jsx("span",{className:"block text-xs text-[#8a7077] mt-0.5",children:e("zip.radiusSameDay",{radius:p.radiusMi,cutoff:p.sameDayCutoff,tz:p.timezone})})]}),u.jsx(Es,{size:16,className:"text-blush-500"})]},p.storeId))})]})]}),u.jsxs("div",{className:"flex items-center justify-center gap-2 mt-6 text-[12px] text-[#8a7077]",children:[u.jsx("span",{className:"flex text-gold",children:[1,2,3,4,5].map(p=>u.jsx(Wa,{size:13,fill:"currentColor"},p))}),ke.rating,"★ · ",e("zip.reviews",{n:ke.reviewCount.toLocaleString()})]}),u.jsx("button",{onClick:()=>f("/home"),className:"text-xs text-[#a08a90] hover:text-blush-600 mt-4 underline-offset-2 hover:underline",children:e("zip.browsePickup")})]})]})}function a5({size:e=18}){return u.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12c0 4.24 2.64 7.85 6.36 9.31-.09-.79-.17-2 .03-2.86.18-.78 1.17-4.97 1.17-4.97s-.3-.6-.3-1.48c0-1.39.81-2.43 1.81-2.43.85 0 1.27.64 1.27 1.41 0 .86-.55 2.14-.83 3.33-.24 1 .5 1.81 1.48 1.81 1.78 0 3.14-1.88 3.14-4.58 0-2.4-1.72-4.07-4.19-4.07-2.85 0-4.52 2.14-4.52 4.35 0 .86.33 1.78.74 2.28.08.1.09.19.07.29l-.27 1.13c-.04.18-.14.22-.33.13-1.25-.58-2.03-2.4-2.03-3.87 0-3.15 2.29-6.04 6.6-6.04 3.46 0 6.16 2.47 6.16 5.77 0 3.44-2.17 6.21-5.18 6.21-1.01 0-1.97-.53-2.29-1.15l-.62 2.37c-.23.86-.83 1.94-1.24 2.6.94.29 1.92.44 2.95.44 5.52 0 10-4.48 10-10S17.52 2 12 2z"})})}function BX({size:e=18}){return u.jsxs("svg",{viewBox:"0 0 24 24",width:e,height:e,"aria-hidden":"true",children:[u.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"}),u.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23z"}),u.jsx("path",{fill:"#FBBC05",d:"M5.84 14.1a6.6 6.6 0 0 1 0-4.2V7.06H2.18a11 11 0 0 0 0 9.88l3.66-2.84z"}),u.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1A11 11 0 0 0 2.18 7.06l3.66 2.84C6.71 7.3 9.14 5.38 12 5.38z"})]})}function UX({size:e=18}){return u.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M12.27 13.3l4.45-2.16c.51-.25.66-.92.31-1.36-1.13-1.44-2.7-2.49-4.49-2.99-.55-.15-1.08.27-1.08.84l-.02 5.04c0 .65.72 1.06 1.32.77zM12.6 15.34l4.46 2.13c.51.25 1.13-.07 1.21-.63.25-1.8-.06-3.66-.92-5.31-.27-.51-.96-.6-1.36-.18l-3.5 3.42c-.45.45-.31 1.18.11 1.4v-.84zm-2.59.4l-3.45-3.4c-.41-.4-1.09-.32-1.37.18-.86 1.64-1.18 3.49-.95 5.29.07.56.69.89 1.21.64l4.45-2.12c.6-.29.74-1.02.06-1.43zm.08 2.36l-.02 4.95c0 .57.53.99 1.08.84 1.78-.49 3.34-1.53 4.48-2.96.35-.44.2-1.11-.31-1.36l-4.45-2.15c-.6-.29-1.31.13-1.31.78l.84.01zm-.45-7.1L5.66 7.06c-.43-.7-1.46-.56-1.69.23-.13.45-.22.92-.27 1.4-.16 1.55.05 3.12.61 4.56.21.53.91.62 1.27.13l3.95-5.32c.32-.43.06-1.05-.5-1.16l.39.56z"})})}const FX={instagram:({size:e})=>u.jsx(yk,{size:e}),facebook:({size:e})=>u.jsx(pk,{size:e}),pinterest:a5,google:BX,yelp:UX},VX={instagram:"Instagram",facebook:"Facebook",pinterest:"Pinterest",google:"Google Business",yelp:"Yelp"},HX=["instagram","facebook","pinterest","google","yelp"];function qX({size:e=18,className:t="",iconClass:n=""}){return u.jsx("div",{className:`flex items-center gap-3 ${t}`,children:HX.map(r=>{const a=ke.social[r];if(!a)return null;const i=FX[r];return u.jsx("a",{href:a,target:"_blank",rel:"noreferrer","aria-label":VX[r],className:`transition-colors ${n}`,children:u.jsx(i,{size:e})},r)})})}function KX({url:e,title:t,image:n,className:r=""}){const a=encodeURIComponent(e),i=encodeURIComponent(t||ke.name),s=encodeURIComponent(n||""),o=`https://www.facebook.com/sharer/sharer.php?u=${a}`,l=`https://pinterest.com/pin/create/button/?url=${a}&media=${s}&description=${i}`,c=ke.social.instagram,f=d=>window.open(d,"_blank","noopener,width=640,height=600");return u.jsxs("div",{className:`flex items-center gap-2 ${r}`,children:[u.jsx("span",{className:"text-xs text-[#a08a90]",children:"Share:"}),u.jsx("button",{type:"button",onClick:()=>f(c),"aria-label":"Share on Instagram",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(yk,{size:16})}),u.jsx("button",{type:"button",onClick:()=>f(o),"aria-label":"Share on Facebook",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(pk,{size:16})}),u.jsx("button",{type:"button",onClick:()=>f(l),"aria-label":"Share on Pinterest",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(a5,{size:16})})]})}function GX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Visa",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("text",{x:"24",y:"21",textAnchor:"middle",fontFamily:"Georgia, serif",fontWeight:"700",fontStyle:"italic",fontSize:"13",fill:"#1a1f71",children:"VISA"})]})}function YX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Mastercard",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("circle",{cx:"20",cy:"16",r:"8",fill:"#eb001b"}),u.jsx("circle",{cx:"28",cy:"16",r:"8",fill:"#f79e1b",fillOpacity:"0.85"})]})}function XX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"American Express",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#2e77bb"}),u.jsx("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"9",fill:"#fff",children:"AMEX"})]})}function WX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Discover",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("circle",{cx:"36",cy:"22",r:"9",fill:"#f68121"}),u.jsx("text",{x:"22",y:"19",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"7",fill:"#231f20",children:"DISCOVER"})]})}function QX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Apple Pay",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#000"}),u.jsx("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"-apple-system, Helvetica, sans-serif",fontWeight:"600",fontSize:"9",fill:"#fff",children:" Pay"})]})}function ZX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Google Pay",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsxs("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"9",children:[u.jsx("tspan",{fill:"#4285f4",children:"G"}),u.jsx("tspan",{fill:"#ea4335",children:"o"}),u.jsx("tspan",{fill:"#fbbc05",children:"o"}),u.jsx("tspan",{fill:"#4285f4",children:"g"}),u.jsx("tspan",{fill:"#34a853",children:"l"}),u.jsx("tspan",{fill:"#ea4335",children:"e"}),u.jsx("tspan",{fill:"#5f6368",children:" Pay"})]})]})}const i5={Visa:GX,Mastercard:YX,Amex:XX,Discover:WX,"Apple Pay":QX,"Google Pay":ZX};function s5({items:e,className:t=""}){return u.jsx("div",{className:`flex flex-wrap items-center gap-1.5 ${t}`,children:e.map(n=>{const r=i5[n];return r?u.jsx(r,{},n):u.jsx("span",{className:"text-[10px] bg-cream/10 rounded px-2 py-1",children:n},n)})})}function JX(e){const t=e.replace(/\D/g,"");return t.length<4?"•••• •••• •••• ••••":`•••• •••• •••• ${t.slice(-4)}`}function eW(e){return e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim()}function tW({method:e,onMethod:t,onCardChange:n,cards:r=["Visa","Mastercard","Amex","Discover"],wallets:a=["Apple Pay","Google Pay"]}){const[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(""),[d,h]=A.useState(""),[p,m]=A.useState(!1),g=i.replace(/\D/g,""),b=(v=i,x=o,w=c)=>{const S=v.replace(/\D/g,""),j=S.length>=15&&/^\d{2}\/\d{2}$/.test(x)&&w.replace(/\D/g,"").length>=3;n==null||n({last4:S.slice(-4),expiry:x,complete:j})},y=v=>v==="Apple Pay"?"APPLE_PAY":"GOOGLE_PAY";return u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[u.jsxs("button",{type:"button",onClick:()=>t("CARD"),className:`flex items-center justify-center gap-1.5 py-2.5 rounded-xl border text-sm ${e==="CARD"?"border-bloom bg-petal text-bloom2 font-semibold":"border-blush-100 text-[#6b5258]"}`,children:[u.jsx(WE,{size:16})," Card"]}),a.map(v=>{const x=y(v),w=i5[v];return u.jsx("button",{type:"button",onClick:()=>t(x),className:`flex items-center justify-center py-2 rounded-xl border ${e===x?"border-bloom bg-petal":"border-blush-100"}`,"aria-label":v,children:w?u.jsx(w,{}):u.jsx("span",{className:"text-sm",children:v})},v)})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-[11px] text-gray-400",children:"Accepted:"}),u.jsx(s5,{items:r})]}),e==="CARD"?u.jsxs("div",{className:"rounded-2xl border border-blush-100 p-4 space-y-3 bg-white",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Card number"}),u.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 rounded-xl border border-blush-100 focus-within:border-bloom",children:[u.jsx(WE,{size:16,className:"text-blush-400 shrink-0"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-number",value:p?eW(i):g?JX(i):"",onFocus:()=>m(!0),onBlur:()=>m(!1),onChange:v=>{const x=v.target.value;s(x),b(x)},placeholder:"1234 1234 1234 1234",className:"flex-1 bg-transparent text-sm outline-none tracking-wider"})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Expiry (MM/YY)"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-exp",value:o,onChange:v=>{let x=v.target.value.replace(/\D/g,"").slice(0,4);x.length>=3&&(x=x.slice(0,2)+"/"+x.slice(2)),l(x),b(i,x)},placeholder:"MM/YY",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"CVC"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-csc",value:c,onChange:v=>{const x=v.target.value.replace(/\D/g,"").slice(0,4);f(x),b(i,o,x)},placeholder:"•••",type:"password",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Name on card"}),u.jsx("input",{autoComplete:"cc-name",value:d,onChange:v=>h(v.target.value),placeholder:"Full name",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("p",{className:"flex items-center gap-1 text-[11px] text-gray-400",children:[u.jsx(QE,{size:11})," Card number is masked and never stored on this device. Processed via GUARDiA PaymentGateway."]})]}):u.jsxs("div",{className:"rounded-2xl border border-blush-100 p-4 bg-white",children:[u.jsx("button",{type:"button",className:`w-full py-3 rounded-xl font-semibold flex items-center justify-center gap-2 ${e==="APPLE_PAY"?"bg-black text-white":"bg-white border border-edge text-[#3c4043]"}`,children:e==="APPLE_PAY"?" Pay":"G Pay"}),u.jsxs("p",{className:"flex items-center gap-1 text-[11px] text-gray-400 mt-2",children:[u.jsx(QE,{size:11})," ",e==="APPLE_PAY"?"Apple Pay":"Google Pay"," via secure wallet. If unconfigured, processed as mock at checkout."]})]})]})}const nW=[{to:"/home",key:"home"},{to:"/category",key:"shopAll"},{to:"/category?occasion=ROMANCE",key:"loveRomance"},{to:"/category?occasion=BIRTHDAY",key:"birthday"},{to:"/category?occasion=SYMPATHY",key:"sympathy"},{to:"/daily-standard",key:"todaysBouquet",accent:!0},{to:"/subscription",key:"subscriptions"},{to:"/events",key:"offers"}];function rW(){const{t:e}=ni(),{zip:t,storeName:n,custToken:r,cartCount:a,setCartCount:i}=bn(),s=Kt(),o=jr(),l=ti(),[c,f]=A.useState("");A.useEffect(()=>{if(!r){i(0);return}hj().then(h=>i((h||[]).reduce((p,m)=>p+(m.quantity||1),0))).catch(()=>{})},[r]);const d=h=>{h.preventDefault(),c.trim()&&s(`/search?q=${encodeURIComponent(c.trim())}`)};return u.jsxs("div",{className:"min-h-screen bg-cream text-[#43343a] flex flex-col",children:[u.jsx("div",{className:"bg-sage-700 text-cream/95 text-[12px] tracking-wide",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-9 flex items-center justify-center sm:justify-between gap-3",children:[u.jsxs("span",{className:"hidden sm:flex items-center gap-1.5",children:[u.jsx(ft,{size:13})," ",ke.tagline]}),u.jsxs("span",{className:"flex items-center gap-3",children:[u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(Wa,{size:12,className:"text-gold",fill:"currentColor"})," ",ke.rating,"★ · ",e("shop.topbar.reviews",{n:ke.reviewCount.toLocaleString()})]}),u.jsxs("a",{href:`tel:${ke.phoneTel}`,className:"hidden sm:flex items-center gap-1 hover:text-white",children:[u.jsx(ZE,{size:12})," ",ke.phone]})]})]})}),u.jsxs("header",{className:"sticky top-0 z-30 bg-cream/90 backdrop-blur-md border-b border-blush-100",children:[u.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-[72px] flex items-center gap-4",children:[u.jsxs(Le,{to:"/home",className:"flex items-center gap-2.5 shrink-0",children:[u.jsx(Nt.span,{animate:l?void 0:{rotate:[0,8,-6,0]},transition:{duration:7,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{className:"text-blush-500",size:28})}),u.jsxs("span",{className:"leading-none",children:[u.jsx("span",{className:"block font-serif text-[20px] font-bold text-blush-900 tracking-tight",children:"Montvale"}),u.jsx("span",{className:"block font-display text-[12px] tracking-[0.35em] text-sage-600 uppercase -mt-0.5",children:"Florist"})]})]}),u.jsxs("form",{onSubmit:d,className:"flex-1 max-w-md hidden md:flex items-center bg-white border border-blush-100 rounded-full px-4 py-2.5 shadow-soft",children:[u.jsx(rj,{size:16,className:"text-blush-400"}),u.jsx("input",{value:c,onChange:h=>f(h.target.value),placeholder:e("common.searchPlaceholder"),className:"flex-1 bg-transparent ml-2 text-sm outline-none placeholder:text-blush-300"})]}),u.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-3 ml-auto",children:[u.jsx(ag,{variant:"shop"}),u.jsxs(Le,{to:"/",className:"hidden sm:flex items-center gap-1 text-sm text-sage-700 hover:text-blush-500 transition-colors",children:[u.jsx(dm,{size:15})," ",t?`${t}`:e("shop.header.zip")]}),u.jsx(Le,{to:"/wishlist","aria-label":e("shop.header.wishlist"),className:"p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:u.jsx(Rf,{size:20})}),u.jsxs(Le,{to:"/cart",className:"relative p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:[u.jsx(sj,{size:20}),u.jsx(nx,{children:a>0&&u.jsx(Nt.span,{initial:l?!1:{scale:0},animate:{scale:1},exit:{scale:0},className:"absolute -top-1 -right-1 bg-blush-500 text-white text-[10px] rounded-full min-w-[18px] h-[18px] px-1 flex items-center justify-center",children:a},a)})]}),u.jsx(Le,{to:r?"/mypage":"/account",className:"p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:u.jsx(wk,{size:20})})]})]}),u.jsx("nav",{className:"border-t border-blush-50 bg-white/60",children:u.jsx("div",{className:"max-w-6xl mx-auto px-4 h-11 flex items-center gap-7 text-[13px] overflow-x-auto thin-scroll",children:nW.map(h=>{const p=o.pathname+o.search===h.to||h.to==="/home"&&o.pathname==="/home";return u.jsxs(Le,{to:h.to,className:`relative whitespace-nowrap py-1 transition-colors ${h.accent?"text-sage-700 font-medium":"text-[#6b5258] hover:text-blush-500"} ${p?"text-blush-600":""}`,children:[e(`shop.nav.${h.key}`),p&&u.jsx(Nt.span,{layoutId:"nav-underline",className:"absolute -bottom-[1px] left-0 right-0 h-[2px] bg-blush-500 rounded-full"})]},h.to)})})})]}),u.jsx("main",{className:"flex-1",children:u.jsx(f$,{})}),u.jsxs("footer",{className:"mt-16 bg-sage-800 text-cream/85",children:[u.jsx("div",{className:"botanical-divider py-6 opacity-50",children:u.jsx(ft,{size:16})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 pb-10 grid md:grid-cols-4 gap-8",children:[u.jsxs("div",{className:"md:col-span-1",children:[u.jsx("div",{className:"font-serif text-xl font-bold text-white mb-1",children:"Montvale Florist"}),u.jsx("p",{className:"font-display text-[13px] tracking-[0.3em] uppercase text-sage-300 mb-3",children:e("shop.footer.since",{year:ke.founded})}),u.jsx("p",{className:"text-[13px] leading-relaxed text-cream/70",children:ke.tagline}),u.jsx(qX,{size:18,className:"mt-4 text-cream/80",iconClass:"hover:text-white"})]}),u.jsxs("div",{children:[u.jsx("div",{className:"font-semibold text-white mb-3 text-sm",children:e("shop.footer.visitUs")}),u.jsxs("p",{className:"text-[13px] flex items-start gap-1.5 text-cream/75 mb-1.5",children:[u.jsx(dm,{size:14,className:"mt-0.5 shrink-0"})," ",ke.address]}),u.jsxs("a",{href:`tel:${ke.phoneTel}`,className:"text-[13px] flex items-center gap-1.5 text-cream/75 hover:text-white mb-1.5",children:[u.jsx(ZE,{size:14})," ",ke.phone]}),u.jsx("p",{className:"text-[13px] text-cream/60",children:ke.email})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"font-semibold text-white mb-3 text-sm flex items-center gap-1.5",children:[u.jsx(ck,{size:14})," ",e("shop.footer.hours")]}),ke.hours.map(h=>u.jsxs("div",{className:"text-[13px] text-cream/75 mb-1",children:[u.jsx("span",{className:"inline-block w-20",children:h.day})," ",h.open]},h.day))]}),u.jsxs("div",{children:[u.jsx("div",{className:"font-semibold text-white mb-3 text-sm",children:e("shop.footer.customerCare")}),u.jsxs(Le,{to:"/cs",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.contactAiHelp")]}),u.jsxs(Le,{to:"/orders",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.orderStatus")]}),u.jsxs(Le,{to:"/subscription",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.subscriptions")]}),u.jsxs(Le,{to:"/app",className:"flex items-center gap-1 text-[13px] text-gold hover:text-white mb-3 font-medium",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.getApp")]}),u.jsx("div",{className:"text-[11px] text-cream/50 mb-1.5",children:e("shop.footer.weAccept")}),u.jsx(s5,{items:ke.payments})]})]}),u.jsx("div",{className:"border-t border-cream/10",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex flex-col sm:flex-row items-center justify-between gap-2 text-[11px] text-cream/50",children:[u.jsxs("span",{children:["© 2026 Montvale Florist · ",ke.address]}),u.jsx("span",{className:"flex flex-wrap gap-3",children:ke.policies.map(h=>u.jsx("span",{className:"hover:text-cream/80",children:h},h))})]})})]})]})}function Zl({p:e}){var a;const t=ti(),n=e.salePrice!=null&&e.salePrice>0&&e.salePrice<(e.price||0),r=n?Math.round((1-e.salePrice/e.price)*100):0;return u.jsx(Nt.div,{whileHover:t?void 0:{y:-8},transition:{type:"spring",stiffness:300,damping:24},className:"group h-full",children:u.jsxs(Le,{to:`/product/${e.id}`,className:"block h-full bg-white rounded-3xl overflow-hidden border border-blush-100/70 shadow-soft hover:shadow-bloom transition-shadow duration-500",children:[u.jsxs("div",{className:"relative aspect-[4/5] zoom-frame bg-gradient-to-br from-blush-50 to-ivory flex items-center justify-center",children:[e.thumbnail?u.jsx("img",{src:e.thumbnail,alt:e.name,loading:"lazy",className:"w-full h-full object-cover group-hover:scale-110"}):u.jsx(ft,{className:"text-blush-200",size:56}),n&&u.jsxs("span",{className:"absolute top-3 left-3 bg-blush-500 text-white text-[11px] font-semibold px-2.5 py-1 rounded-full shadow-petal",children:["-",r,"%"]}),e.occasion&&u.jsx("span",{className:"absolute top-3 right-3 bg-white/85 backdrop-blur text-sage-700 text-[10px] uppercase tracking-wide px-2.5 py-1 rounded-full",children:e.occasion}),u.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 bg-gradient-to-t from-blush-900/10 to-transparent"})]}),u.jsxs("div",{className:"p-4",children:[e.brand&&u.jsx("div",{className:"text-[10px] uppercase tracking-[0.12em] text-sage-600 mb-0.5",children:e.brand}),u.jsx("div",{className:"font-serif text-[15px] leading-snug text-blush-900 truncate",children:e.name}),u.jsxs("div",{className:"flex items-center justify-between mt-2",children:[u.jsx("div",{className:"flex items-baseline gap-1.5",children:n?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-blush-600 font-bold",children:Ee(e.salePrice)}),u.jsx("span",{className:"text-gray-400 line-through text-xs",children:Ee(e.price)})]}):u.jsx("span",{className:"font-bold text-blush-900",children:Ee(e.price)})}),e.ratingAvg!=null&&e.reviewCount?u.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-gold",children:[u.jsx(Wa,{size:12,fill:"currentColor"}),(a=e.ratingAvg)==null?void 0:a.toFixed(1)]}):null]})]})]})})}const aW=[wK,ft,aj],iW=6e3;function sW(){const{storeName:e}=bn(),t=ti(),n=A.useRef(null),{scrollYProgress:r}=mq({target:n,offset:["start start","end start"]}),a=Jv(r,[0,1],["0%",t?"0%":"28%"]),i=Jv(r,[0,1],[1,t?1:1.12]),s=Jv(r,[0,.8],[1,t?1:.2]),[o,l]=A.useState(0),[c,f]=A.useState(1),d=lb.length,h=A.useCallback(m=>{f(m>o||o===d-1&&m===0?1:-1),l((m%d+d)%d)},[o,d]);A.useEffect(()=>{if(t)return;const m=setInterval(()=>{f(1),l(g=>(g+1)%d)},iW);return()=>clearInterval(m)},[t,d]);const p=lb[o];return u.jsxs("section",{ref:n,className:"relative overflow-hidden min-h-[78vh] flex items-center",children:[u.jsxs(Nt.div,{style:{y:a,scale:i},className:"absolute inset-0 z-0",children:[u.jsx(nx,{initial:!1,children:u.jsx(Nt.img,{src:p.img,alt:"",className:"absolute inset-0 w-full h-full object-cover",initial:{opacity:0,scale:t?1:1.06},animate:{opacity:1,scale:1},exit:{opacity:0},transition:{duration:t?0:1.1,ease:[.22,1,.36,1]}},p.img)}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blush-900/70 via-blush-900/40 to-transparent"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-sage-900/40 to-transparent"})]}),u.jsx(Kd,{count:16,className:"z-[1]"}),u.jsx(Nt.div,{style:{opacity:s},className:"relative z-10 max-w-6xl mx-auto px-4 w-full py-20",children:u.jsx(nx,{mode:"wait",custom:c,children:u.jsxs(Nt.div,{className:"max-w-xl",custom:c,initial:t?!1:{opacity:0,x:c*36},animate:{opacity:1,x:0},exit:t?{opacity:0}:{opacity:0,x:c*-36},transition:{duration:.7,ease:[.22,1,.36,1]},children:[u.jsxs("div",{className:"inline-flex items-center gap-2 text-cream/90 text-[12px] tracking-[0.25em] uppercase mb-5",children:[u.jsx("span",{className:"h-px w-8 bg-gold"})," ",p.eyebrow]}),u.jsx("h1",{className:"font-serif text-5xl md:text-6xl font-bold text-white leading-[1.05] mb-5 whitespace-pre-line drop-shadow-sm",children:p.headline}),u.jsxs("p",{className:"text-cream/90 text-lg leading-relaxed mb-8 max-w-md font-light",children:[p.subtext,e?` Same-day from ${e}.`:""]}),u.jsxs("div",{className:"flex flex-wrap gap-3",children:[u.jsx(Le,{to:p.to,children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 bg-white text-blush-700 font-semibold px-7 py-3.5 rounded-full shadow-bloom hover:bg-cream",children:[p.cta," ",u.jsx(Es,{size:17})]})}),u.jsx(Le,{to:"/daily-standard",children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 border border-white/70 text-white px-7 py-3.5 rounded-full hover:bg-white/10",children:[u.jsx(ej,{size:16})," Today's Bouquet"]})})]}),u.jsxs("div",{className:"flex items-center gap-2 mt-7 text-cream/85 text-sm",children:[u.jsx("span",{className:"flex text-gold",children:[1,2,3,4,5].map(m=>u.jsx(Wa,{size:15,fill:"currentColor"},m))}),u.jsx("span",{className:"font-medium",children:ke.rating}),u.jsxs("span",{className:"text-cream/60",children:["· ",ke.reviewCount.toLocaleString()," happy customers"]})]})]},o)})}),u.jsx("button",{"aria-label":"Previous slide",onClick:()=>h(o-1),className:"absolute left-3 md:left-5 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 backdrop-blur-sm text-white flex items-center justify-center transition-colors",children:u.jsx(gK,{size:22})}),u.jsx("button",{"aria-label":"Next slide",onClick:()=>h(o+1),className:"absolute right-3 md:right-5 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 backdrop-blur-sm text-white flex items-center justify-center transition-colors",children:u.jsx(Pu,{size:22})}),u.jsx("div",{className:"absolute bottom-7 left-1/2 -translate-x-1/2 z-20 flex items-center gap-2.5",children:lb.map((m,g)=>u.jsx("button",{"aria-label":`Go to slide ${g+1}`,onClick:()=>h(g),className:`h-2.5 rounded-full transition-all duration-300 ${g===o?"w-8 bg-white":"w-2.5 bg-white/45 hover:bg-white/70"}`},g))}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -bottom-6 right-6 z-[2] text-white/20 hidden md:block pointer-events-none",animate:t?void 0:{rotate:[0,5,-4,0],y:[0,-8,0]},transition:{duration:9,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{size:130,strokeWidth:1})})]})}function oW(){var i,s,o;const{data:e}=se({queryKey:["ai-rec"],queryFn:()=>t5("","",8)}),{data:t}=se({queryKey:["best"],queryFn:()=>Ql({sort:"sales",size:8})}),{data:n}=se({queryKey:["feat"],queryFn:()=>Ql({sort:"rating",size:12})}),r=(t==null?void 0:t.items)||[],a=(n==null?void 0:n.items)||[];return u.jsxs("div",{children:[u.jsx(sW,{}),u.jsx("section",{className:"bg-ivory border-b border-blush-100",children:u.jsx("div",{className:"max-w-6xl mx-auto px-4 py-10 grid md:grid-cols-3 gap-6",children:ke.promise.map((l,c)=>{const f=aW[c];return u.jsxs(Gr,{delay:c*.1,className:"flex items-start gap-3",children:[u.jsx("span",{className:"shrink-0 w-11 h-11 rounded-full bg-blush-50 text-blush-500 flex items-center justify-center",children:u.jsx(f,{size:20})}),u.jsxs("div",{children:[u.jsx("div",{className:"font-serif text-lg text-blush-900",children:l.title}),u.jsx("p",{className:"text-sm text-[#6b5258] leading-relaxed mt-0.5",children:l.desc})]})]},l.title)})})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-14 space-y-20",children:[u.jsxs("section",{children:[u.jsxs(Gr,{className:"flex items-end justify-between mb-7",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-600 text-[12px] tracking-[0.2em] uppercase mb-2",children:[u.jsx(xr,{size:15})," Curated by GUARDiA AI · On-premise"]}),u.jsx("h2",{className:"font-serif text-3xl text-blush-900",children:"Picked Just for You"})]}),u.jsxs(Le,{to:"/category",className:"hidden sm:flex items-center gap-1 text-sm text-blush-500 hover:text-blush-700",children:["View all ",u.jsx(Es,{size:15})]})]}),u.jsxs(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:[(e||[]).slice(0,8).map(l=>u.jsx(mm,{children:u.jsx(Zl,{p:l})},l.id)),!(e||[]).length&&u.jsx("div",{className:"col-span-4 text-blush-300 text-sm py-12 text-center",children:"Curating fresh picks…"})]})]}),u.jsx("div",{className:"botanical-divider",children:u.jsx(ft,{size:18})}),u.jsx(Gr,{children:u.jsxs("section",{className:"relative overflow-hidden rounded-4xl bg-gradient-to-br from-sage-700 to-sage-800 text-white",children:[u.jsx(Kd,{count:8}),u.jsxs("div",{className:"relative z-10 p-8 md:p-12 flex flex-col md:flex-row items-center justify-between gap-6",children:[u.jsxs("div",{className:"max-w-lg",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-200 text-[12px] tracking-[0.2em] uppercase mb-3",children:[u.jsx(ej,{size:15})," Farmgirl-style daily"]}),u.jsx("h3",{className:"font-serif text-3xl md:text-4xl font-bold mb-3",children:"Today's Designer Bouquet"}),u.jsx("p",{className:"text-cream/85 leading-relaxed",children:"Made fresh each morning with whatever's most beautiful in the cooler — hand-designed by our florists and curated by GUARDiA AI. Limited daily stock."})]}),u.jsx(Le,{to:"/daily-standard",children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 bg-white text-sage-800 font-semibold px-7 py-3.5 rounded-full shadow-bloom",children:["See today's bouquet ",u.jsx(Es,{size:16})]})})]})]})}),u.jsxs("section",{children:[u.jsxs(Gr,{className:"flex items-end justify-between mb-7",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-600 text-[12px] tracking-[0.2em] uppercase mb-2",children:[u.jsx(Wa,{size:14})," Most loved"]}),u.jsx("h2",{className:"font-serif text-3xl text-blush-900",children:"Bestsellers"})]}),u.jsxs(Le,{to:"/category?sort=sales",className:"hidden sm:flex items-center gap-1 text-sm text-blush-500 hover:text-blush-700",children:["View all ",u.jsx(Es,{size:15})]})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:r.map(l=>u.jsx(mm,{children:u.jsx(Zl,{p:l})},l.id))})]}),u.jsx(Gr,{children:u.jsx("section",{className:"grid md:grid-cols-3 gap-5",children:[{to:"/category?occasion=ROMANCE",label:"Love & Romance",sub:"Roses that speak from the heart",img:(i=a[1])==null?void 0:i.thumbnail},{to:"/category?occasion=SYMPATHY",label:"Sympathy & Comfort",sub:"Thoughtful tributes, gently delivered",img:(s=a[2])==null?void 0:s.thumbnail},{to:"/subscription",label:"Flower Subscriptions",sub:"Fresh blooms, week after week",img:(o=a[3])==null?void 0:o.thumbnail}].map((l,c)=>u.jsxs(Le,{to:l.to,className:"group relative rounded-3xl overflow-hidden zoom-frame aspect-[5/4] block shadow-soft",children:[l.img?u.jsx("img",{src:l.img,alt:"",loading:"lazy",className:"w-full h-full object-cover group-hover:scale-110"}):u.jsx("div",{className:"w-full h-full bg-gradient-to-br from-blush-100 to-sage-100"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-blush-900/75 via-blush-900/20 to-transparent"}),u.jsxs("div",{className:"absolute bottom-0 left-0 p-6 text-white",children:[u.jsx("div",{className:"font-serif text-xl font-semibold mb-0.5",children:l.label}),u.jsx("p",{className:"text-cream/85 text-sm",children:l.sub}),u.jsxs("span",{className:"inline-flex items-center gap-1 text-[13px] text-gold mt-2 group-hover:gap-2 transition-all",children:["Explore ",u.jsx(Es,{size:14})]})]})]},l.to))})}),u.jsx(Gr,{children:u.jsxs("section",{className:"rounded-4xl bg-blush-50 border border-blush-100 p-8 md:p-10 text-center",children:[u.jsx("div",{className:"flex justify-center mb-4",children:u.jsx("span",{className:"w-12 h-12 rounded-full bg-white text-blush-500 flex items-center justify-center shadow-soft",children:u.jsx(Ud,{size:22})})}),u.jsxs("h3",{className:"font-serif text-2xl text-blush-900 mb-2",children:["Your Local Florist Since ",ke.founded]}),u.jsx("p",{className:"text-[#6b5258] max-w-xl mx-auto leading-relaxed text-[15px]",children:ke.about}),u.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 mt-5 text-[12px] text-sage-700",children:[u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"Same-Day Delivery"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"Hand-Delivered"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"100% Satisfaction"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"No-Contact Available"})]})]})})]})]})}const gT=[["","All"],["BIRTHDAY","Birthday"],["ANNIVERSARY","Anniversary"],["SYMPATHY","Sympathy"],["CONGRATS","Congrats"],["ROMANCE","Romance"]],lW=[["","Recommended"],["price_asc","Price ↑"],["price_desc","Price ↓"],["sales","Bestselling"],["rating","Top rated"]];function cW(){var b;const[e,t]=m$(),n=e.get("occasion")||"",[r,a]=A.useState(e.get("sort")||""),[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(null);se({queryKey:["cats"],queryFn:PY});const{data:d}=se({queryKey:["products",n,r,i],queryFn:()=>Ql({occasion:n,sort:r,maxPrice:i?Number(i):void 0,size:24})}),h=c?c.items:(d==null?void 0:d.items)||[],p=y=>{const v=new URLSearchParams(e);y?v.set("occasion",y):v.delete("occasion"),t(v),f(null)},m=async y=>{if(y.preventDefault(),!o.trim()){f(null);return}const v=await n5(o.trim()).catch(()=>null);f(v)},g=((b=gT.find(y=>y[0]===n))==null?void 0:b[1])||"All";return u.jsxs("div",{children:[u.jsx("section",{className:"bg-gradient-to-br from-blush-50 to-ivory border-b border-blush-100",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10",children:[u.jsx("div",{className:"text-[12px] tracking-[0.2em] uppercase text-sage-600 mb-2",children:"Shop the collection"}),u.jsx("h1",{className:"font-serif text-4xl text-blush-900",children:g==="All"?"All Flowers":g})]})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("form",{onSubmit:m,className:"flex items-center gap-2 bg-white border border-blush-100 rounded-full px-5 py-3 mb-6 max-w-xl shadow-soft",children:[u.jsx(xr,{size:16,className:"text-blush-500"}),u.jsx("input",{value:o,onChange:y=>l(y.target.value),placeholder:'Try "anniversary roses under $80"',className:"flex-1 text-sm outline-none bg-transparent placeholder:text-blush-300"}),u.jsx("button",{className:"text-blush-500 text-sm font-semibold",children:"AI Search"})]}),c&&u.jsxs("div",{className:"text-xs text-sage-700 mb-4",children:["AI understood: ",u.jsx("span",{className:"font-medium",children:JSON.stringify(c.parsed)})," · ",c.source]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-7",children:[gT.map(([y,v])=>u.jsx("button",{onClick:()=>p(y),className:`px-4 py-1.5 rounded-full text-sm border transition-colors ${n===y?"bg-blush-500 text-white border-blush-500":"bg-white text-[#6b5258] border-blush-100 hover:border-blush-300"}`,children:v},y)),u.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[u.jsx(CK,{size:15,className:"text-blush-300"}),u.jsx("input",{value:i,onChange:y=>{s(y.target.value.replace(/\D/g,"")),f(null)},placeholder:"Max $",className:"w-24 px-3 py-1.5 rounded-full border border-blush-100 text-sm outline-none focus:border-blush-300"}),u.jsx("select",{value:r,onChange:y=>{a(y.target.value),f(null)},className:"px-3 py-1.5 rounded-full border border-blush-100 text-sm outline-none bg-white",children:lW.map(([y,v])=>u.jsx("option",{value:y,children:v},y))})]})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:h.map(y=>u.jsx(mm,{children:u.jsx(Zl,{p:y})},y.id))}),!h.length&&u.jsxs(Gr,{className:"text-center text-blush-300 py-20",children:[u.jsx(ft,{size:40,className:"mx-auto mb-3 text-blush-200"}),"No flowers match those filters."]})]})]})}function uW(){const{t:e}=ni(),[t]=m$(),n=t.get("q")||"",{data:r,isLoading:a}=se({queryKey:["nl-search",n],queryFn:()=>n5(n),enabled:!!n}),i=(r==null?void 0:r.items)||[];return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(xr,{className:"text-bloom",size:20}),u.jsx("h1",{className:"font-serif text-2xl font-bold",children:e("search.resultsFor",{query:n})})]}),(r==null?void 0:r.parsed)&&u.jsxs("div",{className:"text-xs text-bloom2 mb-5",children:[e("search.aiUnderstood")," ",u.jsx("span",{className:"font-medium",children:JSON.stringify(r.parsed)})," · ",r.source]}),a&&u.jsx("div",{className:"text-gray-400 py-10 text-center",children:e("search.searching")}),u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:i.map(s=>u.jsx(Zl,{p:s},s.id))}),!a&&!i.length&&u.jsx("div",{className:"text-center text-gray-400 py-16",children:e("search.noResults")})]})}function fW(){var te,Z,ye;const{id:e}=o$(),t=Number(e),n=Kt(),r=ti(),{custToken:a,setCartCount:i}=bn(),[s,o]=A.useState(""),[l,c]=A.useState(null),[f,d]=A.useState(null),[h,p]=A.useState(""),[m,g]=A.useState(1),[b,y]=A.useState(""),[v,x]=A.useState(!1),[w,S]=A.useState(null),{data:j}=se({queryKey:["product",t],queryFn:()=>CY(t)}),{data:O}=se({queryKey:["reviews",t],queryFn:()=>WY(t)}),{data:E}=se({queryKey:["rstats",t],queryFn:()=>QY(t)}),{data:T}=se({queryKey:["aisum",t],queryFn:()=>cX(t)});if(!j)return u.jsx("div",{className:"max-w-6xl mx-auto px-4 py-24 text-center text-blush-300",children:"Loading…"});const N=j.sizes||[],M=N.find(J=>J.sizeCode===s)||N[0],C=j.options||[],L=C.filter(J=>J.optionType==="VASE"),D=C.filter(J=>J.optionType==="WRAP"),$=J=>C.find(st=>st.id===J),P=M?M.price:j.salePrice&&j.salePrice>0?j.salePrice:j.price,k=(((te=$(l))==null?void 0:te.extraPrice)||0)+(((Z=$(f))==null?void 0:Z.extraPrice)||0),I=(P+k)*m,F=w||j.thumbnail,H=async()=>{if(!a){n("/account");return}try{await LY({productId:j.id,optionId:l||f||null,sizeCode:(M==null?void 0:M.sizeCode)||"",cardMessage:h,quantity:m}),i(J=>J+m),y("Added to your cart.")}catch{y("Could not add to cart.")}},Y=async()=>{await H(),n("/cart")},q=async()=>{if(!a){n("/account");return}x(!0),setTimeout(()=>x(!1),700),await rX(j.id).catch(()=>{}),y("Saved to your wishlist.")};return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10",children:[u.jsxs("div",{className:"grid md:grid-cols-2 gap-10",children:[u.jsxs(Gr,{children:[u.jsx("div",{className:"relative aspect-[4/5] rounded-4xl overflow-hidden bg-gradient-to-br from-blush-50 to-ivory flex items-center justify-center shadow-soft",children:F?u.jsx(Nt.img,{src:F,alt:j.name,initial:r?!1:{opacity:0,scale:1.04},animate:{opacity:1,scale:1},transition:{duration:.6},className:"w-full h-full object-cover"},F):u.jsx(ft,{className:"text-blush-200",size:96})}),!!(j.images||[]).length&&u.jsxs("div",{className:"flex gap-2 mt-3",children:[u.jsx("button",{onClick:()=>S(null),className:`w-16 h-16 rounded-2xl overflow-hidden border-2 ${w?"border-blush-100":"border-blush-400"}`,children:j.thumbnail?u.jsx("img",{src:j.thumbnail,className:"w-full h-full object-cover"}):u.jsx(ft,{className:"text-blush-200 m-auto",size:20})}),j.images.map((J,st)=>u.jsx("button",{onClick:()=>S(J),className:`w-16 h-16 rounded-2xl overflow-hidden border-2 ${w===J?"border-blush-400":"border-blush-100"}`,children:u.jsx("img",{src:J,className:"w-full h-full object-cover"})},st))]})]}),u.jsxs(Gr,{delay:.1,children:[j.brand&&u.jsx("div",{className:"text-[11px] uppercase tracking-[0.2em] text-sage-600 mb-1",children:j.brand}),u.jsx("h1",{className:"font-serif text-3xl font-bold text-blush-900 mb-2 leading-tight",children:j.name}),u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gold mb-4",children:[u.jsx(Wa,{size:15,fill:"currentColor"})," ",((ye=j.ratingAvg)==null?void 0:ye.toFixed(1))||"–",u.jsxs("span",{className:"text-[#a08a90]",children:["(",j.reviewCount||0," reviews)"]}),j.occasion&&u.jsx("span",{className:"text-xs bg-blush-50 text-blush-700 px-2.5 py-0.5 rounded-full ml-1",children:j.occasion})]}),u.jsx("p",{className:"text-[#6b5258] text-[15px] mb-6 leading-relaxed",children:j.description}),!!N.length&&u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Choose your size"}),u.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:N.map(J=>u.jsxs(Ua,{onClick:()=>o(J.sizeCode),className:`rounded-2xl border p-3 text-center transition-colors ${(M==null?void 0:M.sizeCode)===J.sizeCode?"border-blush-400 bg-blush-50":"border-blush-100 hover:border-blush-300"}`,children:[u.jsx("div",{className:"font-semibold text-sm text-blush-900",children:J.label}),u.jsxs("div",{className:"text-xs text-[#8a7077]",children:[J.stemCount," stems"]}),u.jsx("div",{className:"text-blush-600 font-bold text-sm mt-1",children:Ee(J.price)})]},J.sizeCode))})]}),!!L.length&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Add a vase"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Ch,{active:l===null,onClick:()=>c(null),children:"No vase"}),L.map(J=>u.jsxs(Ch,{active:l===J.id,onClick:()=>c(J.id),children:[J.optionValue," +",Ee(J.extraPrice)]},J.id))]})]}),!!D.length&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Wrapping"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Ch,{active:f===null,onClick:()=>d(null),children:"Standard"}),D.map(J=>u.jsxs(Ch,{active:f===J.id,onClick:()=>d(J.id),children:[J.optionValue," +",Ee(J.extraPrice)]},J.id))]})]}),u.jsxs("div",{className:"mb-5",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("span",{className:"text-sm font-medium text-blush-900",children:"Card message"}),u.jsxs(Le,{to:"/cs",className:"text-xs text-blush-500 flex items-center gap-1",children:[u.jsx(xr,{size:12})," AI message helper"]})]}),u.jsx("textarea",{value:h,onChange:J=>p(J.target.value),rows:2,maxLength:200,placeholder:"Write a heartfelt note for the recipient…",className:"w-full px-3.5 py-2.5 rounded-2xl border border-blush-100 text-sm outline-none focus:border-blush-400"})]}),u.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[u.jsxs("div",{className:"flex items-center border border-blush-100 rounded-full",children:[u.jsx("button",{onClick:()=>g(J=>Math.max(1,J-1)),className:"px-3.5 py-1.5 text-blush-600",children:"−"}),u.jsx("span",{className:"px-2 text-sm w-8 text-center",children:m}),u.jsx("button",{onClick:()=>g(J=>J+1),className:"px-3.5 py-1.5 text-blush-600",children:"+"})]}),u.jsx("div",{className:"font-serif text-2xl font-bold text-blush-900",children:Ee(I)})]}),b&&u.jsx("div",{className:"text-sm text-sage-700 mb-3",children:b}),u.jsxs("div",{className:"flex gap-3",children:[u.jsxs(Ua,{onClick:H,className:"flex-1 flex items-center justify-center gap-2 border border-blush-400 text-blush-600 font-semibold py-3.5 rounded-full hover:bg-blush-50",children:[u.jsx(sj,{size:18})," Add to Cart"]}),u.jsx(Ua,{onClick:Y,className:"flex-1 bg-blush-500 text-white font-semibold py-3.5 rounded-full hover:bg-blush-600 shadow-petal",children:"Buy Now"}),u.jsx("button",{onClick:q,className:`px-4 border border-blush-100 rounded-full text-blush-500 hover:bg-blush-50 ${v?"animate-heartbeat":""}`,children:u.jsx(Rf,{size:18,fill:v?"currentColor":"none"})})]}),u.jsxs("div",{className:"flex items-center gap-5 mt-5 text-xs text-sage-700",children:[u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(Ud,{size:14})," Same-day local delivery"]}),u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(aj,{size:14})," 100% satisfaction"]})]}),u.jsx("div",{className:"mt-4 pt-4 border-t border-blush-100/60",children:u.jsx(KX,{url:typeof window<"u"?window.location.href:"",title:j.name,image:j.thumbnail||""})})]})]}),u.jsxs("div",{className:"mt-16",children:[u.jsx("div",{className:"botanical-divider mb-8",children:u.jsx(ft,{size:16})}),u.jsxs("h2",{className:"font-serif text-2xl font-bold text-blush-900 mb-5",children:["Reviews (",(E==null?void 0:E.count)??j.reviewCount??0,")"]}),(T==null?void 0:T.summary)&&u.jsxs(Gr,{className:"bg-gradient-to-br from-blush-50 to-sage-50 border border-blush-100 rounded-3xl p-5 mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2 text-blush-700 font-medium text-sm mb-1.5",children:[u.jsx(xr,{size:15})," AI Review Summary ",u.jsx("span",{className:"text-xs text-[#a08a90]",children:T.source})]}),u.jsx("p",{className:"text-sm text-[#5a474d] leading-relaxed",children:T.summary})]}),u.jsxs("div",{className:"space-y-3",children:[(O||[]).map(J=>u.jsxs("div",{className:"bg-white rounded-3xl border border-blush-100/70 p-5 shadow-soft",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"font-medium text-sm text-blush-900",children:J.title||"Review"}),u.jsxs("span",{className:"flex items-center gap-0.5 text-gold text-sm",children:[u.jsx(Wa,{size:13,fill:"currentColor"}),J.rating]})]}),u.jsx("p",{className:"text-sm text-[#6b5258] mt-1.5 leading-relaxed",children:J.content})]},J.id)),!(O||[]).length&&u.jsx("div",{className:"text-blush-300 text-sm py-8 text-center",children:"No reviews yet — be the first."})]}),u.jsx(Le,{to:`/review/${j.id}`,className:"inline-flex items-center gap-1 mt-5 text-sm text-blush-500 font-semibold hover:text-blush-700",children:"Write a review →"})]})]})}function Ch({active:e,onClick:t,children:n}){return u.jsx("button",{onClick:t,className:`px-3.5 py-1.5 rounded-full text-sm border transition-colors ${e?"bg-blush-500 text-white border-blush-500":"border-blush-100 text-[#6b5258] hover:border-blush-300"}`,children:n})}function dW(){const{t:e}=ni(),t=nn(),n=Kt(),{custToken:r,setCartCount:a}=bn(),{data:i}=se({queryKey:["cart"],queryFn:hj,enabled:!!r}),s=()=>t.invalidateQueries({queryKey:["cart"]}),o=async(d,h)=>{h<1||(await zY(d,h),s())},l=async d=>{await IY(d),s(),a(h=>Math.max(0,h-1))};if(!r)return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-20 text-center",children:[u.jsx(sj,{className:"mx-auto text-bloom/40 mb-3",size:48}),u.jsx("p",{className:"text-gray-500 mb-4",children:e("cart.signInPrompt")}),u.jsx(Le,{to:"/account",className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:e("cart.signInRegister")})]});const c=i||[],f=c.reduce((d,h)=>d+(h.price||(h.unitPrice||0)*(h.quantity||1)),0);return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsx("h1",{className:"font-serif text-2xl font-bold mb-6",children:e("cart.title")}),c.length?u.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[u.jsx("div",{className:"md:col-span-2 space-y-3",children:c.map(d=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex gap-4",children:[u.jsx("div",{className:"w-20 h-20 bg-petal rounded-xl flex items-center justify-center overflow-hidden shrink-0",children:d.thumbnail?u.jsx("img",{src:d.thumbnail,className:"w-full h-full object-cover"}):u.jsx(ft,{className:"text-bloom/30",size:32})}),u.jsxs("div",{className:"flex-1",children:[u.jsx("div",{className:"font-medium text-sm",children:d.productName||`Product #${d.productId}`}),u.jsxs("div",{className:"text-xs text-gray-500",children:[d.sizeCode,d.cardMessage?` · ${e("cart.card")}: ${d.cardMessage.slice(0,20)}`:""]}),u.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[u.jsxs("div",{className:"flex items-center border border-blush-100 rounded-full text-sm",children:[u.jsx("button",{onClick:()=>o(d.id,(d.quantity||1)-1),className:"px-2.5 py-1 text-bloom2",children:"−"}),u.jsx("span",{className:"px-1 w-6 text-center",children:d.quantity||1}),u.jsx("button",{onClick:()=>o(d.id,(d.quantity||1)+1),className:"px-2.5 py-1 text-bloom2",children:"+"})]}),u.jsx("button",{onClick:()=>l(d.id),className:"text-blush-400 hover:text-blush-600",children:u.jsx(PK,{size:16})})]})]}),u.jsx("div",{className:"font-bold text-bloom2 text-sm",children:Ee(d.price||(d.unitPrice||0)*(d.quantity||1))})]},d.id))}),u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 h-fit",children:[u.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[u.jsx("span",{className:"text-gray-500",children:e("cart.subtotal")}),u.jsx("span",{className:"font-medium",children:Ee(f)})]}),u.jsxs("div",{className:"flex justify-between text-sm mb-3",children:[u.jsx("span",{className:"text-gray-500",children:e("cart.shippingTax")}),u.jsx("span",{className:"text-gray-400",children:e("cart.calcAtCheckout")})]}),u.jsxs("div",{className:"border-t border-blush-100/60 pt-3 flex justify-between font-bold",children:[u.jsx("span",{children:e("cart.total")}),u.jsx("span",{className:"text-bloom2",children:Ee(f)})]}),u.jsx("button",{onClick:()=>n("/checkout"),className:"w-full mt-4 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2",children:e("cart.checkout")})]})]}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:[e("cart.empty")," ",u.jsx(Le,{to:"/category",className:"text-bloom",children:e("cart.startShopping")})]})]})}function hW(e){const t=[],n=new Date;for(let r=0;rSo(!0)}),{data:st}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!t}),{data:Ve}=se({queryKey:["holidays"],queryFn:Wk}),{data:G}=se({queryKey:["avail",o,c],queryFn:()=>$Y(o,c),enabled:!!o&&!!c});A.useEffect(()=>{!o&&(J!=null&&J.length)&&l(J[0].id)},[J]);const oe=ye||[],X=oe.reduce((le,zt)=>le+(zt.price||(zt.unitPrice||0)*(zt.quantity||1)),0),V=G!=null&&G.surgeMultiplier&&G.surgeMultiplier>1?X*(G.surgeMultiplier-1):0,_e=((Co=st==null?void 0:st.benefit)==null?void 0:Co.discountRate)||0,ge=X*(_e/100),Xe=(k==null?void 0:k.taxAmount)||0,ot=(st==null?void 0:st.pointBalance)||0,dt=Math.min(ot,Math.floor(X)),Rn=Math.max(0,X+V+Xe-ge-T),oi=A.useMemo(()=>new Set((Ve||[]).filter(le=>le.blocked).map(le=>le.holidayDate)),[Ve]),No=async()=>{if(!y||!x)return;const le=await oX(y,x).catch(()=>null);P(le)},pa=async()=>{var Er;const le=((Er=J==null?void 0:J.find(nh=>nh.id===o))==null?void 0:Er.state)||"",zt=await sX(X,x||"",le).catch(()=>null);I(zt)};A.useEffect(()=>{X>0&&o&&pa()},[X,o,x]);const ma=async()=>{var le,zt;if(Z(""),!t){e("/account");return}if(!oe.length){Z("Your cart is empty.");return}if(!c||!d){Z("Please select a delivery/pickup date and time slot.");return}if(i==="DELIVERY"&&(!y||!p)){Z("Please enter the recipient and delivery address.");return}if(M==="CARD"&&!L.complete){Z("Please enter your card details.");return}H(!0);try{const Er=await UY({storeId:o,fulfillmentType:i,receiverName:p,receiverPhone:g,address:i==="DELIVERY"?y:"",deliveryZip:x,scheduledDate:c,slotId:d.id,slotLabel:d.label,cardMessage:S,memo:O,couponId:null,discountAmount:Math.round((ge+T)*100)/100,taxAmount:Xe,surgeAmount:Math.round(V*100)/100});await VY({orderId:Er.id,amount:Rn,method:M,usePoints:T,cardLast4:M==="CARD"?L.last4:""}).catch(()=>{}),a(0),q(Er)}catch(Er){Z(((zt=(le=Er==null?void 0:Er.response)==null?void 0:le.data)==null?void 0:zt.message)||"Order failed. Please try again in a moment.")}finally{H(!1)}};return t?Y?u.jsxs("div",{className:"max-w-lg mx-auto px-4 py-20 text-center",children:[u.jsx(vK,{className:"mx-auto text-leaf mb-4",size:56}),u.jsx("h1",{className:"font-serif text-2xl font-bold mb-2",children:"Your order has been placed"}),u.jsxs("p",{className:"text-gray-500 mb-1",children:["Order Number ",u.jsx("span",{className:"font-semibold text-bloom2",children:Y.orderNo||`#${Y.id}`})]}),u.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:[c," · ",d==null?void 0:d.label," · ",Ee(Rn)]}),u.jsxs("div",{className:"flex gap-3 justify-center",children:[u.jsx("button",{onClick:()=>e("/orders"),className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Order History"}),u.jsx("button",{onClick:()=>e("/home"),className:"border border-blush-100 px-6 py-2.5 rounded-full text-bloom2",children:"Continue Shopping"})]})]}):u.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[u.jsx("h1",{className:"font-serif text-2xl font-bold mb-6",children:"Checkout"}),u.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[u.jsxs("div",{className:"md:col-span-2 space-y-5",children:[u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Fulfillment Method"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("button",{onClick:()=>s("DELIVERY"),className:`flex items-center gap-2 justify-center py-3 rounded-xl border ${i==="DELIVERY"?"border-bloom bg-petal text-bloom2":"border-blush-100"}`,children:[u.jsx(Ud,{size:18})," Local Delivery"]}),u.jsxs("button",{onClick:()=>s("PICKUP"),className:`flex items-center gap-2 justify-center py-3 rounded-xl border ${i==="PICKUP"?"border-bloom bg-petal text-bloom2":"border-blush-100"}`,children:[u.jsx(Bd,{size:18})," Store Pickup"]})]}),u.jsxs("div",{className:"mt-3",children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Store"}),u.jsx("select",{value:o,onChange:le=>l(Number(le.target.value)),className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:(J||[]).map(le=>u.jsxs("option",{value:le.id,children:[le.name," (",le.city,", ",le.state,")"]},le.id))})]})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold mb-3",children:[u.jsx(yK,{size:16,className:"text-bloom"})," Delivery / Pickup Date"]}),u.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2",children:hW(14).map(le=>{const zt=oi.has(le),Er=c===le,nh=new Date(le);return u.jsxs("button",{disabled:zt,onClick:()=>{f(le),h(null)},className:`shrink-0 w-16 py-2 rounded-xl border text-center text-xs ${zt?"opacity-30 cursor-not-allowed border-blush-100":Er?"border-bloom bg-bloom text-white":"border-blush-100 hover:border-bloom"}`,children:[u.jsx("div",{className:"font-semibold",children:nh.toLocaleDateString("en-US",{weekday:"short"})}),u.jsx("div",{className:"text-base",children:nh.getDate()}),zt&&u.jsx("div",{className:"text-[9px]",children:"Closed"})]},le)})}),c&&G&&u.jsxs("div",{className:"mt-3",children:[G.blocked&&u.jsxs("div",{className:"flex items-center gap-1.5 text-blush-500 text-xs mb-2",children:[u.jsx(RK,{size:13})," Delivery is unavailable on this date (peak season / closed)."]}),G.surgeMultiplier>1&&u.jsxs("div",{className:"text-xs text-amber-600 mb-2",children:["⚡ Peak-season surge pricing ×",G.surgeMultiplier," applied"]}),G.sameDayAvailable&&u.jsxs("div",{className:"text-xs text-leaf mb-2",children:["Same-Day Delivery available (order by ",G.sameDayCutoff,")"]}),u.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium mb-2",children:[u.jsx(ck,{size:14,className:"text-bloom"})," Delivery Time Slot"]}),u.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[(G.slots||[]).map(le=>{const zt=le.available===!1||le.capacity!=null&&le.booked>=le.capacity;return u.jsx("button",{disabled:zt,onClick:()=>h({id:le.id,label:le.slotLabel}),className:`py-2 rounded-lg border text-xs ${zt?"opacity-30 cursor-not-allowed":(d==null?void 0:d.id)===le.id?"border-bloom bg-petal text-bloom2 font-semibold":"border-blush-100 hover:border-bloom"}`,children:le.slotLabel},le.id)}),!(G.slots||[]).length&&u.jsx("div",{className:"col-span-3 text-gray-400 text-xs py-2",children:"No time slots available."})]})]})]}),i==="DELIVERY"&&u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3",children:[u.jsx("div",{className:"text-sm font-semibold",children:"Recipient Information"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx("input",{value:p,onChange:le=>m(le.target.value),placeholder:"Recipient Name",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:g,onChange:le=>b(le.target.value),placeholder:"Phone",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{value:y,onChange:le=>v(le.target.value),placeholder:"Delivery Address",className:"flex-1 px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:x,onChange:le=>w(le.target.value.replace(/\D/g,"").slice(0,5)),placeholder:"ZIP",className:"w-24 px-3 py-2 rounded-xl border border-blush-100 text-sm text-center outline-none focus:border-bloom"}),u.jsxs("button",{onClick:No,className:"px-3 rounded-xl border border-bloom text-bloom text-sm font-semibold flex items-center gap-1",children:[u.jsx(dm,{size:14})," Verify"]})]}),$&&u.jsx("div",{className:`text-xs ${$.valid?"text-leaf":"text-blush-500"}`,children:$.valid?`Verified: ${$.normalized||y} (${$.provider})`:`Address verification failed (${$.provider})`})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("div",{className:"text-sm font-semibold",children:"Gift Card Message"}),u.jsxs("span",{className:"text-xs text-bloom flex items-center gap-1",children:[u.jsx(xr,{size:12})," AI writing is on the product page"]})]}),u.jsx("textarea",{value:S,onChange:le=>j(le.target.value),rows:2,maxLength:200,placeholder:"Message for the recipient",className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:O,onChange:le=>E(le.target.value),placeholder:"Special Instructions (optional)",className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Payment Method"}),u.jsx(tW,{method:M,onMethod:C,onCardChange:D,cards:ke.cards,wallets:ke.wallets})]})]}),u.jsxs("aside",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 h-fit sticky top-20",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Order Summary"}),u.jsxs("div",{className:"space-y-1.5 text-sm",children:[u.jsx(fu,{k:"Subtotal",v:Ee(X)}),V>0&&u.jsx(fu,{k:"Surge Pricing",v:`+${Ee(V)}`,amber:!0}),u.jsx(fu,{k:"Tax",v:Ee(Xe),sub:k?`${k.provider} ${(k.rate*100).toFixed(1)}%`:""}),ge>0&&u.jsx(fu,{k:`Tier Discount (${(st==null?void 0:st.tierName)||""} ${_e}%)`,v:`-${Ee(ge)}`,green:!0}),T>0&&u.jsx(fu,{k:"Points Used",v:`-${Ee(T)}`,green:!0})]}),!!t&&u.jsxs("div",{className:"mt-4 bg-petal rounded-xl p-3",children:[u.jsxs("div",{className:"flex items-center justify-between text-xs text-bloom2 mb-1",children:[u.jsxs("span",{children:["Points Balance ",ot.toLocaleString()," pts"]}),u.jsx("button",{onClick:()=>N(dt),className:"text-bloom font-semibold",children:"Use All"})]}),u.jsx("input",{type:"range",min:0,max:dt,value:T,onChange:le=>N(Number(le.target.value)),className:"w-full accent-bloom"}),u.jsxs("div",{className:"text-xs text-gray-500 text-right",children:[T.toLocaleString()," pts used"]})]}),u.jsxs("div",{className:"border-t border-blush-100/60 mt-4 pt-3 flex justify-between font-bold text-base",children:[u.jsx("span",{children:"Order Total"}),u.jsx("span",{className:"text-bloom2",children:Ee(Rn)})]}),te&&u.jsx("div",{className:"text-blush-500 text-xs mt-3",children:te}),u.jsx("button",{onClick:ma,disabled:F,className:"w-full mt-4 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2 disabled:opacity-60",children:F?"Processing…":`Place Order · ${Ee(Rn)}`}),u.jsx("p",{className:"text-[11px] text-gray-400 text-center mt-2",children:"Payments processed via GUARDiA PaymentGateway (secure adapter) · Card details not stored"})]})]})]}):(e("/account"),null)}function fu({k:e,v:t,sub:n,amber:r,green:a}){return u.jsxs("div",{className:"flex justify-between",children:[u.jsxs("span",{className:"text-gray-500",children:[e,n&&u.jsx("span",{className:"text-[10px] text-gray-400 ml-1",children:n})]}),u.jsx("span",{className:r?"text-amber-600":a?"text-leaf":"font-medium",children:t})]})}const mW={PAID:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",CONFIRMED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",DELIVERED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",COMPLETED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",APPROVED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",PUBLISHED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",ACTIVE:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",RESOLVED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",SHIPPED:"bg-sky-500/15 text-sky-400 border-sky-500/30",PREPARING:"bg-sky-500/15 text-sky-400 border-sky-500/30",REQUESTED:"bg-sky-500/15 text-sky-400 border-sky-500/30",IN_PROGRESS:"bg-sky-500/15 text-sky-400 border-sky-500/30",PENDING:"bg-amber-500/15 text-amber-400 border-amber-500/30",PAUSED:"bg-amber-500/15 text-amber-400 border-amber-500/30",OPEN:"bg-amber-500/15 text-amber-400 border-amber-500/30",DRAFT:"bg-slate-500/15 text-slate-400 border-slate-500/30",ENDED:"bg-slate-600/20 text-slate-400 border-slate-600/30",CANCELLED:"bg-slate-600/20 text-slate-400 border-slate-600/30",REJECTED:"bg-rose-500/15 text-rose-400 border-rose-500/30",REFUNDED:"bg-rose-500/15 text-rose-400 border-rose-500/30",FAILED:"bg-rose-500/15 text-rose-400 border-rose-500/30",BASIC:"bg-slate-500/15 text-slate-300 border-slate-500/30",SILVER:"bg-slate-300/20 text-slate-200 border-slate-300/30",GOLD:"bg-amber-400/15 text-amber-300 border-amber-400/30",VIP:"bg-violet-500/15 text-violet-300 border-violet-500/30"},yW={PENDING:"Pending",PAID:"Paid",PREPARING:"Preparing",SHIPPED:"Out for Delivery",DELIVERED:"Delivered",CONFIRMED:"Confirmed",CANCELLED:"Cancelled",REFUNDED:"Refunded",ACTIVE:"Active",PAUSED:"Paused",REQUESTED:"Requested",APPROVED:"Approved",REJECTED:"Rejected",COMPLETED:"Completed",PUBLISHED:"Published",DRAFT:"Draft",ENDED:"Ended",OPEN:"Open",IN_PROGRESS:"Processing",RESOLVED:"Resolved"};function Ur({status:e}){if(!e)return null;const t=mW[e]||"bg-slate-500/15 text-slate-400 border-slate-500/30";return u.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs font-medium border ${t}`,children:yW[e]||e})}const vT=[["WEEKLY","Weekly"],["BIWEEKLY","Every 2 Weeks"],["MONTHLY","Monthly"]];function gW(){const e=nn(),t=Kt(),{custToken:n,storeId:r}=bn(),[a,i]=A.useState("WEEKLY"),[s,o]=A.useState(0),[l,c]=A.useState(!1),{data:f}=se({queryKey:["subs"],queryFn:HY,enabled:!!n}),{data:d}=se({queryKey:["stores"],queryFn:()=>So(!0)}),{data:h}=se({queryKey:["sub-prods"],queryFn:()=>Ql({size:12,sort:"sales"})}),p=(h==null?void 0:h.items)||[],m=async()=>{var x;if(!n){t("/account");return}const y=r||((x=d==null?void 0:d[0])==null?void 0:x.id),v=p.find(w=>w.id===s)||p[0];v&&(await qY({storeId:y,productId:v.id,sizeCode:"ORIGINAL",frequency:a,receiverName:"",receiverPhone:"",address:"",deliveryZip:"",price:v.price}).catch(()=>{}),c(!1),e.invalidateQueries({queryKey:["subs"]}))},g=async(y,v)=>{await mT(y,v==="ACTIVE"?"PAUSED":"ACTIVE").catch(()=>{}),e.invalidateQueries({queryKey:["subs"]})},b=async y=>{await mT(y,"CANCELLED").catch(()=>{}),e.invalidateQueries({queryKey:["subs"]})};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Qy,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"Flower Subscription"})]}),u.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Get fresh flowers delivered weekly, every two weeks, or monthly."}),!n&&u.jsxs("div",{className:"bg-petal rounded-2xl p-6 text-center text-sm text-gray-600 mb-6",children:["Please log in to start a subscription. ",u.jsx(Le,{to:"/account",className:"text-bloom font-semibold",children:"Log In →"})]}),u.jsx("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 mb-6",children:l?u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"Delivery Frequency"}),u.jsx("div",{className:"flex gap-2",children:vT.map(([y,v])=>u.jsx("button",{onClick:()=>i(y),className:`px-4 py-2 rounded-full text-sm border ${a===y?"bg-bloom text-white border-bloom":"border-blush-100"}`,children:v},y))})]}),u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"Choose a Product"}),u.jsxs("select",{value:s,onChange:y=>o(Number(y.target.value)),className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:[u.jsx("option",{value:0,children:"Best Seller (Recommended)"}),p.map(y=>u.jsxs("option",{value:y.id,children:[y.name," — ",Ee(y.price)]},y.id))]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{onClick:m,className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Start Subscription"}),u.jsx("button",{onClick:()=>c(!1),className:"border border-blush-100 px-6 py-2.5 rounded-full text-gray-600",children:"Cancel"})]})]}):u.jsx("button",{onClick:()=>n?c(!0):t("/account"),className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Start a New Subscription"})}),u.jsx("h2",{className:"font-serif text-lg font-bold mb-3",children:"My Subscriptions"}),u.jsxs("div",{className:"space-y-3",children:[(f||[]).map(y=>{var v;return u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex items-center gap-4",children:[u.jsx("div",{className:"w-14 h-14 bg-petal rounded-xl flex items-center justify-center",children:u.jsx(ft,{className:"text-bloom/40",size:26})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("div",{className:"font-medium text-sm",children:[y.productName||`상품 #${y.productId}`," · ",((v=vT.find(x=>x[0]===y.frequency))==null?void 0:v[1])||y.frequency]}),u.jsxs("div",{className:"text-xs text-gray-500",children:["다음 배송 ",y.nextDeliveryDate||"-"," · ",Ee(y.price)]})]}),u.jsx(Ur,{status:y.status}),y.status!=="CANCELLED"&&u.jsxs(u.Fragment,{children:[u.jsx("button",{onClick:()=>g(y.id,y.status),className:"text-xs text-bloom2 border border-blush-100 rounded-full px-3 py-1.5",children:y.status==="ACTIVE"?"일시정지":"재개"}),u.jsx("button",{onClick:()=>b(y.id),className:"text-xs text-blush-400 border border-blush-100 rounded-full px-3 py-1.5",children:"해지"})]})]},y.id)}),!(f||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-8 text-center",children:"아직 구독이 없습니다."})]})]})}function vW(){const{storeName:e}=bn(),{data:t}=se({queryKey:["daily-rec"],queryFn:()=>t5("daily","",8)}),{data:n}=se({queryKey:["daily-fresh"],queryFn:()=>Ql({sort:"rating",size:8})}),r=(t&&t.length?t:n==null?void 0:n.items)||[];return u.jsxs("div",{children:[u.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-sage-700 to-sage-800 text-white",children:[u.jsx(Kd,{count:12}),u.jsxs("div",{className:"relative z-10 max-w-6xl mx-auto px-4 py-16",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-200 text-[12px] tracking-[0.2em] uppercase mb-3",children:[u.jsx(ej,{size:15})," Fresh today, gone tomorrow"]}),u.jsx("h1",{className:"font-serif text-5xl font-bold mb-4",children:"Today's Designer Bouquet"}),u.jsxs("p",{className:"text-cream/85 max-w-xl leading-relaxed text-lg font-light",children:["Hand-designed each morning with the freshest stems in our cooler, then curated by ",u.jsx("b",{className:"font-medium",children:"GUARDiA AI"}),". Limited daily stock · ",e||"your nearest store"," same-day delivery."]})]})]}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-12",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(xr,{className:"text-blush-500",size:18}),u.jsx("h2",{className:"font-serif text-2xl font-bold text-blush-900",children:"Today's Picks"}),u.jsx("span",{className:"text-xs text-sage-600",children:"AI-curated"})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:r.map(a=>u.jsx(mm,{children:u.jsx(Zl,{p:a})},a.id))}),!r.length&&u.jsxs("div",{className:"text-center text-blush-300 py-20",children:[u.jsx(ft,{className:"mx-auto text-blush-200 mb-3",size:40}),"Today's bouquet is being designed. ",u.jsx(Le,{to:"/category",className:"text-blush-500",children:"Browse all flowers →"})]})]})]})}const bW={DISCOUNT:_K,POINT_BONUS:Mf,GIFT:mk,TIER_ONLY:Mf,SEASON:Df};function xW(){const{custToken:e}=bn(),t=Kt(),[n,r]=A.useState(""),{data:a}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!e}),i=(a==null?void 0:a.tier)||"",{data:s}=se({queryKey:["ongoing-events",i],queryFn:()=>TX(i)}),o=async l=>{var c,f;if(!e){t("/account");return}r("");try{const d=await NX(l);r(d!=null&&d.coupon?`참여 완료! 쿠폰 발급: ${d.coupon.name} (${d.coupon.code})`:"이벤트에 참여했습니다.")}catch(d){r(((f=(c=d==null?void 0:d.response)==null?void 0:c.data)==null?void 0:f.message)||"참여 자격이 없거나 이미 참여했습니다.")}};return u.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Df,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"이벤트 / 캠페인"})]}),i&&u.jsxs("p",{className:"text-sm text-gray-500 mb-2",children:["현재 등급 ",u.jsx("span",{className:"font-semibold text-bloom2",children:(a==null?void 0:a.tierName)||i})," · 등급 전용 이벤트가 함께 표시됩니다."]}),n&&u.jsx("div",{className:"bg-petal text-bloom2 text-sm rounded-xl px-4 py-2 mb-4",children:n}),u.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mt-4",children:[(s||[]).map(l=>{const c=bW[l.eventType]||Df,f=(l.banners||[])[0];return u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 overflow-hidden",children:[u.jsx("div",{className:"bg-gradient-to-r from-bloom2 to-bloom text-white p-5",children:f?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"font-serif text-lg font-bold",children:f.headline||l.title}),u.jsx("p",{className:"text-white/85 text-sm mt-1",children:f.subtext||l.description})]}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"font-serif text-lg font-bold",children:l.title}),u.jsx("p",{className:"text-white/85 text-sm mt-1",children:l.description})]})}),u.jsxs("div",{className:"p-4 flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[u.jsx(c,{size:16,className:"text-bloom"}),u.jsx("span",{children:l.eventType}),l.bonusPointRate>0&&u.jsxs("span",{className:"text-xs text-leaf",children:["+",l.bonusPointRate,"% 포인트"]}),l.targetTiers&&u.jsxs("span",{className:"text-xs bg-petal text-bloom2 px-2 py-0.5 rounded-full",children:[l.targetTiers," 전용"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ur,{status:l.status}),u.jsx("button",{onClick:()=>o(l.id),className:"bg-bloom text-white text-sm font-semibold px-4 py-2 rounded-full hover:bg-bloom2",children:"참여"})]})]}),u.jsxs("div",{className:"px-4 pb-3 text-[11px] text-gray-400",children:[l.startDate," ~ ",l.endDate]})]},l.id)}),!(s||[]).length&&u.jsx("div",{className:"col-span-2 text-center text-gray-400 py-16",children:"진행 중인 이벤트가 없습니다."})]})]})}function SW(){const{t:e}=ni(),t=nn(),n=Kt(),{custToken:r}=bn(),{data:a}=se({queryKey:["wishlist"],queryFn:nX,enabled:!!r});if(!r)return n("/account"),null;const i=a||[],s=async o=>{await aX(o).catch(()=>{}),t.invalidateQueries({queryKey:["wishlist"]})};return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(Rf,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:e("wishlist.title")})]}),i.length?u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:i.map(o=>u.jsxs("div",{className:"relative",children:[u.jsx(Zl,{p:{...o,id:o.productId||o.id}}),u.jsx("button",{onClick:()=>s(o.productId||o.id),className:"absolute top-2 right-2 bg-white/90 rounded-full p-1.5 text-bloom shadow",children:u.jsx(Rf,{size:16,fill:"currentColor"})})]},o.id||o.productId))}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:[e("wishlist.empty")," ",u.jsx(Le,{to:"/category",className:"text-bloom",children:e("wishlist.startShopping")})]})]})}const bT={BASIC:"from-slate-400 to-slate-500",SILVER:"from-slate-300 to-slate-400",GOLD:"from-amber-400 to-amber-500",VIP:"from-violet-500 to-fuchsia-500"};function wW(){const{custToken:e,setCustToken:t}=bn(),n=Kt(),{data:r}=se({queryKey:["member"],queryFn:JY,enabled:!!e}),{data:a}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!e}),{data:i}=se({queryKey:["point-history"],queryFn:()=>AX(20),enabled:!!e});if(!e)return n("/account"),null;const s=(a==null?void 0:a.tier)||"BASIC",o=a==null?void 0:a.nextTier,l=()=>{t(null),n("/home")};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center justify-between mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(wk,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"My Account"})]}),u.jsxs("button",{onClick:l,className:"flex items-center gap-1.5 text-sm text-gray-500 hover:text-bloom",children:[u.jsx(gk,{size:16})," Log Out"]})]}),u.jsxs("div",{className:`rounded-2xl bg-gradient-to-r ${bT[s]||bT.BASIC} text-white p-6 mb-5`,children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-xs uppercase tracking-widest text-white/70",children:"Membership Tier"}),u.jsxs("div",{className:"font-serif text-2xl font-bold flex items-center gap-2",children:[u.jsx(Mf,{size:24})," ",(a==null?void 0:a.tierName)||s]}),u.jsxs("div",{className:"text-sm text-white/85 mt-1",children:["Spent in last 12 months ",Ee(a==null?void 0:a.spend12m)," · ",(a==null?void 0:a.orderCount12m)||0," orders"]})]}),u.jsxs("div",{className:"text-right",children:[u.jsx("div",{className:"text-xs text-white/70",children:"Points Balance"}),u.jsxs("div",{className:"text-3xl font-bold",children:[((a==null?void 0:a.pointBalance)||0).toLocaleString(),u.jsx("span",{className:"text-base",children:"P"})]})]})]}),o&&!o.isTop&&u.jsxs("div",{className:"mt-4 text-xs text-white/85 bg-white/15 rounded-lg px-3 py-2",children:["Spend ",Ee(o.spendNeeded)," more or place ",o.ordersNeeded," more orders to reach ",u.jsx("b",{children:o.nextTierName}),"."]})]}),(a==null?void 0:a.benefit)&&u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 mb-5",children:[u.jsxs("div",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[u.jsx(mk,{size:16,className:"text-bloom"})," My Tier Benefits"]}),u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 text-sm",children:[u.jsx(_h,{label:"Discount",value:`${a.benefit.discountRate}%`}),u.jsx(_h,{label:"Earn Rate",value:`${a.benefit.pointEarnRate}%`}),u.jsx(_h,{label:"Free Shipping",value:a.benefit.freeShipThreshold===0?"Always":a.benefit.freeShipThreshold?Ee(a.benefit.freeShipThreshold)+"+":"None"}),u.jsx(_h,{label:"Priority Slot",value:a.benefit.prioritySlot?"Included":"–"})]})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-6",children:[u.jsx(cb,{to:"/orders",icon:vk,label:"Order History"}),u.jsx(cb,{to:"/wishlist",icon:Rf,label:"Wishlist"}),u.jsx(cb,{to:"/subscription",icon:Qy,label:"Manage Subscription"})]}),u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[u.jsx(uk,{size:16,className:"text-bloom"})," Points Earned / Used History"]}),u.jsxs("div",{className:"divide-y divide-blush-100/60",children:[(i||[]).map(c=>u.jsxs("div",{className:"flex items-center justify-between py-2 text-sm",children:[u.jsxs("div",{children:[u.jsx("span",{className:"text-gray-700",children:c.reason||c.entryType}),c.orderNo&&u.jsx("span",{className:"text-xs text-gray-400 ml-2",children:c.orderNo}),u.jsx("div",{className:"text-[11px] text-gray-400",children:(c.createdAt||"").slice(0,10)})]}),u.jsxs("span",{className:c.points>=0?"text-leaf font-semibold":"text-blush-500 font-semibold",children:[c.points>=0?"+":"",c.points,"P"]})]},c.id)),!(i||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-6 text-center",children:"No points history yet."})]})]}),(r==null?void 0:r.username)&&u.jsx("div",{className:"text-center text-xs text-gray-400 mt-6",children:r.displayName||r.username})]})}function _h({label:e,value:t}){return u.jsxs("div",{className:"bg-petal rounded-xl p-3 text-center",children:[u.jsx("div",{className:"text-[11px] text-gray-500",children:e}),u.jsx("div",{className:"font-bold text-bloom2",children:t})]})}function cb({to:e,icon:t,label:n}){return u.jsxs(Le,{to:e,className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex flex-col items-center gap-1.5 hover:border-bloom",children:[u.jsx(t,{size:22,className:"text-bloom"}),u.jsx("span",{className:"text-sm",children:n})]})}function jW(){const e=nn(),t=Kt(),{custToken:n}=bn(),{data:r}=se({queryKey:["my-orders"],queryFn:()=>BY(""),enabled:!!n});if(!n)return t("/account"),null;const a=r||[],i=async(s,o)=>{await Qk(s,o).catch(()=>{}),e.invalidateQueries({queryKey:["my-orders"]})};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(vk,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"주문 내역"})]}),a.length?u.jsx("div",{className:"space-y-3",children:a.map(s=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("div",{className:"font-semibold text-sm",children:s.orderNo||`주문 #${s.id}`}),u.jsx(Ur,{status:s.status})]}),u.jsxs("div",{className:"text-xs text-gray-500 mb-3",children:[(s.createdAt||"").slice(0,16).replace("T"," ")," · ",s.fulfillmentType==="PICKUP"?"매장 픽업":"배송"," · ",s.scheduledDate," ",s.slotLabel]}),u.jsx("div",{className:"space-y-1.5",children:(s.items||[]).map(o=>u.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[u.jsx("div",{className:"w-9 h-9 bg-petal rounded-lg flex items-center justify-center",children:u.jsx(ft,{className:"text-bloom/40",size:16})}),u.jsxs("span",{className:"flex-1",children:[o.productName||`상품 #${o.productId}`," ",o.sizeCode&&`· ${o.sizeCode}`," ×",o.quantity]}),u.jsx("span",{className:"text-gray-600",children:Ee(o.price||o.unitPrice)})]},o.id))}),u.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-blush-100/60",children:[u.jsx("span",{className:"font-bold text-bloom2",children:Ee(s.payAmount??s.totalAmount)}),u.jsxs("div",{className:"flex gap-2",children:[s.status==="DELIVERED"&&u.jsx("button",{onClick:()=>i(s.id,"CONFIRMED"),className:"text-xs bg-bloom text-white px-3 py-1.5 rounded-full",children:"구매확정"}),["PENDING","PAID"].includes(s.status)&&u.jsx("button",{onClick:()=>i(s.id,"CANCELLED"),className:"text-xs border border-blush-100 text-blush-400 px-3 py-1.5 rounded-full",children:"주문취소"})]})]})]},s.id))}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:["주문 내역이 없습니다. ",u.jsx(Le,{to:"/category",className:"text-bloom",children:"쇼핑하기 →"})]})]})}function AW(){const{productId:e}=o$(),t=Number(e),n=Kt(),{custToken:r}=bn(),[a,i]=A.useState(5),[s,o]=A.useState(""),[l,c]=A.useState(""),[f,d]=A.useState(""),[h,p]=A.useState("");if(!r)return n("/account"),null;const m=async g=>{g.preventDefault(),p("");try{await ZY({productId:t,rating:a,title:s,content:l,imageUrl:f}),p("리뷰가 등록되었습니다."),setTimeout(()=>n(`/product/${t}`),800)}catch{p("등록에 실패했습니다. (구매 이력이 필요할 수 있습니다)")}};return u.jsxs("div",{className:"max-w-lg mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(OK,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"리뷰 작성"})]}),u.jsxs("form",{onSubmit:m,className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"별점"}),u.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(g=>u.jsx("button",{type:"button",onClick:()=>i(g),className:"text-amber-400",children:u.jsx(Wa,{size:28,fill:g<=a?"currentColor":"none"})},g))})]}),u.jsx("input",{value:s,onChange:g=>o(g.target.value),placeholder:"제목",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("textarea",{value:l,onChange:g=>c(g.target.value),rows:5,required:!0,placeholder:"상품은 어떠셨나요? 신선도, 배송, 디자인 등을 적어주세요.",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:f,onChange:g=>d(g.target.value),placeholder:"사진 URL (선택)",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),h&&u.jsx("div",{className:"text-sm text-leaf",children:h}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{className:"flex-1 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2",children:"등록"}),u.jsx("button",{type:"button",onClick:()=>n(-1),className:"px-6 border border-blush-100 rounded-full text-gray-600",children:"취소"})]})]})]})}function OW(){const[e,t]=A.useState("login"),[n,r]=A.useState(""),[a,i]=A.useState(""),[s,o]=A.useState(""),[l,c]=A.useState(""),[f,d]=A.useState(!1),{setCustToken:h}=bn(),p=Kt(),m=async g=>{var b,y;g.preventDefault(),c(""),d(!0);try{const x=(y=(b=(e==="login"?await Yk(n,a):await EY(n,a,s||n)).data)==null?void 0:b.data)==null?void 0:y.token;if(!x)throw new Error("no token");h(x),p("/home")}catch{c(e==="login"?"Login failed — check your username and password.":"Sign-up failed — that username may already be taken.")}finally{d(!1)}};return u.jsxs("div",{className:"relative min-h-screen bg-gradient-to-br from-blush-100 via-cream to-sage-100 flex items-center justify-center px-4 overflow-hidden",children:[u.jsx(Kd,{count:12}),u.jsxs(Nt.form,{onSubmit:m,initial:{opacity:0,y:22},animate:{opacity:1,y:0},transition:{duration:.7,ease:[.22,1,.36,1]},className:"relative z-10 w-full max-w-sm bg-white/90 backdrop-blur rounded-4xl shadow-bloom p-8 border border-blush-100",children:[u.jsxs(Le,{to:"/home",className:"flex flex-col items-center gap-1 mb-6",children:[u.jsx(ft,{className:"text-blush-500",size:32}),u.jsx("span",{className:"font-serif text-xl font-bold text-blush-900",children:"Montvale Florist"})]}),u.jsx("div",{className:"flex gap-2 mb-6 bg-blush-50 rounded-full p-1 text-sm",children:["login","register"].map(g=>u.jsx("button",{type:"button",onClick:()=>{t(g),c("")},className:`flex-1 py-2 rounded-full font-medium transition-colors ${e===g?"bg-blush-500 text-white shadow-petal":"text-blush-700"}`,children:g==="login"?"Sign In":"Create Account"},g))}),u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Username"}),u.jsx("input",{value:n,onChange:g=>r(g.target.value),required:!0,className:"w-full mb-3 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"}),e==="register"&&u.jsxs(u.Fragment,{children:[u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Name"}),u.jsx("input",{value:s,onChange:g=>o(g.target.value),className:"w-full mb-3 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"})]}),u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Password"}),u.jsx("input",{type:"password",value:a,onChange:g=>i(g.target.value),required:!0,className:"w-full mb-4 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"}),l&&u.jsx("p",{className:"text-blush-500 text-xs mb-3",children:l}),u.jsx(Ua,{type:"submit",disabled:f,className:"w-full py-2.5 rounded-full bg-blush-500 text-white font-semibold hover:bg-blush-600 disabled:opacity-60",children:f?"Please wait…":e==="login"?"Sign In":"Create Account"}),u.jsxs("p",{className:"text-center text-[11px] text-[#a08a90] mt-4",children:["Store & owner staff → ",u.jsx("a",{href:"/admin/login",className:"text-blush-600",children:"Admin Console"})]}),u.jsx("p",{className:"text-center text-[11px] text-sage-600 mt-2",children:ke.tagline})]})]})}const EW=["DELIVERY","PRODUCT","PAYMENT","REFUND","OTHER"];function TW(){const e=nn(),t=Kt(),{custToken:n}=bn(),[r,a]=A.useState("DELIVERY"),[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(""),[d,h]=A.useState(""),[p,m]=A.useState("Birthday"),[g,b]=A.useState("Warm"),[y,v]=A.useState(""),[x,w]=A.useState([]),{data:S}=se({queryKey:["cs"],queryFn:eX,enabled:!!n}),j=async E=>{if(E.preventDefault(),h(""),!n){t("/account");return}try{const T=await tX({orderNo:i,category:r,subject:o,content:c});h(T!=null&&T.aiReply?`AI auto-reply: ${T.aiReply}`:"Your request has been submitted."),l(""),f(""),e.invalidateQueries({queryKey:["cs"]})}catch{h("Failed to submit your request.")}},O=async()=>{const E=await uX(p,g,y).catch(()=>null);w((E==null?void 0:E.messages)||[])};return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(jK,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"Customer Support (1:1)"})]}),u.jsxs("div",{className:"bg-petal rounded-2xl p-5 mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2 text-bloom2 font-medium text-sm mb-3",children:[u.jsx(xr,{size:16})," AI Card Message Helper"]}),u.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[u.jsx("input",{value:p,onChange:E=>m(E.target.value),placeholder:"Occasion (e.g. Birthday)",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"}),u.jsx("input",{value:g,onChange:E=>b(E.target.value),placeholder:"Tone",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"}),u.jsx("input",{value:y,onChange:E=>v(E.target.value),placeholder:"Recipient",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"})]}),u.jsx("button",{onClick:O,className:"bg-bloom text-white text-sm font-semibold px-4 py-2 rounded-full",children:"Suggest Messages"}),!!x.length&&u.jsx("ul",{className:"mt-3 space-y-2",children:x.map((E,T)=>u.jsx("li",{className:"bg-white rounded-lg px-3 py-2 text-sm text-gray-700",children:E},T))})]}),u.jsxs("form",{onSubmit:j,className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3 mb-8",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx("select",{value:r,onChange:E=>a(E.target.value),className:"px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:EW.map(E=>u.jsx("option",{value:E,children:E},E))}),u.jsx("input",{value:i,onChange:E=>s(E.target.value),placeholder:"Order number (optional)",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsx("input",{value:o,onChange:E=>l(E.target.value),required:!0,placeholder:"Subject",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("textarea",{value:c,onChange:E=>f(E.target.value),rows:4,required:!0,placeholder:"Tell us how we can help. Our AI will try to answer first.",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),d&&u.jsx("div",{className:"text-sm text-leaf bg-leaf/10 rounded-lg px-3 py-2",children:d}),u.jsxs("button",{className:"flex items-center gap-1.5 bg-bloom text-white font-semibold px-6 py-2.5 rounded-full hover:bg-bloom2",children:[u.jsx(NK,{size:16})," Submit Request"]}),!n&&u.jsxs("p",{className:"text-xs text-gray-400",children:["Please log in to submit a request. ",u.jsx(Le,{to:"/account",className:"text-bloom",children:"Log In"})]})]}),u.jsx("h2",{className:"font-serif text-lg font-bold mb-3",children:"My Requests"}),u.jsxs("div",{className:"space-y-2",children:[(S||[]).map(E=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"font-medium text-sm",children:E.subject}),u.jsx(Ur,{status:E.status})]}),u.jsx("p",{className:"text-sm text-gray-600 mt-1",children:E.content}),E.aiReply&&u.jsxs("div",{className:"mt-2 text-xs text-bloom2 bg-petal rounded-lg px-3 py-2",children:[u.jsx("b",{children:"AI Reply:"})," ",E.aiReply]}),E.itsmSrId&&u.jsxs("div",{className:"text-[11px] text-gray-400 mt-1",children:["ITSM SR: ",E.itsmSrId]})]},E.id)),!(S||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-6 text-center",children:"No requests submitted yet."})]})]})}const o5="https://itsm.zioinfo.co.kr",ub=e=>e==null?void 0:e.replace(/https?:\/\/zioinfo\.co\.kr:8443/g,o5);function NW(){const[e,t]=A.useState(null),[n,r]=A.useState(!0),[a,i]=A.useState(""),[s,o]=A.useState(!1),l=()=>{r(!0),i(""),fetch(`${o5}/api/app/public-latest`).then(f=>f.json()).then(f=>t({...f,qr_url:ub(f.qr_url),landing_url:ub(f.landing_url),download_url:ub(f.download_url)})).catch(()=>i("Unable to connect to the app store. Please try again in a moment.")).finally(()=>r(!1))};A.useEffect(()=>{l()},[]);const c=async()=>{if(e!=null&&e.landing_url)try{await navigator.clipboard.writeText(e.landing_url),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-10",children:[u.jsxs("div",{className:"text-center mb-8",children:[u.jsxs("div",{className:"flex items-center gap-2 justify-center mb-2",children:[u.jsx(bl,{className:"text-bloom",size:26}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-bloom2",children:"Order with the App"})]}),u.jsxs("p",{className:"text-sm text-gray-500",children:["Scan the QR code to open the ",u.jsx("span",{className:"text-bloom font-semibold",children:"GUARDiA Mall"})," customer app install page.",u.jsx("br",{}),"Enjoy same-day delivery alerts, easy reordering, and subscription management right in the app."]})]}),n&&u.jsx("div",{className:"text-center text-gray-400 py-10",children:"Loading…"}),a&&u.jsx("div",{className:"bg-petal border border-blush-100 rounded-2xl p-6 text-center text-blush-500 text-sm",children:a}),!n&&!a&&e&&!e.has_version&&u.jsxs("div",{className:"bg-white border border-blush-100/60 rounded-2xl p-10 text-center text-gray-400",children:[u.jsx(ft,{size:40,className:"mx-auto mb-3 text-bloom/30"}),"No app version has been published yet.",u.jsx("br",{}),u.jsx("span",{className:"text-xs",children:"App uploads and version management are handled in GUARDiA Manager."})]}),!n&&!a&&(e==null?void 0:e.has_version)&&u.jsxs("div",{className:"bg-white border border-blush-100/60 rounded-2xl p-6 grid md:grid-cols-[200px_1fr] gap-6 items-start shadow-sm",children:[u.jsx("div",{className:"bg-petal rounded-2xl p-3 flex items-center justify-center",children:e.qr_url?u.jsx("img",{src:e.qr_url,alt:"App install QR code",className:"w-44 h-44"}):u.jsx(bl,{size:64,className:"text-bloom/40"})}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[u.jsx("span",{className:"text-lg font-bold",children:e.app_name||"GUARDiA Mall"}),u.jsxs("span",{className:"px-2 py-0.5 rounded-md bg-bloom text-white text-xs font-semibold",children:["v",e.version]})]}),u.jsxs("div",{className:"text-xs text-gray-500 mb-4",children:[e.platform," ",e.file_size_mb?`· ${e.file_size_mb}MB`:"",e.download_count!=null&&` · ${e.download_count} downloads`]}),e.release_notes&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-[11px] font-semibold text-gray-400 uppercase tracking-wider mb-1",children:"What's New"}),u.jsx("div",{className:"text-sm text-gray-600 whitespace-pre-line bg-petal rounded-lg p-3 max-h-32 overflow-auto",children:e.release_notes})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.landing_url&&u.jsxs("a",{href:e.landing_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-4 py-2 rounded-full bg-bloom text-white text-sm font-semibold hover:bg-bloom2",children:[u.jsx(hk,{size:15})," Install Page"]}),e.download_url&&u.jsxs("a",{href:e.download_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-4 py-2 rounded-full border border-blush-100 text-bloom2 text-sm hover:bg-petal",children:[u.jsx(dk,{size:15})," Download APK"]}),u.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 px-4 py-2 rounded-full border border-blush-100 text-bloom2 text-sm hover:bg-petal",children:[s?u.jsx(lk,{size:15,className:"text-leaf"}):u.jsx(fk,{size:15}),s?"Copied":"Copy Link"]}),u.jsx("button",{onClick:l,className:"flex items-center gap-1.5 px-3 py-2 rounded-full border border-blush-100 text-gray-500 text-sm hover:bg-petal",children:u.jsx(nj,{size:15})})]})]})]})]})}function CW(){const{t:e}=ni(),[t,n]=A.useState("admin"),[r,a]=A.useState(""),[i,s]=A.useState(""),o=Kt();A.useEffect(()=>(document.documentElement.classList.add("admin-shell"),()=>document.documentElement.classList.remove("admin-shell")),[]);const l=async c=>{var f,d;c.preventDefault(),s("");try{const p=(d=(f=(await Yk(t,r)).data)==null?void 0:f.data)==null?void 0:d.token;if(!p)throw new Error("no token");localStorage.setItem("mall_admin_token",p);const m=await Xk().catch(()=>null);if(m!=null&&m.role&&localStorage.setItem("mall_role",m.role),m!=null&&m.username&&localStorage.setItem("mall_admin_user",m.username),(m==null?void 0:m.role)==="USER"){s(e("admin.login.errNoPriv")),localStorage.removeItem("mall_admin_token");return}o("/admin/dashboard")}catch{s(e("admin.login.errFailed"))}};return u.jsxs("div",{className:"admin-shell min-h-screen flex items-center justify-center bg-ink text-[#e6edf6]",children:[u.jsx("div",{className:"absolute top-5 right-5",children:u.jsx(ag,{variant:"admin"})}),u.jsxs("form",{onSubmit:l,className:"w-[360px] bg-panel border border-edge rounded-2xl p-8",children:[u.jsxs("div",{className:"flex items-center gap-2 justify-center mb-6",children:[u.jsx(ft,{className:"text-brand",size:28}),u.jsx("span",{className:"text-xl font-bold",children:e("admin.login.title")})]}),u.jsx("p",{className:"text-center text-sm text-slate-400 mb-6",children:e("admin.login.subtitle")}),u.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e("admin.login.username")}),u.jsx("input",{value:t,onChange:c=>n(c.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),u.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e("admin.login.password")}),u.jsx("input",{type:"password",value:r,onChange:c=>a(c.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),i&&u.jsx("p",{className:"text-rose-400 text-xs mb-3",children:i}),u.jsx("button",{className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90",children:e("admin.login.signIn")}),u.jsxs("p",{className:"text-center text-[11px] text-slate-500 mt-4",children:[e("admin.login.storefrontHere")," ",u.jsx("a",{href:"/",className:"text-brand",children:e("admin.login.here")})]})]})]})}const _W=[{to:"/admin/dashboard",key:"dashboard",icon:AK,roles:["ADMIN","MANAGER"]},{to:"/admin/stores",key:"stores",icon:Bd,roles:["ADMIN","MANAGER"]},{to:"/admin/products",key:"products",icon:ft,roles:["ADMIN","MANAGER"]},{to:"/admin/inventory",key:"inventory",icon:sk,roles:["ADMIN","MANAGER"]},{to:"/admin/orders",key:"orders",icon:ij,roles:["ADMIN","MANAGER"]},{to:"/admin/transfers",key:"transfers",icon:ik,roles:["ADMIN","MANAGER"]},{to:"/admin/members",key:"members",icon:jk,roles:["ADMIN","MANAGER"]},{to:"/admin/loyalty",key:"loyalty",icon:Mf,roles:["ADMIN","MANAGER"]},{to:"/admin/events",key:"events",icon:Df,roles:["ADMIN","MANAGER"]},{to:"/admin/subscriptions",key:"subscriptions",icon:Qy,roles:["ADMIN","MANAGER"]},{to:"/admin/schedule",key:"schedule",icon:ok,roles:["ADMIN","MANAGER"]},{to:"/admin/analytics",key:"analytics",icon:Jw,roles:["ADMIN","MANAGER"]}],PW=[{to:"/admin/users",key:"users",icon:Sk,roles:["ADMIN"]},{to:"/admin/audit",key:"audit",icon:bk,roles:["ADMIN","MANAGER"]},{to:"/admin/settings",key:"settings",icon:xk,roles:["ADMIN"]},{to:"/admin/app",key:"appInstall",icon:bl,roles:["ADMIN","MANAGER"]}],xT=({isActive:e})=>`flex items-center gap-3 px-5 py-2.5 text-sm transition-colors ${e?"bg-card text-brand border-r-2 border-brand":"text-slate-300 hover:bg-card/60"}`;function MW(){const{t:e}=ni(),t=localStorage.getItem("mall_admin_token"),[n,r]=A.useState(()=>localStorage.getItem("mall_role")||""),[a,i]=A.useState(()=>localStorage.getItem("mall_admin_user")||""),s=Kt();if(A.useEffect(()=>(document.documentElement.classList.add("admin-shell"),()=>document.documentElement.classList.remove("admin-shell")),[]),A.useEffect(()=>{t&&Xk().then(f=>{f!=null&&f.role&&(localStorage.setItem("mall_role",f.role),r(f.role)),f!=null&&f.username&&(localStorage.setItem("mall_admin_user",f.username),i(f.username))}).catch(()=>{})},[t]),!t)return u.jsx(em,{to:"/admin/login",replace:!0});if(n&&n==="USER")return u.jsx(em,{to:"/admin/login",replace:!0});const o=_W.filter(f=>!n||f.roles.includes(n)),l=PW.filter(f=>f.roles.includes(n)),c=()=>{localStorage.removeItem("mall_admin_token"),localStorage.removeItem("mall_role"),localStorage.removeItem("mall_admin_user"),s("/admin/login")};return u.jsxs("div",{className:"admin-shell flex h-screen bg-ink text-[#e6edf6]",children:[u.jsxs("aside",{className:"w-60 bg-panel border-r border-edge flex flex-col",children:[u.jsxs("div",{className:"h-16 flex items-center gap-2 px-5 border-b border-edge",children:[u.jsx(ft,{className:"text-brand",size:22}),u.jsxs("div",{children:[u.jsx("div",{className:"font-bold text-base leading-tight",children:"GUARDiA Mall"}),u.jsx("div",{className:"text-[11px] text-slate-400",children:e("admin.console")})]})]}),u.jsxs("nav",{className:"flex-1 py-2 overflow-auto",children:[o.map(({to:f,key:d,icon:h})=>u.jsxs(tx,{to:f,className:xT,children:[u.jsx(h,{size:18}),e(`admin.nav.${d}`)]},f)),l.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"px-5 pt-4 pb-1.5 text-[10px] font-semibold tracking-wider text-slate-500 uppercase border-t border-edge mt-3",children:e("admin.system")}),l.map(({to:f,key:d,icon:h})=>u.jsxs(tx,{to:f,className:xT,children:[u.jsx(h,{size:18}),e(`admin.nav.${d}`)]},f))]})]}),u.jsx("div",{className:"p-4 text-[11px] text-slate-500 border-t border-edge",children:e("admin.onPremiseTag")})]}),u.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[u.jsxs("header",{className:"h-16 bg-panel border-b border-edge flex items-center justify-between px-6",children:[u.jsx("div",{className:"text-sm text-slate-400 truncate",children:e("admin.header")}),u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(ag,{variant:"admin"}),u.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-slate-300",children:[u.jsx(bK,{size:18})," ",a||"admin"," ",u.jsx("span",{className:"text-[10px] text-brand",children:n})]}),u.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 text-sm text-slate-400 hover:text-brand",children:[u.jsx(gk,{size:16})," ",e("admin.signOut")]})]})]}),u.jsx("main",{className:"flex-1 overflow-auto p-6",children:u.jsx(f$,{})})]})]})}function l5(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t-1}var PZ=_Z,MZ=sg;function RZ(e,t){var n=this.__data__,r=MZ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var DZ=RZ,$Z=gZ,kZ=OZ,LZ=NZ,zZ=PZ,IZ=DZ;function Vc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Ns=function(t){return oo(t)&&t.indexOf("%")===t.length-1},K=function(t){return iee(t)&&!qc(t)},cee=function(t){return me(t)},$t=function(t){return K(t)||oo(t)},uee=0,jo=function(t){var n=++uee;return"".concat(t||"").concat(n)},pn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!K(t)&&!oo(t))return r;var i;if(Ns(t)){var s=t.indexOf("%");i=n*parseFloat(t.slice(0,s))/100}else i=+t;return qc(i)&&(i=r),a&&i>n&&(i=n),i},xi=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},fee=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Cx(e){"@babel/helpers - typeof";return Cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cx(e)}var MT={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Fa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},RT=null,hb=null,Ej=function e(t){if(t===RT&&Array.isArray(hb))return hb;var n=[];return A.Children.forEach(t,function(r){me(r)||(eee.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),hb=n,RT=t,n};function Wn(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Fa(a)}):r=[Fa(t)],Ej(e).forEach(function(a){var i=Xn(a,"type.displayName")||Xn(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function Ln(e,t){var n=Wn(e,t);return n&&n[0]}var DT=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!K(r)||r<=0||!K(a)||a<=0)},bee=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],xee=function(t){return t&&t.type&&oo(t.type)&&bee.indexOf(t.type)>=0},S5=function(t){return t&&Cx(t)==="object"&&"clipDot"in t},See=function(t,n,r,a){var i,s=(i=db==null?void 0:db[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!de(t)&&(a&&s.includes(n)||pee.includes(n))||r&&Oj.includes(n)},ie=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(A.isValidElement(t)&&(a=t.props),!Uc(a))return null;var i={};return Object.keys(a).forEach(function(s){var o;See((o=a)===null||o===void 0?void 0:o[s],s,n,r)&&(i[s]=a[s])}),i},_x=function e(t,n){if(t===n)return!0;var r=A.Children.count(t);if(r!==A.Children.count(n))return!1;if(r===0)return!0;if(r===1)return $T(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Eee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mx(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,s=e.style,o=e.title,l=e.desc,c=Oee(e,Aee),f=a||{width:n,height:r,x:0,y:0},d=ve("recharts-surface",i);return _.createElement("svg",Px({},ie(c,!0,"svg"),{className:d,width:n,height:r,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),_.createElement("title",null,o),_.createElement("desc",null,l),t)}var Tee=["children","className"];function Rx(){return Rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ae=_.forwardRef(function(e,t){var n=e.children,r=e.className,a=Nee(e,Tee),i=ve("recharts-layer",r);return _.createElement("g",Rx({className:i},ie(a,!0),{ref:t}),n)}),kr=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;ia?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r=r?e:Mee(e,t,n)}var Dee=Ree,$ee="\\ud800-\\udfff",kee="\\u0300-\\u036f",Lee="\\ufe20-\\ufe2f",zee="\\u20d0-\\u20ff",Iee=kee+Lee+zee,Bee="\\ufe0e\\ufe0f",Uee="\\u200d",Fee=RegExp("["+Uee+$ee+Iee+Bee+"]");function Vee(e){return Fee.test(e)}var w5=Vee;function Hee(e){return e.split("")}var qee=Hee,j5="\\ud800-\\udfff",Kee="\\u0300-\\u036f",Gee="\\ufe20-\\ufe2f",Yee="\\u20d0-\\u20ff",Xee=Kee+Gee+Yee,Wee="\\ufe0e\\ufe0f",Qee="["+j5+"]",Dx="["+Xee+"]",$x="\\ud83c[\\udffb-\\udfff]",Zee="(?:"+Dx+"|"+$x+")",A5="[^"+j5+"]",O5="(?:\\ud83c[\\udde6-\\uddff]){2}",E5="[\\ud800-\\udbff][\\udc00-\\udfff]",Jee="\\u200d",T5=Zee+"?",N5="["+Wee+"]?",ete="(?:"+Jee+"(?:"+[A5,O5,E5].join("|")+")"+N5+T5+")*",tte=N5+T5+ete,nte="(?:"+[A5+Dx+"?",Dx,O5,E5,Qee].join("|")+")",rte=RegExp($x+"(?="+$x+")|"+nte+tte,"g");function ate(e){return e.match(rte)||[]}var ite=ate,ste=qee,ote=w5,lte=ite;function cte(e){return ote(e)?lte(e):ste(e)}var ute=cte,fte=Dee,dte=w5,hte=ute,pte=m5;function mte(e){return function(t){t=pte(t);var n=dte(t)?hte(t):void 0,r=n?n[0]:t.charAt(0),a=n?fte(n,1).join(""):t.slice(1);return r[e]()+a}}var yte=mte,gte=yte,vte=gte("toUpperCase"),bte=vte;const xg=Ie(bte);function Qe(e){return function(){return e}}const C5=Math.cos,vm=Math.sin,Fr=Math.sqrt,bm=Math.PI,Sg=2*bm,kx=Math.PI,Lx=2*kx,xs=1e-6,xte=Lx-xs;function _5(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return _5;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;axs)if(!(Math.abs(d*l-c*f)>xs)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-s,m=a-o,g=l*l+c*c,b=p*p+m*m,y=Math.sqrt(g),v=Math.sqrt(h),x=i*Math.tan((kx-Math.acos((g+h-b)/(2*y*v)))/2),w=x/v,S=x/y;Math.abs(w-1)>xs&&this._append`L${t+w*f},${n+w*d}`,this._append`A${i},${i},0,0,${+(d*p>f*m)},${this._x1=t+S*l},${this._y1=n+S*c}`}}arc(t,n,r,a,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(a),l=r*Math.sin(a),c=t+o,f=n+l,d=1^s,h=s?a-i:i-a;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>xs||Math.abs(this._y1-f)>xs)&&this._append`L${c},${f}`,r&&(h<0&&(h=h%Lx+Lx),h>xte?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=f}`:h>xs&&this._append`A${r},${r},0,${+(h>=kx)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function Tj(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new wte(t)}function Nj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function P5(e){this._context=e}P5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function wg(e){return new P5(e)}function M5(e){return e[0]}function R5(e){return e[1]}function D5(e,t){var n=Qe(!0),r=null,a=wg,i=null,s=Tj(o);e=typeof e=="function"?e:e===void 0?M5:Qe(e),t=typeof t=="function"?t:t===void 0?R5:Qe(t);function o(l){var c,f=(l=Nj(l)).length,d,h=!1,p;for(r==null&&(i=a(p=s())),c=0;c<=f;++c)!(c=p;--m)o.point(x[m],w[m]);o.lineEnd(),o.areaEnd()}y&&(x[h]=+e(b,h,d),w[h]=+t(b,h,d),o.point(r?+r(b,h,d):x[h],n?+n(b,h,d):w[h]))}if(v)return o=null,v+""||null}function f(){return D5().defined(a).curve(s).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Qe(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Qe(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Qe(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:Qe(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Qe(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Qe(+d),c):n},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(n)},c.lineX1=function(){return f().x(r).y(t)},c.defined=function(d){return arguments.length?(a=typeof d=="function"?d:Qe(!!d),c):a},c.curve=function(d){return arguments.length?(s=d,i!=null&&(o=s(i)),c):s},c.context=function(d){return arguments.length?(d==null?i=o=null:o=s(i=d),c):i},c}class $5{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function jte(e){return new $5(e,!0)}function Ate(e){return new $5(e,!1)}const Cj={draw(e,t){const n=Fr(t/bm);e.moveTo(n,0),e.arc(0,0,n,0,Sg)}},Ote={draw(e,t){const n=Fr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},k5=Fr(1/3),Ete=k5*2,Tte={draw(e,t){const n=Fr(t/Ete),r=n*k5;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Nte={draw(e,t){const n=Fr(t),r=-n/2;e.rect(r,r,n,n)}},Cte=.8908130915292852,L5=vm(bm/10)/vm(7*bm/10),_te=vm(Sg/10)*L5,Pte=-C5(Sg/10)*L5,Mte={draw(e,t){const n=Fr(t*Cte),r=_te*n,a=Pte*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const s=Sg*i/5,o=C5(s),l=vm(s);e.lineTo(l*n,-o*n),e.lineTo(o*r-l*a,l*r+o*a)}e.closePath()}},pb=Fr(3),Rte={draw(e,t){const n=-Fr(t/(pb*3));e.moveTo(0,n*2),e.lineTo(-pb*n,-n),e.lineTo(pb*n,-n),e.closePath()}},nr=-.5,rr=Fr(3)/2,zx=1/Fr(12),Dte=(zx/2+1)*3,$te={draw(e,t){const n=Fr(t/Dte),r=n/2,a=n*zx,i=r,s=n*zx+n,o=-i,l=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(o,l),e.lineTo(nr*r-rr*a,rr*r+nr*a),e.lineTo(nr*i-rr*s,rr*i+nr*s),e.lineTo(nr*o-rr*l,rr*o+nr*l),e.lineTo(nr*r+rr*a,nr*a-rr*r),e.lineTo(nr*i+rr*s,nr*s-rr*i),e.lineTo(nr*o+rr*l,nr*l-rr*o),e.closePath()}};function kte(e,t){let n=null,r=Tj(a);e=typeof e=="function"?e:Qe(e||Cj),t=typeof t=="function"?t:Qe(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Qe(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Qe(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function xm(){}function Sm(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function z5(e){this._context=e}z5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Sm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lte(e){return new z5(e)}function I5(e){this._context=e}I5.prototype={areaStart:xm,areaEnd:xm,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zte(e){return new I5(e)}function B5(e){this._context=e}B5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ite(e){return new B5(e)}function U5(e){this._context=e}U5.prototype={areaStart:xm,areaEnd:xm,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Bte(e){return new U5(e)}function LT(e){return e<0?-1:1}function zT(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return(LT(i)+LT(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function IT(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function mb(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function wm(e){this._context=e}wm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mb(this,this._t0,IT(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,mb(this,IT(this,n=zT(this,e,t)),n);break;default:mb(this,this._t0,n=zT(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function F5(e){this._context=new V5(e)}(F5.prototype=Object.create(wm.prototype)).point=function(e,t){wm.prototype.point.call(this,t,e)};function V5(e){this._context=e}V5.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function Ute(e){return new wm(e)}function Fte(e){return new F5(e)}function H5(e){this._context=e}H5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=BT(e),a=BT(t),i=0,s=1;s=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Hte(e){return new jg(e,.5)}function qte(e){return new jg(e,0)}function Kte(e){return new jg(e,1)}function Jl(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,o=i.length;n=0;)n[t]=t;return n}function Gte(e,t){return e[t]}function Yte(e){const t=[];return t.key=e,t}function Xte(){var e=Qe([]),t=Ix,n=Jl,r=Gte;function a(i){var s=Array.from(e.apply(this,arguments),Yte),o,l=s.length,c=-1,f;for(const d of i)for(o=0,++c;o0){for(var n,r,a=0,i=e[0].length,s;a0){for(var n=0,r=e[t[0]],a,i=r.length;n0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ane(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var q5={symbolCircle:Cj,symbolCross:Ote,symbolDiamond:Tte,symbolSquare:Nte,symbolStar:Mte,symbolTriangle:Rte,symbolWye:$te},ine=Math.PI/180,sne=function(t){var n="symbol".concat(xg(t));return q5[n]||Cj},one=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*ine;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},lne=function(t,n){q5["symbol".concat(xg(t))]=n},_j=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,s=t.sizeType,o=s===void 0?"area":s,l=rne(t,Jte),c=FT(FT({},l),{},{type:r,size:i,sizeType:o}),f=function(){var b=sne(r),y=kte().type(b).size(one(i,o,r));return y()},d=c.className,h=c.cx,p=c.cy,m=ie(c,!0);return h===+h&&p===+p&&i===+i?_.createElement("path",Bx({},m,{className:ve("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(p,")"),d:f()})):null};_j.registerSymbol=lne;function ec(e){"@babel/helpers - typeof";return ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(e)}function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var v=p.inactive?c:p.color;return _.createElement("li",Ux({className:b,style:d,key:"legend-item-".concat(m)},lo(r.props,p,m)),_.createElement(Mx,{width:s,height:s,viewBox:f,style:h},r.renderIcon(p)),_.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},g?g(y,p,m):y))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,s=r.align;if(!a||!a.length)return null;var o={padding:0,margin:0,textAlign:i==="horizontal"?s:"left"};return _.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(A.PureComponent);kf(Pj,"displayName","Legend");kf(Pj,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var vne=og;function bne(){this.__data__=new vne,this.size=0}var xne=bne;function Sne(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var wne=Sne;function jne(e){return this.__data__.get(e)}var Ane=jne;function One(e){return this.__data__.has(e)}var Ene=One,Tne=og,Nne=vj,Cne=bj,_ne=200;function Pne(e,t){var n=this.__data__;if(n instanceof Tne){var r=n.__data__;if(!Nne||r.length<_ne-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Cne(r)}return n.set(e,t),this.size=n.size,this}var Mne=Pne,Rne=og,Dne=xne,$ne=wne,kne=Ane,Lne=Ene,zne=Mne;function Kc(e){var t=this.__data__=new Rne(e);this.size=t.size}Kc.prototype.clear=Dne;Kc.prototype.delete=$ne;Kc.prototype.get=kne;Kc.prototype.has=Lne;Kc.prototype.set=zne;var Y5=Kc,Ine="__lodash_hash_undefined__";function Bne(e){return this.__data__.set(e,Ine),this}var Une=Bne;function Fne(e){return this.__data__.has(e)}var Vne=Fne,Hne=bj,qne=Une,Kne=Vne;function Am(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Hne;++to))return!1;var c=i.get(e),f=i.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=n&Jne?new Xne:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=rae}var $j=aae,iae=ri,sae=$j,oae=ai,lae="[object Arguments]",cae="[object Array]",uae="[object Boolean]",fae="[object Date]",dae="[object Error]",hae="[object Function]",pae="[object Map]",mae="[object Number]",yae="[object Object]",gae="[object RegExp]",vae="[object Set]",bae="[object String]",xae="[object WeakMap]",Sae="[object ArrayBuffer]",wae="[object DataView]",jae="[object Float32Array]",Aae="[object Float64Array]",Oae="[object Int8Array]",Eae="[object Int16Array]",Tae="[object Int32Array]",Nae="[object Uint8Array]",Cae="[object Uint8ClampedArray]",_ae="[object Uint16Array]",Pae="[object Uint32Array]",tt={};tt[jae]=tt[Aae]=tt[Oae]=tt[Eae]=tt[Tae]=tt[Nae]=tt[Cae]=tt[_ae]=tt[Pae]=!0;tt[lae]=tt[cae]=tt[Sae]=tt[uae]=tt[wae]=tt[fae]=tt[dae]=tt[hae]=tt[pae]=tt[mae]=tt[yae]=tt[gae]=tt[vae]=tt[bae]=tt[xae]=!1;function Mae(e){return oae(e)&&sae(e.length)&&!!tt[iae(e)]}var Rae=Mae;function Dae(e){return function(t){return e(t)}}var n4=Dae,Em={exports:{}};Em.exports;(function(e,t){var n=c5,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i&&n.process,o=function(){try{var l=a&&a.require&&a.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(Em,Em.exports);var $ae=Em.exports,kae=Rae,Lae=n4,XT=$ae,WT=XT&&XT.isTypedArray,zae=WT?Lae(WT):kae,r4=zae,Iae=Fre,Bae=Rj,Uae=Mn,Fae=t4,Vae=Dj,Hae=r4,qae=Object.prototype,Kae=qae.hasOwnProperty;function Gae(e,t){var n=Uae(e),r=!n&&Bae(e),a=!n&&!r&&Fae(e),i=!n&&!r&&!a&&Hae(e),s=n||r||a||i,o=s?Iae(e.length,String):[],l=o.length;for(var c in e)(t||Kae.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vae(c,l)))&&o.push(c);return o}var Yae=Gae,Xae=Object.prototype;function Wae(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Xae;return e===n}var Qae=Wae;function Zae(e,t){return function(n){return e(t(n))}}var a4=Zae,Jae=a4,eie=Jae(Object.keys,Object),tie=eie,nie=Qae,rie=tie,aie=Object.prototype,iie=aie.hasOwnProperty;function sie(e){if(!nie(e))return rie(e);var t=[];for(var n in Object(e))iie.call(e,n)&&n!="constructor"&&t.push(n);return t}var oie=sie,lie=yj,cie=$j;function uie(e){return e!=null&&cie(e.length)&&!lie(e)}var Yd=uie,fie=Yae,die=oie,hie=Yd;function pie(e){return hie(e)?fie(e):die(e)}var Ag=pie,mie=_re,yie=Bre,gie=Ag;function vie(e){return mie(e,gie,yie)}var bie=vie,QT=bie,xie=1,Sie=Object.prototype,wie=Sie.hasOwnProperty;function jie(e,t,n,r,a,i){var s=n&xie,o=QT(e),l=o.length,c=QT(t),f=c.length;if(l!=f&&!s)return!1;for(var d=l;d--;){var h=o[d];if(!(s?h in t:wie.call(t,h)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var b=s;++d-1}var Soe=xoe;function woe(e,t,n){for(var r=-1,a=e==null?0:e.length;++r=Loe){var c=t?null:$oe(e);if(c)return koe(c);s=!1,a=Doe,l=new Poe}else l=t?[]:o;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Joe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ele(e){return e.value}function tle(e,t){if(_.isValidElement(e))return _.cloneElement(e,t);if(typeof e=="function")return _.createElement(e,t);t.ref;var n=Zoe(t,Hoe);return _.createElement(Pj,n)}var hN=1,Jr=function(e){function t(){var n;qoe(this,t);for(var r=arguments.length,a=new Array(r),i=0;ihN||Math.abs(a.height-this.lastBoundingBox.height)>hN)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Sa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,s=a.align,o=a.verticalAlign,l=a.margin,c=a.chartWidth,f=a.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((c||0)-p.width)/2}}else d=s==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var m=this.getBBoxSnapshot();h={top:((f||0)-m.height)/2}}else h=o==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Sa(Sa({},d),h)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,s=a.width,o=a.height,l=a.wrapperStyle,c=a.payloadUniqBy,f=a.payload,d=Sa(Sa({position:"absolute",width:s||"auto",height:o||"auto"},this.getDefaultPosition(l)),l);return _.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},tle(i,Sa(Sa({},this.props),{},{payload:f4(f,c,ele)})))}}],[{key:"getWithHeight",value:function(r,a){var i=Sa(Sa({},this.defaultProps),r.props),s=i.layout;return s==="vertical"&&K(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||a}:null}}])}(A.PureComponent);Og(Jr,"displayName","Legend");Og(Jr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var pN=Gd,nle=Rj,rle=Mn,mN=pN?pN.isConcatSpreadable:void 0;function ale(e){return rle(e)||nle(e)||!!(mN&&e&&e[mN])}var ile=ale,sle=J5,ole=ile;function p4(e,t,n,r,a){var i=-1,s=e.length;for(n||(n=ole),a||(a=[]);++i0&&n(o)?t>1?p4(o,t-1,n,r,a):sle(a,o):r||(a[a.length]=o)}return a}var m4=p4;function lle(e){return function(t,n,r){for(var a=-1,i=Object(t),s=r(t),o=s.length;o--;){var l=s[e?o:++a];if(n(i[l],l,i)===!1)break}return t}}var cle=lle,ule=cle,fle=ule(),dle=fle,hle=dle,ple=Ag;function mle(e,t){return e&&hle(e,t,ple)}var y4=mle,yle=Yd;function gle(e,t){return function(n,r){if(n==null)return n;if(!yle(n))return e(n,r);for(var a=n.length,i=t?a:-1,s=Object(n);(t?i--:++it||i&&s&&l&&!o&&!c||r&&s&&l||!n&&l||!a)return 1;if(!r&&!i&&!c&&e=o)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var Ple=_le,bb=Sj,Mle=wj,Rle=ha,Dle=g4,$le=Ele,kle=n4,Lle=Ple,zle=Yc,Ile=Mn;function Ble(e,t,n){t.length?t=bb(t,function(i){return Ile(i)?function(s){return Mle(s,i.length===1?i[0]:i)}:i}):t=[zle];var r=-1;t=bb(t,kle(Rle));var a=Dle(e,function(i,s,o){var l=bb(t,function(c){return c(i)});return{criteria:l,index:++r,value:i}});return $le(a,function(i,s){return Lle(i,s,n)})}var Ule=Ble;function Fle(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Vle=Fle,Hle=Vle,gN=Math.max;function qle(e,t,n){return t=gN(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=gN(r.length-t,0),s=Array(i);++a0){if(++t>=tce)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ice=ace,sce=ece,oce=ice,lce=oce(sce),cce=lce,uce=Yc,fce=Kle,dce=cce;function hce(e,t){return dce(fce(e,t,uce),e+"")}var pce=hce,mce=gj,yce=Yd,gce=Dj,vce=rs;function bce(e,t,n){if(!vce(n))return!1;var r=typeof t;return(r=="number"?yce(n)&&gce(t,n.length):r=="string"&&t in n)?mce(n[t],e):!1}var Eg=bce,xce=m4,Sce=Ule,wce=pce,bN=Eg,jce=wce(function(e,t){if(e==null)return[];var n=t.length;return n>1&&bN(e,t[0],t[1])?t=[]:n>2&&bN(t[0],t[1],t[2])&&(t=[t[0]]),Sce(e,xce(t,1),[])}),Ace=jce;const zj=Ie(Ace);function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function Xx(){return Xx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(hu,"-left"),K(n)&&t&&K(t.x)&&n=t.y),"".concat(hu,"-top"),K(r)&&t&&K(t.y)&&rg?Math.max(f,l[r]):Math.max(d,l[r])}function Ice(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Bce(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipBox,o=e.useTranslate3d,l=e.viewBox,c,f,d;return s.height>0&&s.width>0&&n?(f=wN({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),d=wN({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),c=Ice({translateX:f,translateY:d,useTranslate3d:o})):c=Lce,{cssProperties:c,cssClasses:zce({translateX:f,translateY:d,coordinate:n})}}function nc(e){"@babel/helpers - typeof";return nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nc(e)}function jN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function AN(e){for(var t=1;tON||Math.abs(r.height-this.state.lastBoundingBox.height)>ON)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,o=a.animationDuration,l=a.animationEasing,c=a.children,f=a.coordinate,d=a.hasPayload,h=a.isAnimationActive,p=a.offset,m=a.position,g=a.reverseDirection,b=a.useTranslate3d,y=a.viewBox,v=a.wrapperStyle,x=Bce({allowEscapeViewBox:s,coordinate:f,offsetTopLeft:p,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:y}),w=x.cssClasses,S=x.cssProperties,j=AN(AN({transition:h&&i?"transform ".concat(o,"ms ").concat(l):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},v);return _.createElement("div",{tabIndex:-1,className:w,style:j,ref:function(E){r.wrapperNode=E}},c)}}])}(A.PureComponent),Wce=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},as={isSsr:Wce()};function rc(e){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}function EN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function TN(e){for(var t=1;t0;return _.createElement(Xce,{allowEscapeViewBox:s,animationDuration:o,animationEasing:l,isAnimationActive:h,active:i,coordinate:f,hasPayload:j,offset:p,position:b,reverseDirection:y,useTranslate3d:v,viewBox:x,wrapperStyle:w},sue(c,TN(TN({},this.props),{},{payload:S})))}}])}(A.PureComponent);Ij(Bn,"displayName","Tooltip");Ij(Bn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!as.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var oue=da,lue=function(){return oue.Date.now()},cue=lue,uue=/\s/;function fue(e){for(var t=e.length;t--&&uue.test(e.charAt(t)););return t}var due=fue,hue=due,pue=/^\s+/;function mue(e){return e&&e.slice(0,hue(e)+1).replace(pue,"")}var yue=mue,gue=yue,NN=rs,vue=Bc,CN=NaN,bue=/^[-+]0x[0-9a-f]+$/i,xue=/^0b[01]+$/i,Sue=/^0o[0-7]+$/i,wue=parseInt;function jue(e){if(typeof e=="number")return e;if(vue(e))return CN;if(NN(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=NN(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gue(e);var n=xue.test(e);return n||Sue.test(e)?wue(e.slice(2),n?2:8):bue.test(e)?CN:+e}var j4=jue,Aue=rs,Sb=cue,_N=j4,Oue="Expected a function",Eue=Math.max,Tue=Math.min;function Nue(e,t,n){var r,a,i,s,o,l,c=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Oue);t=_N(t)||0,Aue(n)&&(f=!!n.leading,d="maxWait"in n,i=d?Eue(_N(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(j){var O=r,E=a;return r=a=void 0,c=j,s=e.apply(E,O),s}function m(j){return c=j,o=setTimeout(y,t),f?p(j):s}function g(j){var O=j-l,E=j-c,T=t-O;return d?Tue(T,i-E):T}function b(j){var O=j-l,E=j-c;return l===void 0||O>=t||O<0||d&&E>=i}function y(){var j=Sb();if(b(j))return v(j);o=setTimeout(y,g(j))}function v(j){return o=void 0,h&&r?p(j):(r=a=void 0,s)}function x(){o!==void 0&&clearTimeout(o),c=0,r=l=a=o=void 0}function w(){return o===void 0?s:v(Sb())}function S(){var j=Sb(),O=b(j);if(r=arguments,a=this,l=j,O){if(o===void 0)return m(l);if(d)return clearTimeout(o),o=setTimeout(y,t),p(l)}return o===void 0&&(o=setTimeout(y,t)),s}return S.cancel=x,S.flush=w,S}var Cue=Nue,_ue=Cue,Pue=rs,Mue="Expected a function";function Rue(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(Mue);return Pue(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),_ue(e,t,{leading:r,maxWait:t,trailing:a})}var Due=Rue;const A4=Ie(Due);function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function PN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Dh(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(L=A4(L,g,{trailing:!0,leading:!1}));var D=new ResizeObserver(L),$=S.current.getBoundingClientRect(),P=$.width,k=$.height;return M(P,k),D.observe(S.current),function(){D.disconnect()}},[M,g]);var C=A.useMemo(function(){var L=T.containerWidth,D=T.containerHeight;if(L<0||D<0)return null;kr(Ns(s)||Ns(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,s,l),kr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var $=Ns(s)?L:s,P=Ns(l)?D:l;n&&n>0&&($?P=$/n:P&&($=P*n),h&&P>h&&(P=h)),kr($>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,$,P,s,l,f,d,n);var k=!Array.isArray(p)&&Fa(p.type).endsWith("Chart");return _.Children.map(p,function(I){return _.isValidElement(I)?A.cloneElement(I,Dh({width:$,height:P},k?{style:Dh({height:"100%",width:"100%",maxHeight:P,maxWidth:$},I.props.style)}:{})):I})},[n,p,l,h,d,f,T,s]);return _.createElement("div",{id:b?"".concat(b):void 0,className:ve("recharts-responsive-container",y),style:Dh(Dh({},w),{},{width:s,height:l,minWidth:f,minHeight:d,maxHeight:h}),ref:S},C)}),Tg=function(t){return null};Tg.displayName="Cell";function Bf(e){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(e)}function RN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Jx(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||as.isSsr)return{width:0,height:0};var r=Yue(n),a=JSON.stringify({text:t,copyStyle:r});if(Ro.widthCache[a])return Ro.widthCache[a];try{var i=document.getElementById(DN);i||(i=document.createElement("span"),i.setAttribute("id",DN),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var s=Jx(Jx({},Gue),r);Object.assign(i.style,s),i.textContent="".concat(t);var o=i.getBoundingClientRect(),l={width:o.width,height:o.height};return Ro.widthCache[a]=l,++Ro.cacheCount>Kue&&(Ro.cacheCount=0,Ro.widthCache={}),l}catch{return{width:0,height:0}}},Xue=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Uf(e){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uf(e)}function _m(e,t){return Jue(e)||Zue(e,t)||Que(e,t)||Wue()}function Wue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Que(e,t){if(e){if(typeof e=="string")return $N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $N(e,t)}}function $N(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function UN(e,t){return gfe(e)||yfe(e,t)||mfe(e,t)||pfe()}function pfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mfe(e,t){if(e){if(typeof e=="string")return FN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FN(e,t)}}function FN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(P,k){var I=k.word,F=k.width,H=P[P.length-1];if(H&&(a==null||i||H.width+F+rk.width?P:k})};if(!f)return p;for(var g="…",b=function($){var P=d.slice(0,$),k=N4({breakAll:c,style:l,children:P+g}).wordsWithComputedWidth,I=h(k),F=I.length>s||m(I).width>Number(a);return[F,I]},y=0,v=d.length-1,x=0,w;y<=v&&x<=d.length-1;){var S=Math.floor((y+v)/2),j=S-1,O=b(j),E=UN(O,2),T=E[0],N=E[1],M=b(S),C=UN(M,1),L=C[0];if(!T&&!L&&(y=S+1),T&&L&&(v=S-1),!T&&L){w=N;break}x++}return w||p},VN=function(t){var n=me(t)?[]:t.toString().split(T4);return[{words:n}]},bfe=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,s=t.breakAll,o=t.maxLines;if((n||r)&&!as.isSsr){var l,c,f=N4({breakAll:s,children:a,style:i});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;l=d,c=h}else return VN(a);return vfe({breakAll:s,children:a,maxLines:o,style:i},l,c,n,r)}return VN(a)},HN="#808080",co=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,s=t.lineHeight,o=s===void 0?"1em":s,l=t.capHeight,c=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,g=m===void 0?"end":m,b=t.fill,y=b===void 0?HN:b,v=BN(t,ffe),x=A.useMemo(function(){return bfe({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:d,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,d,v.style,v.width]),w=v.dx,S=v.dy,j=v.angle,O=v.className,E=v.breakAll,T=BN(v,dfe);if(!$t(r)||!$t(i))return null;var N=r+(K(w)?w:0),M=i+(K(S)?S:0),C;switch(g){case"start":C=wb("calc(".concat(c,")"));break;case"middle":C=wb("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(c," / 2))"));break;default:C=wb("calc(".concat(x.length-1," * -").concat(o,")"));break}var L=[];if(d){var D=x[0].width,$=v.width;L.push("scale(".concat((K($)?$/D:1)/D,")"))}return j&&L.push("rotate(".concat(j,", ").concat(N,", ").concat(M,")")),L.length&&(T.transform=L.join(" ")),_.createElement("text",e1({},ie(T,!0),{x:N,y:M,className:ve("recharts-text",O),textAnchor:p,fill:y.includes("url")?HN:y}),x.map(function(P,k){var I=P.words.join(E?"":" ");return _.createElement("tspan",{x:N,dy:k===0?C:o,key:"".concat(I,"-").concat(k)},I)}))};function Ki(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function xfe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Bj(e){let t,n,r;e.length!==2?(t=Ki,n=(o,l)=>Ki(e(o),l),r=(o,l)=>e(o)-l):(t=e===Ki||e===xfe?e:Sfe,n=e,r=e);function a(o,l,c=0,f=o.length){if(c>>1;n(o[d],l)<0?c=d+1:f=d}while(c>>1;n(o[d],l)<=0?c=d+1:f=d}while(cc&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:a,center:s,right:i}}function Sfe(){return 0}function C4(e){return e===null?NaN:+e}function*wfe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const jfe=Bj(Ki),Xd=jfe.right;Bj(C4).center;class qN extends Map{constructor(t,n=Efe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(KN(this,t))}has(t){return super.has(KN(this,t))}set(t,n){return super.set(Afe(this,t),n)}delete(t){return super.delete(Ofe(this,t))}}function KN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Afe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Ofe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Efe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Tfe(e=Ki){if(e===Ki)return _4;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function _4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Nfe=Math.sqrt(50),Cfe=Math.sqrt(10),_fe=Math.sqrt(2);function Pm(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),s=i>=Nfe?10:i>=Cfe?5:i>=_fe?2:1;let o,l,c;return a<0?(c=Math.pow(10,-a)/s,o=Math.round(e*c),l=Math.round(t*c),o/ct&&--l,c=-c):(c=Math.pow(10,a)*s,o=Math.round(e/c),l=Math.round(t/c),o*ct&&--l),l0))return[];if(e===t)return[e];const r=t=a))return[];const o=i-a+1,l=new Array(o);if(r)if(s<0)for(let c=0;c=r)&&(n=r);return n}function YN(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function P4(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?_4:Tfe(a);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+h)),m=Math.min(r,Math.floor(t+(l-c)*d/l+h));P4(e,t,p,m,a)}const i=e[t];let s=n,o=r;for(pu(e,n,t),a(e[r],i)>0&&pu(e,n,r);s0;)--o}a(e[n],i)===0?pu(e,n,o):(++o,pu(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function pu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Pfe(e,t,n){if(e=Float64Array.from(wfe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return YN(e);if(t>=1)return GN(e);var r,a=(r-1)*t,i=Math.floor(a),s=GN(P4(e,i).subarray(0,i+1)),o=YN(e.subarray(i+1));return s+(o-s)*(a-i)}}function Mfe(e,t,n=C4){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return s+(o-s)*(a-i)}}function Rfe(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Lh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Lh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$fe.exec(e))?new Tn(t[1],t[2],t[3],1):(t=kfe.exec(e))?new Tn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Lfe.exec(e))?Lh(t[1],t[2],t[3],t[4]):(t=zfe.exec(e))?Lh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ife.exec(e))?tC(t[1],t[2]/100,t[3]/100,1):(t=Bfe.exec(e))?tC(t[1],t[2]/100,t[3]/100,t[4]):XN.hasOwnProperty(e)?ZN(XN[e]):e==="transparent"?new Tn(NaN,NaN,NaN,0):null}function ZN(e){return new Tn(e>>16&255,e>>8&255,e&255,1)}function Lh(e,t,n,r){return r<=0&&(e=t=n=NaN),new Tn(e,t,n,r)}function Vfe(e){return e instanceof Wd||(e=qf(e)),e?(e=e.rgb(),new Tn(e.r,e.g,e.b,e.opacity)):new Tn}function i1(e,t,n,r){return arguments.length===1?Vfe(e):new Tn(e,t,n,r??1)}function Tn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Fj(Tn,i1,R4(Wd,{brighter(e){return e=e==null?Mm:Math.pow(Mm,e),new Tn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Vf:Math.pow(Vf,e),new Tn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Tn(Xs(this.r),Xs(this.g),Xs(this.b),Rm(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JN,formatHex:JN,formatHex8:Hfe,formatRgb:eC,toString:eC}));function JN(){return`#${Cs(this.r)}${Cs(this.g)}${Cs(this.b)}`}function Hfe(){return`#${Cs(this.r)}${Cs(this.g)}${Cs(this.b)}${Cs((isNaN(this.opacity)?1:this.opacity)*255)}`}function eC(){const e=Rm(this.opacity);return`${e===1?"rgb(":"rgba("}${Xs(this.r)}, ${Xs(this.g)}, ${Xs(this.b)}${e===1?")":`, ${e})`}`}function Rm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cs(e){return e=Xs(e),(e<16?"0":"")+e.toString(16)}function tC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Dr(e,t,n,r)}function D4(e){if(e instanceof Dr)return new Dr(e.h,e.s,e.l,e.opacity);if(e instanceof Wd||(e=qf(e)),!e)return new Dr;if(e instanceof Dr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,l=(i+a)/2;return o?(t===i?s=(n-r)/o+(n0&&l<1?0:s,new Dr(s,o,l,e.opacity)}function qfe(e,t,n,r){return arguments.length===1?D4(e):new Dr(e,t,n,r??1)}function Dr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fj(Dr,qfe,R4(Wd,{brighter(e){return e=e==null?Mm:Math.pow(Mm,e),new Dr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Vf:Math.pow(Vf,e),new Dr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Tn(jb(e>=240?e-240:e+120,a,r),jb(e,a,r),jb(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Dr(nC(this.h),zh(this.s),zh(this.l),Rm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Rm(this.opacity);return`${e===1?"hsl(":"hsla("}${nC(this.h)}, ${zh(this.s)*100}%, ${zh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function nC(e){return e=(e||0)%360,e<0?e+360:e}function zh(e){return Math.max(0,Math.min(1,e||0))}function jb(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Vj=e=>()=>e;function Kfe(e,t){return function(n){return e+n*t}}function Gfe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Yfe(e){return(e=+e)==1?$4:function(t,n){return n-t?Gfe(t,n,e):Vj(isNaN(t)?n:t)}}function $4(e,t){var n=t-e;return n?Kfe(e,n):Vj(isNaN(e)?t:e)}const rC=function e(t){var n=Yfe(t);function r(a,i){var s=n((a=i1(a)).r,(i=i1(i)).r),o=n(a.g,i.g),l=n(a.b,i.b),c=$4(a.opacity,i.opacity);return function(f){return a.r=s(f),a.g=o(f),a.b=l(f),a.opacity=c(f),a+""}}return r.gamma=e,r}(1);function Xfe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;an&&(i=t.slice(n,i),o[s]?o[s]+=i:o[++s]=i),(r=r[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,l.push({i:s,x:Dm(r,a)})),n=Ab.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function sde(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a2?ode:sde,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?i:(l||(l=o(e.map(r),t,n)))(r(s(h)))}return d.invert=function(h){return s(a((c||(c=o(t,e.map(r),Dm)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,$m),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Hj,f()},d.clamp=function(h){return arguments.length?(s=h?!0:mn,f()):s!==mn},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(i=h,d):i},function(h,p){return r=h,a=p,f()}}function qj(){return Ng()(mn,mn)}function lde(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function km(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ac(e){return e=km(Math.abs(e)),e?e[1]:NaN}function cde(e,t){return function(n,r){for(var a=n.length,i=[],s=0,o=e[0],l=0;a>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),i.push(n.substring(a-=o,a+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function ude(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var fde=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kf(e){if(!(t=fde.exec(e)))throw new Error("invalid format: "+e);var t;return new Kj({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Kf.prototype=Kj.prototype;function Kj(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Kj.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function dde(e){e:for(var t=e.length,n=1,r=-1,a;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var Lm;function hde(e,t){var n=km(e,t);if(!n)return Lm=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(Lm=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+km(e,Math.max(0,t+i-1))[0]}function iC(e,t){var n=km(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const sC={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:lde,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>iC(e*100,t),r:iC,s:hde,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function oC(e){return e}var lC=Array.prototype.map,cC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pde(e){var t=e.grouping===void 0||e.thousands===void 0?oC:cde(lC.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?oC:ude(lC.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d,h){d=Kf(d);var p=d.fill,m=d.align,g=d.sign,b=d.symbol,y=d.zero,v=d.width,x=d.comma,w=d.precision,S=d.trim,j=d.type;j==="n"?(x=!0,j="g"):sC[j]||(w===void 0&&(w=12),S=!0,j="g"),(y||p==="0"&&m==="=")&&(y=!0,p="0",m="=");var O=(h&&h.prefix!==void 0?h.prefix:"")+(b==="$"?n:b==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),E=(b==="$"?r:/[%p]/.test(j)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),T=sC[j],N=/[defgprs%]/.test(j);w=w===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function M(C){var L=O,D=E,$,P,k;if(j==="c")D=T(C)+D,C="";else{C=+C;var I=C<0||1/C<0;if(C=isNaN(C)?l:T(Math.abs(C),w),S&&(C=dde(C)),I&&+C==0&&g!=="+"&&(I=!1),L=(I?g==="("?g:o:g==="-"||g==="("?"":g)+L,D=(j==="s"&&!isNaN(C)&&Lm!==void 0?cC[8+Lm/3]:"")+D+(I&&g==="("?")":""),N){for($=-1,P=C.length;++$k||k>57){D=(k===46?a+C.slice($+1):C.slice($))+D,C=C.slice(0,$);break}}}x&&!y&&(C=t(C,1/0));var F=L.length+C.length+D.length,H=F>1)+L+C+D+H.slice(F);break;default:C=H+L+C+D;break}return i(C)}return M.toString=function(){return d+""},M}function f(d,h){var p=Math.max(-8,Math.min(8,Math.floor(ac(h)/3)))*3,m=Math.pow(10,-p),g=c((d=Kf(d),d.type="f",d),{suffix:cC[8+p/3]});return function(b){return g(m*b)}}return{format:c,formatPrefix:f}}var Ih,Gj,k4;mde({thousands:",",grouping:[3],currency:["$",""]});function mde(e){return Ih=pde(e),Gj=Ih.format,k4=Ih.formatPrefix,Ih}function yde(e){return Math.max(0,-ac(Math.abs(e)))}function gde(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ac(t)/3)))*3-ac(Math.abs(e)))}function vde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ac(t)-ac(e))+1}function L4(e,t,n,r){var a=r1(e,t,n),i;switch(r=Kf(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=gde(a,s))&&(r.precision=i),k4(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=vde(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=yde(a))&&(r.precision=i-(r.type==="%")*2);break}}return Gj(r)}function is(e){var t=e.domain;return e.ticks=function(n){var r=t();return t1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return L4(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],o=r[i],l,c,f=10;for(o0;){if(c=n1(s,o,n),c===l)return r[a]=s,r[i]=o,t(r);if(c>0)s=Math.floor(s/c)*c,o=Math.ceil(o/c)*c;else if(c<0)s=Math.ceil(s*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function zm(){var e=qj();return e.copy=function(){return Qd(e,zm())},Or.apply(e,arguments),is(e)}function z4(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,$m),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return z4(e).unknown(t)},e=arguments.length?Array.from(e,$m):[0,1],is(n)}function I4(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return iMath.pow(e,t)}function jde(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function dC(e){return(t,n)=>-e(-t,n)}function Yj(e){const t=e(uC,fC),n=t.domain;let r=10,a,i;function s(){return a=jde(r),i=wde(r),n()[0]<0?(a=dC(a),i=dC(i),e(bde,xde)):e(uC,fC),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const l=n();let c=l[0],f=l[l.length-1];const d=f0){for(;h<=p;++h)for(m=1;mf)break;y.push(g)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(g=h>0?m/i(-h):m*i(h),!(gf)break;y.push(g)}y.length*2{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Kf(l)).precision==null&&(l.trim=!0),l=Gj(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return f=>{let d=f/i(Math.round(a(f)));return d*rn(I4(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function B4(){const e=Yj(Ng()).domain([1,10]);return e.copy=()=>Qd(e,B4()).base(e.base()),Or.apply(e,arguments),e}function hC(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function pC(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Xj(e){var t=1,n=e(hC(t),pC(t));return n.constant=function(r){return arguments.length?e(hC(t=+r),pC(t)):t},is(n)}function U4(){var e=Xj(Ng());return e.copy=function(){return Qd(e,U4()).constant(e.constant())},Or.apply(e,arguments)}function mC(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ade(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ode(e){return e<0?-e*e:e*e}function Wj(e){var t=e(mn,mn),n=1;function r(){return n===1?e(mn,mn):n===.5?e(Ade,Ode):e(mC(n),mC(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},is(t)}function Qj(){var e=Wj(Ng());return e.copy=function(){return Qd(e,Qj()).exponent(e.exponent())},Or.apply(e,arguments),e}function Ede(){return Qj.apply(null,arguments).exponent(.5)}function yC(e){return Math.sign(e)*e*e}function Tde(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function F4(){var e=qj(),t=[0,1],n=!1,r;function a(i){var s=Tde(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(yC(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,$m)).map(yC)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return F4(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Or.apply(a,arguments),is(a)}function V4(){var e=[],t=[],n=[],r;function a(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s0?n[o-1]:e[0],o=n?[r[n-1],t]:[r[c-1],r[c]]},s.unknown=function(l){return arguments.length&&(i=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return H4().domain([e,t]).range(a).unknown(i)},Or.apply(is(s),arguments)}function q4(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Xd(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return q4().domain(e).range(t).unknown(n)},Or.apply(a,arguments)}const Ob=new Date,Eb=new Date;function Lt(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const l=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i0))return l;let c;do l.push(c=new Date(+i)),t(i,o),e(i);while(cLt(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(Ob.setTime(+i),Eb.setTime(+s),e(Ob),e(Eb),Math.floor(n(Ob,Eb))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Im=Lt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Im.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Lt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Im);Im.range;const Ma=1e3,mr=Ma*60,Ra=mr*60,Qa=Ra*24,Zj=Qa*7,gC=Qa*30,Tb=Qa*365,_s=Lt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ma)},(e,t)=>(t-e)/Ma,e=>e.getUTCSeconds());_s.range;const Jj=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma)},(e,t)=>{e.setTime(+e+t*mr)},(e,t)=>(t-e)/mr,e=>e.getMinutes());Jj.range;const eA=Lt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*mr)},(e,t)=>(t-e)/mr,e=>e.getUTCMinutes());eA.range;const tA=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma-e.getMinutes()*mr)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getHours());tA.range;const nA=Lt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getUTCHours());nA.range;const Zd=Lt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*mr)/Qa,e=>e.getDate()-1);Zd.range;const Cg=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>e.getUTCDate()-1);Cg.range;const K4=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>Math.floor(e/Qa));K4.range;function Ao(e){return Lt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*mr)/Zj)}const _g=Ao(0),Bm=Ao(1),Nde=Ao(2),Cde=Ao(3),ic=Ao(4),_de=Ao(5),Pde=Ao(6);_g.range;Bm.range;Nde.range;Cde.range;ic.range;_de.range;Pde.range;function Oo(e){return Lt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Zj)}const Pg=Oo(0),Um=Oo(1),Mde=Oo(2),Rde=Oo(3),sc=Oo(4),Dde=Oo(5),$de=Oo(6);Pg.range;Um.range;Mde.range;Rde.range;sc.range;Dde.range;$de.range;const rA=Lt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());rA.range;const aA=Lt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());aA.range;const Za=Lt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Za.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Za.range;const Ja=Lt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ja.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ja.range;function G4(e,t,n,r,a,i){const s=[[_s,1,Ma],[_s,5,5*Ma],[_s,15,15*Ma],[_s,30,30*Ma],[i,1,mr],[i,5,5*mr],[i,15,15*mr],[i,30,30*mr],[a,1,Ra],[a,3,3*Ra],[a,6,6*Ra],[a,12,12*Ra],[r,1,Qa],[r,2,2*Qa],[n,1,Zj],[t,1,gC],[t,3,3*gC],[e,1,Tb]];function o(c,f,d){const h=fb).right(s,h);if(p===s.length)return e.every(r1(c/Tb,f/Tb,d));if(p===0)return Im.every(Math.max(r1(c,f,d),1));const[m,g]=s[h/s[p-1][2]53)return null;"w"in V||(V.w=1),"Z"in V?(ge=Cb(mu(V.y,0,1)),Xe=ge.getUTCDay(),ge=Xe>4||Xe===0?Um.ceil(ge):Um(ge),ge=Cg.offset(ge,(V.V-1)*7),V.y=ge.getUTCFullYear(),V.m=ge.getUTCMonth(),V.d=ge.getUTCDate()+(V.w+6)%7):(ge=Nb(mu(V.y,0,1)),Xe=ge.getDay(),ge=Xe>4||Xe===0?Bm.ceil(ge):Bm(ge),ge=Zd.offset(ge,(V.V-1)*7),V.y=ge.getFullYear(),V.m=ge.getMonth(),V.d=ge.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),Xe="Z"in V?Cb(mu(V.y,0,1)).getUTCDay():Nb(mu(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(Xe+5)%7:V.w+V.U*7-(Xe+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,Cb(V)):Nb(V)}}function E(G,oe,X,V){for(var _e=0,ge=oe.length,Xe=X.length,ot,dt;_e=Xe)return-1;if(ot=oe.charCodeAt(_e++),ot===37){if(ot=oe.charAt(_e++),dt=S[ot in vC?oe.charAt(_e++):ot],!dt||(V=dt(G,X,V))<0)return-1}else if(ot!=X.charCodeAt(V++))return-1}return V}function T(G,oe,X){var V=c.exec(oe.slice(X));return V?(G.p=f.get(V[0].toLowerCase()),X+V[0].length):-1}function N(G,oe,X){var V=p.exec(oe.slice(X));return V?(G.w=m.get(V[0].toLowerCase()),X+V[0].length):-1}function M(G,oe,X){var V=d.exec(oe.slice(X));return V?(G.w=h.get(V[0].toLowerCase()),X+V[0].length):-1}function C(G,oe,X){var V=y.exec(oe.slice(X));return V?(G.m=v.get(V[0].toLowerCase()),X+V[0].length):-1}function L(G,oe,X){var V=g.exec(oe.slice(X));return V?(G.m=b.get(V[0].toLowerCase()),X+V[0].length):-1}function D(G,oe,X){return E(G,t,oe,X)}function $(G,oe,X){return E(G,n,oe,X)}function P(G,oe,X){return E(G,r,oe,X)}function k(G){return s[G.getDay()]}function I(G){return i[G.getDay()]}function F(G){return l[G.getMonth()]}function H(G){return o[G.getMonth()]}function Y(G){return a[+(G.getHours()>=12)]}function q(G){return 1+~~(G.getMonth()/3)}function te(G){return s[G.getUTCDay()]}function Z(G){return i[G.getUTCDay()]}function ye(G){return l[G.getUTCMonth()]}function J(G){return o[G.getUTCMonth()]}function st(G){return a[+(G.getUTCHours()>=12)]}function Ve(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var oe=j(G+="",x);return oe.toString=function(){return G},oe},parse:function(G){var oe=O(G+="",!1);return oe.toString=function(){return G},oe},utcFormat:function(G){var oe=j(G+="",w);return oe.toString=function(){return G},oe},utcParse:function(G){var oe=O(G+="",!0);return oe.toString=function(){return G},oe}}}var vC={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,Ude=/^%/,Fde=/[\\^$*+?|[\]().{}]/g;function Pe(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i[t.toLowerCase(),n]))}function Hde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function qde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Kde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Gde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Yde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function bC(e,t,n){var r=Gt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function xC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xde(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Wde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Qde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function SC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zde(e,t,n){var r=Gt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function wC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Jde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ehe(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function the(e,t,n){var r=Gt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nhe(e,t,n){var r=Gt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rhe(e,t,n){var r=Ude.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ahe(e,t,n){var r=Gt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ihe(e,t,n){var r=Gt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function jC(e,t){return Pe(e.getDate(),t,2)}function she(e,t){return Pe(e.getHours(),t,2)}function ohe(e,t){return Pe(e.getHours()%12||12,t,2)}function lhe(e,t){return Pe(1+Zd.count(Za(e),e),t,3)}function Y4(e,t){return Pe(e.getMilliseconds(),t,3)}function che(e,t){return Y4(e,t)+"000"}function uhe(e,t){return Pe(e.getMonth()+1,t,2)}function fhe(e,t){return Pe(e.getMinutes(),t,2)}function dhe(e,t){return Pe(e.getSeconds(),t,2)}function hhe(e){var t=e.getDay();return t===0?7:t}function phe(e,t){return Pe(_g.count(Za(e)-1,e),t,2)}function X4(e){var t=e.getDay();return t>=4||t===0?ic(e):ic.ceil(e)}function mhe(e,t){return e=X4(e),Pe(ic.count(Za(e),e)+(Za(e).getDay()===4),t,2)}function yhe(e){return e.getDay()}function ghe(e,t){return Pe(Bm.count(Za(e)-1,e),t,2)}function vhe(e,t){return Pe(e.getFullYear()%100,t,2)}function bhe(e,t){return e=X4(e),Pe(e.getFullYear()%100,t,2)}function xhe(e,t){return Pe(e.getFullYear()%1e4,t,4)}function She(e,t){var n=e.getDay();return e=n>=4||n===0?ic(e):ic.ceil(e),Pe(e.getFullYear()%1e4,t,4)}function whe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Pe(t/60|0,"0",2)+Pe(t%60,"0",2)}function AC(e,t){return Pe(e.getUTCDate(),t,2)}function jhe(e,t){return Pe(e.getUTCHours(),t,2)}function Ahe(e,t){return Pe(e.getUTCHours()%12||12,t,2)}function Ohe(e,t){return Pe(1+Cg.count(Ja(e),e),t,3)}function W4(e,t){return Pe(e.getUTCMilliseconds(),t,3)}function Ehe(e,t){return W4(e,t)+"000"}function The(e,t){return Pe(e.getUTCMonth()+1,t,2)}function Nhe(e,t){return Pe(e.getUTCMinutes(),t,2)}function Che(e,t){return Pe(e.getUTCSeconds(),t,2)}function _he(e){var t=e.getUTCDay();return t===0?7:t}function Phe(e,t){return Pe(Pg.count(Ja(e)-1,e),t,2)}function Q4(e){var t=e.getUTCDay();return t>=4||t===0?sc(e):sc.ceil(e)}function Mhe(e,t){return e=Q4(e),Pe(sc.count(Ja(e),e)+(Ja(e).getUTCDay()===4),t,2)}function Rhe(e){return e.getUTCDay()}function Dhe(e,t){return Pe(Um.count(Ja(e)-1,e),t,2)}function $he(e,t){return Pe(e.getUTCFullYear()%100,t,2)}function khe(e,t){return e=Q4(e),Pe(e.getUTCFullYear()%100,t,2)}function Lhe(e,t){return Pe(e.getUTCFullYear()%1e4,t,4)}function zhe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?sc(e):sc.ceil(e),Pe(e.getUTCFullYear()%1e4,t,4)}function Ihe(){return"+0000"}function OC(){return"%"}function EC(e){return+e}function TC(e){return Math.floor(+e/1e3)}var Do,Z4,J4;Bhe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Bhe(e){return Do=Bde(e),Z4=Do.format,Do.parse,J4=Do.utcFormat,Do.utcParse,Do}function Uhe(e){return new Date(e)}function Fhe(e){return e instanceof Date?+e:+new Date(+e)}function iA(e,t,n,r,a,i,s,o,l,c){var f=qj(),d=f.invert,h=f.domain,p=c(".%L"),m=c(":%S"),g=c("%I:%M"),b=c("%I %p"),y=c("%a %d"),v=c("%b %d"),x=c("%B"),w=c("%Y");function S(j){return(l(j)t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Pfe(e,i/r))},n.copy=function(){return rL(t).domain(e)},ii.apply(n,arguments)}function Rg(){var e=0,t=.5,n=1,r=1,a,i,s,o,l,c=mn,f,d=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+f(g))-i)*(r*gt}var oL=Xhe,Whe=Dg,Qhe=oL,Zhe=Yc;function Jhe(e){return e&&e.length?Whe(e,Zhe,Qhe):void 0}var epe=Jhe;const Di=Ie(epe);function tpe(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*nt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ne.dividedBy=ne.div=function(e){return Va(this,new this.constructor(e))};ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,n=t.constructor;return Ge(Va(t,new n(e),0,1),n.precision)};ne.equals=ne.eq=function(e){return!this.cmp(e)};ne.exponent=function(){return _t(this)};ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0};ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0};ne.isInteger=ne.isint=function(){return this.e>this.d.length-2};ne.isNegative=ne.isneg=function(){return this.s<0};ne.isPositive=ne.ispos=function(){return this.s>0};ne.isZero=function(){return this.s===0};ne.lessThan=ne.lt=function(e){return this.cmp(e)<0};ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1};ne.logarithm=ne.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Vn))throw Error(Sr+"NaN");if(n.s<1)throw Error(Sr+(n.s?"NaN":"-Infinity"));return n.eq(Vn)?new r(0):(ct=!1,t=Va(Gf(n,i),Gf(e,i),i),ct=!0,Ge(t,a))};ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dL(t,e):uL(t,(e.s=-e.s,e))};ne.modulo=ne.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(Sr+"NaN");return n.s?(ct=!1,t=Va(n,e,0,1).times(e),ct=!0,n.minus(t)):Ge(new r(n),a)};ne.naturalExponential=ne.exp=function(){return fL(this)};ne.naturalLogarithm=ne.ln=function(){return Gf(this)};ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?uL(t,e):dL(t,(e.s=-e.s,e))};ne.precision=ne.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ws+e);if(t=_t(a)+1,r=a.d.length-1,n=r*nt+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ne.squareRoot=ne.sqrt=function(){var e,t,n,r,a,i,s,o=this,l=o.constructor;if(o.s<1){if(!o.s)return new l(0);throw Error(Sr+"NaN")}for(e=_t(o),ct=!1,a=Math.sqrt(+o),a==0||a==1/0?(t=ea(o.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Qc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(a.toString()),n=l.precision,a=s=n+3;;)if(i=r,r=i.plus(Va(o,i,s+2)).times(.5),ea(i.d).slice(0,s)===(t=ea(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Ge(i,n+1,0),i.times(i).eq(o)){r=i;break}}else if(t!="9999")break;s+=4}return ct=!0,Ge(r,n)};ne.times=ne.mul=function(e){var t,n,r,a,i,s,o,l,c,f=this,d=f.constructor,h=f.d,p=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=h.length,c=p.length,l=0;){for(t=0,a=l+r;a>r;)o=i[a]+p[r]*h[a-r-1]+t,i[a--]=o%Ut|0,t=o/Ut|0;i[a]=(i[a]+t)%Ut|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,ct?Ge(e,d.precision):e};ne.toDecimalPlaces=ne.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ca(e,0,Wc),t===void 0?t=r.rounding:ca(t,0,8),Ge(n,e+_t(n)+1,t))};ne.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=fo(r,!0):(ca(e,0,Wc),t===void 0?t=a.rounding:ca(t,0,8),r=Ge(new a(r),e+1,t),n=fo(r,!0,e+1)),n};ne.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?fo(a):(ca(e,0,Wc),t===void 0?t=i.rounding:ca(t,0,8),r=Ge(new i(a),e+_t(a)+1,t),n=fo(r.abs(),!1,e+_t(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return Ge(new t(e),_t(e)+1,t.rounding)};ne.toNumber=function(){return+this};ne.toPower=ne.pow=function(e){var t,n,r,a,i,s,o=this,l=o.constructor,c=12,f=+(e=new l(e));if(!e.s)return new l(Vn);if(o=new l(o),!o.s){if(e.s<1)throw Error(Sr+"Infinity");return o}if(o.eq(Vn))return o;if(r=l.precision,e.eq(Vn))return Ge(o,r);if(t=e.e,n=e.d.length-1,s=t>=n,i=o.s,s){if((n=f<0?-f:f)<=cL){for(a=new l(Vn),t=Math.ceil(r/nt+4),ct=!1;n%2&&(a=a.times(o),_C(a.d,t)),n=Qc(n/2),n!==0;)o=o.times(o),_C(o.d,t);return ct=!0,e.s<0?new l(Vn).div(a):Ge(a,r)}}else if(i<0)throw Error(Sr+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,ct=!1,a=e.times(Gf(o,r+c)),ct=!0,a=fL(a),a.s=i,a};ne.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=_t(a),r=fo(a,n<=i.toExpNeg||n>=i.toExpPos)):(ca(e,1,Wc),t===void 0?t=i.rounding:ca(t,0,8),a=Ge(new i(a),e,t),n=_t(a),r=fo(a,e<=n||n<=i.toExpNeg,e)),r};ne.toSignificantDigits=ne.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ca(e,1,Wc),t===void 0?t=r.rounding:ca(t,0,8)),Ge(new r(n),e,t)};ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=_t(e),n=e.constructor;return fo(e,t<=n.toExpNeg||t>=n.toExpPos)};function uL(e,t){var n,r,a,i,s,o,l,c,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),ct?Ge(t,d):t;if(l=e.d,c=t.d,s=e.e,a=t.e,l=l.slice(),i=s-a,i){for(i<0?(r=l,i=-i,o=c.length):(r=c,a=s,o=l.length),s=Math.ceil(d/nt),o=s>o?s+1:o+1,i>o&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(o=l.length,i=c.length,o-i<0&&(i=o,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/Ut|0,l[i]%=Ut;for(n&&(l.unshift(n),++a),o=l.length;l[--o]==0;)l.pop();return t.d=l,t.e=a,ct?Ge(t,d):t}function ca(e,t,n){if(e!==~~e||en)throw Error(Ws+e)}function ea(e){var t,n,r,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;ts?1:-1;else for(o=l=0;oa[o]?1:-1;break}return l}function n(r,a,i){for(var s=0;i--;)r[i]-=s,s=r[i]1;)r.shift()}return function(r,a,i,s){var o,l,c,f,d,h,p,m,g,b,y,v,x,w,S,j,O,E,T=r.constructor,N=r.s==a.s?1:-1,M=r.d,C=a.d;if(!r.s)return new T(r);if(!a.s)throw Error(Sr+"Division by zero");for(l=r.e-a.e,O=C.length,S=M.length,p=new T(N),m=p.d=[],c=0;C[c]==(M[c]||0);)++c;if(C[c]>(M[c]||0)&&--l,i==null?v=i=T.precision:s?v=i+(_t(r)-_t(a))+1:v=i,v<0)return new T(0);if(v=v/nt+2|0,c=0,O==1)for(f=0,C=C[0],v++;(c1&&(C=e(C,f),M=e(M,f),O=C.length,S=M.length),w=O,g=M.slice(0,O),b=g.length;b=Ut/2&&++j;do f=0,o=t(C,g,O,b),o<0?(y=g[0],O!=b&&(y=y*Ut+(g[1]||0)),f=y/j|0,f>1?(f>=Ut&&(f=Ut-1),d=e(C,f),h=d.length,b=g.length,o=t(d,g,h,b),o==1&&(f--,n(d,O16)throw Error(lA+_t(e));if(!e.s)return new f(Vn);for(ct=!1,o=d,s=new f(.03125);e.abs().gte(.1);)e=e.times(s),c+=5;for(r=Math.log(ws(2,c))/Math.LN10*2+5|0,o+=r,n=a=i=new f(Vn),f.precision=o;;){if(a=Ge(a.times(e),o),n=n.times(++l),s=i.plus(Va(a,n,o)),ea(s.d).slice(0,o)===ea(i.d).slice(0,o)){for(;c--;)i=Ge(i.times(i),o);return f.precision=d,t==null?(ct=!0,Ge(i,d)):i}i=s}}function _t(e){for(var t=e.e*nt,n=e.d[0];n>=10;n/=10)t++;return t}function _b(e,t,n){if(t>e.LN10.sd())throw ct=!0,n&&(e.precision=n),Error(Sr+"LN10 precision limit exceeded");return Ge(new e(e.LN10),t)}function mi(e){for(var t="";e--;)t+="0";return t}function Gf(e,t){var n,r,a,i,s,o,l,c,f,d=1,h=10,p=e,m=p.d,g=p.constructor,b=g.precision;if(p.s<1)throw Error(Sr+(p.s?"NaN":"-Infinity"));if(p.eq(Vn))return new g(0);if(t==null?(ct=!1,c=b):c=t,p.eq(10))return t==null&&(ct=!0),_b(g,c);if(c+=h,g.precision=c,n=ea(m),r=n.charAt(0),i=_t(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ea(p.d),r=n.charAt(0),d++;i=_t(p),r>1?(p=new g("0."+n),i++):p=new g(r+"."+n.slice(1))}else return l=_b(g,c+2,b).times(i+""),p=Gf(new g(r+"."+n.slice(1)),c-h).plus(l),g.precision=b,t==null?(ct=!0,Ge(p,b)):p;for(o=s=p=Va(p.minus(Vn),p.plus(Vn),c),f=Ge(p.times(p),c),a=3;;){if(s=Ge(s.times(f),c),l=o.plus(Va(s,new g(a),c)),ea(l.d).slice(0,c)===ea(o.d).slice(0,c))return o=o.times(2),i!==0&&(o=o.plus(_b(g,c+2,b).times(i+""))),o=Va(o,new g(d),c),g.precision=b,t==null?(ct=!0,Ge(o,b)):o;o=l,a+=2}}function CC(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=Qc(n/nt),e.d=[],r=(n+1)%nt,n<0&&(r+=nt),rFm||e.e<-Fm))throw Error(lA+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ge(e,t,n){var r,a,i,s,o,l,c,f,d=e.d;for(s=1,i=d[0];i>=10;i/=10)s++;if(r=t-s,r<0)r+=nt,a=t,c=d[f=0];else{if(f=Math.ceil((r+1)/nt),i=d.length,f>=i)return e;for(c=i=d[f],s=1;i>=10;i/=10)s++;r%=nt,a=r-nt+s}if(n!==void 0&&(i=ws(10,s-a-1),o=c/i%10|0,l=t<0||d[f+1]!==void 0||c%i,l=n<4?(o||l)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||l||n==6&&(r>0?a>0?c/ws(10,s-a):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=_t(e),d.length=1,t=t-i-1,d[0]=ws(10,(nt-t%nt)%nt),e.e=Qc(-t/nt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,i=1,f--):(d.length=f+1,i=ws(10,nt-r),d[f]=a>0?(c/ws(10,s-a)%ws(10,a)|0)*i:0),l)for(;;)if(f==0){(d[0]+=i)==Ut&&(d[0]=1,++e.e);break}else{if(d[f]+=i,d[f]!=Ut)break;d[f--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(ct&&(e.e>Fm||e.e<-Fm))throw Error(lA+_t(e));return e}function dL(e,t){var n,r,a,i,s,o,l,c,f,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ct?Ge(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),s=c-r,s){for(f=s<0,f?(n=l,s=-s,o=d.length):(n=d,r=c,o=l.length),a=Math.max(Math.ceil(p/nt),o)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,o=d.length,f=a0;--a)l[o++]=0;for(a=d.length;a>s;){if(l[--a]0?i=i.charAt(0)+"."+i.slice(1)+mi(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+mi(-a-1)+i,n&&(r=n-s)>0&&(i+=mi(r))):a>=s?(i+=mi(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+mi(r))):((r=a+1)
F?(P.sortIndex=I,t(c,P),n(l)===null&&P===n(c)&&(g?(v(O),O=-1):g=!0,$(S,I-F))):(P.sortIndex=H,t(l,P),m||p||(m=!0,j||(j=!0,C()))),P},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(P){var k=h;return function(){var I=h;h=k;try{return P.apply(this,arguments)}finally{h=I}}}})(KP);qP.exports=KP;var wz=qP.exports,GP={exports:{}},vn={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var jz=A;function YP(e){var t="https://react.dev/errors/"+e;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(XP)}catch(e){console.error(e)}}XP(),GP.exports=vn;var Ez=GP.exports;/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var kt=wz,WP=A,Tz=Ez;function U(e){var t="https://react.dev/errors/"+e;if(1Ho||(e.current=Yb[Ho],Yb[Ho]=null,Ho--)}function Ze(e,t){Ho++,Yb[Ho]=e.current,e.current=t}var na=ua(null),cf=ua(null),ki=ua(null),wp=ua(null);function jp(e,t){switch(Ze(ki,t),Ze(cf,e),Ze(na,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?D2(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=D2(t),e=wD(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}qt(na),Ze(na,e)}function kl(){qt(na),qt(cf),qt(ki)}function Xb(e){e.memoizedState!==null&&Ze(wp,e);var t=na.current,n=wD(t,e.type);t!==n&&(Ze(cf,e),Ze(na,n))}function Ap(e){cf.current===e&&(qt(na),qt(cf)),wp.current===e&&(qt(wp),xf._currentValue=Fs)}var Jg,CA;function ps(e){if(Jg===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jg=t&&t[1]||"",CA=-1)":-1a||l[r]!==c[a]){var f=` +`+l[r].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=r&&0<=a);break}}}finally{ev=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ps(n):""}function Mz(e,t){switch(e.tag){case 26:case 27:case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return e.child!==t&&t!==null?ps("Suspense Fallback"):ps("Suspense");case 19:return ps("SuspenseList");case 0:case 15:return tv(e.type,!1);case 11:return tv(e.type.render,!1);case 1:return tv(e.type,!0);case 31:return ps("Activity");default:return""}}function _A(e){try{var t="",n=null;do t+=Mz(e,n),n=e,e=e.return;while(e);return t}catch(r){return` +Error generating stack: `+r.message+` +`+r.stack}}var Wb=Object.prototype.hasOwnProperty,fS=kt.unstable_scheduleCallback,nv=kt.unstable_cancelCallback,Rz=kt.unstable_shouldYield,Dz=kt.unstable_requestPaint,qn=kt.unstable_now,$z=kt.unstable_getCurrentPriorityLevel,rM=kt.unstable_ImmediatePriority,aM=kt.unstable_UserBlockingPriority,Op=kt.unstable_NormalPriority,kz=kt.unstable_LowPriority,iM=kt.unstable_IdlePriority,Lz=kt.log,zz=kt.unstable_setDisableYieldValue,wd=null,Kn=null;function Ci(e){if(typeof Lz=="function"&&zz(e),Kn&&typeof Kn.setStrictMode=="function")try{Kn.setStrictMode(wd,e)}catch{}}var Gn=Math.clz32?Math.clz32:Uz,Iz=Math.log,Bz=Math.LN2;function Uz(e){return e>>>=0,e===0?32:31-(Iz(e)/Bz|0)|0}var oh=256,lh=262144,ch=4194304;function ms(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function jy(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var a=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~i,r!==0?a=ms(r):(s&=o,s!==0?a=ms(s):n||(n=o&~e,n!==0&&(a=ms(n))))):(o=r&~i,o!==0?a=ms(o):s!==0?a=ms(s):n||(n=r&~e,n!==0&&(a=ms(n)))),a===0?0:t!==0&&t!==a&&!(t&i)&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function jd(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fz(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sM(){var e=ch;return ch<<=1,!(ch&62914560)&&(ch=4194304),e}function rv(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ad(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Vz(e,t,n,r,a,i){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Xz=/[\n"\\]/g;function fr(e){return e.replace(Xz,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Jb(e,t,n,r,a,i,s,o){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+lr(t)):e.value!==""+lr(t)&&(e.value=""+lr(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?e0(e,s,lr(t)):n!=null?e0(e,s,lr(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+lr(o):e.removeAttribute("name")}function mM(e,t,n,r,a,i,s,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Zb(e);return}n=n!=null?""+lr(n):"",t=t!=null?""+lr(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Zb(e)}function e0(e,t,n){t==="number"&&Ep(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function dl(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),n0=!1;if(Ha)try{var eu={};Object.defineProperty(eu,"passive",{get:function(){n0=!0}}),window.addEventListener("test",eu,eu),window.removeEventListener("test",eu,eu)}catch{n0=!1}var _i=null,gS=null,Qh=null;function xM(){if(Qh)return Qh;var e,t=gS,n=t.length,r,a="value"in _i?_i.value:_i.textContent,i=a.length;for(e=0;e=Du),UA=" ",FA=!1;function wM(e,t){switch(e){case"keyup":return jI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Go=!1;function OI(e,t){switch(e){case"compositionend":return jM(t);case"keypress":return t.which!==32?null:(FA=!0,UA);case"textInput":return e=t.data,e===UA&&FA?null:e;default:return null}}function EI(e,t){if(Go)return e==="compositionend"||!bS&&wM(e,t)?(e=xM(),Qh=gS=_i=null,Go=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=GA(n)}}function TM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?TM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function NM(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ep(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ep(e.document)}return t}function xS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var DI=Ha&&"documentMode"in document&&11>=document.documentMode,Yo=null,r0=null,ku=null,a0=!1;function XA(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;a0||Yo==null||Yo!==Ep(r)||(r=Yo,"selectionStart"in r&&xS(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ku&&df(ku,r)||(ku=r,r=Hp(r0,"onSelect"),0>=s,a-=s,Yr=1<<32-Gn(t)+a|n<E?(T=O,O=null):T=O.sibling;var N=h(y,O,x[E],w);if(N===null){O===null&&(O=T);break}e&&O&&N.alternate===null&&t(y,O),v=i(N,v,E),j===null?S=N:j.sibling=N,j=N,O=T}if(E===x.length)return n(y,O),Ce&&Oa(y,E),S;if(O===null){for(;EE?(T=O,O=null):T=O.sibling;var M=h(y,O,N.value,w);if(M===null){O===null&&(O=T);break}e&&O&&M.alternate===null&&t(y,O),v=i(M,v,E),j===null?S=M:j.sibling=M,j=M,O=T}if(N.done)return n(y,O),Ce&&Oa(y,E),S;if(O===null){for(;!N.done;E++,N=x.next())N=d(y,N.value,w),N!==null&&(v=i(N,v,E),j===null?S=N:j.sibling=N,j=N);return Ce&&Oa(y,E),S}for(O=r(O);!N.done;E++,N=x.next())N=p(O,y,E,N.value,w),N!==null&&(e&&N.alternate!==null&&O.delete(N.key===null?E:N.key),v=i(N,v,E),j===null?S=N:j.sibling=N,j=N);return e&&O.forEach(function(C){return t(y,C)}),Ce&&Oa(y,E),S}function b(y,v,x,w){if(typeof x=="object"&&x!==null&&x.type===Vo&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case sh:e:{for(var S=x.key;v!==null;){if(v.key===S){if(S=x.type,S===Vo){if(v.tag===7){n(y,v.sibling),w=a(v,x.props.children),w.return=y,y=w;break e}}else if(v.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===hi&&ys(S)===v.type){n(y,v.sibling),w=a(v,x.props),nu(w,x),w.return=y,y=w;break e}n(y,v);break}else t(y,v);v=v.sibling}x.type===Vo?(w=Vs(x.props.children,y.mode,w,x.key),w.return=y,y=w):(w=Jh(x.type,x.key,x.props,null,y.mode,w),nu(w,x),w.return=y,y=w)}return s(y);case wu:e:{for(S=x.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){n(y,v.sibling),w=a(v,x.children||[]),w.return=y,y=w;break e}else{n(y,v);break}else t(y,v);v=v.sibling}w=dv(x,y.mode,w),w.return=y,y=w}return s(y);case hi:return x=ys(x),b(y,v,x,w)}if(ju(x))return m(y,v,x,w);if(Jc(x)){if(S=Jc(x),typeof S!="function")throw Error(U(150));return x=S.call(x),g(y,v,x,w)}if(typeof x.then=="function")return b(y,v,hh(x),w);if(x.$$typeof===Ca)return b(y,v,dh(y,x),w);ph(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,v!==null&&v.tag===6?(n(y,v.sibling),w=a(v,x),w.return=y,y=w):(n(y,v),w=fv(x,y.mode,w),w.return=y,y=w),s(y)):n(y,v)}return function(y,v,x,w){try{mf=0;var S=b(y,v,x,w);return ml=null,S}catch(O){if(O===Cc||O===Cy)throw O;var j=Fn(29,O,null,y.mode);return j.lanes=w,j.return=y,j}finally{}}}var eo=VM(!0),HM=VM(!1),pi=!1;function CS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function f0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function zi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ii(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Me&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Np(e),$M(e,null,n),t}return Ny(e,r,t,n),Np(e)}function zu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lM(e,n)}}function pv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var d0=!1;function Iu(){if(d0){var e=pl;if(e!==null)throw e}}function Bu(e,t,n,r){d0=!1;var a=e.updateQueue;pi=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var l=o,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==s&&(o===null?f.firstBaseUpdate=c:o.next=c,f.lastBaseUpdate=l))}if(i!==null){var d=a.baseState;s=0,f=c=l=null,o=i;do{var h=o.lane&-536870913,p=h!==o.lane;if(p?(Te&h)===h:(r&h)===h){h!==0&&h===Il&&(d0=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,g=o;h=t;var b=n;switch(g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(b,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,h=typeof m=="function"?m.call(b,d,h):m,h==null)break e;d=it({},d,h);break e;case 2:pi=!0}}h=o.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=a.callbacks,p===null?a.callbacks=[h]:p.push(h))}else p={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(c=f=p,l=d):f=f.next=p,s|=h;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);f===null&&(l=d),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=f,i===null&&(a.shared.lanes=0),Zi|=s,e.lanes=s,e.memoizedState=d}}function qM(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function KM(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ei?i:8;var s=he.T,o={};he.T=o,FS(e,!1,t,n);try{var l=a(),c=he.S;if(c!==null&&c(o,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var f=VI(l,r);Uu(e,t,f,Yn(e))}else Uu(e,t,r,Yn(e))}catch(d){Uu(e,t,{then:function(){},status:"rejected",reason:d},Yn())}finally{De.p=i,s!==null&&o.types!==null&&(s.types=o.types),he.T=s}}function XI(){}function g0(e,t,n,r){if(e.tag!==5)throw Error(U(476));var a=gR(e).queue;yR(e,a,t,Fs,n===null?XI:function(){return vR(e),n(r)})}function gR(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Fs,baseState:Fs,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:Fs},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vR(e){var t=gR(e);t.next===null&&(t=e.alternate.memoizedState),Uu(e,t.next.queue,{},Yn())}function US(){return en(xf)}function bR(){return wt().memoizedState}function xR(){return wt().memoizedState}function WI(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Yn();e=zi(n);var r=Ii(t,e,n);r!==null&&(Nn(r,t,n),zu(r,t,n)),t={cache:ES()},e.payload=t;return}t=t.return}}function QI(e,t,n){var r=Yn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ry(e)?wR(t,n):(n=wS(e,t,n,r),n!==null&&(Nn(n,e,r),jR(n,t,r)))}function SR(e,t,n){var r=Yn();Uu(e,t,n,r)}function Uu(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ry(e))wR(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,o=i(s,n);if(a.hasEagerState=!0,a.eagerState=o,Qn(o,s))return Ny(e,t,a,0),Ye===null&&Ty(),!1}catch{}finally{}if(n=wS(e,t,a,r),n!==null)return Nn(n,e,r),jR(n,t,r),!0}return!1}function FS(e,t,n,r){if(r={lane:2,revertLane:QS(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ry(e)){if(t)throw Error(U(479))}else t=wS(e,n,r,2),t!==null&&Nn(t,e,2)}function Ry(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function wR(e,t){yl=Dp=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function jR(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lM(e,n)}}var gf={readContext:en,use:Py,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};gf.useEffectEvent=pt;var AR={readContext:en,use:Py,useCallback:function(e,t){return fn().memoizedState=[e,t===void 0?null:t],e},useContext:en,useEffect:u2,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,np(4194308,4,fR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return np(4194308,4,e,t)},useInsertionEffect:function(e,t){np(4,2,e,t)},useMemo:function(e,t){var n=fn();t=t===void 0?null:t;var r=e();if(to){Ci(!0);try{e()}finally{Ci(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=fn();if(n!==void 0){var a=n(t);if(to){Ci(!0);try{n(t)}finally{Ci(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=QI.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=fn();return e={current:e},t.memoizedState=e},useState:function(e){e=m0(e);var t=e.queue,n=SR.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:IS,useDeferredValue:function(e,t){var n=fn();return BS(n,e,t)},useTransition:function(){var e=m0(!1);return e=yR.bind(null,xe,e.queue,!0,!1),fn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=xe,a=fn();if(Ce){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ye===null)throw Error(U(349));Te&127||QM(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,u2(JM.bind(null,r,i,e),[e]),r.flags|=2048,Ul(9,{destroy:void 0},ZM.bind(null,r,i,n,t),null),n},useId:function(){var e=fn(),t=Ye.identifierPrefix;if(Ce){var n=Xr,r=Yr;n=(r&~(1<<32-Gn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=$p++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?s.createElement(a,{is:r.is}):s.createElement(a)}}i[Qt]=t,i[_n]=r;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)i.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(tn(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ga(t)}}return et(t),wv(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ga(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(e=ki.current,_o(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Zt,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Qt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||SD(e.nodeValue,n)),e||Wi(t,!0)}else e=qp(e).createTextNode(r),e[Qt]=t,t.stateNode=e}return et(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=_o(t),n!==null){if(e===null){if(!r)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[Qt]=t}else Zs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;et(t),e=!1}else n=hv(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Un(t),t):(Un(t),null);if(t.flags&128)throw Error(U(558))}return et(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=_o(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(U(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(U(317));a[Qt]=t}else Zs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;et(t),a=!1}else a=hv(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Un(t),t):(Un(t),null)}return Un(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),mh(t,t.updateQueue),et(t),null);case 4:return kl(),e===null&&ZS(t.stateNode.containerInfo),et(t),null;case 10:return La(t.type),et(t),null;case 19:if(qt(xt),r=t.memoizedState,r===null)return et(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)ru(r,!1);else{if(vt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Rp(e),i!==null){for(t.flags|=128,ru(r,!1),e=i.updateQueue,t.updateQueue=e,mh(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)kM(n,e),n=n.sibling;return Ze(xt,xt.current&1|2),Ce&&Oa(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&qn()>Ip&&(t.flags|=128,a=!0,ru(r,!1),t.lanes=4194304)}else{if(!a)if(e=Rp(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,mh(t,e),ru(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Ce)return et(t),null}else 2*qn()-r.renderingStartTime>Ip&&n!==536870912&&(t.flags|=128,a=!0,ru(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=qn(),e.sibling=null,n=xt.current,Ze(xt,a?n&1|2:n&1),Ce&&Oa(t,r.treeForkCount),e):(et(t),null);case 22:case 23:return Un(t),_S(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),n=t.updateQueue,n!==null&&mh(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&qt(Hs),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),La(Tt),et(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function nB(e,t){switch(OS(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return La(Tt),kl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ap(t),null;case 31:if(t.memoizedState!==null){if(Un(t),t.alternate===null)throw Error(U(340));Zs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Un(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Zs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qt(xt),null;case 4:return kl(),null;case 10:return La(t.type),null;case 22:case 23:return Un(t),_S(),e!==null&&qt(Hs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return La(Tt),null;case 25:return null;default:return null}}function kR(e,t){switch(OS(t),t.tag){case 3:La(Tt),kl();break;case 26:case 27:case 5:Ap(t);break;case 4:kl();break;case 31:t.memoizedState!==null&&Un(t);break;case 13:Un(t);break;case 19:qt(xt);break;case 10:La(t.type);break;case 22:case 23:Un(t),_S(),e!==null&&qt(Hs);break;case 24:La(Tt)}}function Cd(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,s=n.inst;r=i(),s.destroy=r}n=n.next}while(n!==a)}}catch(o){Ue(t,t.return,o)}}function Qi(e,t,n){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var i=a.next;r=i;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(o!==void 0){s.destroy=void 0,a=t;var l=n,c=o;try{c()}catch(f){Ue(a,l,f)}}}r=r.next}while(r!==i)}}catch(f){Ue(t,t.return,f)}}function LR(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{KM(t,n)}catch(r){Ue(e,e.return,r)}}}function zR(e,t,n){n.props=no(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Ue(e,t,r)}}function Fu(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(a){Ue(e,t,a)}}function Wr(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){Ue(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Ue(e,t,a)}else n.current=null}function IR(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Ue(e,e.return,a)}}function jv(e,t,n){try{var r=e.stateNode;AB(r,e.type,n,t),r[_n]=t}catch(a){Ue(e,e.return,a)}}function BR(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ts(e.type)||e.tag===4}function Av(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||BR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ts(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function w0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_a));else if(r!==4&&(r===27&&ts(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(w0(e,t,n),e=e.sibling;e!==null;)w0(e,t,n),e=e.sibling}function zp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ts(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(zp(e,t,n),e=e.sibling;e!==null;)zp(e,t,n),e=e.sibling}function UR(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);tn(t,r,n),t[Qt]=e,t[_n]=n}catch(i){Ue(e,e.return,i)}}var Na=!1,Et=!1,Ov=!1,j2=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function rB(e,t){if(e=e.containerInfo,C0=Xp,e=NM(e),xS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,o=-1,l=-1,c=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==n||a!==0&&d.nodeType!==3||(o=s+a),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===a&&(o=s),h===i&&++f===r&&(l=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(_0={focusedElem:e,selectionRange:n},Xp=!1,Ft=t;Ft!==null;)if(t=Ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ft=e;else for(;Ft!==null;){switch(t=Ft,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),tn(i,r,n),i[Qt]=e,Vt(i),r=i;break e;case"link":var s=V2("link","href",a).get(r+(n.href||""));if(s){for(var o=0;ob&&(s=b,b=g,g=s);var y=YA(o,g),v=YA(o,b);if(y&&v&&(p.rangeCount!==1||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var x=d.createRange();x.setStart(y.node,y.offset),p.removeAllRanges(),g>b?(p.addRange(x),p.extend(v.node,v.offset)):(x.setEnd(v.node,v.offset),p.addRange(x))}}}}for(d=[],p=o;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;on?32:n,he.T=null,n=O0,O0=null;var i=Ui,s=za;if(Dt=0,Vl=Ui=null,za=0,Me&6)throw Error(U(331));var o=Me;if(Me|=4,ZR(i.current),XR(i,i.current,s,n),Me=o,_d(0,!1),Kn&&typeof Kn.onPostCommitFiberRoot=="function")try{Kn.onPostCommitFiberRoot(wd,i)}catch{}return!0}finally{De.p=a,he.T=r,hD(e,t)}}function T2(e,t,n){t=dr(n,t),t=b0(e.stateNode,t,2),e=Ii(e,t,2),e!==null&&(Ad(e,2),fa(e))}function Ue(e,t,n){if(e.tag===3)T2(e,e,n);else for(;t!==null;){if(t.tag===3){T2(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Bi===null||!Bi.has(r))){e=dr(n,e),n=CR(2),r=Ii(t,n,2),r!==null&&(_R(n,r,t,e),Ad(r,2),fa(r));break}}t=t.return}}function Tv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new sB;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(YS=!0,a.add(n),e=fB.bind(null,e,t,n),t.then(e,e))}function fB(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ye===e&&(Te&n)===n&&(vt===4||vt===3&&(Te&62914560)===Te&&300>qn()-Dy?!(Me&2)&&Hl(e,0):XS|=n,Fl===Te&&(Fl=0)),fa(e)}function mD(e,t){t===0&&(t=sM()),e=vo(e,t),e!==null&&(Ad(e,t),fa(e))}function dB(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),mD(e,n)}function hB(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(U(314))}r!==null&&r.delete(t),mD(e,n)}function pB(e,t){return fS(e,t)}var Fp=null,Fo=null,T0=!1,Vp=!1,Nv=!1,Ri=0;function fa(e){e!==Fo&&e.next===null&&(Fo===null?Fp=Fo=e:Fo=Fo.next=e),Vp=!0,T0||(T0=!0,yB())}function _d(e,t){if(!Nv&&Vp){Nv=!0;do for(var n=!1,r=Fp;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var s=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-Gn(42|e)+1)-1,i&=a&~(s&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,N2(r,i))}else i=Te,i=jy(r,r===Ye?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||jd(r,i)||(n=!0,N2(r,i));r=r.next}while(n);Nv=!1}}function mB(){yD()}function yD(){Vp=T0=!1;var e=0;Ri!==0&&EB()&&(e=Ri);for(var t=qn(),n=null,r=Fp;r!==null;){var a=r.next,i=gD(r,t);i===0?(r.next=null,n===null?Fp=a:n.next=a,a===null&&(Fo=n)):(n=r,(e!==0||i&3)&&(Vp=!0)),r=a}Dt!==0&&Dt!==5||_d(e),Ri!==0&&(Ri=0)}function gD(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0o)break;var f=l.transferSize,d=l.initiatorType;f&&R2(d)&&(l=l.responseEnd,s+=f*(l"u"?null:document;function ED(e,t,n){var r=Pc;if(r&&typeof t=="string"&&t){var a=fr(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),B2.has(a)||(B2.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),tn(t,"link",e),Vt(t),r.head.appendChild(t)))}}function $B(e){ei.D(e),ED("dns-prefetch",e,null)}function kB(e,t){ei.C(e,t),ED("preconnect",e,t)}function LB(e,t,n){ei.L(e,t,n);var r=Pc;if(r&&e&&t){var a='link[rel="preload"][as="'+fr(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+fr(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+fr(n.imageSizes)+'"]')):a+='[href="'+fr(e)+'"]';var i=a;switch(t){case"style":i=ql(e);break;case"script":i=Mc(e)}vr.has(i)||(e=it({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),vr.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(Pd(i))||t==="script"&&r.querySelector(Md(i))||(t=r.createElement("link"),tn(t,"link",e),Vt(t),r.head.appendChild(t)))}}function zB(e,t){ei.m(e,t);var n=Pc;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+fr(r)+'"][href="'+fr(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Mc(e)}if(!vr.has(i)&&(e=it({rel:"modulepreload",href:e},t),vr.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Md(i)))return}r=n.createElement("link"),tn(r,"link",e),Vt(r),n.head.appendChild(r)}}}function IB(e,t,n){ei.S(e,t,n);var r=Pc;if(r&&e){var a=fl(r).hoistableStyles,i=ql(e);t=t||"default";var s=a.get(i);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(Pd(i)))o.loading=5;else{e=it({rel:"stylesheet",href:e,"data-precedence":t},n),(n=vr.get(i))&&JS(e,n);var l=s=r.createElement("link");Vt(l),tn(l,"link",e),l._p=new Promise(function(c,f){l.onload=c,l.onerror=f}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,sp(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},a.set(i,s)}}}function BB(e,t){ei.X(e,t);var n=Pc;if(n&&e){var r=fl(n).hoistableScripts,a=Mc(e),i=r.get(a);i||(i=n.querySelector(Md(a)),i||(e=it({src:e,async:!0},t),(t=vr.get(a))&&ew(e,t),i=n.createElement("script"),Vt(i),tn(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function UB(e,t){ei.M(e,t);var n=Pc;if(n&&e){var r=fl(n).hoistableScripts,a=Mc(e),i=r.get(a);i||(i=n.querySelector(Md(a)),i||(e=it({src:e,async:!0,type:"module"},t),(t=vr.get(a))&&ew(e,t),i=n.createElement("script"),Vt(i),tn(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function U2(e,t,n,r){var a=(a=ki.current)?Kp(a):null;if(!a)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=ql(n.href),n=fl(a).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ql(n.href);var i=fl(a).hoistableStyles,s=i.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=a.querySelector(Pd(e)))&&!i._p&&(s.instance=i,s.state.loading=5),vr.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vr.set(e,n),i||FB(a,e,n,s.state))),t&&r===null)throw Error(U(528,""));return s}if(t&&r!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Mc(n),n=fl(a).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function ql(e){return'href="'+fr(e)+'"'}function Pd(e){return'link[rel="stylesheet"]['+e+"]"}function TD(e){return it({},e,{"data-precedence":e.precedence,precedence:null})}function FB(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),tn(t,"link",n),Vt(t),e.head.appendChild(t))}function Mc(e){return'[src="'+fr(e)+'"]'}function Md(e){return"script[async]"+e}function F2(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+fr(n.href)+'"]');if(r)return t.instance=r,Vt(r),r;var a=it({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Vt(r),tn(r,"style",a),sp(r,n.precedence,e),t.instance=r;case"stylesheet":a=ql(n.href);var i=e.querySelector(Pd(a));if(i)return t.state.loading|=4,t.instance=i,Vt(i),i;r=TD(n),(a=vr.get(a))&&JS(r,a),i=(e.ownerDocument||e).createElement("link"),Vt(i);var s=i;return s._p=new Promise(function(o,l){s.onload=o,s.onerror=l}),tn(i,"link",r),t.state.loading|=4,sp(i,n.precedence,e),t.instance=i;case"script":return i=Mc(n.src),(a=e.querySelector(Md(i)))?(t.instance=a,Vt(a),a):(r=n,(a=vr.get(i))&&(r=it({},n),ew(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),Vt(a),tn(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,sp(r,n.precedence,e));return t.instance}function sp(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,s=0;s title"):null)}function VB(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ND(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function HB(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=ql(r.href),i=t.querySelector(Pd(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Gp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Vt(i);return}i=t.ownerDocument||t,r=TD(r),(a=vr.get(a))&&JS(r,a),i=i.createElement("link"),Vt(i);var s=i;s._p=new Promise(function(o,l){s.onload=o,s.onerror=l}),tn(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Gp.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Dv=0;function qB(e,t){return e.stylesheets&&e.count===0&&lp(e,e.stylesheets),0Dv?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function Gp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yp=null;function lp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yp=new Map,t.forEach(KB,e),Yp=null,Gp.call(e))}function KB(e,t){if(!(t.state.loading&4)){var n=Yp.get(e);if(n)var r=n.get(null);else{n=new Map,Yp.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kD)}catch(e){console.error(e)}}kD(),HP.exports=Sy;var e8=HP.exports;const t8=Ie(e8);var Rd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Rs,Si,jl,OP,n8=(OP=class extends Rd{constructor(){super();ce(this,Rs);ce(this,Si);ce(this,jl);ee(this,jl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,Si)||this.setEventListener(R(this,jl))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Si))==null||t.call(this),ee(this,Si,void 0))}setEventListener(t){var n;ee(this,jl,t),(n=R(this,Si))==null||n.call(this),ee(this,Si,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){R(this,Rs)!==t&&(ee(this,Rs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof R(this,Rs)=="boolean"?R(this,Rs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Rs=new WeakMap,Si=new WeakMap,jl=new WeakMap,OP),iw=new n8,r8={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},wi,rS,EP,a8=(EP=class{constructor(){ce(this,wi,r8);ce(this,rS,!1)}setTimeoutProvider(e){ee(this,wi,e)}setTimeout(e,t){return R(this,wi).setTimeout(e,t)}clearTimeout(e){R(this,wi).clearTimeout(e)}setInterval(e,t){return R(this,wi).setInterval(e,t)}clearInterval(e){R(this,wi).clearInterval(e)}},wi=new WeakMap,rS=new WeakMap,EP),As=new a8;function i8(e){setTimeout(e,0)}var s8=typeof window>"u"||"Deno"in globalThis;function En(){}function o8(e,t){return typeof e=="function"?e(t):e}function z0(e){return typeof e=="number"&&e>=0&&e!==1/0}function LD(e,t){return Math.max(e+(t||0)-Date.now(),0)}function qi(e,t){return typeof e=="function"?e(t):e}function In(e,t){return typeof e=="function"?e(t):e}function Q2(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:s,stale:o}=e;if(s){if(r){if(t.queryHash!==sw(s,t.options))return!1}else if(!Af(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function Z2(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(jf(t.options.mutationKey)!==jf(i))return!1}else if(!Af(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function sw(e,t){return((t==null?void 0:t.queryKeyHashFn)||jf)(e)}function jf(e){return JSON.stringify(e,(t,n)=>B0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Af(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Af(e[n],t[n])):!1}var l8=Object.prototype.hasOwnProperty;function zD(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=J2(e)&&J2(t);if(!r&&!(B0(e)&&B0(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),o=s.length,l=r?new Array(o):{};let c=0;for(let f=0;f{As.setTimeout(t,e)})}function U0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?zD(e,t):t}function u8(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function f8(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ow=Symbol();function ID(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ow?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function BD(e,t){return typeof e=="function"?e(...t):!!e}function d8(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var Of=(()=>{let e=()=>s8;return{isServer(){return e()},setIsServer(t){e=t}}})();function F0(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var h8=i8;function p8(){let e=[],t=0,n=o=>{o()},r=o=>{o()},a=h8;const i=o=>{t?e.push(o):a(()=>{n(o)})},s=()=>{const o=e;e=[],o.length&&a(()=>{r(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{a=o}}}var Wt=p8(),Al,ji,Ol,TP,m8=(TP=class extends Rd{constructor(){super();ce(this,Al,!0);ce(this,ji);ce(this,Ol);ee(this,Ol,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){R(this,ji)||this.setEventListener(R(this,Ol))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,ji))==null||t.call(this),ee(this,ji,void 0))}setEventListener(t){var n;ee(this,Ol,t),(n=R(this,ji))==null||n.call(this),ee(this,ji,t(this.setOnline.bind(this)))}setOnline(t){R(this,Al)!==t&&(ee(this,Al,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return R(this,Al)}},Al=new WeakMap,ji=new WeakMap,Ol=new WeakMap,TP),Qp=new m8;function y8(e){return Math.min(1e3*2**e,3e4)}function UD(e){return(e??"online")==="online"?Qp.isOnline():!0}var V0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function FD(e){let t=!1,n=0,r;const a=F0(),i=()=>a.status!=="pending",s=g=>{var b;if(!i()){const y=new V0(g);h(y),(b=e.onCancel)==null||b.call(e,y)}},o=()=>{t=!0},l=()=>{t=!1},c=()=>iw.isFocused()&&(e.networkMode==="always"||Qp.isOnline())&&e.canRun(),f=()=>UD(e.networkMode)&&e.canRun(),d=g=>{i()||(r==null||r(),a.resolve(g))},h=g=>{i()||(r==null||r(),a.reject(g))},p=()=>new Promise(g=>{var b;r=y=>{(i()||c())&&g(y)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;r=void 0,i()||(g=e.onContinue)==null||g.call(e)}),m=()=>{if(i())return;let g;const b=n===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(d).catch(y=>{var j;if(i())return;const v=e.retry??(Of.isServer()?0:3),x=e.retryDelay??y8,w=typeof x=="function"?x(n,y):x,S=v===!0||typeof v=="number"&&nc()?void 0:p()).then(()=>{t?h(y):m()})})};return{promise:a,status:()=>a.status,cancel:s,continue:()=>(r==null||r(),a),cancelRetry:o,continueRetry:l,canStart:f,start:()=>(f()?m():p().then(m),a)}}var Ds,NP,VD=(NP=class{constructor(){ce(this,Ds)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),z0(this.gcTime)&&ee(this,Ds,As.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Of.isServer()?1/0:5*60*1e3))}clearGcTimeout(){R(this,Ds)!==void 0&&(As.clearTimeout(R(this,Ds)),ee(this,Ds,void 0))}},Ds=new WeakMap,NP);function g8(e){return{onFetch:(t,n)=>{var f,d,h,p,m;const r=t.options,a=(h=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((m=t.state.data)==null?void 0:m.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const b=x=>{d8(x,()=>t.signal,()=>g=!0)},y=ID(t.options,t.fetchOptions),v=async(x,w,S)=>{if(g)return Promise.reject(t.signal.reason);if(w==null&&x.pages.length)return Promise.resolve(x);const O=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:w,direction:S?"backward":"forward",meta:t.options.meta};return b(M),M})(),E=await y(O),{maxPages:T}=t.options,N=S?f8:u8;return{pages:N(x.pages,E,T),pageParams:N(x.pageParams,w,T)}};if(a&&i.length){const x=a==="backward",w=x?v8:tO,S={pages:i,pageParams:s},j=w(r,S);o=await v(S,j,x)}else{const x=e??i.length;do{const w=l===0?s[0]??r.initialPageParam:tO(r,o);if(l>0&&w==null)break;o=await v(o,w),l++}while(l{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function tO(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function v8(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var El,$s,Tl,sr,ks,It,yd,Ls,zn,HD,ja,CP,b8=(CP=class extends VD{constructor(t){super();ce(this,zn);ce(this,El);ce(this,$s);ce(this,Tl);ce(this,sr);ce(this,ks);ce(this,It);ce(this,yd);ce(this,Ls);ee(this,Ls,!1),ee(this,yd,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,ks,t.client),ee(this,sr,R(this,ks).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,$s,rO(this.options)),this.state=t.state??R(this,$s),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return R(this,El)}get promise(){var t;return(t=R(this,It))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,yd),...t},t!=null&&t._type&&ee(this,El,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=rO(this.options);n.data!==void 0&&(this.setState(nO(n.data,n.dataUpdatedAt)),ee(this,$s,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,sr).remove(this)}setData(t,n){const r=U0(this.state.data,t,this.options);return Oe(this,zn,ja).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Oe(this,zn,ja).call(this,{type:"setState",state:t})}cancel(t){var r,a;const n=(r=R(this,It))==null?void 0:r.promise;return(a=R(this,It))==null||a.cancel(t),n?n.then(En).catch(En):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return R(this,$s)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>In(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ow||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>qi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!LD(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,It))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,It))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,sr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(R(this,It)&&(R(this,Ls)||Oe(this,zn,HD).call(this)?R(this,It).cancel({revert:!0}):R(this,It).cancelRetry()),this.scheduleGc()),R(this,sr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Oe(this,zn,ja).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,d,h,p,m,g,b,y,v,x;if(this.state.fetchStatus!=="idle"&&((c=R(this,It))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,It))return R(this,It).continueRetry(),R(this,It).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(S=>S.options.queryFn);w&&this.setOptions(w.options)}const r=new AbortController,a=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(ee(this,Ls,!0),r.signal)})},i=()=>{const w=ID(this.options,n),j=(()=>{const O={client:R(this,ks),queryKey:this.queryKey,meta:this.meta};return a(O),O})();return ee(this,Ls,!1),this.options.persister?this.options.persister(w,j,this):w(j)},o=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:R(this,ks),state:this.state,fetchFn:i};return a(w),w})(),l=R(this,El)==="infinite"?g8(this.options.pages):this.options.behavior;l==null||l.onFetch(o,this),ee(this,Tl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Oe(this,zn,ja).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),ee(this,It,FD({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:w=>{w instanceof V0&&w.revert&&this.setState({...R(this,Tl),fetchStatus:"idle"}),r.abort()},onFail:(w,S)=>{Oe(this,zn,ja).call(this,{type:"failed",failureCount:w,error:S})},onPause:()=>{Oe(this,zn,ja).call(this,{type:"pause"})},onContinue:()=>{Oe(this,zn,ja).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const w=await R(this,It).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(p=(h=R(this,sr).config).onSuccess)==null||p.call(h,w,this),(g=(m=R(this,sr).config).onSettled)==null||g.call(m,w,this.state.error,this),w}catch(w){if(w instanceof V0){if(w.silent)return R(this,It).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Oe(this,zn,ja).call(this,{type:"error",error:w}),(y=(b=R(this,sr).config).onError)==null||y.call(b,w,this),(x=(v=R(this,sr).config).onSettled)==null||x.call(v,this.state.data,w,this),w}finally{this.scheduleGc()}}},El=new WeakMap,$s=new WeakMap,Tl=new WeakMap,sr=new WeakMap,ks=new WeakMap,It=new WeakMap,yd=new WeakMap,Ls=new WeakMap,zn=new WeakSet,HD=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ja=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...qD(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...nO(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,Tl,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Wt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,sr).notify({query:this,type:"updated",action:t})})},CP);function qD(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:UD(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function rO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var jn,Ne,gd,un,zs,Nl,Ea,Ai,vd,Cl,_l,Is,Bs,Oi,Pl,ze,Tu,H0,q0,K0,G0,Y0,X0,W0,KD,_P,x8=(_P=class extends Rd{constructor(t,n){super();ce(this,ze);ce(this,jn);ce(this,Ne);ce(this,gd);ce(this,un);ce(this,zs);ce(this,Nl);ce(this,Ea);ce(this,Ai);ce(this,vd);ce(this,Cl);ce(this,_l);ce(this,Is);ce(this,Bs);ce(this,Oi);ce(this,Pl,new Set);this.options=n,ee(this,jn,t),ee(this,Ai,null),ee(this,Ea,F0()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Ne).addObserver(this),aO(R(this,Ne),this.options)?Oe(this,ze,Tu).call(this):this.updateResult(),Oe(this,ze,G0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Q0(R(this,Ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Q0(R(this,Ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Oe(this,ze,Y0).call(this),Oe(this,ze,X0).call(this),R(this,Ne).removeObserver(this)}setOptions(t){const n=this.options,r=R(this,Ne);if(this.options=R(this,jn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof In(this.options.enabled,R(this,Ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Oe(this,ze,W0).call(this),R(this,Ne).setOptions(this.options),n._defaulted&&!I0(this.options,n)&&R(this,jn).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Ne),observer:this});const a=this.hasListeners();a&&iO(R(this,Ne),r,this.options,n)&&Oe(this,ze,Tu).call(this),this.updateResult(),a&&(R(this,Ne)!==r||In(this.options.enabled,R(this,Ne))!==In(n.enabled,R(this,Ne))||qi(this.options.staleTime,R(this,Ne))!==qi(n.staleTime,R(this,Ne)))&&Oe(this,ze,H0).call(this);const i=Oe(this,ze,q0).call(this);a&&(R(this,Ne)!==r||In(this.options.enabled,R(this,Ne))!==In(n.enabled,R(this,Ne))||i!==R(this,Oi))&&Oe(this,ze,K0).call(this,i)}getOptimisticResult(t){const n=R(this,jn).getQueryCache().build(R(this,jn),t),r=this.createResult(n,t);return w8(this,r)&&(ee(this,un,r),ee(this,Nl,this.options),ee(this,zs,R(this,Ne).state)),r}getCurrentResult(){return R(this,un)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,Ea).status==="pending"&&R(this,Ea).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){R(this,Pl).add(t)}getCurrentQuery(){return R(this,Ne)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=R(this,jn).defaultQueryOptions(t),r=R(this,jn).getQueryCache().build(R(this,jn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Oe(this,ze,Tu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,un)))}createResult(t,n){var T;const r=R(this,Ne),a=this.options,i=R(this,un),s=R(this,zs),o=R(this,Nl),c=t!==r?t.state:R(this,gd),{state:f}=t;let d={...f},h=!1,p;if(n._optimisticResults){const N=this.hasListeners(),M=!N&&aO(t,n),C=N&&iO(t,r,n,a);(M||C)&&(d={...d,...qD(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:b}=d;p=d.data;let y=!1;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let N;i!=null&&i.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(N=i.data,y=!0):N=typeof n.placeholderData=="function"?n.placeholderData((T=R(this,_l))==null?void 0:T.state.data,R(this,_l)):n.placeholderData,N!==void 0&&(b="success",p=U0(i==null?void 0:i.data,N,n),h=!0)}if(n.select&&p!==void 0&&!y)if(i&&p===(s==null?void 0:s.data)&&n.select===R(this,vd))p=R(this,Cl);else try{ee(this,vd,n.select),p=n.select(p),p=U0(i==null?void 0:i.data,p,n),ee(this,Cl,p),ee(this,Ai,null)}catch(N){ee(this,Ai,N)}R(this,Ai)&&(m=R(this,Ai),p=R(this,Cl),g=Date.now(),b="error");const v=d.fetchStatus==="fetching",x=b==="pending",w=b==="error",S=x&&v,j=p!==void 0,E={status:b,fetchStatus:d.fetchStatus,isPending:x,isSuccess:b==="success",isError:w,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:w&&!j,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&j,isStale:lw(t,n),refetch:this.refetch,promise:R(this,Ea),isEnabled:In(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const N=E.data!==void 0,M=E.status==="error"&&!N,C=$=>{M?$.reject(E.error):N&&$.resolve(E.data)},L=()=>{const $=ee(this,Ea,E.promise=F0());C($)},D=R(this,Ea);switch(D.status){case"pending":t.queryHash===r.queryHash&&C(D);break;case"fulfilled":(M||E.data!==D.value)&&L();break;case"rejected":(!M||E.error!==D.reason)&&L();break}}return E}updateResult(){const t=R(this,un),n=this.createResult(R(this,Ne),this.options);if(ee(this,zs,R(this,Ne).state),ee(this,Nl,this.options),R(this,zs).data!==void 0&&ee(this,_l,R(this,Ne)),I0(n,t))return;ee(this,un,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!R(this,Pl).size)return!0;const s=new Set(i??R(this,Pl));return this.options.throwOnError&&s.add("error"),Object.keys(R(this,un)).some(o=>{const l=o;return R(this,un)[l]!==t[l]&&s.has(l)})};Oe(this,ze,KD).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Oe(this,ze,G0).call(this)}},jn=new WeakMap,Ne=new WeakMap,gd=new WeakMap,un=new WeakMap,zs=new WeakMap,Nl=new WeakMap,Ea=new WeakMap,Ai=new WeakMap,vd=new WeakMap,Cl=new WeakMap,_l=new WeakMap,Is=new WeakMap,Bs=new WeakMap,Oi=new WeakMap,Pl=new WeakMap,ze=new WeakSet,Tu=function(t){Oe(this,ze,W0).call(this);let n=R(this,Ne).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(En)),n},H0=function(){Oe(this,ze,Y0).call(this);const t=qi(this.options.staleTime,R(this,Ne));if(Of.isServer()||R(this,un).isStale||!z0(t))return;const r=LD(R(this,un).dataUpdatedAt,t)+1;ee(this,Is,As.setTimeout(()=>{R(this,un).isStale||this.updateResult()},r))},q0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Ne)):this.options.refetchInterval)??!1},K0=function(t){Oe(this,ze,X0).call(this),ee(this,Oi,t),!(Of.isServer()||In(this.options.enabled,R(this,Ne))===!1||!z0(R(this,Oi))||R(this,Oi)===0)&&ee(this,Bs,As.setInterval(()=>{(this.options.refetchIntervalInBackground||iw.isFocused())&&Oe(this,ze,Tu).call(this)},R(this,Oi)))},G0=function(){Oe(this,ze,H0).call(this),Oe(this,ze,K0).call(this,Oe(this,ze,q0).call(this))},Y0=function(){R(this,Is)!==void 0&&(As.clearTimeout(R(this,Is)),ee(this,Is,void 0))},X0=function(){R(this,Bs)!==void 0&&(As.clearInterval(R(this,Bs)),ee(this,Bs,void 0))},W0=function(){const t=R(this,jn).getQueryCache().build(R(this,jn),this.options);if(t===R(this,Ne))return;const n=R(this,Ne);ee(this,Ne,t),ee(this,gd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},KD=function(t){Wt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(R(this,un))}),R(this,jn).getQueryCache().notify({query:R(this,Ne),type:"observerResultsUpdated"})})},_P);function S8(e,t){return In(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&In(t.retryOnMount,e)===!1)}function aO(e,t){return S8(e,t)||e.state.data!==void 0&&Q0(e,t,t.refetchOnMount)}function Q0(e,t,n){if(In(t.enabled,e)!==!1&&qi(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&lw(e,t)}return!1}function iO(e,t,n,r){return(e!==t||In(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&lw(e,n)}function lw(e,t){return In(t.enabled,e)!==!1&&e.isStaleByTime(qi(t.staleTime,e))}function w8(e,t){return!I0(e.getCurrentResult(),t)}var bd,Hr,an,Us,qr,ci,PP,j8=(PP=class extends VD{constructor(t){super();ce(this,qr);ce(this,bd);ce(this,Hr);ce(this,an);ce(this,Us);ee(this,bd,t.client),this.mutationId=t.mutationId,ee(this,an,t.mutationCache),ee(this,Hr,[]),this.state=t.state||A8(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,Hr).includes(t)||(R(this,Hr).push(t),this.clearGcTimeout(),R(this,an).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,Hr,R(this,Hr).filter(n=>n!==t)),this.scheduleGc(),R(this,an).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,Hr).length||(this.state.status==="pending"?this.scheduleGc():R(this,an).remove(this))}continue(){var t;return((t=R(this,Us))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,l,c,f,d,h,p,m,g,b,y,v,x,w,S,j,O;const n=()=>{Oe(this,qr,ci).call(this,{type:"continue"})},r={client:R(this,bd),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Us,FD({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(E,T)=>{Oe(this,qr,ci).call(this,{type:"failed",failureCount:E,error:T})},onPause:()=>{Oe(this,qr,ci).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,an).canRun(this)}));const a=this.state.status==="pending",i=!R(this,Us).canStart();try{if(a)n();else{Oe(this,qr,ci).call(this,{type:"pending",variables:t,isPaused:i}),R(this,an).config.onMutate&&await R(this,an).config.onMutate(t,this,r);const T=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,r));T!==this.state.context&&Oe(this,qr,ci).call(this,{type:"pending",context:T,variables:t,isPaused:i})}const E=await R(this,Us).start();return await((c=(l=R(this,an).config).onSuccess)==null?void 0:c.call(l,E,t,this.state.context,this,r)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,E,t,this.state.context,r)),await((p=(h=R(this,an).config).onSettled)==null?void 0:p.call(h,E,null,this.state.variables,this.state.context,this,r)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,E,null,t,this.state.context,r)),Oe(this,qr,ci).call(this,{type:"success",data:E}),E}catch(E){try{await((y=(b=R(this,an).config).onError)==null?void 0:y.call(b,E,t,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((x=(v=this.options).onError)==null?void 0:x.call(v,E,t,this.state.context,r))}catch(T){Promise.reject(T)}try{await((S=(w=R(this,an).config).onSettled)==null?void 0:S.call(w,void 0,E,this.state.variables,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((O=(j=this.options).onSettled)==null?void 0:O.call(j,void 0,E,t,this.state.context,r))}catch(T){Promise.reject(T)}throw Oe(this,qr,ci).call(this,{type:"error",error:E}),E}finally{R(this,an).runNext(this)}}},bd=new WeakMap,Hr=new WeakMap,an=new WeakMap,Us=new WeakMap,qr=new WeakSet,ci=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Wt.batch(()=>{R(this,Hr).forEach(r=>{r.onMutationUpdate(t)}),R(this,an).notify({mutation:this,type:"updated",action:t})})},PP);function A8(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ta,_r,xd,MP,O8=(MP=class extends Rd{constructor(t={}){super();ce(this,Ta);ce(this,_r);ce(this,xd);this.config=t,ee(this,Ta,new Set),ee(this,_r,new Map),ee(this,xd,0)}build(t,n,r){const a=new j8({client:t,mutationCache:this,mutationId:++rh(this,xd)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){R(this,Ta).add(t);const n=Sh(t);if(typeof n=="string"){const r=R(this,_r).get(n);r?r.push(t):R(this,_r).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Ta).delete(t)){const n=Sh(t);if(typeof n=="string"){const r=R(this,_r).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&R(this,_r).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Sh(t);if(typeof n=="string"){const r=R(this,_r).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=Sh(t);if(typeof n=="string"){const a=(r=R(this,_r).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wt.batch(()=>{R(this,Ta).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Ta).clear(),R(this,_r).clear()})}getAll(){return Array.from(R(this,Ta))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Z2(n,r))}findAll(t={}){return this.getAll().filter(n=>Z2(t,n))}notify(t){Wt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Wt.batch(()=>Promise.all(t.map(n=>n.continue().catch(En))))}},Ta=new WeakMap,_r=new WeakMap,xd=new WeakMap,MP);function Sh(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Kr,RP,E8=(RP=class extends Rd{constructor(t={}){super();ce(this,Kr);this.config=t,ee(this,Kr,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??sw(a,n);let s=this.get(i);return s||(s=new b8({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){R(this,Kr).has(t.queryHash)||(R(this,Kr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=R(this,Kr).get(t.queryHash);n&&(t.destroy(),n===t&&R(this,Kr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,Kr).get(t)}getAll(){return[...R(this,Kr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Q2(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Q2(t,r)):n}notify(t){Wt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kr=new WeakMap,RP),mt,Ei,Ti,Ml,Rl,Ni,Dl,$l,DP,T8=(DP=class{constructor(e={}){ce(this,mt);ce(this,Ei);ce(this,Ti);ce(this,Ml);ce(this,Rl);ce(this,Ni);ce(this,Dl);ce(this,$l);ee(this,mt,e.queryCache||new E8),ee(this,Ei,e.mutationCache||new O8),ee(this,Ti,e.defaultOptions||{}),ee(this,Ml,new Map),ee(this,Rl,new Map),ee(this,Ni,0)}mount(){rh(this,Ni)._++,R(this,Ni)===1&&(ee(this,Dl,iw.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,mt).onFocus())})),ee(this,$l,Qp.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,mt).onOnline())})))}unmount(){var e,t;rh(this,Ni)._--,R(this,Ni)===0&&((e=R(this,Dl))==null||e.call(this),ee(this,Dl,void 0),(t=R(this,$l))==null||t.call(this),ee(this,$l,void 0))}isFetching(e){return R(this,mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,Ei).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,mt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=R(this,mt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(qi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return R(this,mt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=R(this,mt).get(r.queryHash),i=a==null?void 0:a.state.data,s=o8(t,i);if(s!==void 0)return R(this,mt).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Wt.batch(()=>R(this,mt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,mt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=R(this,mt);Wt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=R(this,mt);return Wt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Wt.batch(()=>R(this,mt).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(En).catch(En)}invalidateQueries(e,t={}){return Wt.batch(()=>(R(this,mt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Wt.batch(()=>R(this,mt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(En)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(En)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=R(this,mt).build(this,t);return n.isStaleByTime(qi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(En).catch(En)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(En).catch(En)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Qp.isOnline()?R(this,Ei).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,mt)}getMutationCache(){return R(this,Ei)}getDefaultOptions(){return R(this,Ti)}setDefaultOptions(e){ee(this,Ti,e)}setQueryDefaults(e,t){R(this,Ml).set(jf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,Ml).values()],n={};return t.forEach(r=>{Af(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){R(this,Rl).set(jf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,Rl).values()],n={};return t.forEach(r=>{Af(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,Ti).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sw(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ow&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,Ti).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,mt).clear(),R(this,Ei).clear()}},mt=new WeakMap,Ei=new WeakMap,Ti=new WeakMap,Ml=new WeakMap,Rl=new WeakMap,Ni=new WeakMap,Dl=new WeakMap,$l=new WeakMap,DP),GD=A.createContext(void 0),nn=e=>{const t=A.useContext(GD);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},N8=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(GD.Provider,{value:e,children:t})),YD=A.createContext(!1),C8=()=>A.useContext(YD);YD.Provider;function _8(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var P8=A.createContext(_8()),M8=()=>A.useContext(P8),R8=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?BD(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},D8=e=>{A.useEffect(()=>{e.clearReset()},[e])},$8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||BD(n,[e.error,r])),k8=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},L8=(e,t)=>e.isLoading&&e.isFetching&&!t,z8=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,sO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function I8(e,t,n){var p,m,g,b;const r=C8(),a=M8(),i=nn(),s=i.defaultQueryOptions(e);(m=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||m.call(p,s);const o=i.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=r?"isRestoring":l?"optimistic":void 0,k8(s),R8(s,a,o),D8(a);const c=!i.getQueryCache().get(s.queryHash),[f]=A.useState(()=>new t(i,s)),d=f.getOptimisticResult(s),h=!r&&l;if(A.useSyncExternalStore(A.useCallback(y=>{const v=h?f.subscribe(Wt.batchCalls(y)):En;return f.updateResult(),v},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),A.useEffect(()=>{f.setOptions(s)},[s,f]),z8(s,d))throw sO(s,f,a);if($8({result:d,errorResetBoundary:a,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((b=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||b.call(g,s,d),s.experimental_prefetchInRender&&!Of.isServer()&&L8(d,r)){const y=c?sO(s,f,a):o==null?void 0:o.promise;y==null||y.catch(En).finally(()=>{f.updateResult()})}return s.notifyOnChangeProps?d:f.trackResult(d)}function se(e,t){return I8(e,x8)}/** + * react-router v7.17.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */var oO="popstate";function lO(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function B8(e={}){function t(r,a){var c;let i=(c=a.state)==null?void 0:c.masked,{pathname:s,search:o,hash:l}=i||r.location;return Z0("",{pathname:s,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Ef(a)}return F8(t,n,null,e)}function ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function br(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function U8(){return Math.random().toString(36).substring(2,10)}function cO(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Z0(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Rc(t):t,state:n,key:t&&t.key||r||U8(),mask:a}}function Ef({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Rc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function F8(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,s=a.history,o="POP",l=null,c=f();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function f(){return(s.state||{idx:null}).idx}function d(){o="POP";let b=f(),y=b==null?null:b-c;c=b,l&&l({action:o,location:g.location,delta:y})}function h(b,y){o="PUSH";let v=lO(b)?b:Z0(g.location,b,y);c=f()+1;let x=cO(v,c),w=g.createHref(v.mask||v);try{s.pushState(x,"",w)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;a.location.assign(w)}i&&l&&l({action:o,location:g.location,delta:1})}function p(b,y){o="REPLACE";let v=lO(b)?b:Z0(g.location,b,y);c=f();let x=cO(v,c),w=g.createHref(v.mask||v);s.replaceState(x,"",w),i&&l&&l({action:o,location:g.location,delta:0})}function m(b){return V8(a,b)}let g={get action(){return o},get location(){return e(a,s)},listen(b){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(oO,d),l=b,()=>{a.removeEventListener(oO,d),l=null}},createHref(b){return t(a,b)},createURL:m,encodeLocation(b){let y=m(b);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(b){return s.go(b)}};return g}function V8(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),ut(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ef(t);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function XD(e,t,n="/"){return H8(e,t,n,!1)}function H8(e,t,n,r,a){let i=typeof t=="string"?Rc(t):t,s=Xa(i.pathname||"/",n);if(s==null)return null;let o=q8(e),l=null,c=rU(s);for(let f=0;l==null&&f{let f={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&l)return;ut(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=$r([r,f.relativePath]),h=n.concat(f);s.children&&s.children.length>0&&(ut(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),WD(s.children,t,h,d,l)),!(s.path==null&&!s.index)&&t.push({path:d,score:J8(d,s.index),routesMeta:h})};return e.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let c of QD(s.path))i(s,o,!0,c)}),t}function QD(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let s=QD(r.join("/")),o=[];return o.push(...s.map(l=>l===""?i:[i,l].join("/"))),a&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function K8(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:eU(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var G8=/^:[\w-]+$/,Y8=3,X8=2,W8=1,Q8=10,Z8=-2,uO=e=>e==="*";function J8(e,t){let n=e.split("/"),r=n.length;return n.some(uO)&&(r+=Z8),t&&(r+=X8),n.filter(a=>!uO(a)).reduce((a,i)=>a+(G8.test(i)?Y8:i===""?W8:Q8),r)}function eU(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function tU(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",s=[];for(let o=0;o{if(f==="*"){let m=o[h]||"";s=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const p=o[h];return d&&!p?c[f]=void 0:c[f]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:e}}function nU(e,t=!1,n=!0){br(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l,c,f)=>{if(r.push({paramName:o,isOptional:l!=null}),l){let d=f.charAt(c+s.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function rU(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return br(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Xa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var aU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function iU(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Rc(e):e,i;return n?(n=ZD(n),n.startsWith("/")?i=fO(n.substring(1),"/"):i=fO(n,t)):i=t,{pathname:i,search:lU(r),hash:cU(a)}}function fO(e,t){let n=Jp(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function $v(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function sU(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function cw(e){let t=sU(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Iy(e,t,n,r=!1){let a;typeof e=="string"?a=Rc(e):(a={...e},ut(!a.pathname||!a.pathname.includes("?"),$v("?","pathname","search",a)),ut(!a.pathname||!a.pathname.includes("#"),$v("#","pathname","hash",a)),ut(!a.search||!a.search.includes("#"),$v("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,o;if(s==null)o=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;a.pathname=h.join("/")}o=d>=0?t[d]:"/"}let l=iU(a,o),c=s&&s!=="/"&&s.endsWith("/"),f=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}var ZD=e=>e.replace(/\/\/+/g,"/"),$r=e=>ZD(e.join("/")),Jp=e=>e.replace(/\/+$/,""),oU=e=>Jp(e).replace(/^\/*/,"/"),lU=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cU=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,uU=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function fU(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function dU(e){let t=e.map(n=>n.route.path).filter(Boolean);return $r(t)||"/"}var JD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function e$(e,t){let n=e;if(typeof n!="string"||!aU.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(JD)try{let i=new URL(window.location.href),s=n.startsWith("//")?new URL(i.protocol+n):new URL(n),o=Xa(s.pathname,t);s.origin===i.origin&&o!=null?n=o+s.search+s.hash:a=!0}catch{br(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var t$=["POST","PUT","PATCH","DELETE"];new Set(t$);var hU=["GET",...t$];new Set(hU);var Dc=A.createContext(null);Dc.displayName="DataRouter";var By=A.createContext(null);By.displayName="DataRouterState";var n$=A.createContext(!1);function pU(){return A.useContext(n$)}var r$=A.createContext({isTransitioning:!1});r$.displayName="ViewTransition";var mU=A.createContext(new Map);mU.displayName="Fetchers";var yU=A.createContext(null);yU.displayName="Await";var er=A.createContext(null);er.displayName="Navigation";var Dd=A.createContext(null);Dd.displayName="Location";var wr=A.createContext({outlet:null,matches:[],isDataRoute:!1});wr.displayName="Route";var uw=A.createContext(null);uw.displayName="RouteError";var a$="REACT_ROUTER_ERROR",gU="REDIRECT",vU="ROUTE_ERROR_RESPONSE";function bU(e){if(e.startsWith(`${a$}:${gU}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function xU(e){if(e.startsWith(`${a$}:${vU}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new uU(t.status,t.statusText,t.data)}catch{}}function SU(e,{relative:t}={}){ut($c(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=A.useContext(er),{hash:a,pathname:i,search:s}=$d(e,{relative:t}),o=i;return n!=="/"&&(o=i==="/"?n:$r([n,i])),r.createHref({pathname:o,search:s,hash:a})}function $c(){return A.useContext(Dd)!=null}function jr(){return ut($c(),"useLocation() may be used only in the context of a component."),A.useContext(Dd).location}var i$="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function s$(e){A.useContext(er).static||A.useLayoutEffect(e)}function Kt(){let{isDataRoute:e}=A.useContext(wr);return e?kU():wU()}function wU(){ut($c(),"useNavigate() may be used only in the context of a component.");let e=A.useContext(Dc),{basename:t,navigator:n}=A.useContext(er),{matches:r}=A.useContext(wr),{pathname:a}=jr(),i=JSON.stringify(cw(r)),s=A.useRef(!1);return s$(()=>{s.current=!0}),A.useCallback((l,c={})=>{if(br(s.current,i$),!s.current)return;if(typeof l=="number"){n.go(l);return}let f=Iy(l,JSON.parse(i),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:$r([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,i,a,e])}var jU=A.createContext(null);function AU(e){let t=A.useContext(wr).outlet;return A.useMemo(()=>t&&A.createElement(jU.Provider,{value:e},t),[t,e])}function o$(){let{matches:e}=A.useContext(wr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function $d(e,{relative:t}={}){let{matches:n}=A.useContext(wr),{pathname:r}=jr(),a=JSON.stringify(cw(n));return A.useMemo(()=>Iy(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function OU(e,t){return l$(e,t)}function l$(e,t,n){var b;ut($c(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=A.useContext(er),{matches:a}=A.useContext(wr),i=a[a.length-1],s=i?i.params:{},o=i?i.pathname:"/",l=i?i.pathnameBase:"/",c=i&&i.route;{let y=c&&c.path||"";u$(o,!c||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${o}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let f=jr(),d;if(t){let y=typeof t=="string"?Rc(t):t;ut(l==="/"||((b=y.pathname)==null?void 0:b.startsWith(l)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=f;let h=d.pathname||"/",p=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let m=n&&n.state.matches.length?n.state.matches.map(y=>Object.assign(y,{route:n.manifest[y.route.id]||y.route})):XD(e,{pathname:p});br(c||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),br(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let g=_U(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:$r([l,r.encodeLocation?r.encodeLocation(y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:$r([l,r.encodeLocation?r.encodeLocation(y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),a,n);return t&&g?A.createElement(Dd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},g):g}function EU(){let e=$U(),t=fU(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:i},"ErrorBoundary")," or"," ",A.createElement("code",{style:i},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),n?A.createElement("pre",{style:a},n):null,s)}var TU=A.createElement(EU,null),c$=class extends A.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=xU(e.digest);n&&(e=n)}let t=e!==void 0?A.createElement(wr.Provider,{value:this.props.routeContext},A.createElement(uw.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?A.createElement(NU,{error:e},t):t}};c$.contextType=n$;var kv=new WeakMap;function NU({children:e,error:t}){let{basename:n}=A.useContext(er);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=bU(t.digest);if(r){let a=kv.get(t);if(a)throw a;let i=e$(r.location,n);if(JD&&!kv.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw kv.set(t,s),s}return A.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function CU({routeContext:e,match:t,children:n}){let r=A.useContext(Dc);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(wr.Provider,{value:e},n)}function _U(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let f=a.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);ut(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let s=!1,o=-1;if(n&&r){s=r.renderFallback;for(let f=0;f=0?a=a.slice(0,o+1):a=[a[0]];break}}}}let l=n==null?void 0:n.onError,c=r&&l?(f,d)=>{var h,p;l(f,{location:r.location,params:((p=(h=r.matches)==null?void 0:h[0])==null?void 0:p.params)??{},pattern:dU(r.matches),errorInfo:d})}:void 0;return a.reduceRight((f,d,h)=>{let p,m=!1,g=null,b=null;r&&(p=i&&d.route.id?i[d.route.id]:void 0,g=d.route.errorElement||TU,s&&(o<0&&h===0?(u$("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,b=null):o===h&&(m=!0,b=d.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,h+1)),v=()=>{let x;return p?x=g:m?x=b:d.route.Component?x=A.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=f,A.createElement(CU,{match:d,routeContext:{outlet:f,matches:y,isDataRoute:r!=null},children:x})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?A.createElement(c$,{location:r.location,revalidation:r.revalidation,component:g,error:p,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:c}):v()},null)}function fw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function PU(e){let t=A.useContext(Dc);return ut(t,fw(e)),t}function MU(e){let t=A.useContext(By);return ut(t,fw(e)),t}function RU(e){let t=A.useContext(wr);return ut(t,fw(e)),t}function dw(e){let t=RU(e),n=t.matches[t.matches.length-1];return ut(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function DU(){return dw("useRouteId")}function $U(){var r;let e=A.useContext(uw),t=MU("useRouteError"),n=dw("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function kU(){let{router:e}=PU("useNavigate"),t=dw("useNavigate"),n=A.useRef(!1);return s$(()=>{n.current=!0}),A.useCallback(async(a,i={})=>{br(n.current,i$),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var dO={};function u$(e,t,n){!t&&!dO[e]&&(dO[e]=!0,br(!1,n))}A.memo(LU);function LU({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:i}){return l$(e,void 0,{manifest:t,state:r,isStatic:a,onError:i})}function em({to:e,replace:t,state:n,relative:r}){ut($c()," may be used only in the context of a component.");let{static:a}=A.useContext(er);br(!a," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:i}=A.useContext(wr),{pathname:s}=jr(),o=Kt(),l=Iy(e,cw(i),s,r==="path"),c=JSON.stringify(l);return A.useEffect(()=>{o(JSON.parse(c),{replace:t,state:n,relative:r})},[o,c,r,t,n]),null}function f$(e){return AU(e.context)}function Se(e){ut(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function zU({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,useTransitions:s}){ut(!$c(),"You cannot render a inside another . You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=A.useMemo(()=>({basename:o,navigator:a,static:i,useTransitions:s,future:{}}),[o,a,i,s]);typeof n=="string"&&(n=Rc(n));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:p="default",mask:m}=n,g=A.useMemo(()=>{let b=Xa(c,o);return b==null?null:{location:{pathname:b,search:f,hash:d,state:h,key:p,mask:m},navigationType:r}},[o,c,f,d,h,p,r,m]);return br(g!=null,` is not able to match the URL "${c}${f}${d}" because it does not start with the basename, so the won't render anything.`),g==null?null:A.createElement(er.Provider,{value:l},A.createElement(Dd.Provider,{children:t,value:g}))}function IU({children:e,location:t}){return OU(J0(e),t)}function J0(e,t=[]){let n=[];return A.Children.forEach(e,(r,a)=>{if(!A.isValidElement(r))return;let i=[...t,a];if(r.type===A.Fragment){n.push.apply(n,J0(r.props.children,i));return}ut(r.type===Se,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),ut(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=J0(r.props.children,i)),n.push(s)}),n}var up="get",fp="application/x-www-form-urlencoded";function Uy(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function BU(e){return Uy(e)&&e.tagName.toLowerCase()==="button"}function UU(e){return Uy(e)&&e.tagName.toLowerCase()==="form"}function FU(e){return Uy(e)&&e.tagName.toLowerCase()==="input"}function VU(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HU(e,t){return e.button===0&&(!t||t==="_self")&&!VU(e)}function ex(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function qU(e,t){let n=ex(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var wh=null;function KU(){if(wh===null)try{new FormData(document.createElement("form"),0),wh=!1}catch{wh=!0}return wh}var GU=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lv(e){return e!=null&&!GU.has(e)?(br(!1,`"${e}" is not a valid \`encType\` for \`\`/\`\` and will default to "${fp}"`),null):e}function YU(e,t){let n,r,a,i,s;if(UU(e)){let o=e.getAttribute("action");r=o?Xa(o,t):null,n=e.getAttribute("method")||up,a=Lv(e.getAttribute("enctype"))||fp,i=new FormData(e)}else if(BU(e)||FU(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a or without a ');let l=e.getAttribute("formaction")||o.getAttribute("action");if(r=l?Xa(l,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||up,a=Lv(e.getAttribute("formenctype"))||Lv(o.getAttribute("enctype"))||fp,i=new FormData(o,e),!KU()){let{name:c,type:f,value:d}=e;if(f==="image"){let h=c?`${c}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else c&&i.append(c,d)}}else{if(Uy(e))throw new Error('Cannot submit element that is not , , or ');n=up,r=null,a=fp,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function hw(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function d$(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&Xa(a.pathname,t)==="/"?a.pathname=`${Jp(t)}/_root.${r}`:a.pathname=`${Jp(a.pathname)}.${r}`,a}async function XU(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function WU(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function QU(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await XU(i,n);return s.links?s.links():[]}return[]}));return t7(r.flat(1).filter(WU).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function hO(e,t,n,r,a,i){let s=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,o=(l,c)=>{var f;return n[c].pathname!==l.pathname||((f=n[c].route.path)==null?void 0:f.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,c)=>s(l,c)||o(l,c)):i==="data"?t.filter((l,c)=>{var d;let f=r.routes[l.route.id];if(!f||!f.hasLoader)return!1;if(s(l,c)||o(l,c))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function ZU(e,t,{includeHydrateFallback:n}={}){return JU(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function JU(e){return[...new Set(e)]}function e7(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function t7(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(e7(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function pw(){let e=A.useContext(Dc);return hw(e,"You must render this element inside a element"),e}function n7(){let e=A.useContext(By);return hw(e,"You must render this element inside a element"),e}var mw=A.createContext(void 0);mw.displayName="FrameworkContext";function yw(){let e=A.useContext(mw);return hw(e,"You must render this element inside a element"),e}function r7(e,t){let n=A.useContext(mw),[r,a]=A.useState(!1),[i,s]=A.useState(!1),{onFocus:o,onBlur:l,onMouseEnter:c,onMouseLeave:f,onTouchStart:d}=t,h=A.useRef(null);A.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let g=y=>{y.forEach(v=>{s(v.isIntersecting)})},b=new IntersectionObserver(g,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),A.useEffect(()=>{if(r){let g=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(g)}}},[r]);let p=()=>{a(!0)},m=()=>{a(!1),s(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:su(o,p),onBlur:su(l,m),onMouseEnter:su(c,p),onMouseLeave:su(f,m),onTouchStart:su(d,p)}]:[!1,h,{}]}function su(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function a7({page:e,...t}){let n=pU(),{router:r}=pw(),a=A.useMemo(()=>XD(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?A.createElement(s7,{page:e,matches:a,...t}):A.createElement(o7,{page:e,matches:a,...t}):null}function i7(e){let{manifest:t,routeModules:n}=yw(),[r,a]=A.useState([]);return A.useEffect(()=>{let i=!1;return QU(e,t,n).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,n]),r}function s7({page:e,matches:t,...n}){let r=jr(),{future:a}=yw(),{basename:i}=pw(),s=A.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let o=d$(e,i,a.v8_trailingSlashAwareDataRequests,"rsc"),l=!1,c=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?l=!0:c.push(f.route.id);return l&&c.length>0&&o.searchParams.set("_routes",c.join(",")),[o.pathname+o.search]},[i,a.v8_trailingSlashAwareDataRequests,e,r,t]);return A.createElement(A.Fragment,null,s.map(o=>A.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...n})))}function o7({page:e,matches:t,...n}){let r=jr(),{future:a,manifest:i,routeModules:s}=yw(),{basename:o}=pw(),{loaderData:l,matches:c}=n7(),f=A.useMemo(()=>hO(e,t,c,i,r,"data"),[e,t,c,i,r]),d=A.useMemo(()=>hO(e,t,c,i,r,"assets"),[e,t,c,i,r]),h=A.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,b=!1;if(t.forEach(v=>{var w;let x=i.routes[v.route.id];!x||!x.hasLoader||(!f.some(S=>S.route.id===v.route.id)&&v.route.id in l&&((w=s[v.route.id])!=null&&w.shouldRevalidate)||x.hasClientLoader?b=!0:g.add(v.route.id))}),g.size===0)return[];let y=d$(e,o,a.v8_trailingSlashAwareDataRequests,"data");return b&&g.size>0&&y.searchParams.set("_routes",t.filter(v=>g.has(v.route.id)).map(v=>v.route.id).join(",")),[y.pathname+y.search]},[o,a.v8_trailingSlashAwareDataRequests,l,r,i,f,t,e,s]),p=A.useMemo(()=>ZU(d,i),[d,i]),m=i7(d);return A.createElement(A.Fragment,null,h.map(g=>A.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),p.map(g=>A.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),m.map(({key:g,link:b})=>A.createElement("link",{key:g,nonce:n.nonce,...b,crossOrigin:b.crossOrigin??n.crossOrigin})))}function l7(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var c7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{c7&&(window.__reactRouterVersion="7.17.0")}catch{}function u7({basename:e,children:t,useTransitions:n,window:r}){let a=A.useRef();a.current==null&&(a.current=B8({window:r,v5Compat:!0}));let i=a.current,[s,o]=A.useState({action:i.action,location:i.location}),l=A.useCallback(c=>{n===!1?o(c):A.startTransition(()=>o(c))},[n]);return A.useLayoutEffect(()=>i.listen(l),[i,l]),A.createElement(zU,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,useTransitions:n})}var h$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Le=A.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:i,replace:s,mask:o,state:l,target:c,to:f,preventScrollReset:d,viewTransition:h,defaultShouldRevalidate:p,...m},g){let{basename:b,navigator:y,useTransitions:v}=A.useContext(er),x=typeof f=="string"&&h$.test(f),w=e$(f,b);f=w.to;let S=SU(f,{relative:a}),j=jr(),O=null;if(o){let $=Iy(o,[],j.mask?j.mask.pathname:"/",!0);b!=="/"&&($.pathname=$.pathname==="/"?b:$r([b,$.pathname])),O=y.createHref($)}let[E,T,N]=r7(r,m),M=h7(f,{replace:s,mask:o,state:l,target:c,preventScrollReset:d,relative:a,viewTransition:h,defaultShouldRevalidate:p,useTransitions:v});function C($){t&&t($),$.defaultPrevented||M($)}let L=!(w.isExternal||i),D=A.createElement("a",{...m,...N,href:(L?O:void 0)||w.absoluteURL||S,onClick:L?C:t,ref:l7(g,T),target:c,"data-discover":!x&&n==="render"?"true":void 0});return E&&!x?A.createElement(A.Fragment,null,D,A.createElement(a7,{page:S})):D});Le.displayName="Link";var tx=A.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:i,to:s,viewTransition:o,children:l,...c},f){let d=$d(s,{relative:c.relative}),h=jr(),p=A.useContext(By),{navigator:m,basename:g}=A.useContext(er),b=p!=null&&v7(d)&&o===!0,y=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=h.pathname,x=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(v=v.toLowerCase(),x=x?x.toLowerCase():null,y=y.toLowerCase()),x&&g&&(x=Xa(x,g)||x);const w=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let S=v===y||!a&&v.startsWith(y)&&v.charAt(w)==="/",j=x!=null&&(x===y||!a&&x.startsWith(y)&&x.charAt(y.length)==="/"),O={isActive:S,isPending:j,isTransitioning:b},E=S?t:void 0,T;typeof r=="function"?T=r(O):T=[r,S?"active":null,j?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let N=typeof i=="function"?i(O):i;return A.createElement(Le,{...c,"aria-current":E,className:T,ref:f,style:N,to:s,viewTransition:o},typeof l=="function"?l(O):l)});tx.displayName="NavLink";var f7=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:s=up,action:o,onSubmit:l,relative:c,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h,...p},m)=>{let{useTransitions:g}=A.useContext(er),b=y7(),y=g7(o,{relative:c}),v=s.toLowerCase()==="get"?"get":"post",x=typeof o=="string"&&h$.test(o),w=S=>{if(l&&l(S),S.defaultPrevented)return;S.preventDefault();let j=S.nativeEvent.submitter,O=(j==null?void 0:j.getAttribute("formmethod"))||s,E=()=>b(j||S.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:a,state:i,relative:c,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h});g&&n!==!1?A.startTransition(()=>E()):E()};return A.createElement("form",{ref:m,method:v,action:y,onSubmit:r?l:w,...p,"data-discover":!x&&e==="render"?"true":void 0})});f7.displayName="Form";function d7(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function p$(e){let t=A.useContext(Dc);return ut(t,d7(e)),t}function h7(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:o,defaultShouldRevalidate:l,useTransitions:c}={}){let f=Kt(),d=jr(),h=$d(e,{relative:s});return A.useCallback(p=>{if(HU(p,t)){p.preventDefault();let m=n!==void 0?n:Ef(d)===Ef(h),g=()=>f(e,{replace:m,mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:o,defaultShouldRevalidate:l});c?A.startTransition(()=>g()):g()}},[d,f,h,n,r,a,t,e,i,s,o,l,c])}function m$(e){br(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=A.useRef(ex(e)),n=A.useRef(!1),r=jr(),a=A.useMemo(()=>qU(r.search,n.current?null:t.current),[r.search]),i=Kt(),s=A.useCallback((o,l)=>{const c=ex(typeof o=="function"?o(new URLSearchParams(a)):o);n.current=!0,i("?"+c,l)},[i,a]);return[a,s]}var p7=0,m7=()=>`__${String(++p7)}__`;function y7(){let{router:e}=p$("useSubmit"),{basename:t}=A.useContext(er),n=DU(),r=e.fetch,a=e.navigate;return A.useCallback(async(i,s={})=>{let{action:o,method:l,encType:c,formData:f,body:d}=YU(i,t);if(s.navigate===!1){let h=s.fetcherKey||m7();await r(h,n,s.action||o,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:f,body:d,formMethod:s.method||l,formEncType:s.encType||c,flushSync:s.flushSync})}else await a(s.action||o,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:f,body:d,formMethod:s.method||l,formEncType:s.encType||c,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,a,t,n])}function g7(e,{relative:t}={}){let{basename:n}=A.useContext(er),r=A.useContext(wr);ut(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...$d(e||".",{relative:t})},s=jr();if(e==null){i.search=s.search;let o=new URLSearchParams(i.search),l=o.getAll("index");if(l.some(f=>f==="")){o.delete("index"),l.filter(d=>d).forEach(d=>o.append("index",d));let f=o.toString();i.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:$r([n,i.pathname])),Ef(i)}function v7(e,{relative:t}={}){let n=A.useContext(r$);ut(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=p$("useViewTransitionState"),a=$d(e,{relative:t});if(!n.isTransitioning)return!1;let i=Xa(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Xa(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Zp(a.pathname,s)!=null||Zp(a.pathname,i)!=null}const y$=A.createContext(null);function b7({children:e}){const[t,n]=A.useState(()=>localStorage.getItem("mall_zip")||""),[r,a]=A.useState(()=>{const m=localStorage.getItem("mall_store_id");return m?Number(m):null}),[i,s]=A.useState(()=>localStorage.getItem("mall_store_name")||""),[o,l]=A.useState(()=>localStorage.getItem("mall_token")),[c,f]=A.useState(0),d=(m,g,b)=>{n(m),a(g),s(b),localStorage.setItem("mall_zip",m),localStorage.setItem("mall_store_id",String(g)),localStorage.setItem("mall_store_name",b)},h=()=>{n(""),a(null),s(""),localStorage.removeItem("mall_zip"),localStorage.removeItem("mall_store_id"),localStorage.removeItem("mall_store_name")},p=m=>{l(m),m?localStorage.setItem("mall_token",m):localStorage.removeItem("mall_token")};return A.useEffect(()=>{const m=()=>l(localStorage.getItem("mall_token"));return window.addEventListener("storage",m),()=>window.removeEventListener("storage",m)},[]),u.jsx(y$.Provider,{value:{zip:t,storeId:r,storeName:i,setZone:d,clearZone:h,custToken:o,setCustToken:p,cartCount:c,setCartCount:f},children:e})}const bn=()=>A.useContext(y$),Ee=e=>`$${(Number(e)||0).toFixed(2)}`,gw=A.createContext({});function kc(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const Fy=A.createContext(null),Vy=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class x7 extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function S7({children:e,isPresent:t}){const n=A.useId(),r=A.useRef(null),a=A.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=A.useContext(Vy);return A.useInsertionEffect(()=>{const{width:s,height:o,top:l,left:c}=a.current;if(t||!r.current||!s||!o)return;r.current.dataset.motionPopId=n;const f=document.createElement("style");return i&&(f.nonce=i),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${s}px !important; + height: ${o}px !important; + top: ${l}px !important; + left: ${c}px !important; + } + `),()=>{document.head.removeChild(f)}},[t]),u.jsx(x7,{isPresent:t,childRef:r,sizeRef:a,children:A.cloneElement(e,{ref:r})})}const w7=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:i,mode:s})=>{const o=kc(j7),l=A.useId(),c=A.useCallback(d=>{o.set(d,!0);for(const h of o.values())if(!h)return;r&&r()},[o,r]),f=A.useMemo(()=>({id:l,initial:t,isPresent:n,custom:a,onExitComplete:c,register:d=>(o.set(d,!1),()=>o.delete(d))}),i?[Math.random(),c]:[n,c]);return A.useMemo(()=>{o.forEach((d,h)=>o.set(h,!1))},[n]),A.useEffect(()=>{!n&&!o.size&&r&&r()},[n]),s==="popLayout"&&(e=u.jsx(S7,{isPresent:n,children:e})),u.jsx(Fy.Provider,{value:f,children:e})};function j7(){return new Map}function g$(e=!0){const t=A.useContext(Fy);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,i=A.useId();A.useEffect(()=>{e&&a(i)},[e]);const s=A.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const jh=e=>e.key||"";function pO(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const vw=typeof window<"u",Hy=vw?A.useLayoutEffect:A.useEffect,nx=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:i="sync",propagate:s=!1})=>{const[o,l]=g$(s),c=A.useMemo(()=>pO(e),[e]),f=s&&!o?[]:c.map(jh),d=A.useRef(!0),h=A.useRef(c),p=kc(()=>new Map),[m,g]=A.useState(c),[b,y]=A.useState(c);Hy(()=>{d.current=!1,h.current=c;for(let w=0;w{const S=jh(w),j=s&&!o?!1:c===b||f.includes(S),O=()=>{if(p.has(S))p.set(S,!0);else return;let E=!0;p.forEach(T=>{T||(E=!1)}),E&&(x==null||x(),y(h.current),s&&(l==null||l()),r&&r())};return u.jsx(w7,{isPresent:j,initial:!d.current||n?void 0:!1,custom:j?void 0:t,presenceAffectsLayout:a,mode:i,onExitComplete:j?void 0:O,children:w},S)})})},yn=e=>e;let A7=yn,v$=yn;function bw(e){let t;return()=>(t===void 0&&(t=e()),t)}const ro=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ia=e=>e*1e3,Ba=e=>e/1e3,O7={useManualTiming:!1};function E7(e){let t=new Set,n=new Set,r=!1,a=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function o(c){i.has(c)&&(l.schedule(c),e()),c(s)}const l={schedule:(c,f=!1,d=!1)=>{const p=d&&r?t:n;return f&&i.add(c),p.has(c)||p.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(s=c,r){a=!0;return}r=!0,[t,n]=[n,t],t.forEach(o),t.clear(),r=!1,a&&(a=!1,l.process(c))}};return l}const Ah=["read","resolveKeyframes","update","preRender","render","postRender"],T7=40;function b$(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Ah.reduce((y,v)=>(y[v]=E7(i),y),{}),{read:o,resolveKeyframes:l,update:c,preRender:f,render:d,postRender:h}=s,p=()=>{const y=performance.now();n=!1,a.delta=r?1e3/60:Math.max(Math.min(y-a.timestamp,T7),1),a.timestamp=y,a.isProcessing=!0,o.process(a),l.process(a),c.process(a),f.process(a),d.process(a),h.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,a.isProcessing||e(p)};return{schedule:Ah.reduce((y,v)=>{const x=s[v];return y[v]=(w,S=!1,j=!1)=>(n||m(),x.schedule(w,S,j)),y},{}),cancel:y=>{for(let v=0;vmO[e].some(n=>!!t[n])};function N7(e){for(const t in e)Gl[t]={...Gl[t],...e[t]}}const C7=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function tm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||C7.has(e)}let S$=e=>!tm(e);function _7(e){e&&(S$=t=>t.startsWith("on")?!tm(t):e(t))}try{_7(require("@emotion/is-prop-valid").default)}catch{}function P7(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(S$(a)||n===!0&&tm(a)||!t&&!tm(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function M7(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}const qy=A.createContext({});function Tf(e){return typeof e=="string"||Array.isArray(e)}function Ky(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const xw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sw=["initial",...xw];function Gy(e){return Ky(e.animate)||Sw.some(t=>Tf(e[t]))}function w$(e){return!!(Gy(e)||e.variants)}function R7(e,t){if(Gy(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Tf(n)?n:void 0,animate:Tf(r)?r:void 0}}return e.inherit!==!1?t:{}}function D7(e){const{initial:t,animate:n}=R7(e,A.useContext(qy));return A.useMemo(()=>({initial:t,animate:n}),[yO(t),yO(n)])}function yO(e){return Array.isArray(e)?e.join(" "):e}const $7=Symbol.for("motionComponentSymbol");function tl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function k7(e,t,n){return A.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):tl(n)&&(n.current=r))},[t])}const ww=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),L7="framerAppearId",j$="data-"+ww(L7),{schedule:jw}=b$(queueMicrotask,!1),A$=A.createContext({});function z7(e,t,n,r,a){var i,s;const{visualElement:o}=A.useContext(qy),l=A.useContext(x$),c=A.useContext(Fy),f=A.useContext(Vy).reducedMotion,d=A.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f}));const h=d.current,p=A.useContext(A$);h&&!h.projection&&a&&(h.type==="html"||h.type==="svg")&&I7(d.current,n,a,p);const m=A.useRef(!1);A.useInsertionEffect(()=>{h&&m.current&&h.update(n,c)});const g=n[j$],b=A.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,g)));return Hy(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),jw.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),A.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),b.current=!1))}),h}function I7(e,t,n,r){const{layoutId:a,layout:i,drag:s,dragConstraints:o,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:O$(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!s||o&&tl(o),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function O$(e){if(e)return e.options.allowProjection!==!1?e.projection:O$(e.parent)}function B7({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){var i,s;e&&N7(e);function o(c,f){let d;const h={...A.useContext(Vy),...c,layoutId:U7(c)},{isStatic:p}=h,m=D7(c),g=r(c,p);if(!p&&vw){F7();const b=V7(h);d=b.MeasureLayout,m.visualElement=z7(a,g,h,t,b.ProjectionNode)}return u.jsxs(qy.Provider,{value:m,children:[d&&m.visualElement?u.jsx(d,{visualElement:m.visualElement,...h}):null,n(a,c,k7(g,m.visualElement,f),g,p,m.visualElement)]})}o.displayName=`motion.${typeof a=="string"?a:`create(${(s=(i=a.displayName)!==null&&i!==void 0?i:a.name)!==null&&s!==void 0?s:""})`}`;const l=A.forwardRef(o);return l[$7]=a,l}function U7({layoutId:e}){const t=A.useContext(gw).id;return t&&e!==void 0?t+"-"+e:e}function F7(e,t){A.useContext(x$).strict}function V7(e){const{drag:t,layout:n}=Gl;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const H7=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Aw(e){return typeof e!="string"||e.includes("-")?!1:!!(H7.indexOf(e)>-1||/[A-Z]/u.test(e))}function gO(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ow(e,t,n,r){if(typeof t=="function"){const[a,i]=gO(r);t=t(n!==void 0?n:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=gO(r);t=t(n!==void 0?n:e.custom,a,i)}return t}const rx=e=>Array.isArray(e),q7=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),K7=e=>rx(e)?e[e.length-1]||0:e,cn=e=>!!(e&&e.getVelocity);function dp(e){const t=cn(e)?e.get():e;return q7(t)?t.toValue():t}function G7({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,a,i){const s={latestValues:Y7(r,a,i,e),renderState:t()};return n&&(s.onMount=o=>n({props:r,current:o,...s}),s.onUpdate=o=>n(o)),s}const E$=e=>(t,n)=>{const r=A.useContext(qy),a=A.useContext(Fy),i=()=>G7(e,t,r,a);return n?i():kc(i)};function Y7(e,t,n,r){const a={},i=r(e,{});for(const h in i)a[h]=dp(i[h]);let{initial:s,animate:o}=e;const l=Gy(e),c=w$(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),o===void 0&&(o=t.animate));let f=n?n.initial===!1:!1;f=f||s===!1;const d=f?o:s;if(d&&typeof d!="boolean"&&!Ky(d)){const h=Array.isArray(d)?d:[d];for(let p=0;pt=>typeof t=="string"&&t.startsWith(e),N$=T$("--"),X7=T$("var(--"),Ew=e=>X7(e)?W7.test(e.split("/*")[0].trim()):!1,W7=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,C$=(e,t)=>t&&typeof e=="number"?t.transform(e):e,la=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Nf={...zc,transform:e=>la(0,1,e)},Oh={...zc,default:1},kd=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ui=kd("deg"),ra=kd("%"),fe=kd("px"),Q7=kd("vh"),Z7=kd("vw"),vO={...ra,parse:e=>ra.parse(e)/100,transform:e=>ra.transform(e*100)},J7={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,backgroundPositionX:fe,backgroundPositionY:fe},eF={rotate:ui,rotateX:ui,rotateY:ui,rotateZ:ui,scale:Oh,scaleX:Oh,scaleY:Oh,scaleZ:Oh,skew:ui,skewX:ui,skewY:ui,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:Nf,originX:vO,originY:vO,originZ:fe},bO={...zc,transform:Math.round},Tw={...J7,...eF,zIndex:bO,size:fe,fillOpacity:Nf,strokeOpacity:Nf,numOctaves:bO},tF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nF=Lc.length;function rF(e,t,n){let r="",a=!0;for(let i=0;i({style:{},transform:{},transformOrigin:{},vars:{}}),_$=()=>({..._w(),attrs:{}}),Pw=e=>typeof e=="string"&&e.toLowerCase()==="svg";function P$(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const M$=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function R$(e,t,n,r){P$(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(M$.has(a)?a:ww(a),t.attrs[a])}const nm={};function lF(e){Object.assign(nm,e)}function D$(e,{layout:t,layoutId:n}){return xo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!nm[e]||e==="opacity")}function Mw(e,t,n){var r;const{style:a}=e,i={};for(const s in a)(cn(a[s])||t.style&&cn(t.style[s])||D$(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=a[s]);return i}function $$(e,t,n){const r=Mw(e,t,n);for(const a in e)if(cn(e[a])||cn(t[a])){const i=Lc.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=e[a]}return r}function cF(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const SO=["x","y","width","height","cx","cy","r"],uF={useVisualState:E$({scrapeMotionValuesFromProps:$$,createRenderState:_$,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:a})=>{if(!n)return;let i=!!e.drag;if(!i){for(const o in a)if(xo.has(o)){i=!0;break}}if(!i)return;let s=!t;if(t)for(let o=0;o{cF(n,r),Re.render(()=>{Cw(r,a,Pw(n.tagName),e.transformTemplate),R$(n,r)})})}})},fF={useVisualState:E$({scrapeMotionValuesFromProps:Mw,createRenderState:_w})};function k$(e,t,n){for(const r in t)!cn(t[r])&&!D$(r,n)&&(e[r]=t[r])}function dF({transformTemplate:e},t){return A.useMemo(()=>{const n=_w();return Nw(n,t,e),Object.assign({},n.vars,n.style)},[t])}function hF(e,t){const n=e.style||{},r={};return k$(r,n,e),Object.assign(r,dF(e,t)),r}function pF(e,t){const n={},r=hF(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function mF(e,t,n,r){const a=A.useMemo(()=>{const i=_$();return Cw(i,t,Pw(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};k$(i,e.style,e),a.style={...i,...a.style}}return a}function yF(e=!1){return(n,r,a,{latestValues:i},s)=>{const l=(Aw(n)?mF:pF)(r,i,s,n),c=P7(r,typeof n=="string",e),f=n!==A.Fragment?{...c,...l,ref:a}:{},{children:d}=r,h=A.useMemo(()=>cn(d)?d.get():d,[d]);return A.createElement(n,{...f,children:h})}}function gF(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const s={...Aw(r)?uF:fF,preloadedFeatures:e,useRender:yF(a),createVisualElement:t,Component:r};return B7(s)}}function L$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rwindow.ScrollTimeline!==void 0);class vF{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(z$()&&a.attachTimeline)return a.attachTimeline(t);if(typeof n=="function")return n(a)});return()=>{r.forEach((a,i)=>{a&&a(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class bF extends vF{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Rw(e,t){return e?e[t]||e.default||e:void 0}const ax=2e4;function I$(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=ax?1/0:t}function Dw(e){return typeof e=="function"}function wO(e,t){e.timeline=t,e.onfinish=null}const $w=e=>Array.isArray(e)&&typeof e[0]=="number",xF={linearEasing:void 0};function SF(e,t){const n=bw(e);return()=>{var r;return(r=xF[t])!==null&&r!==void 0?r:n()}}const rm=SF(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),B$=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let i=0;i`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ix={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nu([0,.65,.55,1]),circOut:Nu([.55,0,1,.45]),backIn:Nu([.31,.01,.66,-.59]),backOut:Nu([.33,1.53,.69,.99])};function F$(e,t){if(e)return typeof e=="function"&&rm()?B$(e,t):$w(e)?Nu(e):Array.isArray(e)?e.map(n=>F$(n,t)||ix.easeOut):ix[e]}const Cr={x:!1,y:!1};function V$(){return Cr.x||Cr.y}function H$(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let a=document;const i=(r=void 0)!==null&&r!==void 0?r:a.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function q$(e,t){const n=H$(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function jO(e){return t=>{t.pointerType==="touch"||V$()||e(t)}}function wF(e,t,n={}){const[r,a,i]=q$(e,n),s=jO(o=>{const{target:l}=o,c=t(o);if(typeof c!="function"||!l)return;const f=jO(d=>{c(d),l.removeEventListener("pointerleave",f)});l.addEventListener("pointerleave",f,a)});return r.forEach(o=>{o.addEventListener("pointerenter",s,a)}),i}const K$=(e,t)=>t?e===t?!0:K$(e,t.parentElement):!1,kw=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,jF=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function AF(e){return jF.has(e.tagName)||e.tabIndex!==-1}const Cu=new WeakSet;function AO(e){return t=>{t.key==="Enter"&&e(t)}}function Iv(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const OF=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=AO(()=>{if(Cu.has(n))return;Iv(n,"down");const a=AO(()=>{Iv(n,"up")}),i=()=>Iv(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function OO(e){return kw(e)&&!V$()}function EF(e,t,n={}){const[r,a,i]=q$(e,n),s=o=>{const l=o.currentTarget;if(!OO(o)||Cu.has(l))return;Cu.add(l);const c=t(o),f=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),!(!OO(p)||!Cu.has(l))&&(Cu.delete(l),typeof c=="function"&&c(p,{success:m}))},d=p=>{f(p,n.useGlobalTarget||K$(l,p.target))},h=p=>{f(p,!1)};window.addEventListener("pointerup",d,a),window.addEventListener("pointercancel",h,a)};return r.forEach(o=>{!AF(o)&&o.getAttribute("tabindex")===null&&(o.tabIndex=0),(n.useGlobalTarget?window:o).addEventListener("pointerdown",s,a),o.addEventListener("focus",c=>OF(c,a),a)}),i}function TF(e){return e==="x"||e==="y"?Cr[e]?null:(Cr[e]=!0,()=>{Cr[e]=!1}):Cr.x||Cr.y?null:(Cr.x=Cr.y=!0,()=>{Cr.x=Cr.y=!1})}const G$=new Set(["width","height","top","left","right","bottom",...Lc]);let hp;function NF(){hp=void 0}const aa={now:()=>(hp===void 0&&aa.set(Bt.isProcessing||O7.useManualTiming?Bt.timestamp:performance.now()),hp),set:e=>{hp=e,queueMicrotask(NF)}};function Lw(e,t){e.indexOf(t)===-1&&e.push(t)}function zw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Iw{constructor(){this.subscriptions=[]}add(t){return Lw(this.subscriptions,t),()=>zw(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e)),Gu={current:void 0};class _F{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{const i=aa.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=aa.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=CF(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Iw);const r=this.events[t].add(n);return t==="change"?()=>{r(),Re.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Gu.current&&Gu.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=aa.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>EO)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,EO);return Bw(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qr(e,t){return new _F(e,t)}function PF(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qr(n))}function MF(e,t){const n=Yy(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const s in i){const o=K7(i[s]);PF(e,s,o)}}function RF(e){return!!(cn(e)&&e.add)}function sx(e,t){const n=e.getValue("willChange");if(RF(n))return n.add(t)}function Y$(e){return e.props[j$]}const X$=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,DF=1e-7,$F=12;function kF(e,t,n,r,a){let i,s,o=0;do s=t+(n-t)/2,i=X$(s,r,a)-e,i>0?n=s:t=s;while(Math.abs(i)>DF&&++o<$F);return s}function Ld(e,t,n,r){if(e===t&&n===r)return yn;const a=i=>kF(i,0,1,e,n);return i=>i===0||i===1?i:X$(a(i),t,r)}const W$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Q$=e=>t=>1-e(1-t),Z$=Ld(.33,1.53,.69,.99),Uw=Q$(Z$),J$=W$(Uw),e3=e=>(e*=2)<1?.5*Uw(e):.5*(2-Math.pow(2,-10*(e-1))),Fw=e=>1-Math.sin(Math.acos(e)),t3=Q$(Fw),n3=W$(Fw),r3=e=>/^0[^.\s]+$/u.test(e);function LF(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||r3(e):!0}const Yu=e=>Math.round(e*1e5)/1e5,Vw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zF(e){return e==null}const IF=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hw=(e,t)=>n=>!!(typeof n=="string"&&IF.test(n)&&n.startsWith(e)||t&&!zF(n)&&Object.prototype.hasOwnProperty.call(n,t)),a3=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,i,s,o]=r.match(Vw);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},BF=e=>la(0,255,e),Bv={...zc,transform:e=>Math.round(BF(e))},Os={test:Hw("rgb","red"),parse:a3("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Bv.transform(e)+", "+Bv.transform(t)+", "+Bv.transform(n)+", "+Yu(Nf.transform(r))+")"};function UF(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const ox={test:Hw("#"),parse:UF,transform:Os.transform},nl={test:Hw("hsl","hue"),parse:a3("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ra.transform(Yu(t))+", "+ra.transform(Yu(n))+", "+Yu(Nf.transform(r))+")"},sn={test:e=>Os.test(e)||ox.test(e)||nl.test(e),parse:e=>Os.test(e)?Os.parse(e):nl.test(e)?nl.parse(e):ox.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Os.transform(e):nl.transform(e)},FF=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function VF(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vw))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(FF))===null||n===void 0?void 0:n.length)||0)>0}const i3="number",s3="color",HF="var",qF="var(",TO="${}",KF=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Cf(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(KF,l=>(sn.test(l)?(r.color.push(i),a.push(s3),n.push(sn.parse(l))):l.startsWith(qF)?(r.var.push(i),a.push(HF),n.push(l)):(r.number.push(i),a.push(i3),n.push(parseFloat(l))),++i,TO)).split(TO);return{values:n,split:o,indexes:r,types:a}}function o3(e){return Cf(e).values}function l3(e){const{split:t,types:n}=Cf(e),r=t.length;return a=>{let i="";for(let s=0;stypeof e=="number"?0:e;function YF(e){const t=o3(e);return l3(e)(t.map(GF))}const Ji={test:VF,parse:o3,createTransformer:l3,getAnimatableNone:YF},XF=new Set(["brightness","contrast","saturate","opacity"]);function WF(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vw)||[];if(!r)return e;const a=n.replace(r,"");let i=XF.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+a+")"}const QF=/\b([a-z-]*)\(.*?\)/gu,lx={...Ji,getAnimatableNone:e=>{const t=e.match(QF);return t?t.map(WF).join(" "):e}},ZF={...Tw,color:sn,backgroundColor:sn,outlineColor:sn,fill:sn,stroke:sn,borderColor:sn,borderTopColor:sn,borderRightColor:sn,borderBottomColor:sn,borderLeftColor:sn,filter:lx,WebkitFilter:lx},qw=e=>ZF[e];function c3(e,t){let n=qw(e);return n!==lx&&(n=Ji),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const JF=new Set(["auto","none","0"]);function eV(e,t,n){let r=0,a;for(;re===zc||e===fe,CO=(e,t)=>parseFloat(e.split(", ")[t]),_O=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const a=r.match(/^matrix3d\((.+)\)$/u);if(a)return CO(a[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?CO(i[1],e):0}},tV=new Set(["x","y","z"]),nV=Lc.filter(e=>!tV.has(e));function rV(e){const t=[];return nV.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Yl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:_O(4,13),y:_O(5,14)};Yl.translateX=Yl.x;Yl.translateY=Yl.y;const Gs=new Set;let cx=!1,ux=!1;function u3(){if(ux){const e=Array.from(Gs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=rV(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([i,s])=>{var o;(o=r.getValue(i))===null||o===void 0||o.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ux=!1,cx=!1,Gs.forEach(e=>e.complete()),Gs.clear()}function f3(){Gs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ux=!0)})}function aV(){f3(),u3()}class Kw{constructor(t,n,r,a,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Gs.add(this),cx||(cx=!0,Re.read(f3),Re.resolveKeyframes(u3))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;for(let i=0;i/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),iV=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sV(e){const t=iV.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function h3(e,t,n=1){const[r,a]=sV(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return d3(s)?parseFloat(s):s}return Ew(a)?h3(a,t,n+1):a}const p3=e=>t=>t.test(e),oV={test:e=>e==="auto",parse:e=>e},m3=[zc,fe,ra,ui,Z7,Q7,oV],PO=e=>m3.find(p3(e));class y3 extends Kw{constructor(t,n,r,a,i){super(t,n,r,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const MO=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ji.test(e)||e==="0")&&!e.startsWith("url("));function lV(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function Xy(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(uV),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const fV=40;class g3{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=aa.now(),this.options={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:i,repeatType:s,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>fV?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&aV(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=aa.now(),this.hasAttemptedResolve=!0;const{name:r,type:a,velocity:i,delay:s,onComplete:o,onUpdate:l,isGenerator:c}=this.options;if(!c&&!cV(t,r,a,i))if(s)this.options.duration=0;else{l&&l(Xy(t,this.options,n)),o&&o(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ht=(e,t,n)=>e+(t-e)*n;function Uv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function dV({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,i=0,s=0;if(!t)a=i=s=n;else{const o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;a=Uv(l,o,e+1/3),i=Uv(l,o,e),s=Uv(l,o,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function am(e,t){return n=>n>0?t:e}const Fv=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},hV=[ox,Os,nl],pV=e=>hV.find(t=>t.test(e));function RO(e){const t=pV(e);if(!t)return!1;let n=t.parse(e);return t===nl&&(n=dV(n)),n}const DO=(e,t)=>{const n=RO(e),r=RO(t);if(!n||!r)return am(e,t);const a={...n};return i=>(a.red=Fv(n.red,r.red,i),a.green=Fv(n.green,r.green,i),a.blue=Fv(n.blue,r.blue,i),a.alpha=ht(n.alpha,r.alpha,i),Os.transform(a))},mV=(e,t)=>n=>t(e(n)),zd=(...e)=>e.reduce(mV),fx=new Set(["none","hidden"]);function yV(e,t){return fx.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gV(e,t){return n=>ht(e,t,n)}function Gw(e){return typeof e=="number"?gV:typeof e=="string"?Ew(e)?am:sn.test(e)?DO:xV:Array.isArray(e)?v3:typeof e=="object"?sn.test(e)?DO:vV:am}function v3(e,t){const n=[...e],r=n.length,a=e.map((i,s)=>Gw(i)(i,t[s]));return i=>{for(let s=0;s{for(const i in r)n[i]=r[i](a);return n}}function bV(e,t){var n;const r=[],a={color:0,var:0,number:0};for(let i=0;i{const n=Ji.createTransformer(t),r=Cf(e),a=Cf(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?fx.has(e)&&!a.values.length||fx.has(t)&&!r.values.length?yV(e,t):zd(v3(bV(r,a),a.values),n):am(e,t)};function b3(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ht(e,t,n):Gw(e)(e,t)}const SV=5;function x3(e,t,n){const r=Math.max(t-SV,0);return Bw(n-e(r),t-r)}const yt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Vv=.001;function wV({duration:e=yt.duration,bounce:t=yt.bounce,velocity:n=yt.velocity,mass:r=yt.mass}){let a,i,s=1-t;s=la(yt.minDamping,yt.maxDamping,s),e=la(yt.minDuration,yt.maxDuration,Ba(e)),s<1?(a=c=>{const f=c*s,d=f*e,h=f-n,p=dx(c,s),m=Math.exp(-d);return Vv-h/p*m},i=c=>{const d=c*s*e,h=d*n+n,p=Math.pow(s,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=dx(Math.pow(c,2),s);return(-a(c)+Vv>0?-1:1)*((h-p)*m)/g}):(a=c=>{const f=Math.exp(-c*e),d=(c-n)*e+1;return-Vv+f*d},i=c=>{const f=Math.exp(-c*e),d=(n-c)*(e*e);return f*d});const o=5/e,l=AV(a,i,o);if(e=Ia(e),isNaN(l))return{stiffness:yt.stiffness,damping:yt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const jV=12;function AV(e,t,n){let r=n;for(let a=1;ae[n]!==void 0)}function TV(e){let t={velocity:yt.velocity,stiffness:yt.stiffness,damping:yt.damping,mass:yt.mass,isResolvedFromDuration:!1,...e};if(!$O(e,EV)&&$O(e,OV))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,i=2*la(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:yt.mass,stiffness:a,damping:i}}else{const n=wV(e);t={...t,...n,mass:yt.mass},t.isResolvedFromDuration=!0}return t}function S3(e=yt.visualDuration,t=yt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:l,damping:c,mass:f,duration:d,velocity:h,isResolvedFromDuration:p}=TV({...n,velocity:-Ba(n.velocity||0)}),m=h||0,g=c/(2*Math.sqrt(l*f)),b=s-i,y=Ba(Math.sqrt(l/f)),v=Math.abs(b)<5;r||(r=v?yt.restSpeed.granular:yt.restSpeed.default),a||(a=v?yt.restDelta.granular:yt.restDelta.default);let x;if(g<1){const S=dx(y,g);x=j=>{const O=Math.exp(-g*y*j);return s-O*((m+g*y*b)/S*Math.sin(S*j)+b*Math.cos(S*j))}}else if(g===1)x=S=>s-Math.exp(-y*S)*(b+(m+y*b)*S);else{const S=y*Math.sqrt(g*g-1);x=j=>{const O=Math.exp(-g*y*j),E=Math.min(S*j,300);return s-O*((m+g*y*b)*Math.sinh(E)+S*b*Math.cosh(E))/S}}const w={calculatedDuration:p&&d||null,next:S=>{const j=x(S);if(p)o.done=S>=d;else{let O=0;g<1&&(O=S===0?Ia(m):x3(x,S,j));const E=Math.abs(O)<=r,T=Math.abs(s-j)<=a;o.done=E&&T}return o.value=o.done?s:j,o},toString:()=>{const S=Math.min(I$(w),ax),j=B$(O=>w.next(S*O).value,S,30);return S+"ms "+j}};return w}function kO({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:l,restDelta:c=.5,restSpeed:f}){const d=e[0],h={done:!1,value:d},p=E=>o!==void 0&&El,m=E=>o===void 0?l:l===void 0||Math.abs(o-E)-g*Math.exp(-E/r),x=E=>y+v(E),w=E=>{const T=v(E),N=x(E);h.done=Math.abs(T)<=c,h.value=h.done?y:N};let S,j;const O=E=>{p(h.value)&&(S=E,j=S3({keyframes:[h.value,m(h.value)],velocity:x3(x,E,h.value),damping:a,stiffness:i,restDelta:c,restSpeed:f}))};return O(0),{calculatedDuration:null,next:E=>{let T=!1;return!j&&S===void 0&&(T=!0,w(E),O(E)),S!==void 0&&E>=S?j.next(E-S):(!T&&w(E),h)}}}const NV=Ld(.42,0,1,1),CV=Ld(0,0,.58,1),w3=Ld(.42,0,.58,1),_V=e=>Array.isArray(e)&&typeof e[0]!="number",PV={linear:yn,easeIn:NV,easeInOut:w3,easeOut:CV,circIn:Fw,circInOut:n3,circOut:t3,backIn:Uw,backInOut:J$,backOut:Z$,anticipate:e3},LO=e=>{if($w(e)){v$(e.length===4);const[t,n,r,a]=e;return Ld(t,n,r,a)}else if(typeof e=="string")return PV[e];return e};function MV(e,t,n){const r=[],a=n||b3,i=e.length-1;for(let s=0;st[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=MV(t,r,a),l=o.length,c=f=>{if(s&&f1)for(;dc(la(e[0],e[i-1],f)):c}function RV(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=ro(0,t,r);e.push(ht(n,1,a))}}function j3(e){const t=[0];return RV(t,e.length-1),t}function DV(e,t){return e.map(n=>n*t)}function $V(e,t){return e.map(()=>t||w3).splice(0,e.length-1)}function im({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=_V(r)?r.map(LO):LO(r),i={done:!1,value:t[0]},s=DV(n&&n.length===t.length?n:j3(t),e),o=Yw(s,t,{ease:Array.isArray(a)?a:$V(t,a)});return{calculatedDuration:e,next:l=>(i.value=o(l),i.done=l>=e,i)}}const kV=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Re.update(t,!0),stop:()=>Lr(t),now:()=>Bt.isProcessing?Bt.timestamp:aa.now()}},LV={decay:kO,inertia:kO,tween:im,keyframes:im,spring:S3},zV=e=>e/100;class Xw extends g3{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:a,keyframes:i}=this.options,s=(a==null?void 0:a.KeyframeResolver)||Kw,o=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new s(i,o,n,r,a),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=this.options,o=Dw(n)?n:LV[n]||im;let l,c;o!==im&&typeof t[0]!="number"&&(l=zd(zV,b3(t[0],t[1])),t=[0,100]);const f=o({...this.options,keyframes:t});i==="mirror"&&(c=o({...this.options,keyframes:[...t].reverse(),velocity:-s})),f.calculatedDuration===null&&(f.calculatedDuration=I$(f));const{calculatedDuration:d}=f,h=d+a,p=h*(r+1)-a;return{generator:f,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:E}=this.options;return{done:!0,value:E[E.length-1]}}const{finalKeyframe:a,generator:i,mirroredGenerator:s,mapPercentToKeyframes:o,keyframes:l,calculatedDuration:c,totalDuration:f,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:p,repeatType:m,repeatDelay:g,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>f;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let x=this.currentTime,w=i;if(p){const E=Math.min(this.currentTime,f)/d;let T=Math.floor(E),N=E%1;!N&&E>=1&&(N=1),N===1&&T--,T=Math.min(T,p+1),!!(T%2)&&(m==="reverse"?(N=1-N,g&&(N-=g/d)):m==="mirror"&&(w=s)),x=la(0,1,N)*d}const S=v?{done:!1,value:l[0]}:w.next(x);o&&(S.value=o(S.value));let{done:j}=S;!v&&c!==null&&(j=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return O&&a!==void 0&&(S.value=Xy(l,this.options,a)),b&&b(S.value),O&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Ba(t.calculatedDuration):0}get time(){return Ba(this.currentTime)}set time(t){t=Ia(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ba(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=kV,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const IV=new Set(["opacity","clipPath","filter","transform"]);function BV(e,t,n,{delay:r=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const f=F$(o,a);return Array.isArray(f)&&(c.easing=f),e.animate(c,{delay:r,duration:a,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const UV=bw(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sm=10,FV=2e4;function VV(e){return Dw(e.type)||e.type==="spring"||!U$(e.ease)}function HV(e,t){const n=new Xw({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const a=[];let i=0;for(;!r.done&&ithis.onKeyframesResolved(s,o),n,r,a),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:a,ease:i,type:s,motionValue:o,name:l,startTime:c}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof i=="string"&&rm()&&qV(i)&&(i=A3[i]),VV(this.options)){const{onComplete:d,onUpdate:h,motionValue:p,element:m,...g}=this.options,b=HV(t,g);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,a=b.times,i=b.ease,s="keyframes"}const f=BV(o.owner.current,l,t,{...this.options,duration:r,times:a,ease:i});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(wO(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:d}=this.options;o.set(Xy(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:a,type:s,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ba(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ba(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ia(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return yn;const{animation:r}=n;wO(r,t)}return yn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:a,type:i,ease:s,times:o}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:f,onComplete:d,element:h,...p}=this.options,m=new Xw({...p,keyframes:r,duration:a,type:i,ease:s,times:o,isGenerator:!0}),g=Ia(this.time);c.setWithVelocity(m.sample(g-sm).value,m.sample(g).value,sm)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:a,repeatType:i,damping:s,type:o}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return UV()&&r&&IV.has(r)&&!l&&!c&&!a&&i!=="mirror"&&s!==0&&o!=="inertia"}}const KV={type:"spring",stiffness:500,damping:25,restSpeed:10},GV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),YV={type:"keyframes",duration:.8},XV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WV=(e,{keyframes:t})=>t.length>2?YV:xo.has(e)?e.startsWith("scale")?GV(t[1]):KV:XV;function QV({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:l,elapsed:c,...f}){return!!Object.keys(f).length}const Ww=(e,t,n,r={},a,i)=>s=>{const o=Rw(r,e)||{},l=o.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Ia(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-c,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:a};QV(o)||(f={...f,...WV(e,f)}),f.duration&&(f.duration=Ia(f.duration)),f.repeatDelay&&(f.repeatDelay=Ia(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!i&&t.get()!==void 0){const h=Xy(f.keyframes,o);if(h!==void 0)return Re.update(()=>{f.onUpdate(h),f.onComplete()}),new bF([])}return!i&&zO.supports(f)?new zO(f):new Xw(f)};function ZV({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function O3(e,t,{delay:n=0,transitionOverride:r,type:a}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:o,...l}=t;r&&(s=r);const c=[],f=a&&e.animationState&&e.animationState.getState()[a];for(const d in l){const h=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),p=l[d];if(p===void 0||f&&ZV(f,d))continue;const m={delay:n,...Rw(s||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=Y$(e);if(y){const v=window.MotionHandoffAnimation(y,d,Re);v!==null&&(m.startTime=v,g=!0)}}sx(e,d),h.start(Ww(d,h,p,e.shouldReduceMotion&&G$.has(d)?{type:!1}:m,e,g));const b=h.animation;b&&c.push(b)}return o&&Promise.all(c).then(()=>{Re.update(()=>{o&&MF(e,o)})}),c}function hx(e,t,n={}){var r;const a=Yy(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(i=n.transitionOverride);const s=a?()=>Promise.all(O3(e,a,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:h}=i;return JV(e,t,f+c,d,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,f]=l==="beforeChildren"?[s,o]:[o,s];return c().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function JV(e,t,n=0,r=0,a=1,i){const s=[],o=(e.variantChildren.size-1)*r,l=a===1?(c=0)=>c*r:(c=0)=>o-c*r;return Array.from(e.variantChildren).sort(e9).forEach((c,f)=>{c.notify("AnimationStart",t),s.push(hx(c,t,{...i,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function e9(e,t){return e.sortNodePosition(t)}function t9(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(i=>hx(e,i,n));r=Promise.all(a)}else if(typeof t=="string")r=hx(e,t,n);else{const a=typeof t=="function"?Yy(e,t,n.custom):t;r=Promise.all(O3(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const n9=Sw.length;function E3(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?E3(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>t9(e,n,r)))}function s9(e){let t=i9(e),n=IO(),r=!0;const a=l=>(c,f)=>{var d;const h=Yy(e,f,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:p,transitionEnd:m,...g}=h;c={...c,...g,...m}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,f=E3(e.parent)||{},d=[],h=new Set;let p={},m=1/0;for(let b=0;bm&&w,T=!1;const N=Array.isArray(x)?x:[x];let M=N.reduce(a(y),{});S===!1&&(M={});const{prevResolvedValues:C={}}=v,L={...C,...M},D=k=>{E=!0,h.has(k)&&(T=!0,h.delete(k)),v.needsAnimating[k]=!0;const I=e.getValue(k);I&&(I.liveStyle=!1)};for(const k in L){const I=M[k],F=C[k];if(p.hasOwnProperty(k))continue;let H=!1;rx(I)&&rx(F)?H=!L$(I,F):H=I!==F,H?I!=null?D(k):h.add(k):I!==void 0&&h.has(k)?D(k):v.protectedKeys[k]=!0}v.prevProp=x,v.prevResolvedValues=M,v.isActive&&(p={...p,...M}),r&&e.blockInitialAnimation&&(E=!1),E&&(!(j&&O)||T)&&d.push(...N.map(k=>({animation:k,options:{type:y}})))}if(h.size){const b={};h.forEach(y=>{const v=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),b[y]=v??null}),d.push({animation:b})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function o(l,c){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=s(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:s,setActive:o,setAnimateFunction:i,getState:()=>n,reset:()=>{n=IO(),r=!0}}}function o9(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!L$(t,e):!1}function us(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function IO(){return{animate:us(!0),whileInView:us(),whileHover:us(),whileTap:us(),whileDrag:us(),whileFocus:us(),exit:us()}}class ns{constructor(t){this.isMounted=!1,this.node=t}update(){}}class l9 extends ns{constructor(t){super(t),t.animationState||(t.animationState=s9(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ky(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let c9=0;class u9 extends ns{constructor(){super(...arguments),this.id=c9++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const f9={animation:{Feature:l9},exit:{Feature:u9}};function _f(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Id(e){return{point:{x:e.pageX,y:e.pageY}}}const d9=e=>t=>kw(t)&&e(t,Id(t));function Xu(e,t,n,r){return _f(e,t,d9(n),r)}const BO=(e,t)=>Math.abs(e-t);function h9(e,t){const n=BO(e.x,t.x),r=BO(e.y,t.y);return Math.sqrt(n**2+r**2)}class T3{constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=qv(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=h9(d.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=d,{timestamp:g}=Bt;this.history.push({...m,timestamp:g});const{onStart:b,onMove:y}=this.handlers;h||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Hv(h,this.transformPagePoint),Re.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=qv(d.type==="pointercancel"?this.lastMoveEventInfo:Hv(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,b),m&&m(d,b)},!kw(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const s=Id(t),o=Hv(s,this.transformPagePoint),{point:l}=o,{timestamp:c}=Bt;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,qv(o,this.history)),this.removeListeners=zd(Xu(this.contextWindow,"pointermove",this.handlePointerMove),Xu(this.contextWindow,"pointerup",this.handlePointerUp),Xu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Lr(this.updatePoint)}}function Hv(e,t){return t?{point:t(e.point)}:e}function UO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qv({point:e},t){return{point:e,delta:UO(e,N3(t)),offset:UO(e,p9(t)),velocity:m9(t,.1)}}function p9(e){return e[0]}function N3(e){return e[e.length-1]}function m9(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=N3(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Ia(t)));)n--;if(!r)return{x:0,y:0};const i=Ba(a.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const C3=1e-4,y9=1-C3,g9=1+C3,_3=.01,v9=0-_3,b9=0+_3;function Jn(e){return e.max-e.min}function x9(e,t,n){return Math.abs(e-t)<=n}function FO(e,t,n,r=.5){e.origin=r,e.originPoint=ht(t.min,t.max,e.origin),e.scale=Jn(n)/Jn(t),e.translate=ht(n.min,n.max,e.origin)-e.originPoint,(e.scale>=y9&&e.scale<=g9||isNaN(e.scale))&&(e.scale=1),(e.translate>=v9&&e.translate<=b9||isNaN(e.translate))&&(e.translate=0)}function Wu(e,t,n,r){FO(e.x,t.x,n.x,r?r.originX:void 0),FO(e.y,t.y,n.y,r?r.originY:void 0)}function VO(e,t,n){e.min=n.min+t.min,e.max=e.min+Jn(t)}function S9(e,t,n){VO(e.x,t.x,n.x),VO(e.y,t.y,n.y)}function HO(e,t,n){e.min=t.min-n.min,e.max=e.min+Jn(t)}function Qu(e,t,n){HO(e.x,t.x,n.x),HO(e.y,t.y,n.y)}function w9(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ht(n,e,r.max):Math.min(e,n)),e}function qO(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function j9(e,{top:t,left:n,bottom:r,right:a}){return{x:qO(e.x,n,a),y:qO(e.y,t,r)}}function KO(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=ro(t.min,t.max-r,e.min):r>a&&(n=ro(e.min,e.max-a,t.min)),la(0,1,n)}function E9(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const px=.35;function T9(e=px){return e===!1?e=0:e===!0&&(e=px),{x:GO(e,"left","right"),y:GO(e,"top","bottom")}}function GO(e,t,n){return{min:YO(e,t),max:YO(e,n)}}function YO(e,t){return typeof e=="number"?e:e[t]||0}const XO=()=>({translate:0,scale:1,origin:0,originPoint:0}),rl=()=>({x:XO(),y:XO()}),WO=()=>({min:0,max:0}),bt=()=>({x:WO(),y:WO()});function ir(e){return[e("x"),e("y")]}function P3({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function N9({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function C9(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Kv(e){return e===void 0||e===1}function mx({scale:e,scaleX:t,scaleY:n}){return!Kv(e)||!Kv(t)||!Kv(n)}function vs(e){return mx(e)||M3(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function M3(e){return QO(e.x)||QO(e.y)}function QO(e){return e&&e!=="0%"}function om(e,t,n){const r=e-n,a=t*r;return n+a}function ZO(e,t,n,r,a){return a!==void 0&&(e=om(e,a,r)),om(e,n,r)+t}function yx(e,t=0,n=1,r,a){e.min=ZO(e.min,t,n,r,a),e.max=ZO(e.max,t,n,r,a)}function R3(e,{x:t,y:n}){yx(e.x,t.translate,t.scale,t.originPoint),yx(e.y,n.translate,n.scale,n.originPoint)}const JO=.999999999999,eE=1.0000000000001;function _9(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let i,s;for(let o=0;oJO&&(t.x=1),t.yJO&&(t.y=1)}function al(e,t){e.min=e.min+t,e.max=e.max+t}function tE(e,t,n,r,a=.5){const i=ht(e.min,e.max,a);yx(e,t,n,i,r)}function il(e,t){tE(e.x,t.x,t.scaleX,t.scale,t.originX),tE(e.y,t.y,t.scaleY,t.scale,t.originY)}function D3(e,t){return P3(C9(e.getBoundingClientRect(),t))}function P9(e,t,n){const r=D3(e,n),{scroll:a}=t;return a&&(al(r.x,a.offset.x),al(r.y,a.offset.y)),r}const $3=({current:e})=>e?e.ownerDocument.defaultView:null,M9=new WeakMap;class R9{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=bt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Id(f).point)},i=(f,d)=>{const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=TF(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ir(b=>{let y=this.getAxisMotionValue(b).get()||0;if(ra.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[b];x&&(y=Jn(x)*(parseFloat(y)/100))}}this.originPoint[b]=y}),m&&Re.postRender(()=>m(f,d)),sx(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(f,d)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=d;if(p&&this.currentDirection===null){this.currentDirection=D9(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),g&&g(f,d)},o=(f,d)=>this.stop(f,d),l=()=>ir(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new T3(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:o,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:$3(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&Re.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!Eh(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=w9(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&tl(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&a?this.constraints=j9(a.layoutBox,n):this.constraints=!1,this.elastic=T9(r),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&ir(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=E9(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tl(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=P9(r,a.root,this.visualElement.getTransformPagePoint());let s=A9(a.layout.layoutBox,i);if(n){const o=n(N9(s));this.hasMutatedConstraints=!!o,o&&(s=P3(o))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},c=ir(f=>{if(!Eh(f,n,this.currentDirection))return;let d=l&&l[f]||{};s&&(d={min:0,max:0});const h=a?200:1e6,p=a?40:1e7,m={type:"inertia",velocity:r?t[f]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(f,m)});return Promise.all(c).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return sx(this.visualElement,t),r.start(Ww(t,r,0,n,this.visualElement,!1))}stopAnimation(){ir(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ir(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ir(n=>{const{drag:r}=this.getProps();if(!Eh(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(n);if(a&&a.layout){const{min:s,max:o}=a.layout.layoutBox[n];i.set(t[n]-ht(s,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!tl(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};ir(s=>{const o=this.getAxisMotionValue(s);if(o&&this.constraints!==!1){const l=o.get();a[s]=O9({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ir(s=>{if(!Eh(s,t,null))return;const o=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];o.set(ht(l,c,a[s]))})}addListeners(){if(!this.visualElement.current)return;M9.set(this.visualElement,this);const t=this.visualElement.current,n=Xu(t,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();tl(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Re.read(r);const s=_f(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ir(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=l[f].translate,d.set(d.get()+l[f].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:s=px,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:i,dragElastic:s,dragMomentum:o}}}function Eh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function D9(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $9 extends ns{constructor(t){super(t),this.removeGroupControls=yn,this.removeListeners=yn,this.controls=new R9(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yn}unmount(){this.removeGroupControls(),this.removeListeners()}}const nE=e=>(t,n)=>{e&&Re.postRender(()=>e(t,n))};class k9 extends ns{constructor(){super(...arguments),this.removePointerDownListener=yn}onPointerDown(t){this.session=new T3(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$3(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:nE(t),onStart:nE(n),onMove:r,onEnd:(i,s)=>{delete this.session,a&&Re.postRender(()=>a(i,s))}}}mount(){this.removePointerDownListener=Xu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const pp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ou={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=rE(e,t.target.x),r=rE(e,t.target.y);return`${n}% ${r}%`}},L9={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=Ji.parse(e);if(a.length>5)return r;const i=Ji.createTransformer(e),s=typeof a[0]!="number"?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;a[0+s]/=o,a[1+s]/=l;const c=ht(o,l,.5);return typeof a[2+s]=="number"&&(a[2+s]/=c),typeof a[3+s]=="number"&&(a[3+s]/=c),i(a)}};class z9 extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:i}=t;lF(I9),i&&(n.group&&n.group.add(i),r&&r.register&&a&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),pp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,a||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Re.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),jw.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function k3(e){const[t,n]=g$(),r=A.useContext(gw);return u.jsx(z9,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(A$),isPresent:t,safeToRemove:n})}const I9={borderRadius:{...ou,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ou,borderTopRightRadius:ou,borderBottomLeftRadius:ou,borderBottomRightRadius:ou,boxShadow:L9};function B9(e,t,n){const r=cn(e)?e:Qr(e);return r.start(Ww("",r,t,n)),r.animation}function U9(e){return e instanceof SVGElement&&e.tagName!=="svg"}const F9=(e,t)=>e.depth-t.depth;class V9{constructor(){this.children=[],this.isDirty=!1}add(t){Lw(this.children,t),this.isDirty=!0}remove(t){zw(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(F9),this.isDirty=!1,this.children.forEach(t)}}function H9(e,t){const n=aa.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(Lr(r),e(i-t))};return Re.read(r,!0),()=>Lr(r)}const L3=["TopLeft","TopRight","BottomLeft","BottomRight"],q9=L3.length,aE=e=>typeof e=="string"?parseFloat(e):e,iE=e=>typeof e=="number"||fe.test(e);function K9(e,t,n,r,a,i){a?(e.opacity=ht(0,n.opacity!==void 0?n.opacity:1,G9(r)),e.opacityExit=ht(t.opacity!==void 0?t.opacity:1,0,Y9(r))):i&&(e.opacity=ht(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(ro(e,t,r))}function oE(e,t){e.min=t.min,e.max=t.max}function tr(e,t){oE(e.x,t.x),oE(e.y,t.y)}function lE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function cE(e,t,n,r,a){return e-=t,e=om(e,1/n,r),a!==void 0&&(e=om(e,1/a,r)),e}function X9(e,t=0,n=1,r=.5,a,i=e,s=e){if(ra.test(t)&&(t=parseFloat(t),t=ht(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=ht(i.min,i.max,r);e===i&&(o-=t),e.min=cE(e.min,t,n,o,a),e.max=cE(e.max,t,n,o,a)}function uE(e,t,[n,r,a],i,s){X9(e,t[n],t[r],t[a],t.scale,i,s)}const W9=["x","scaleX","originX"],Q9=["y","scaleY","originY"];function fE(e,t,n,r){uE(e.x,t,W9,n?n.x:void 0,r?r.x:void 0),uE(e.y,t,Q9,n?n.y:void 0,r?r.y:void 0)}function dE(e){return e.translate===0&&e.scale===1}function I3(e){return dE(e.x)&&dE(e.y)}function hE(e,t){return e.min===t.min&&e.max===t.max}function Z9(e,t){return hE(e.x,t.x)&&hE(e.y,t.y)}function pE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function B3(e,t){return pE(e.x,t.x)&&pE(e.y,t.y)}function mE(e){return Jn(e.x)/Jn(e.y)}function yE(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class J9{constructor(){this.members=[]}add(t){Lw(this.members,t),t.scheduleRender()}remove(t){if(zw(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function eH(e,t,n){let r="";const a=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((a||i||s)&&(r=`translate3d(${a}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:f,rotateX:d,rotateY:h,skewX:p,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const o=e.x.scale*t.x,l=e.y.scale*t.y;return(o!==1||l!==1)&&(r+=`scale(${o}, ${l})`),r||"none"}const bs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},_u=typeof window<"u"&&window.MotionDebug!==void 0,Gv=["","X","Y","Z"],tH={visibility:"hidden"},gE=1e3;let nH=0;function Yv(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function U3(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Y$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Re,!(a||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&U3(r)}function F3({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(s={},o=t==null?void 0:t()){this.id=nH++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,_u&&(bs.totalNodes=bs.resolvedTargetDeltas=bs.recalculatedProjection=0),this.nodes.forEach(iH),this.nodes.forEach(uH),this.nodes.forEach(fH),this.nodes.forEach(sH),_u&&window.MotionDebug.record(bs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=H9(h,250),pp.hasAnimatedSinceResize&&(pp.hasAnimatedSinceResize=!1,this.nodes.forEach(bE))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||f.getDefaultTransition()||yH,{onLayoutAnimationStart:b,onLayoutAnimationComplete:y}=f.getProps(),v=!this.targetLayout||!B3(this.targetLayout,m)||p,x=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const w={...Rw(g,"layout"),onPlay:b,onComplete:y};(f.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else h||bE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Lr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(dH),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&U3(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const S=w/1e3;xE(d.x,s.x,S),xE(d.y,s.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qu(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pH(this.relativeTarget,this.relativeTargetOrigin,h,S),x&&Z9(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=bt()),tr(x,this.relativeTarget)),g&&(this.animationValues=f,K9(f,c,this.latestValues,S,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Lr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Re.update(()=>{pp.hasAnimatedSinceResize=!0,this.currentAnimation=B9(0,gE,{...s,onUpdate:o=>{this.mixTargetDelta(o),s.onUpdate&&s.onUpdate(o)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:l,layout:c,latestValues:f}=s;if(!(!o||!l||!c)){if(this!==s&&this.layout&&c&&V3(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||bt();const d=Jn(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const h=Jn(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}tr(o,l),il(o,f),Wu(this.projectionDeltaWithTransform,this.layoutCorrected,o,f)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new J9),this.sharedNodes.get(s).add(o);const c=o.options.initialPromotionConfig;o.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const c={};l.z&&Yv("z",s,c,this.animationValues);for(let f=0;f{var o;return(o=s.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(vE),this.root.sharedNodes.clear()}}}function rH(e){e.updateLayout()}function aH(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?ir(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],p=Jn(h);h.min=r[d].min,h.max=h.min+p}):V3(i,n.layoutBox,r)&&ir(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],p=Jn(r[d]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const o=rl();Wu(o,r,n.layoutBox);const l=rl();s?Wu(l,e.applyTransform(a,!0),n.measuredBox):Wu(l,r,n.layoutBox);const c=!I3(o);let f=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:p}=d;if(h&&p){const m=bt();Qu(m,n.layoutBox,h.layoutBox);const g=bt();Qu(g,r,p.layoutBox),B3(m,g)||(f=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:o,hasLayoutChanged:c,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function iH(e){_u&&bs.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function sH(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function oH(e){e.clearSnapshot()}function vE(e){e.clearMeasurements()}function lH(e){e.isLayoutDirty=!1}function cH(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function bE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function uH(e){e.resolveTargetDelta()}function fH(e){e.calcProjection()}function dH(e){e.resetSkewAndRotation()}function hH(e){e.removeLeadSnapshot()}function xE(e,t,n){e.translate=ht(t.translate,0,n),e.scale=ht(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function SE(e,t,n,r){e.min=ht(t.min,n.min,r),e.max=ht(t.max,n.max,r)}function pH(e,t,n,r){SE(e.x,t.x,n.x,r),SE(e.y,t.y,n.y,r)}function mH(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yH={duration:.45,ease:[.4,0,.1,1]},wE=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),jE=wE("applewebkit/")&&!wE("chrome/")?Math.round:yn;function AE(e){e.min=jE(e.min),e.max=jE(e.max)}function gH(e){AE(e.x),AE(e.y)}function V3(e,t,n){return e==="position"||e==="preserve-aspect"&&!x9(mE(t),mE(n),.2)}function vH(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const bH=F3({attachResizeListener:(e,t)=>_f(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xv={current:void 0},H3=F3({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xv.current){const e=new bH({});e.mount(window),e.setOptions({layoutScroll:!0}),Xv.current=e}return Xv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),xH={pan:{Feature:k9},drag:{Feature:$9,ProjectionNode:H3,MeasureLayout:k3}};function OE(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,i=r[a];i&&Re.postRender(()=>i(t,Id(t)))}class SH extends ns{mount(){const{current:t}=this.node;t&&(this.unmount=wF(t,n=>(OE(this.node,n,"Start"),r=>OE(this.node,r,"End"))))}unmount(){}}class wH extends ns{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=zd(_f(this.node.current,"focus",()=>this.onFocus()),_f(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function EE(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),i=r[a];i&&Re.postRender(()=>i(t,Id(t)))}class jH extends ns{mount(){const{current:t}=this.node;t&&(this.unmount=EF(t,n=>(EE(this.node,n,"Start"),(r,{success:a})=>EE(this.node,r,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const gx=new WeakMap,Wv=new WeakMap,AH=e=>{const t=gx.get(e.target);t&&t(e)},OH=e=>{e.forEach(AH)};function EH({root:e,...t}){const n=e||document;Wv.has(n)||Wv.set(n,{});const r=Wv.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(OH,{root:e,...t})),r[a]}function TH(e,t,n){const r=EH(t);return gx.set(e,n),r.observe(e),()=>{gx.delete(e),r.unobserve(e)}}const NH={some:0,all:1};class CH extends ns{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:NH[a]},o=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),h=c?f:d;h&&h(l)};return TH(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_H(t,n))&&this.startObserver()}unmount(){}}function _H({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const PH={inView:{Feature:CH},tap:{Feature:jH},focus:{Feature:wH},hover:{Feature:SH}},MH={layout:{ProjectionNode:H3,MeasureLayout:k3}},lm={current:null},Qw={current:!1};function q3(){if(Qw.current=!0,!!vw)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>lm.current=e.matches;e.addListener(t),t()}else lm.current=!1}const RH=[...m3,sn,Ji],DH=e=>RH.find(p3(e)),TE=new WeakMap;function $H(e,t,n){for(const r in t){const a=t[r],i=n[r];if(cn(a))e.addValue(r,a);else if(cn(i))e.addValue(r,Qr(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=e.getStaticValue(r);e.addValue(r,Qr(s!==void 0?s:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const NE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class kH{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=aa.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),Qw.current||q3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:lm.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){TE.delete(this.current),this.projection&&this.projection.unmount(),Lr(this.notifyUpdate),Lr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=xo.has(t),a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Re.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Gl){const n=Gl[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):bt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Qr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(d3(a)||r3(a))?a=parseFloat(a):!DH(a)&&Ji.test(n)&&(a=c3(t,n)),this.setBaseTarget(t,cn(a)?a.get():a)),cn(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let a;if(typeof r=="string"||typeof r=="object"){const s=Ow(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(a=s[t])}if(r&&a!==void 0)return a;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!cn(i)?i:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Iw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class K3 extends kH{constructor(){super(...arguments),this.KeyframeResolver=y3}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;cn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function LH(e){return window.getComputedStyle(e)}class zH extends K3{constructor(){super(...arguments),this.type="html",this.renderInstance=P$}readValueFromInstance(t,n){if(xo.has(n)){const r=qw(n);return r&&r.default||0}else{const r=LH(t),a=(N$(n)?r.getPropertyValue(n):r[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return D3(t,n)}build(t,n,r){Nw(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Mw(t,n,r)}}class IH extends K3{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=bt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(xo.has(n)){const r=qw(n);return r&&r.default||0}return n=M$.has(n)?n:ww(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return $$(t,n,r)}build(t,n,r){Cw(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,a){R$(t,n,r,a)}mount(t){this.isSVGTag=Pw(t.tagName),super.mount(t)}}const BH=(e,t)=>Aw(e)?new IH(t):new zH(t,{allowProjection:e!==A.Fragment}),UH=gF({...f9,...PH,...xH,...MH},BH),Nt=M7(UH);function G3(e,t){let n;const r=()=>{const{currentTime:a}=t,s=(a===null?0:a.value)/100;n!==s&&e(s),n=s};return Re.update(r,!0),()=>Lr(r)}const mp=new WeakMap;let fi;function FH(e,t){if(t){const{inlineSize:n,blockSize:r}=t[0];return{width:n,height:r}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function VH({target:e,contentRect:t,borderBoxSize:n}){var r;(r=mp.get(e))===null||r===void 0||r.forEach(a=>{a({target:e,contentSize:t,get size(){return FH(e,n)}})})}function HH(e){e.forEach(VH)}function qH(){typeof ResizeObserver>"u"||(fi=new ResizeObserver(HH))}function KH(e,t){fi||qH();const n=H$(e);return n.forEach(r=>{let a=mp.get(r);a||(a=new Set,mp.set(r,a)),a.add(t),fi==null||fi.observe(r)}),()=>{n.forEach(r=>{const a=mp.get(r);a==null||a.delete(t),a!=null&&a.size||fi==null||fi.unobserve(r)})}}const yp=new Set;let Zu;function GH(){Zu=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};yp.forEach(n=>n(t))},window.addEventListener("resize",Zu)}function YH(e){return yp.add(e),Zu||GH(),()=>{yp.delete(e),!yp.size&&Zu&&(Zu=void 0)}}function XH(e,t){return typeof e=="function"?YH(e):KH(e,t)}const WH=50,CE=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),QH=()=>({time:0,x:CE(),y:CE()}),ZH={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function _E(e,t,n,r){const a=n[t],{length:i,position:s}=ZH[t],o=a.current,l=n.time;a.current=e[`scroll${s}`],a.scrollLength=e[`scroll${i}`]-e[`client${i}`],a.offset.length=0,a.offset[0]=0,a.offset[1]=a.scrollLength,a.progress=ro(0,a.scrollLength,a.current);const c=r-l;a.velocity=c>WH?0:Bw(a.current-o,c)}function JH(e,t,n){_E(e,"x",t,n),_E(e,"y",t,n),t.time=n}function eq(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const a=r.getBoundingClientRect();r=r.parentElement;const i=r.getBoundingClientRect();n.x+=a.left-i.left,n.y+=a.top-i.top}else if(r instanceof SVGGraphicsElement){const{x:a,y:i}=r.getBBox();n.x+=a,n.y+=i;let s=null,o=r.parentNode;for(;!s;)o.tagName==="svg"&&(s=o),o=r.parentNode;r=s}else break;return n}const vx={start:0,center:.5,end:1};function PE(e,t,n=0){let r=0;if(e in vx&&(e=vx[e]),typeof e=="string"){const a=parseFloat(e);e.endsWith("px")?r=a:e.endsWith("%")?e=a/100:e.endsWith("vw")?r=a/100*document.documentElement.clientWidth:e.endsWith("vh")?r=a/100*document.documentElement.clientHeight:e=a}return typeof e=="number"&&(r=t*e),n+r}const tq=[0,0];function nq(e,t,n,r){let a=Array.isArray(e)?e:tq,i=0,s=0;return typeof e=="number"?a=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?a=e.split(" "):a=[e,vx[e]?e:"0"]),i=PE(a[0],n,r),s=PE(a[1],t),i-s}const rq={All:[[0,0],[1,1]]},aq={x:0,y:0};function iq(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function sq(e,t,n){const{offset:r=rq.All}=n,{target:a=e,axis:i="y"}=n,s=i==="y"?"height":"width",o=a!==e?eq(a,e):aq,l=a===e?{width:e.scrollWidth,height:e.scrollHeight}:iq(a),c={width:e.clientWidth,height:e.clientHeight};t[i].offset.length=0;let f=!t[i].interpolate;const d=r.length;for(let h=0;hoq(e,r.target,n),update:a=>{JH(e,n,a),(r.offset||r.target)&&sq(e,n,r)},notify:()=>t(n)}}const lu=new WeakMap,ME=new WeakMap,Qv=new WeakMap,RE=e=>e===document.documentElement?window:e;function Zw(e,{container:t=document.documentElement,...n}={}){let r=Qv.get(t);r||(r=new Set,Qv.set(t,r));const a=QH(),i=lq(t,e,a,n);if(r.add(i),!lu.has(t)){const o=()=>{for(const h of r)h.measure()},l=()=>{for(const h of r)h.update(Bt.timestamp)},c=()=>{for(const h of r)h.notify()},f=()=>{Re.read(o,!1,!0),Re.read(l,!1,!0),Re.update(c,!1,!0)};lu.set(t,f);const d=RE(t);window.addEventListener("resize",f,{passive:!0}),t!==document.documentElement&&ME.set(t,XH(t,f)),d.addEventListener("scroll",f,{passive:!0})}const s=lu.get(t);return Re.read(s,!1,!0),()=>{var o;Lr(s);const l=Qv.get(t);if(!l||(l.delete(i),l.size))return;const c=lu.get(t);lu.delete(t),c&&(RE(t).removeEventListener("scroll",c),(o=ME.get(t))===null||o===void 0||o(),window.removeEventListener("resize",c))}}function cq({source:e,container:t,axis:n="y"}){e&&(t=e);const r={value:0},a=Zw(i=>{r.value=i[n].progress*100},{container:t,axis:n});return{currentTime:r,cancel:a}}const Zv=new Map;function Y3({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),Zv.has(t)||Zv.set(t,{});const r=Zv.get(t);return r[n]||(r[n]=z$()?new ScrollTimeline({source:t,axis:n}):cq({source:t,axis:n})),r[n]}function uq(e){return e.length===2}function X3(e){return e&&(e.target||e.offset)}function fq(e,t){return uq(e)||X3(t)?Zw(n=>{e(n[t.axis].progress,n)},t):G3(e,Y3(t))}function dq(e,t){if(e.flatten(),X3(t))return e.pause(),Zw(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=Y3(t);return e.attachTimeline?e.attachTimeline(n,r=>(r.pause(),G3(a=>{r.time=r.duration*a},n))):yn}}function hq(e,{axis:t="y",...n}={}){const r={axis:t,...n};return typeof e=="function"?fq(e,r):dq(e,r)}function DE(e,t){A7(!!(!t||t.current))}const pq=()=>({scrollX:Qr(0),scrollY:Qr(0),scrollXProgress:Qr(0),scrollYProgress:Qr(0)});function mq({container:e,target:t,layoutEffect:n=!0,...r}={}){const a=kc(pq);return(n?Hy:A.useEffect)(()=>(DE("target",t),DE("container",e),hq((s,{x:o,y:l})=>{a.scrollX.set(o.current),a.scrollXProgress.set(o.progress),a.scrollY.set(l.current),a.scrollYProgress.set(l.progress)},{...r,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0})),[e,t,JSON.stringify(r.offset)]),a}function yq(e){const t=kc(()=>Qr(e)),{isStatic:n}=A.useContext(Vy);if(n){const[,r]=A.useState(e);A.useEffect(()=>t.on("change",r),[])}return t}function W3(e,t){const n=yq(t()),r=()=>n.set(t());return r(),Hy(()=>{const a=()=>Re.preRender(r,!1,!0),i=e.map(s=>s.on("change",a));return()=>{i.forEach(s=>s()),Lr(r)}}),n}const gq=e=>e&&typeof e=="object"&&e.mix,vq=e=>gq(e)?e.mix:void 0;function bq(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],a=e[1+n],i=e[2+n],s=e[3+n],o=Yw(a,i,{mixer:vq(i[0]),...s});return t?o(r):o}function xq(e){Gu.current=[],e();const t=W3(Gu.current,e);return Gu.current=void 0,t}function Jv(e,t,n,r){if(typeof e=="function")return xq(e);const a=typeof t=="function"?t:bq(t,n,r);return Array.isArray(e)?$E(e,a):$E([e],([i])=>a(i))}function $E(e,t){const n=kc(()=>[]);return W3(e,()=>{n.length=0;const r=e.length;for(let a=0;atypeof e=="string",cu=()=>{let e,t;const n=new Promise((r,a)=>{e=r,t=a});return n.resolve=e,n.reject=t,n},kE=e=>e==null?"":String(e),Sq=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},wq=/###/g,LE=e=>e&&e.includes("###")?e.replace(wq,"."):e,zE=e=>!e||pe(e),Ju=(e,t,n)=>{const r=pe(t)?t.split("."):t;let a=0;for(;a{const{obj:r,k:a}=Ju(e,t,Object);if(r!==void 0||t.length===1){r[a]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),o=Ju(e,s,Object);for(;o.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),o=Ju(e,s,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${i}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${i}`]=n},jq=(e,t,n,r)=>{const{obj:a,k:i}=Ju(e,t,Object);a[i]=a[i]||[],a[i].push(n)},cm=(e,t)=>{const{obj:n,k:r}=Ju(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Aq=(e,t,n)=>{const r=cm(e,n);return r!==void 0?r:cm(t,n)},Q3=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?pe(e[r])||e[r]instanceof String||pe(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Q3(e[r],t[r],n):e[r]=t[r]);return e},xa=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Oq={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Eq=e=>pe(e)?e.replace(/[&<>"'\/]/g,t=>Oq[t]):e;class Tq{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Nq=[" ",",","?","!",";"],Cq=new Tq(20),_q=(e,t,n)=>{t=t||"",n=n||"";const r=Nq.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const a=Cq.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!a.test(e);if(!i){const s=e.indexOf(n);s>0&&!a.test(e.substring(0,s))&&(i=!0)}return i},bx=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let a=e;for(let i=0;ie==null?void 0:e.replace(/_/g,"-"),Pq={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class um{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Pq,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,a){return a&&!this.debug?null:(t=t.map(i=>pe(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),pe(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new um(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new um(this.logger,t)}}var Zr=new um;let Wy=class{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const a=this.observers[r].get(n)||0;this.observers[r].set(n,a+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...a)=>{n(...a),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([a,i])=>{for(let s=0;s{for(let s=0;s-1&&this.options.ns.splice(n,1)}getResource(t,n,r,a={}){var c,f;const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;t.includes(".")?o=t.split("."):(o=[t,n],r&&(Array.isArray(r)?o.push(...r):pe(r)&&i?o.push(...r.split(i)):o.push(r)));const l=cm(this.data,o);return!l&&!n&&!r&&t.includes(".")&&(t=o[0],n=o[1],r=o.slice(2).join(".")),l||!s||!pe(r)?l:bx((f=(c=this.data)==null?void 0:c[t])==null?void 0:f[n],r,i)}addResource(t,n,r,a,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let o=[t,n];r&&(o=o.concat(s?r.split(s):r)),t.includes(".")&&(o=t.split("."),a=n,n=o[1]),this.addNamespaces(n),IE(this.data,o,a),i.silent||this.emit("added",t,n,r,a)}addResources(t,n,r,a={silent:!1}){for(const i in r)(pe(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});a.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,a,i,s={silent:!1,skipCopy:!1}){let o=[t,n];t.includes(".")&&(o=t.split("."),a=r,r=n,n=o[1]),this.addNamespaces(n);let l=cm(this.data,o)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),a?Q3(l,r,i):l={...l,...r},IE(this.data,o,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(a=>n[a]&&Object.keys(n[a]).length>0)}toJSON(){return this.data}}var Z3={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,a){return e.forEach(i=>{var s;t=((s=this.processors[i])==null?void 0:s.process(t,n,r,a))??t}),t}};const J3=Symbol("i18next/PATH_KEY");function Mq(){const e=[],t=Object.create(null);let n;return t.get=(r,a)=>{var i;return(i=n==null?void 0:n.revoke)==null||i.call(n),a===J3?e:(e.push(a),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function vl(e,t){const{[J3]:n}=e(Mq()),r=(t==null?void 0:t.keySeparator)??".",a=(t==null?void 0:t.nsSeparator)??":",i=(t==null?void 0:t.enableSelector)==="strict";if(n.length>1&&a){const s=t==null?void 0:t.ns,o=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(o&&(i?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${a}${n.slice(1).join(r)}`}return n.join(r)}const eb=e=>!pe(e)&&typeof e!="boolean"&&typeof e!="number";class fm extends Wy{constructor(t,n={}){super(),Sq(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zr.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const a=this.resolve(t,r);if((a==null?void 0:a.res)===void 0)return!1;const i=eb(a.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!_q(t,r,a);if(s&&!o){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:pe(i)?[i]:i};const c=t.split(r);(r!==a||r===a&&this.options.ns.includes(c[0]))&&(i=c.shift()),t=c.join(a)}return{key:t,namespaces:pe(i)?[i]:i}}translate(t,n,r){let a=typeof n=="object"?{...n}:n;if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";typeof t=="function"&&(t=vl(t,{...this.options,...a})),Array.isArray(t)||(t=[String(t)]),t=t.map(L=>typeof L=="function"?vl(L,{...this.options,...a}):String(L));const i=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(t[t.length-1],a),c=l[l.length-1];let f=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const d=a.lng||this.language,h=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return h?i?{res:`${c}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:`${c}${f}${o}`:i?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:o;const p=this.resolve(t,a);let m=p==null?void 0:p.res;const g=(p==null?void 0:p.usedKey)||o,b=(p==null?void 0:p.exactUsedKey)||o,y=["[object Number]","[object Function]","[object RegExp]"],v=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,w=a.count!==void 0&&!pe(a.count),S=fm.hasDefaultValue(a),j=w?this.pluralResolver.getSuffix(d,a.count,a):"",O=a.ordinal&&w?this.pluralResolver.getSuffix(d,a.count,{ordinal:!1}):"",E=w&&!a.ordinal&&a.count===0,T=E&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${j}`]||a[`defaultValue${O}`]||a.defaultValue;let N=m;x&&!m&&S&&(N=T);const M=eb(N),C=Object.prototype.toString.apply(N);if(x&&N&&M&&!y.includes(C)&&!(pe(v)&&Array.isArray(N))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,N,{...a,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(p.res=L,p.usedParams=this.getUsedParamsDetails(a),p):L}if(s){const L=Array.isArray(N),D=L?[]:{},$=L?b:g;for(const P in N)if(Object.prototype.hasOwnProperty.call(N,P)){const k=`${$}${s}${P}`;S&&!m?D[P]=this.translate(k,{...a,defaultValue:eb(T)?T[P]:void 0,joinArrays:!1,ns:l}):D[P]=this.translate(k,{...a,joinArrays:!1,ns:l}),D[P]===k&&(D[P]=N[P])}m=D}}else if(x&&pe(v)&&Array.isArray(m))m=m.join(v),m&&(m=this.extendTranslation(m,t,a,r));else{let L=!1,D=!1;!this.isValidLookup(m)&&S&&(L=!0,m=T),this.isValidLookup(m)||(D=!0,m=o);const P=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:m,k=S&&T!==m&&this.options.updateMissing;if(D||L||k){if(this.logger.log(k?"updateKey":"missingKey",d,c,w&&!k?`${o}${this.pluralResolver.getSuffix(d,a.count,a)}`:o,k?T:m),s){const Y=this.resolve(o,{...a,keySeparator:!1});Y&&Y.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let I=[];const F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(let Y=0;Y{var ye;const Z=S&&te!==m?te:P;this.options.missingKeyHandler?this.options.missingKeyHandler(Y,c,q,Z,k,a):(ye=this.backendConnector)!=null&&ye.saveMissing&&this.backendConnector.saveMissing(Y,c,q,Z,k,a),this.emit("missingKey",Y,c,q,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?I.forEach(Y=>{const q=this.pluralResolver.getSuffixes(Y,a);E&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!q.includes(`${this.options.pluralSeparator}zero`)&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(te=>{H([Y],o+te,a[`defaultValue${te}`]||T)})}):H(I,o,T))}m=this.extendTranslation(m,t,a,p,r),D&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${c}${f}${o}`),(D||L)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${o}`:o,L?m:void 0,a))}return i?(p.res=m,p.usedParams=this.getUsedParamsDetails(a),p):m}extendTranslation(t,n,r,a,i){var l,c;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=pe(t)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(f){const p=t.match(this.interpolator.nestingRegexp);d=p&&p.length}let h=r.replace&&!pe(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||a.usedLng,r),f){const p=t.match(this.interpolator.nestingRegexp),m=p&&p.length;d(i==null?void 0:i[0])===p[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):this.translate(...p,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,o=pe(s)?[s]:s;return t!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(t=Z3.handle(o,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,a,i,s,o;return pe(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(l=>typeof l=="function"?vl(l,{...this.options,...n}):l)),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),f=c.key;a=f;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=n.count!==void 0&&!pe(n.count),p=h&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(pe(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(b=>{var y,v;this.isValidLookup(r)||(o=b,!this.checkedLoadedFor[`${g[0]}-${b}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((v=this.utils)!=null&&v.hasLoadedNamespace(o))&&(this.checkedLoadedFor[`${g[0]}-${b}`]=!0,this.logger.warn(`key "${a}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(x=>{var j;if(this.isValidLookup(r))return;s=x;const w=[f];if((j=this.i18nFormat)!=null&&j.addLookupKeys)this.i18nFormat.addLookupKeys(w,f,x,b,n);else{let O;h&&(O=this.pluralResolver.getSuffix(x,n.count,n));const E=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&O.startsWith(T)&&w.push(f+O.replace(T,this.options.pluralSeparator)),w.push(f+O),p&&w.push(f+E)),m){const N=`${f}${this.options.contextSeparator||"_"}${n.context}`;w.push(N),h&&(n.ordinal&&O.startsWith(T)&&w.push(N+O.replace(T,this.options.pluralSeparator)),w.push(N+O),p&&w.push(N+E))}}let S;for(;S=w.pop();)this.isValidLookup(r)||(i=S,r=this.getResource(x,b,S,n))}))})}),{res:r,usedKey:a,exactUsedKey:i,usedLng:s,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,a={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,a):this.resourceStore.getResource(t,n,r,a)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!pe(t.replace);let a=r?t.replace:t;if(r&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!r){a={...a};for(const i of n)delete a[i]}return a}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class UE{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zr.create("languageUtils")}getScriptPartFromCode(t){if(t=Pf(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Pf(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(pe(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const a=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const a=this.getScriptPartFromCode(r);if(this.isSupportedCode(a))return n=a;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),pe(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),a=[],i=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return pe(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):pe(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{a.includes(s)||i(this.formatLanguageCode(s))}),a}}const FE={zero:0,one:1,two:2,few:3,many:4,other:5},VE={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Rq{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Zr.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Pf(t==="dev"?"en":t),a=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:a});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:a})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),VE;if(!t.match(/-|_/))return VE;const l=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(l,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(a=>`${n}${a}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((a,i)=>FE[a]-FE[i]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,n,r={}){const a=this.getRule(t,r);return a?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const HE=(e,t,n,r=".",a=!0)=>{let i=Aq(e,t,n);return!i&&a&&pe(n)&&(i=bx(e,n,r),i===void 0&&(i=bx(t,n,r))),i},tb=e=>e.replace(/\$/g,"$$$$");class qE{constructor(t={}){var n;this.logger=Zr.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:a,prefix:i,prefixEscaped:s,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:f,unescapePrefix:d,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:b,maxReplaces:y,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:Eq,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=i?xa(i):s||"{{",this.suffix=o?xa(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":d?xa(d):"-",this.unescapeSuffix=this.unescapePrefix?"":f?xa(f):"",this.nestingPrefix=h?xa(h):p||xa("$t("),this.nestingSuffix=m?xa(m):g||xa(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=y||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,a){var p;let i,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=m=>{if(!m.includes(this.formatSeparator)){const v=HE(n,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...a,...n,interpolationkey:m}):v}const g=m.split(this.formatSeparator),b=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(HE(n,l,b,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...a,...n,interpolationkey:b})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const f=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((p=a==null?void 0:a.interpolation)==null?void 0:p.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>tb(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?tb(this.escape(m)):tb(m)}].forEach(m=>{for(o=0;i=m.regex.exec(t);){const g=i[1].trim();if(s=c(g),s===void 0)if(typeof f=="function"){const y=f(t,i,a);s=pe(y)?y:""}else if(a&&Object.prototype.hasOwnProperty.call(a,g))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else!pe(s)&&!this.useRawValueToEscape&&(s=kE(s));const b=m.safeValue(s);if(t=t.replace(i[0],b),d?(m.regex.lastIndex+=s.length,m.regex.lastIndex-=i[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,n,r={}){let a,i,s;const o=(l,c)=>{const f=this.nestingOptionsSeparator;if(!l.includes(f))return l;const d=l.split(new RegExp(`${xa(f)}[ ]*{`));let h=`{${d[1]}`;l=d[0],h=this.interpolate(h,s);const p=h.match(/'/g),m=h.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!m||((m==null?void 0:m.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),c&&(s={...c,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${f}${h}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,l};for(;a=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&!pe(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(c!==-1&&(l=a[1].slice(c).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),a[1]=a[1].slice(0,c)),i=n(o.call(this,a[1].trim(),s),s),i&&a[0]===t&&!pe(i))return i;pe(i)||(i=kE(i)),i||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),i=""),l.length&&(i=l.reduce((f,d)=>this.format(f,d,r.lng,{...r,interpolationkey:a[1].trim()}),i.trim())),t=t.replace(a[0],i),this.regexp.lastIndex=0}return t}}const Dq=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const a=r[1].slice(0,-1);t==="currency"&&!a.includes(":")?n.currency||(n.currency=a.trim()):t==="relativetime"&&!a.includes(":")?n.range||(n.range=a.trim()):a.split(";").forEach(s=>{if(s){const[o,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();n[f]||(n[f]=c),c==="false"&&(n[f]=!1),c==="true"&&(n[f]=!0),isNaN(c)||(n[f]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},KE=e=>{const t={};return(n,r,a)=>{let i=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(i={...i,[a.interpolationkey]:void 0});const s=r+JSON.stringify(i);let o=t[s];return o||(o=e(Pf(r),a),t[s]=o),o(n)}},$q=e=>(t,n,r)=>e(Pf(n),r)(t);class kq{constructor(t={}){this.logger=Zr.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?KE:$q;this.formats={number:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i});return o=>s.format(o)}),currency:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i,style:"currency"});return o=>s.format(o)}),datetime:r((a,i)=>{const s=new Intl.DateTimeFormat(a,{...i});return o=>s.format(o)}),relativetime:r((a,i)=>{const s=new Intl.RelativeTimeFormat(a,{...i});return o=>s.format(o,i.range||"day")}),list:r((a,i)=>{const s=new Intl.ListFormat(a,{...i});return o=>s.format(o)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=KE(n)}format(t,n,r,a={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&!i[0].includes(")")&&i.find(o=>o.includes(")"))){const o=i.findIndex(l=>l.includes(")"));i[0]=[i[0],...i.splice(1,o)].join(this.formatSeparator)}return i.reduce((o,l)=>{var d;const{formatName:c,formatOptions:f}=Dq(l);if(this.formats[c]){let h=o;try{const p=((d=a==null?void 0:a.formatParams)==null?void 0:d[a.interpolationkey])||{},m=p.locale||p.lng||a.locale||a.lng||r;h=this.formats[c](o,m,{...f,...a,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn(`there was no format function for ${c}`);return o},t)}}const Lq=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class zq extends Wy{constructor(t,n,r,a={}){var i,s;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=a,this.logger=Zr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(s=(i=this.backend)==null?void 0:i.init)==null||s.call(i,r,a.backend,a)}queueLoad(t,n,r,a){const i={},s={},o={},l={};return t.forEach(c=>{let f=!0;n.forEach(d=>{const h=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,f=!1,s[h]===void 0&&(s[h]=!0),i[h]===void 0&&(i[h]=!0),l[d]===void 0&&(l[d]=!0)))}),f||(o[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const a=t.split("|"),i=a[0],s=a[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const o={};this.queue.forEach(l=>{jq(l.loaded,[i],s),Lq(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const f=l.loaded[c];f.length&&f.forEach(d=>{o[c][d]===void 0&&(o[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r,a=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:a,wait:i,callback:s});return}this.readingCalls++;const o=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&f&&a{this.read(t,n,r,a+1,i*2,s)},i);return}s(c,f)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}return}return l(t,n,o)}prepareLoading(t,n,r={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();pe(t)&&(t=this.languageUtils.toResolveHierarchy(t)),pe(n)&&(n=[n]);const i=this.queueLoad(t,n,r,a);if(!i.toLoad.length)return i.pending.length||a(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),a=r[0],i=r[1];this.read(a,i,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${a} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${i} for language ${a}`,o),this.loaded(t,s,o)})}saveMissing(t,n,r,a,i,s={},o=()=>{}){var l,c,f,d,h;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((d=(f=this.services)==null?void 0:f.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((h=this.backend)!=null&&h.create){const p={...s,isUpdate:i},m=this.backend.create.bind(this.backend);if(m.length<6)try{let g;m.length===5?g=m(t,n,r,a,p):g=m(t,n,r,a),g&&typeof g.then=="function"?g.then(b=>o(null,b)).catch(o):o(null,g)}catch(g){o(g)}else m(t,n,r,a,o,p)}!t||!t[0]||this.store.addResource(t[0],n,r,a)}}}const nb=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),pe(e[1])&&(t.defaultValue=e[1]),pe(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),GE=e=>(pe(e.ns)&&(e.ns=[e.ns]),pe(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),pe(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Th=()=>{},Iq=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ef extends Wy{constructor(t={},n){if(super(),this.options=GE(t),this.services={},this.logger=Zr,this.modules={external:[]},Iq(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(pe(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=nb();this.options={...r,...this.options,...GE(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const a=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Zr.init(a(this.modules.logger),this.options):Zr.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=kq;const f=new UE(this.options);this.store=new BE(this.options.resources,this.options);const d=this.services;d.logger=Zr,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new Rq(f,{prepend:this.options.pluralSeparator}),c&&(d.formatter=a(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new qE(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new zq(a(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(d.languageDetector=a(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=a(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new fm(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Th),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...f)=>this.store[c](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...f)=>(this.store[c](...f),this)});const o=cu(),l=()=>{const c=(f,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(d),n(f,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(t,n=Th){var i,s;let r=n;const a=pe(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((a==null?void 0:a.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(d=>{d!=="cimode"&&(o.includes(d)||o.push(d))})};a?l(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>l(f)),(s=(i=this.options.preload)==null?void 0:i.forEach)==null||s.call(i,c=>l(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const a=cu();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Th),this.services.backendConnector.reload(t,n,i=>{a.resolve(),r(i)}),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Z3.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},i=(o,l)=>{l?this.isLanguageChangingTo===t&&(a(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(o,(...c)=>this.t(...c))},s=o=>{var f,d;!t&&!o&&this.services.languageDetector&&(o=[]);const l=pe(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(pe(o)?[o]:o);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),(d=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||d.call(f,c)),this.loadResources(c,h=>{i(h,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,a){const i=a==null?void 0:a.scopeNs,s=(o,l,...c)=>{let f;typeof l!="object"?f=this.options.overloadTranslationOptionHandler([o,l].concat(c)):f={...l},f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs;const d=f.ns!==void 0&&f.ns!==null;f.ns=f.ns||s.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||r||s.keyPrefix);const h={...this.options,...f};Array.isArray(i)&&!d&&(h.ns=i),typeof f.keyPrefix=="function"&&(f.keyPrefix=vl(f.keyPrefix,h));const p=this.options.keySeparator||".";let m;return f.keyPrefix&&Array.isArray(o)?m=o.map(g=>(typeof g=="function"&&(g=vl(g,h)),`${f.keyPrefix}${p}${g}`)):(typeof o=="function"&&(o=vl(o,h)),m=f.keyPrefix?`${f.keyPrefix}${p}${o}`:o),this.t(m,f)};return pe(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!a||s(i,t)))}loadNamespaces(t,n){const r=cu();return this.options.ns?(pe(t)&&(t=[t]),t.forEach(a=>{this.options.ns.includes(a)||this.options.ns.push(a)}),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=cu();pe(t)&&(t=[t]);const a=this.options.preload||[],i=t.filter(s=>!a.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=a.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var a,i;if(t||(t=this.resolvedLanguage||(((a=this.languages)==null?void 0:a.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const s=new Intl.Locale(t);if(s&&s.getTextInfo){const o=s.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new UE(nb());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new ef(t,n);return r.createInstance=ef.createInstance,r}cloneInstance(t={},n=Th){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const a={...this.options,...t,isClone:!0},i=new ef(a);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(o=>{i[o]=this[o]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((f,d)=>(f[d]={...l[c][d]},f),l[c]),l),{});i.store=new BE(o,a),i.services.resourceStore=i.store}if(t.interpolation){const l={...nb().interpolation,...this.options.interpolation,...t.interpolation},c={...a,interpolation:l};i.services.interpolator=new qE(c)}return i.translator=new fm(i.services,a),i.translator.on("*",(o,...l)=>{i.emit(o,...l)}),i.init(a,n),i.translator.options=a,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const rn=ef.createInstance();rn.createInstance;rn.dir;rn.init;rn.loadResources;rn.reloadResources;rn.use;rn.changeLanguage;rn.getFixedT;rn.t;rn.exists;rn.setDefaultNamespace;rn.hasLoadedNamespace;rn.loadNamespaces;rn.loadLanguages;const Bq=(e,t,n,r)=>{var i,s,o,l;const a=[n,{code:t,...r||{}}];if((s=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&s.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);ao(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(l=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&l.warn?e.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},YE={},xx=(e,t,n,r)=>{ao(n)&&YE[n]||(ao(n)&&(YE[n]=new Date),Bq(e,t,n,r))},ek=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Sx=(e,t,n)=>{e.loadNamespaces(t,ek(e,n))},XE=(e,t,n,r)=>{if(ao(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Sx(e,n,r);n.forEach(a=>{e.options.ns.indexOf(a)<0&&e.options.ns.push(a)}),e.loadLanguages(t,ek(e,r))},Uq=(e,t,n={})=>!t.languages||!t.languages.length?(xx(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!a(r.isLanguageChangingTo,e))return!1}}),ao=e=>typeof e=="string",Fq=e=>typeof e=="object"&&e!==null,Vq=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Hq={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},qq=e=>Hq[e],Kq=e=>e.replace(Vq,qq);let wx={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Kq,transDefaultProps:void 0};const Gq=(e={})=>{wx={...wx,...e}},Yq=()=>wx;let tk;const Xq=e=>{tk=e},Wq=()=>tk,Qq={type:"3rdParty",init(e){Gq(e.options.react),Xq(e)}},Zq=A.createContext();class Jq{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var nk={exports:{}},rk={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Xl=A;function eK(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tK=typeof Object.is=="function"?Object.is:eK,nK=Xl.useState,rK=Xl.useEffect,aK=Xl.useLayoutEffect,iK=Xl.useDebugValue;function sK(e,t){var n=t(),r=nK({inst:{value:n,getSnapshot:t}}),a=r[0].inst,i=r[1];return aK(function(){a.value=n,a.getSnapshot=t,rb(a)&&i({inst:a})},[e,n,t]),rK(function(){return rb(a)&&i({inst:a}),e(function(){rb(a)&&i({inst:a})})},[e]),iK(n),n}function rb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tK(e,n)}catch{return!0}}function oK(e,t){return t()}var lK=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oK:sK;rk.useSyncExternalStore=Xl.useSyncExternalStore!==void 0?Xl.useSyncExternalStore:lK;nk.exports=rk;var cK=nk.exports;const uK=(e,t)=>{if(ao(t))return t;if(Fq(t)&&ao(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const n=e[e.length-1];return typeof n=="function"?"":n}return e},fK={t:uK,ready:!1},dK=()=>()=>{},ni=(e,t={})=>{var T,N,M;const{i18n:n}=t,{i18n:r,defaultNS:a}=A.useContext(Zq)||{},i=n||r||Wq();i&&!i.reportNamespaces&&(i.reportNamespaces=new Jq),i||xx(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const s=A.useMemo(()=>{var C;return{...Yq(),...(C=i==null?void 0:i.options)==null?void 0:C.react,...t}},[i,t]),{useSuspense:o,keyPrefix:l}=s,c=a||((T=i==null?void 0:i.options)==null?void 0:T.defaultNS),f=ao(c)?[c]:c||["translation"],d=A.useMemo(()=>f,f);(M=(N=i==null?void 0:i.reportNamespaces)==null?void 0:N.addUsedNamespaces)==null||M.call(N,d);const h=A.useRef(0),p=A.useCallback(C=>{if(!i)return dK;const{bindI18n:L,bindI18nStore:D}=s,$=()=>{h.current+=1,C()};return L&&i.on(L,$),D&&i.store.on(D,$),()=>{L&&L.split(" ").forEach(P=>i.off(P,$)),D&&D.split(" ").forEach(P=>i.store.off(P,$))}},[i,s]),m=A.useRef(),g=A.useCallback(()=>{if(!i)return fK;const C=!!(i.isInitialized||i.initializedStoreOnce)&&d.every(I=>Uq(I,i,s)),L=t.lng||i.language,D=h.current,$=m.current;if($&&$.ready===C&&$.lng===L&&$.keyPrefix===l&&$.revision===D)return $;const k={t:i.getFixedT(L,s.nsMode==="fallback"?d:d[0],l,{scopeNs:d}),ready:C,lng:L,keyPrefix:l,revision:D};return m.current=k,k},[i,d,l,s,t.lng]),[b,y]=A.useState(0),{t:v,ready:x}=cK.useSyncExternalStore(p,g,g);A.useEffect(()=>{if(i&&!x&&!o){const C=()=>y(L=>L+1);t.lng?XE(i,t.lng,d,C):Sx(i,d,C)}},[i,t.lng,d,x,o,b]);const w=i||{},S=A.useRef(null),j=A.useRef(),O=C=>{const L=Object.getOwnPropertyDescriptors(C);L.__original&&delete L.__original;const D=Object.create(Object.getPrototypeOf(C),L);if(!Object.prototype.hasOwnProperty.call(D,"__original"))try{Object.defineProperty(D,"__original",{value:C,writable:!1,enumerable:!1,configurable:!1})}catch{}return D},E=A.useMemo(()=>{const C=w,L=C==null?void 0:C.language;let D=C;C&&(S.current&&S.current.__original===C?j.current!==L?(D=O(C),S.current=D,j.current=L):D=S.current:(D=O(C),S.current=D,j.current=L));const $=!x&&!o?(...k)=>(xx(i,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),v(...k)):v,P=[$,D,x];return P.t=$,P.i18n=D,P.ready=x,P},[v,w,x,w.resolvedLanguage,w.language,w.languages]);if(i&&o&&!x)throw new Promise(C=>{const L=()=>C();t.lng?XE(i,t.lng,d,L):Sx(i,d,L)});return E};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hK=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ak=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var pK={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mK=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...o},l)=>A.createElement("svg",{ref:l,...pK,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ak("lucide",a),...o},[...s.map(([c,f])=>A.createElement(c,f)),...Array.isArray(i)?i:[i]]));/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ae=(e,t)=>{const n=A.forwardRef(({className:r,...a},i)=>A.createElement(mK,{ref:i,iconNode:t,className:ak(`lucide-${hK(e)}`,r),...a}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ik=ae("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Es=ae("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jw=ae("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sk=ae("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ok=ae("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yK=ae("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lk=ae("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gK=ae("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pu=ae("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vK=ae("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bK=ae("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ck=ae("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uk=ae("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fk=ae("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WE=ae("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mf=ae("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xK=ae("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dk=ae("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hk=ae("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pk=ae("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ft=ae("Flower2",[["path",{d:"M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1",key:"3pnvol"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M12 10v12",key:"6ubwww"}],["path",{d:"M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z",key:"9hd38g"}],["path",{d:"M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z",key:"ufn41s"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mk=ae("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SK=ae("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wK=ae("HandHeart",[["path",{d:"M11 14h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 16",key:"1ifwr1"}],["path",{d:"m7 20 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"17abbs"}],["path",{d:"m2 15 6 6",key:"10dquu"}],["path",{d:"M19.5 8.5c.7-.7 1.5-1.6 1.5-2.7A2.73 2.73 0 0 0 16 4a2.78 2.78 0 0 0-5 1.8c0 1.2.8 2 1.5 2.8L16 12Z",key:"1h3036"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jK=ae("Headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rf=ae("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yk=ae("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const AK=ae("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ej=ae("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QE=ae("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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gk=ae("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dm=ae("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Df=ae("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vk=ae("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OK=ae("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZE=ae("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EK=ae("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tj=ae("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const TK=ae("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JE=ae("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nj=ae("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qy=ae("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bk=ae("ScrollText",[["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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rj=ae("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NK=ae("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xk=ae("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aj=ae("ShieldCheck",[["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",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ij=ae("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sj=ae("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CK=ae("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bl=ae("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xr=ae("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wa=ae("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bd=ae("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _K=ae("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PK=ae("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MK=ae("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const RK=ae("TriangleAlert",[["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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ud=ae("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sk=ae("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wk=ae("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jk=ae("Users",[["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"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);function Ak(e,t){return function(){return e.apply(t,arguments)}}const{toString:DK}=Object.prototype,{getPrototypeOf:Zy}=Object,{iterator:Jy,toStringTag:Ok}=Symbol,eg=(e=>t=>{const n=DK.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Br=e=>(e=e.toLowerCase(),t=>eg(t)===e),tg=e=>t=>typeof t===e,{isArray:io}=Array,Wl=tg("undefined");function Ic(e){return e!==null&&!Wl(e)&&e.constructor!==null&&!Wl(e.constructor)&&Cn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ek=Br("ArrayBuffer");function $K(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ek(e.buffer),t}const kK=tg("string"),Cn=tg("function"),Tk=tg("number"),Fd=e=>e!==null&&typeof e=="object",LK=e=>e===!0||e===!1,gp=e=>{if(eg(e)!=="object")return!1;const t=Zy(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ok in e)&&!(Jy in e)},zK=e=>{if(!Fd(e)||Ic(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},IK=Br("Date"),BK=Br("File"),UK=e=>!!(e&&typeof e.uri<"u"),FK=e=>e&&typeof e.getParts<"u",VK=Br("Blob"),HK=Br("FileList"),qK=e=>Fd(e)&&Cn(e.pipe);function KK(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const eT=KK(),tT=typeof eT.FormData<"u"?eT.FormData:void 0,GK=e=>{if(!e)return!1;if(tT&&e instanceof tT)return!0;const t=Zy(e);if(!t||t===Object.prototype||!Cn(e.append))return!1;const n=eg(e);return n==="formdata"||n==="object"&&Cn(e.toString)&&e.toString()==="[object FormData]"},YK=Br("URLSearchParams"),[XK,WK,QK,ZK]=["ReadableStream","Request","Response","Headers"].map(Br),JK=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vd(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),io(e))for(r=0,a=e.length;r0;)if(a=n[r],t===a.toLowerCase())return a;return null}const Ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ck=e=>!Wl(e)&&e!==Ts;function jx(...e){const{caseless:t,skipUndefined:n}=Ck(this)&&this||{},r={},a=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const o=t&&typeof s=="string"&&Nk(r,s)||s,l=Ax(r,o)?r[o]:void 0;gp(l)&&gp(i)?r[o]=jx(l,i):gp(i)?r[o]=jx({},i):io(i)?r[o]=i.slice():(!n||!Wl(i))&&(r[o]=i)};for(let i=0,s=e.length;i(Vd(t,(a,i)=>{n&&Cn(a)?Object.defineProperty(e,i,{__proto__:null,value:Ak(a,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),tG=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),nG=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},rG=(e,t,n,r)=>{let a,i,s;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!r||r(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=n!==!1&&Zy(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},aG=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},iG=e=>{if(!e)return null;if(io(e))return e;let t=e.length;if(!Tk(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sG=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zy(Uint8Array)),oG=(e,t)=>{const r=(e&&e[Jy]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},lG=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},cG=Br("HTMLFormElement"),uG=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),Ax=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),{propertyIsEnumerable:fG}=Object.prototype,dG=Br("RegExp"),_k=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Vd(n,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(r[i]=s||a)}),Object.defineProperties(e,r)},hG=e=>{_k(e,(t,n)=>{if(Cn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Cn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},pG=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return io(e)?r(e):r(String(e).split(t)),n},mG=()=>{},yG=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function gG(e){return!!(e&&Cn(e.append)&&e[Ok]==="FormData"&&e[Jy])}const vG=e=>{const t=new WeakSet,n=r=>{if(Fd(r)){if(t.has(r))return;if(Ic(r))return r;if(!("toJSON"in r)){t.add(r);const a=io(r)?[]:{};return Vd(r,(i,s)=>{const o=n(i);!Wl(o)&&(a[s]=o)}),t.delete(r),a}}return r};return n(e)},bG=Br("AsyncFunction"),xG=e=>e&&(Fd(e)||Cn(e))&&Cn(e.then)&&Cn(e.catch),Pk=((e,t)=>e?setImmediate:t?((n,r)=>(Ts.addEventListener("message",({source:a,data:i})=>{a===Ts&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Ts.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Cn(Ts.postMessage)),SG=typeof queueMicrotask<"u"?queueMicrotask.bind(Ts):typeof process<"u"&&process.nextTick||Pk,wG=e=>e!=null&&Cn(e[Jy]),z={isArray:io,isArrayBuffer:Ek,isBuffer:Ic,isFormData:GK,isArrayBufferView:$K,isString:kK,isNumber:Tk,isBoolean:LK,isObject:Fd,isPlainObject:gp,isEmptyObject:zK,isReadableStream:XK,isRequest:WK,isResponse:QK,isHeaders:ZK,isUndefined:Wl,isDate:IK,isFile:BK,isReactNativeBlob:UK,isReactNative:FK,isBlob:VK,isRegExp:dG,isFunction:Cn,isStream:qK,isURLSearchParams:YK,isTypedArray:sG,isFileList:HK,forEach:Vd,merge:jx,extend:eG,trim:JK,stripBOM:tG,inherits:nG,toFlatObject:rG,kindOf:eg,kindOfTest:Br,endsWith:aG,toArray:iG,forEachEntry:oG,matchAll:lG,isHTMLForm:cG,hasOwnProperty:Ax,hasOwnProp:Ax,reduceDescriptors:_k,freezeMethods:hG,toObjectSet:pG,toCamelCase:uG,noop:mG,toFiniteNumber:yG,findKey:Nk,global:Ts,isContextDefined:Ck,isSpecCompliantForm:gG,toJSONObject:vG,isAsyncFn:bG,isThenable:xG,setImmediate:Pk,asap:SG,isIterable:wG},jG=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),AG=e=>{const t={};let n,r,a;return e&&e.split(` +`).forEach(function(s){a=s.indexOf(":"),n=s.substring(0,a).trim().toLowerCase(),r=s.substring(a+1).trim(),!(!n||t[n]&&jG[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function OG(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const EG=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),TG=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function oj(e,t){return z.isArray(e)?e.map(n=>oj(n,t)):OG(String(e).replace(t,""))}const NG=e=>oj(e,EG),CG=e=>oj(e,TG);function Mk(e){const t=Object.create(null);return z.forEach(e.toJSON(),(n,r)=>{t[r]=CG(n)}),t}const nT=Symbol("internals");function uu(e){return e&&String(e).trim().toLowerCase()}function vp(e){return e===!1||e==null?e:z.isArray(e)?e.map(vp):NG(String(e))}function _G(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const PG=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ab(e,t,n,r,a){if(z.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!z.isString(t)){if(z.isString(r))return t.indexOf(r)!==-1;if(z.isRegExp(r))return r.test(t)}}function MG(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function RG(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(a,i,s){return this[r].call(this,t,a,i,s)},configurable:!0})})}let gn=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(o,l,c){const f=uu(l);if(!f)return;const d=z.findKey(a,f);(!d||a[d]===void 0||c===!0||c===void 0&&a[d]!==!1)&&(a[d||l]=vp(o))}const s=(o,l)=>z.forEach(o,(c,f)=>i(c,f,l));if(z.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(z.isString(t)&&(t=t.trim())&&!PG(t))s(AG(t),n);else if(z.isObject(t)&&z.isIterable(t)){let o={},l,c;for(const f of t){if(!z.isArray(f))throw new TypeError("Object iterator must return a key-value pair");o[c=f[0]]=(l=o[c])?z.isArray(l)?[...l,f[1]]:[l,f[1]]:f[1]}s(o,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=uu(t),t){const r=z.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return _G(a);if(z.isFunction(n))return n.call(this,a,r);if(z.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=uu(t),t){const r=z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ab(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(s){if(s=uu(s),s){const o=z.findKey(r,s);o&&(!n||ab(r,r[o],o,n))&&(delete r[o],a=!0)}}return z.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||ab(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return z.forEach(this,(a,i)=>{const s=z.findKey(r,i);if(s){n[s]=vp(a),delete n[i];return}const o=t?MG(i):String(i).trim();o!==i&&delete n[i],n[o]=vp(a),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return z.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&z.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[nT]=this[nT]={accessors:{}}).accessors,a=this.prototype;function i(s){const o=uu(s);r[o]||(RG(a,s),r[o]=!0)}return z.isArray(t)?t.forEach(i):i(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});z.freezeMethods(gn);const DG="[REDACTED ****]";function $G(e){if(z.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function kG(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],a=i=>{if(i===null||typeof i!="object"||z.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof gn&&(i=i.toJSON()),r.push(i);let s;if(z.isArray(i))s=[],i.forEach((o,l)=>{const c=a(o);z.isUndefined(c)||(s[l]=c)});else{if(!z.isPlainObject(i)&&$G(i))return r.pop(),i;s=Object.create(null);for(const[o,l]of Object.entries(i)){const c=n.has(o.toLowerCase())?DG:a(l);z.isUndefined(c)||(s[o]=c)}}return r.pop(),s};return a(e)}let re=class Rk extends Error{static from(t,n,r,a,i,s){const o=new Rk(t.message,n||t.code,r,a,i);return o.cause=t,o.name=t.name,t.status!=null&&o.status==null&&(o.status=t.status),s&&Object.assign(o,s),o}constructor(t,n,r,a,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&z.hasOwnProp(t,"redact")?t.redact:void 0,r=z.isArray(n)&&n.length>0?kG(t,n):z.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};re.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";re.ERR_BAD_OPTION="ERR_BAD_OPTION";re.ECONNABORTED="ECONNABORTED";re.ETIMEDOUT="ETIMEDOUT";re.ECONNREFUSED="ECONNREFUSED";re.ERR_NETWORK="ERR_NETWORK";re.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";re.ERR_DEPRECATED="ERR_DEPRECATED";re.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";re.ERR_BAD_REQUEST="ERR_BAD_REQUEST";re.ERR_CANCELED="ERR_CANCELED";re.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";re.ERR_INVALID_URL="ERR_INVALID_URL";re.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const LG=null;function Ox(e){return z.isPlainObject(e)||z.isArray(e)}function Dk(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function ib(e,t,n){return e?e.concat(t).map(function(a,i){return a=Dk(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function zG(e){return z.isArray(e)&&!e.some(Ox)}const IG=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function ng(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,y){return!z.isUndefined(y[b])});const r=n.metaTokens,a=n.visitor||d,i=n.dots,s=n.indexes,o=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,c=o&&z.isSpecCompliantForm(t);if(!z.isFunction(a))throw new TypeError("visitor must be a function");function f(g){if(g===null)return"";if(z.isDate(g))return g.toISOString();if(z.isBoolean(g))return g.toString();if(!c&&z.isBlob(g))throw new re("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(g)||z.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,b,y){let v=g;if(z.isReactNative(t)&&z.isReactNativeBlob(g))return t.append(ib(y,b,i),f(g)),!1;if(g&&!y&&typeof g=="object"){if(z.endsWith(b,"{}"))b=r?b:b.slice(0,-2),g=JSON.stringify(g);else if(z.isArray(g)&&zG(g)||(z.isFileList(g)||z.endsWith(b,"[]"))&&(v=z.toArray(g)))return b=Dk(b),v.forEach(function(w,S){!(z.isUndefined(w)||w===null)&&t.append(s===!0?ib([b],S,i):s===null?b:b+"[]",f(w))}),!1}return Ox(g)?!0:(t.append(ib(y,b,i),f(g)),!1)}const h=[],p=Object.assign(IG,{defaultVisitor:d,convertValue:f,isVisitable:Ox});function m(g,b,y=0){if(!z.isUndefined(g)){if(y>l)throw new re("Object is too deeply nested ("+y+" levels). Max depth: "+l,re.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(g)!==-1)throw new Error("Circular reference detected in "+b.join("."));h.push(g),z.forEach(g,function(x,w){(!(z.isUndefined(x)||x===null)&&a.call(t,x,z.isString(w)?w.trim():w,b,p))===!0&&m(x,b?b.concat(w):[w],y+1)}),h.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return m(e),t}function rT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function lj(e,t){this._pairs=[],e&&ng(e,this,t)}const $k=lj.prototype;$k.append=function(t,n){this._pairs.push([t,n])};$k.toString=function(t){const n=t?function(r){return t.call(this,r,rT)}:rT;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function BG(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function kk(e,t,n){if(!t)return e;const r=n&&n.encode||BG,a=z.isFunction(n)?{serialize:n}:n,i=a&&a.serialize;let s;if(i?s=i(t,a):s=z.isURLSearchParams(t)?t.toString():new lj(t,a).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class aT{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const cj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},UG=typeof URLSearchParams<"u"?URLSearchParams:lj,FG=typeof FormData<"u"?FormData:null,VG=typeof Blob<"u"?Blob:null,HG={isBrowser:!0,classes:{URLSearchParams:UG,FormData:FG,Blob:VG},protocols:["http","https","file","blob","url","data"]},uj=typeof window<"u"&&typeof document<"u",Ex=typeof navigator=="object"&&navigator||void 0,qG=uj&&(!Ex||["ReactNative","NativeScript","NS"].indexOf(Ex.product)<0),KG=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",GG=uj&&window.location.href||"http://localhost",YG=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:uj,hasStandardBrowserEnv:qG,hasStandardBrowserWebWorkerEnv:KG,navigator:Ex,origin:GG},Symbol.toStringTag,{value:"Module"})),Jt={...YG,...HG};function XG(e,t){return ng(e,new Jt.classes.URLSearchParams,{visitor:function(n,r,a,i){return Jt.isNode&&z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function WG(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function QG(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r=n.length;return s=!s&&z.isArray(a)?a.length:s,l?(z.hasOwnProp(a,s)?a[s]=z.isArray(a[s])?a[s].concat(r):[a[s],r]:a[s]=r,!o):((!z.hasOwnProp(a,s)||!z.isObject(a[s]))&&(a[s]=[]),t(n,r,a[s],i)&&z.isArray(a[s])&&(a[s]=QG(a[s])),!o)}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,(r,a)=>{t(WG(r),a,n,0)}),n}return null}const Mo=(e,t)=>e!=null&&z.hasOwnProp(e,t)?e[t]:void 0;function ZG(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Hd={transitional:cj,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=z.isObject(t);if(i&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return a?JSON.stringify(Lk(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){const l=Mo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return XG(t,l).toString();if((o=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=Mo(this,"env"),f=c&&c.FormData;return ng(o?{"files[]":t}:t,f&&new f,l)}}return i||a?(n.setContentType("application/json",!1),ZG(t)):t}],transformResponse:[function(t){const n=Mo(this,"transitional")||Hd.transitional,r=n&&n.forcedJSONParsing,a=Mo(this,"responseType"),i=a==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(r&&!a||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,Mo(this,"parseReviver"))}catch(l){if(o)throw l.name==="SyntaxError"?re.from(l,re.ERR_BAD_RESPONSE,this,null,Mo(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Jt.classes.FormData,Blob:Jt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch","query"],e=>{Hd.headers[e]={}});function sb(e,t){const n=this||Hd,r=t||n,a=gn.from(r.headers);let i=r.data;return z.forEach(e,function(o){i=o.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function zk(e){return!!(e&&e.__CANCEL__)}let qd=class extends re{constructor(t,n,r){super(t??"canceled",re.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ik(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new re("Request failed with status code "+n.status,n.status>=400&&n.status<500?re.ERR_BAD_REQUEST:re.ERR_BAD_RESPONSE,n.config,n.request,n))}function JG(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function eY(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),f=r[i];s||(s=c),n[a]=l,r[a]=c;let d=i,h=0;for(;d!==a;)h+=n[d++],d=d%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-s{n=f,a=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{const f=Date.now(),d=f-n;d>=r?s(c,f):(a=c,i||(i=setTimeout(()=>{i=null,s(a)},r-d)))},()=>a&&s(a)]}const hm=(e,t,n=3)=>{let r=0;const a=eY(50,250);return tY(i=>{if(!i||typeof i.loaded!="number")return;const s=i.loaded,o=i.lengthComputable?i.total:void 0,l=o!=null?Math.min(s,o):s,c=Math.max(0,l-r),f=a(c);r=Math.max(r,l);const d={loaded:l,total:o,progress:o?l/o:void 0,bytes:c,rate:f||void 0,estimated:f&&o?(o-l)/f:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(d)},n)},iT=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},sT=e=>(...t)=>z.asap(()=>e(...t)),nY=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,rY=Jt.hasStandardBrowserEnv?{write(e,t,n,r,a,i,s){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];z.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),z.isString(r)&&o.push(`path=${r}`),z.isString(a)&&o.push(`domain=${a}`),i===!0&&o.push("secure"),z.isString(s)&&o.push(`SameSite=${s}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof gn?{...e}:e;function so(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,f,d,h){return z.isPlainObject(c)&&z.isPlainObject(f)?z.merge.call({caseless:h},c,f):z.isPlainObject(f)?z.merge({},f):z.isArray(f)?f.slice():f}function a(c,f,d,h){if(z.isUndefined(f)){if(!z.isUndefined(c))return r(void 0,c,d,h)}else return r(c,f,d,h)}function i(c,f){if(!z.isUndefined(f))return r(void 0,f)}function s(c,f){if(z.isUndefined(f)){if(!z.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function o(c,f,d){if(z.hasOwnProp(t,d))return r(c,f);if(z.hasOwnProp(e,d))return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:o,headers:(c,f,d)=>a(oT(c),oT(f),d,!0)};return z.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const d=z.hasOwnProp(l,f)?l[f]:a,h=z.hasOwnProp(e,f)?e[f]:void 0,p=z.hasOwnProp(t,f)?t[f]:void 0,m=d(h,p,f);z.isUndefined(m)&&d!==o||(n[f]=m)}),n}const sY=["content-type","content-length"];function oY(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,a])=>{sY.includes(r.toLowerCase())&&e.set(r,a)})}const lY=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Uk(e){const t=so({},e),n=h=>z.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let a=n("withXSRFToken");const i=n("xsrfHeaderName"),s=n("xsrfCookieName");let o=n("headers");const l=n("auth"),c=n("baseURL"),f=n("allowAbsoluteUrls"),d=n("url");if(t.headers=o=gn.from(o),t.url=kk(Bk(c,d,f),n("params"),n("paramsSerializer")),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?lY(l.password):""))),z.isFormData(r)&&(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv||z.isReactNative(r)?o.setContentType(void 0):z.isFunction(r.getHeaders)&&oY(o,r.getHeaders(),n("formDataHeaderPolicy"))),Jt.hasStandardBrowserEnv&&(z.isFunction(a)&&(a=a(t)),a===!0||a==null&&nY(t.url))){const p=i&&s&&rY.read(s);p&&o.set(i,p)}return t}const cY=typeof XMLHttpRequest<"u",uY=cY&&function(e){return new Promise(function(n,r){const a=Uk(e);let i=a.data;const s=gn.from(a.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=a,f,d,h,p,m;function g(){p&&p(),m&&m(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(a.method.toUpperCase(),a.url,!0),b.timeout=a.timeout;function y(){if(!b)return;const x=gn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),S={data:!o||o==="text"||o==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:x,config:e,request:b};Ik(function(O){n(O),g()},function(O){r(O),g()},S),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(y)},b.onabort=function(){b&&(r(new re("Request aborted",re.ECONNABORTED,e,b)),g(),b=null)},b.onerror=function(w){const S=w&&w.message?w.message:"Network Error",j=new re(S,re.ERR_NETWORK,e,b);j.event=w||null,r(j),g(),b=null},b.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const S=a.transitional||cj;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),r(new re(w,S.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,b)),g(),b=null},i===void 0&&s.setContentType(null),"setRequestHeader"in b&&z.forEach(Mk(s),function(w,S){b.setRequestHeader(S,w)}),z.isUndefined(a.withCredentials)||(b.withCredentials=!!a.withCredentials),o&&o!=="json"&&(b.responseType=a.responseType),c&&([h,m]=hm(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,p]=hm(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(f=x=>{b&&(r(!x||x.type?new qd(null,e,b):x),b.abort(),g(),b=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const v=JG(a.url);if(v&&!Jt.protocols.includes(v)){r(new re("Unsupported protocol "+v+":",re.ERR_BAD_REQUEST,e));return}b.send(i||null)})},fY=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const a=function(l){if(!r){r=!0,s();const c=l instanceof Error?l:this.reason;n.abort(c instanceof re?c:new qd(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,a(new re(`timeout of ${t}ms exceeded`,re.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),e=null)};e.forEach(l=>l.addEventListener("abort",a));const{signal:o}=n;return o.unsubscribe=()=>z.asap(s),o},dY=function*(e,t){let n=e.byteLength;if(n{const a=hY(e,t);let i=0,s,o=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:f}=await a.next();if(c){o(),l.close();return}let d=f.byteLength;if(n){let h=i+=d;n(h)}l.enqueue(new Uint8Array(f))}catch(c){throw o(c),c}},cancel(l){return o(l),a.return()}},{highWaterMark:2})};function mY(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let s=r.length;const o=r.length;for(let p=0;p=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(s-=2,p+=2)}let l=0,c=o-1;const f=p=>p>=2&&r.charCodeAt(p-2)===37&&r.charCodeAt(p-1)===51&&(r.charCodeAt(p)===68||r.charCodeAt(p)===100);c>=0&&(r.charCodeAt(c)===61?(l++,c--):f(c)&&(l++,c-=3)),l===1&&c>=0&&(r.charCodeAt(c)===61||f(c))&&l++;const h=Math.floor(s/4)*3-(l||0);return h>0?h:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let i=0;for(let s=0,o=r.length;s=55296&&l<=56319&&s+1=56320&&c<=57343?(i+=4,s++):i+=3}else i+=3}return i}const fj="1.17.0",cT=64*1024,{isFunction:Nh}=z,yY=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),uT=e=>{if(!z.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},fT=(e,...t)=>{try{return!!e(...t)}catch{return!1}},gY=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},vY=e=>{const t=z.global!==void 0&&z.global!==null?z.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:i,Response:s}=e,o=a?Nh(a):typeof fetch=="function",l=Nh(i),c=Nh(s);if(!o)return!1;const f=o&&Nh(n),d=o&&(typeof r=="function"?(y=>v=>y.encode(v))(new r):async y=>new Uint8Array(await new i(y).arrayBuffer())),h=l&&f&&fT(()=>{let y=!1;const v=new i(Jt.origin,{body:new n,method:"POST",get duplex(){return y=!0,"half"}}),x=v.headers.has("Content-Type");return v.body!=null&&v.body.cancel(),y&&!x}),p=c&&f&&fT(()=>z.isReadableStream(new s("").body)),m={stream:p&&(y=>y.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!m[y]&&(m[y]=(v,x)=>{let w=v&&v[y];if(w)return w.call(v);throw new re(`Response type '${y}' is not supported`,re.ERR_NOT_SUPPORT,x)})});const g=async y=>{if(y==null)return 0;if(z.isBlob(y))return y.size;if(z.isSpecCompliantForm(y))return(await new i(Jt.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(z.isArrayBufferView(y)||z.isArrayBuffer(y))return y.byteLength;if(z.isURLSearchParams(y)&&(y=y+""),z.isString(y))return(await d(y)).byteLength},b=async(y,v)=>{const x=z.toFiniteNumber(y.getContentLength());return x??g(v)};return async y=>{let{url:v,method:x,data:w,signal:S,cancelToken:j,timeout:O,onDownloadProgress:E,onUploadProgress:T,responseType:N,headers:M,withCredentials:C="same-origin",fetchOptions:L,maxContentLength:D,maxBodyLength:$}=Uk(y);const P=z.isNumber(D)&&D>-1,k=z.isNumber($)&&$>-1,I=Z=>z.hasOwnProp(y,Z)?y[Z]:void 0;let F=a||fetch;N=N?(N+"").toLowerCase():"text";let H=fY([S,j&&j.toAbortSignal()],O),Y=null;const q=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let te;try{let Z;const ye=I("auth");if(ye){const X=ye.username||"",V=ye.password||"";Z={username:X,password:V}}if(gY(v)){const X=new URL(v,Jt.origin);if(!Z&&(X.username||X.password)){const V=uT(X.username),_e=uT(X.password);Z={username:V,password:_e}}(X.username||X.password)&&(X.username="",X.password="",v=X.href)}if(Z&&(M.delete("authorization"),M.set("Authorization","Basic "+btoa(yY((Z.username||"")+":"+(Z.password||""))))),P&&typeof v=="string"&&v.startsWith("data:")&&mY(v)>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y);if(k&&x!=="get"&&x!=="head"){const X=await b(M,w);if(typeof X=="number"&&isFinite(X)&&X>$)throw new re("Request body larger than maxBodyLength limit",re.ERR_BAD_REQUEST,y,Y)}if(T&&h&&x!=="get"&&x!=="head"&&(te=await b(M,w))!==0){let X=new i(v,{method:"POST",body:w,duplex:"half"}),V;if(z.isFormData(w)&&(V=X.headers.get("content-type"))&&M.setContentType(V),X.body){const[_e,ge]=iT(te,hm(sT(T)));w=lT(X.body,cT,_e,ge)}}z.isString(C)||(C=C?"include":"omit");const J=l&&"credentials"in i.prototype;if(z.isFormData(w)){const X=M.getContentType();X&&/^multipart\/form-data/i.test(X)&&!/boundary=/i.test(X)&&M.delete("content-type")}M.set("User-Agent","axios/"+fj,!1);const st={...L,signal:H,method:x.toUpperCase(),headers:Mk(M.normalize()),body:w,duplex:"half",credentials:J?C:void 0};Y=l&&new i(v,st);let Ve=await(l?F(Y,L):F(v,st));if(P){const X=z.toFiniteNumber(Ve.headers.get("content-length"));if(X!=null&&X>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y)}const G=p&&(N==="stream"||N==="response");if(p&&Ve.body&&(E||P||G&&q)){const X={};["status","statusText","headers"].forEach(dt=>{X[dt]=Ve[dt]});const V=z.toFiniteNumber(Ve.headers.get("content-length")),[_e,ge]=E&&iT(V,hm(sT(E),!0))||[];let Xe=0;const ot=dt=>{if(P&&(Xe=dt,Xe>D))throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y);_e&&_e(dt)};Ve=new s(lT(Ve.body,cT,ot,()=>{ge&&ge(),q&&q()}),X)}N=N||"text";let oe=await m[z.findKey(m,N)||"text"](Ve,y);if(P&&!p&&!G){let X;if(oe!=null&&(typeof oe.byteLength=="number"?X=oe.byteLength:typeof oe.size=="number"?X=oe.size:typeof oe=="string"&&(X=typeof r=="function"?new r().encode(oe).byteLength:oe.length)),typeof X=="number"&&X>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y)}return!G&&q&&q(),await new Promise((X,V)=>{Ik(X,V,{data:oe,headers:gn.from(Ve.headers),status:Ve.status,statusText:Ve.statusText,config:y,request:Y})})}catch(Z){if(q&&q(),H&&H.aborted&&H.reason instanceof re){const ye=H.reason;throw ye.config=y,Y&&(ye.request=Y),Z!==ye&&(ye.cause=Z),ye}throw Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)?Object.assign(new re("Network Error",re.ERR_NETWORK,y,Y,Z&&Z.response),{cause:Z.cause||Z}):re.from(Z,Z&&Z.code,y,Y,Z&&Z.response)}}},bY=new Map,Fk=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let s=i.length,o=s,l,c,f=bY;for(;o--;)l=i[o],c=f.get(l),c===void 0&&f.set(l,c=o?new Map:vY(t)),f=c;return c};Fk();const dj={http:LG,xhr:uY,fetch:{get:Fk}};z.forEach(dj,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const dT=e=>`- ${e}`,xY=e=>z.isFunction(e)||e===null||e===!1;function SY(e,t){e=z.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let s=0;s`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=n?s.length>1?`since : +`+s.map(dT).join(` +`):" "+dT(s[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return a}const Vk={getAdapter:SY,adapters:dj};function ob(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qd(null,e)}function hT(e){return ob(e),e.headers=gn.from(e.headers),e.data=sb.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vk.getAdapter(e.adapter||Hd.adapter,e)(e).then(function(r){ob(e),e.response=r;try{r.data=sb.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=gn.from(r.headers),r},function(r){if(!zk(r)&&(ob(e),r&&r.response)){e.response=r.response;try{r.response.data=sb.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=gn.from(r.response.headers)}return Promise.reject(r)})}const rg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rg[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pT={};rg.transitional=function(t,n,r){function a(i,s){return"[Axios v"+fj+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,o)=>{if(t===!1)throw new re(a(s," has been removed"+(n?" in "+n:"")),re.ERR_DEPRECATED);return n&&!pT[s]&&(pT[s]=!0,console.warn(a(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,o):!0}};rg.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function wY(e,t,n){if(typeof e!="object")throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],s=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(s){const o=e[i],l=o===void 0||s(o,i,e);if(l!==!0)throw new re("option "+i+" must be "+l,re.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new re("Unknown option "+i,re.ERR_BAD_OPTION)}}const bp={assertOptions:wY,validators:rg},wn=bp.validators;let Ys=class{constructor(t){this.defaults=t||{},this.interceptors={request:new aT,response:new aT}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=(()=>{if(!a.stack)return"";const s=a.stack.indexOf(` +`);return s===-1?"":a.stack.slice(s+1)})();try{if(!r.stack)r.stack=i;else if(i){const s=i.indexOf(` +`),o=s===-1?-1:i.indexOf(` +`,s+1),l=o===-1?"":i.slice(o+1);String(r.stack).endsWith(l)||(r.stack+=` +`+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=so(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&bp.assertOptions(r,{silentJSONParsing:wn.transitional(wn.boolean),forcedJSONParsing:wn.transitional(wn.boolean),clarifyTimeoutError:wn.transitional(wn.boolean),legacyInterceptorReqResOrdering:wn.transitional(wn.boolean),advertiseZstdAcceptEncoding:wn.transitional(wn.boolean)},!1),a!=null&&(z.isFunction(a)?n.paramsSerializer={serialize:a}:bp.assertOptions(a,{encode:wn.function,serialize:wn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),bp.assertOptions(n,{baseUrl:wn.spelling("baseURL"),withXsrfToken:wn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&z.merge(i.common,i[n.method]);i&&z.forEach(["delete","get","head","post","put","patch","query","common"],m=>{delete i[m]}),n.headers=gn.concat(s,i);const o=[];let l=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;l=l&&g.synchronous;const b=n.transitional||cj;b&&b.legacyInterceptorReqResOrdering?o.unshift(g.fulfilled,g.rejected):o.push(g.fulfilled,g.rejected)});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let f,d=0,h;if(!l){const m=[hT.bind(this),void 0];for(m.unshift(...o),m.push(...c),h=m.length,f=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const s=new Promise(o=>{r.subscribe(o),i=o}).then(a);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,o){r.reason||(r.reason=new qd(i,s,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Hk(function(a){t=a}),cancel:t}}};function AY(e){return function(n){return e.apply(null,n)}}function OY(e){return z.isObject(e)&&e.isAxiosError===!0}const Tx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Tx).forEach(([e,t])=>{Tx[t]=e});function qk(e){const t=new Ys(e),n=Ak(Ys.prototype.request,t);return z.extend(n,Ys.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return qk(so(e,a))},n}const jt=qk(Hd);jt.Axios=Ys;jt.CanceledError=qd;jt.CancelToken=jY;jt.isCancel=zk;jt.VERSION=fj;jt.toFormData=ng;jt.AxiosError=re;jt.Cancel=jt.CanceledError;jt.all=function(t){return Promise.all(t)};jt.spread=AY;jt.isAxiosError=OY;jt.mergeConfig=so;jt.AxiosHeaders=gn;jt.formToJSON=e=>Lk(z.isHTMLForm(e)?new FormData(e):e);jt.getAdapter=Vk.getAdapter;jt.HttpStatusCode=Tx;jt.default=jt;const{Axios:YAe,AxiosError:XAe,CanceledError:WAe,isCancel:QAe,CancelToken:ZAe,VERSION:JAe,all:e2e,Cancel:t2e,isAxiosError:n2e,spread:r2e,toFormData:a2e,AxiosHeaders:i2e,HttpStatusCode:s2e,formToJSON:o2e,getAdapter:l2e,mergeConfig:c2e,create:u2e}=jt,W=jt.create({baseURL:""}),Kk=()=>location.pathname.startsWith("/admin"),Gk=()=>Kk()?"mall_admin_token":"mall_token";W.interceptors.request.use(e=>{const t=localStorage.getItem(Gk());return t&&(e.headers.Authorization=`Bearer ${t}`),e});W.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem(Gk()),Kk()&&location.pathname!=="/admin/login"&&(location.href="/admin/login")),Promise.reject(e)});const Q=e=>e.then(t=>{var n;return(n=t.data)==null?void 0:n.data}),Yk=(e,t)=>W.post("/api/mall/auth/login",{username:e,password:t}),EY=(e,t,n)=>W.post("/api/mall/auth/register",{username:e,password:t,displayName:n}),Xk=()=>Q(W.get("/api/mall/auth/me")),So=(e=!0)=>Q(W.get(`/api/mall/store?activeOnly=${e}`)),TY=(e,t)=>Q(W.put(`/api/mall/store/${e}/active`,{active:t})),NY=e=>Q(W.get(`/api/mall/zone/lookup?zip=${encodeURIComponent(e)}`)),Ql=(e={})=>{const t=new URLSearchParams;return Object.entries(e).forEach(([n,r])=>{r!==void 0&&r!==""&&r!==null&&t.set(n,String(r))}),Q(W.get(`/api/mall/product?${t}`))},CY=e=>Q(W.get(`/api/mall/product/${e}`)),_Y=(e,t)=>Q(W.put(`/api/mall/product/${e}/status`,{status:t})),PY=()=>Q(W.get("/api/mall/category")),MY=e=>Q(W.get(`/api/mall/store-inventory/store/${e}`)),RY=(e,t,n)=>Q(W.put(`/api/mall/store-inventory/store/${e}/product/${t}/toggle`,{available:n})),DY=(e,t,n)=>Q(W.put(`/api/mall/store-inventory/store/${e}/product/${t}/adjust`,{delta:n})),$Y=(e,t)=>Q(W.get(`/api/mall/schedule/availability?storeId=${e}&date=${t}`)),Wk=()=>Q(W.get("/api/mall/schedule/holidays")),kY=e=>Q(W.post("/api/mall/schedule/holiday",e)),hj=()=>Q(W.get("/api/mall/cart")),LY=e=>Q(W.post("/api/mall/cart",e)),zY=(e,t)=>Q(W.put(`/api/mall/cart/${e}`,{quantity:t})),IY=e=>W.delete(`/api/mall/cart/${e}`),BY=(e="")=>Q(W.get(`/api/mall/order?status=${e}`)),UY=e=>Q(W.post("/api/mall/order/checkout",e)),Qk=(e,t)=>Q(W.put(`/api/mall/order/${e}/status`,{status:t})),FY=(e="",t=100)=>Q(W.get(`/api/mall/order/admin?status=${e}&limit=${t}`)),VY=e=>Q(W.post("/api/mall/payment",e)),HY=()=>Q(W.get("/api/mall/subscription")),qY=e=>Q(W.post("/api/mall/subscription",e)),mT=(e,t)=>Q(W.put(`/api/mall/subscription/${e}/status`,{status:t})),KY=()=>Q(W.get("/api/mall/subscription/admin")),GY=(e="",t="")=>{const n=new URLSearchParams;return e&&n.set("status",e),t&&n.set("storeId",t),Q(W.get(`/api/mall/transfer?${n}`))},YY=e=>Q(W.put(`/api/mall/transfer/${e}/approve`,{})),XY=e=>Q(W.put(`/api/mall/transfer/${e}/reject`,{})),WY=e=>Q(W.get(`/api/mall/review/product/${e}`)),QY=e=>Q(W.get(`/api/mall/review/product/${e}/stats`)),ZY=e=>Q(W.post("/api/mall/review",e)),JY=()=>Q(W.get("/api/mall/member/me")),eX=()=>Q(W.get("/api/mall/cs")),tX=e=>Q(W.post("/api/mall/cs",e)),nX=()=>Q(W.get("/api/mall/wishlist")),rX=e=>Q(W.post(`/api/mall/wishlist/${e}`,{})),aX=e=>W.delete(`/api/mall/wishlist/${e}`),iX=(e=1,t=500)=>Q(W.get(`/api/mall/analytics/dashboard?days=${e}&bigOrderThreshold=${t}`)),Zk=(e=7)=>Q(W.get(`/api/mall/analytics/store-sales?days=${e}`)),Jk=(e=14)=>Q(W.get(`/api/mall/analytics/trend?days=${e}`)),e5=(e=10)=>Q(W.get(`/api/mall/analytics/top-products?limit=${e}`)),sX=(e,t,n)=>Q(W.post("/api/mall/gateway/tax/quote",{amount:e,zip:t,state:n})),oX=(e,t)=>Q(W.post("/api/mall/gateway/address/verify",{address:e,zip:t})),lX=()=>Q(W.get("/api/mall/gateway/providers")),t5=(e="",t="",n=6)=>{const r=new URLSearchParams;return e&&r.set("occasion",e),t&&r.set("keyword",t),r.set("limit",String(n)),Q(W.get(`/api/mall/ai/recommend?${r}`))},cX=e=>Q(W.get(`/api/mall/ai/review-summary/${e}`)),n5=e=>Q(W.post("/api/mall/ai/nl-search",{query:e})),uX=(e,t,n)=>Q(W.post("/api/mall/ai/card-message",{occasion:e,tone:t,recipient:n})),fX=(e="valentine",t=14)=>Q(W.get(`/api/mall/ai/demand-forecast?season=${e}&days=${t}`)),dX=e=>Q(W.post("/api/mall/ai/transfer-recommend",{storeIds:e})),hX=()=>Q(W.get("/api/admin/users")),pX=e=>Q(W.post("/api/admin/users",e)),mX=(e,t)=>Q(W.put(`/api/admin/users/${e}/role`,{role:t})),yX=(e,t)=>Q(W.put(`/api/admin/users/${e}/active`,{active:t})),gX=(e,t)=>Q(W.put(`/api/admin/users/${e}/password`,{password:t})),vX=e=>W.delete(`/api/admin/users/${e}`),bX=(e="",t="",n=100)=>{const r=new URLSearchParams;return e&&r.set("action",e),t&&r.set("actor",t),r.set("limit",String(n)),Q(W.get(`/api/admin/audit?${r}`))},xX=()=>Q(W.get("/api/admin/settings")),SX=(e,t)=>Q(W.put(`/api/admin/settings/${encodeURIComponent(e)}`,{value:t})),wX=(e=!0)=>Q(W.get(`/api/mall/loyalty/tiers?activeOnly=${e}`)),jX=(e,t)=>Q(W.put(`/api/mall/loyalty/tiers/${e}`,t)),pj=()=>Q(W.get("/api/mall/loyalty/me")),AX=(e=100)=>Q(W.get(`/api/mall/loyalty/points/history?limit=${e}`)),OX=(e,t,n)=>Q(W.post("/api/mall/loyalty/points/adjust",{owner:e,points:t,reason:n})),EX=()=>Q(W.post("/api/mall/loyalty/recalc-all",{})),r5=(e=30)=>Q(W.get(`/api/mall/loyalty/analytics/by-tier?days=${e}`)),TX=(e="")=>Q(W.get(`/api/mall/event/ongoing${e?`?tier=${e}`:""}`)),NX=e=>Q(W.post(`/api/mall/event/${e}/join`,{})),CX=(e="",t="",n=!1)=>{const r=new URLSearchParams;return e&&r.set("status",e),t&&r.set("type",t),r.set("activeOnly",String(n)),Q(W.get(`/api/mall/event?${r}`))},_X=e=>Q(W.post("/api/mall/event",e)),PX=e=>Q(W.post(`/api/mall/event/${e}/publish`,{})),MX=e=>Q(W.post(`/api/mall/event/${e}/end`,{})),RX=e=>W.delete(`/api/mall/event/${e}`),DX=e=>Q(W.get(`/api/mall/event/${e}/performance`)),$X=(e,t,n)=>Q(W.post("/api/mall/event/ai/copy",{eventType:e,theme:t,tone:n}));function Gr({children:e,delay:t=0,y:n=24,className:r="",as:a="div"}){const i=ti(),s=Nt[a];return u.jsx(s,{className:r,initial:i?!1:{opacity:0,y:n},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7,delay:t,ease:[.22,1,.36,1]},children:e})}const kX={hidden:{},show:{transition:{staggerChildren:.07,delayChildren:.05}}},LX={hidden:{opacity:0,y:22},show:{opacity:1,y:0,transition:{duration:.6,ease:[.22,1,.36,1]}}};function pm({children:e,className:t=""}){const n=ti();return u.jsx(Nt.div,{className:t,variants:n?void 0:kX,initial:n?!1:"hidden",whileInView:"show",viewport:{once:!0,margin:"-40px"},children:e})}function mm({children:e,className:t=""}){const n=ti();return u.jsx(Nt.div,{className:t,variants:n?void 0:LX,children:e})}const yT=["","sage","cream"];function Kd({count:e=14,className:t=""}){const n=ti(),r=A.useMemo(()=>Array.from({length:e}).map((a,i)=>{const s=8+Math.round(Math.random()*14);return{left:Math.round(Math.random()*100),size:s,delay:+(Math.random()*12).toFixed(2),duration:+(10+Math.random()*10).toFixed(2),kind:yT[i%yT.length]}}),[e]);return n?null:u.jsx("div",{className:`petal-layer ${t}`,"aria-hidden":"true",children:r.map((a,i)=>u.jsx("span",{className:`petal ${a.kind}`,style:{left:`${a.left}%`,width:`${a.size}px`,height:`${a.size}px`,animationDelay:`${a.delay}s`,animationDuration:`${a.duration}s`}},i))})}function Ua({children:e,className:t="",onClick:n,type:r="button",disabled:a}){const i=ti();return u.jsx(Nt.button,{type:r,onClick:n,disabled:a,className:t,whileHover:i||a?void 0:{scale:1.03,y:-1},whileTap:i||a?void 0:{scale:.97},transition:{type:"spring",stiffness:380,damping:22},children:e})}const ke={name:"Montvale Florist",tagline:"100% Florist-Designed and Hand-Delivered!",founded:2010,address:"6 Railroad Ave, Montvale, NJ 07645",phone:"(201) 690-6721",phoneTel:"+12016906721",email:"wecare@montvalefloristnj.com",rating:4.9,reviewCount:44893,promise:[{title:"100% Florist-Designed",desc:"Every arrangement is crafted by hand in our shop — never mass-produced."},{title:"Locally Independent",desc:"A real, community-focused florist in Montvale since 2010 — not an online middleman."},{title:"100% Satisfaction",desc:"We stand behind every bouquet with our satisfaction guarantee."}],hours:[{day:"Mon – Fri",open:"9:00 AM – 5:30 PM",cutoff:"Same-day by 1:00 PM"},{day:"Saturday",open:"9:00 AM – 4:00 PM",cutoff:"Same-day by 12:00 PM"},{day:"Sunday",open:"9:00 AM – 12:00 PM",cutoff:"Same-day by 10:00 AM"}],social:{instagram:"https://instagram.com/themontvaleflorist",instagramHandle:"@themontvaleflorist",facebook:"https://facebook.com/montvaleflorist1",pinterest:"https://pinterest.com/montvaleflorist",google:"https://www.google.com/search?q=Montvale+Florist",yelp:"https://yelp.com/biz/montvale-florist-montvale-3"},payments:["Visa","Mastercard","Amex","Discover","Apple Pay","Google Pay"],wallets:["Apple Pay","Google Pay"],cards:["Visa","Mastercard","Amex","Discover"],policies:["Terms of Service","Privacy Policy","Accessibility Statement","Delivery Policy"],about:"Montvale Florist is your go-to local florist, delivering not just flowers, but joy, comfort, and memories. An independent, community-focused florist dedicated to craftsmanship and personal service since 2010."},lb=[{img:"/img/hero/slide-1.jpg",eyebrow:"Birthday Blooms",headline:`Make Their Birthday +Unforgettable`,subtext:"Florist-designed bouquets, hand-delivered the same day — a celebration in every petal.",cta:"Find the Perfect Gift",to:"/category?occasion=BIRTHDAY"},{img:"/img/hero/slide-2.jpg",eyebrow:"Sympathy & Comfort",headline:`Honor Their Memory +with Heartfelt Flowers`,subtext:"Thoughtful tributes, gently arranged and delivered with care and compassion.",cta:"Send Your Condolences",to:"/category?occasion=SYMPATHY"},{img:"/img/hero/slide-3.jpg",eyebrow:"Just Because",headline:`Brighten Their Day, +Just Because`,subtext:"No occasion needed — send a smile with fresh, locally designed blooms.",cta:"Send a Smile",to:"/category?occasion=JUST_BECAUSE"}],zX=[{code:"en",label:"EN"},{code:"ko",label:"한국어"}];function ag({variant:e="shop"}){const{i18n:t}=ni(),n=(t.language||"en").split("-")[0],r=s=>{s!==n&&t.changeLanguage(s)},a=e==="admin",i=a?"flex items-center gap-0.5 rounded-lg border border-edge bg-card/60 p-0.5":"flex items-center gap-0.5 rounded-full border border-blush-100 bg-white/70 p-0.5 shadow-soft";return u.jsxs("div",{className:"flex items-center gap-1.5","aria-label":"Language",children:[u.jsx(SK,{size:15,className:a?"text-slate-400":"text-sage-600"}),u.jsx("div",{className:i,role:"group",children:zX.map(s=>{const o=s.code===n,l="px-2 py-0.5 text-[11px] font-medium rounded-full transition-colors",c=a?o?"bg-brand text-ink":"text-slate-300 hover:text-brand":o?"bg-blush-500 text-white":"text-sage-700 hover:text-blush-600";return u.jsx("button",{type:"button",onClick:()=>r(s.code),"aria-pressed":o,className:`${l} ${a?"rounded-md":""} ${c}`,children:s.label},s.code)})})]})}function IX(){const{t:e}=ni(),[t,n]=A.useState(""),[r,a]=A.useState(null),[i,s]=A.useState(!1),[o,l]=A.useState(""),{setZone:c}=bn(),f=Kt(),d=async p=>{if(p.preventDefault(),l(""),a(null),!/^\d{5}$/.test(t)){l(e("zip.errInvalid"));return}s(!0);try{const m=await NY(t);a(m),m!=null&&m.deliverable||l(e("zip.errNotDeliverable"))}catch{l(e("zip.errFailed"))}finally{s(!1)}},h=p=>{c(t,p.storeId,p.storeName),f("/home")};return u.jsxs("div",{className:"relative min-h-screen bg-gradient-to-br from-blush-100 via-cream to-sage-100 flex items-center justify-center px-4 overflow-hidden",children:[u.jsx("div",{className:"absolute top-5 right-5 z-20",children:u.jsx(ag,{variant:"shop"})}),u.jsx(Kd,{count:18}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -top-20 -left-20 text-blush-200/40",animate:{rotate:[0,360]},transition:{duration:80,repeat:1/0,ease:"linear"},children:u.jsx(ft,{size:320,strokeWidth:.5})}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -bottom-24 -right-16 text-sage-300/40",animate:{rotate:[360,0]},transition:{duration:90,repeat:1/0,ease:"linear"},children:u.jsx(ft,{size:260,strokeWidth:.5})}),u.jsxs(Nt.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"relative z-10 w-full max-w-lg text-center",children:[u.jsxs("div",{className:"flex flex-col items-center mb-5",children:[u.jsx(Nt.span,{animate:{rotate:[0,8,-6,0]},transition:{duration:7,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{className:"text-blush-500",size:44})}),u.jsx("h1",{className:"font-serif text-4xl font-bold text-blush-900 mt-3",children:"Montvale Florist"}),u.jsx("p",{className:"font-display text-[13px] tracking-[0.35em] uppercase text-sage-600 mt-1",children:e("zip.since",{year:ke.founded})})]}),u.jsx("p",{className:"font-display text-2xl text-[#6b5258] mb-1",children:ke.tagline}),u.jsx("p",{className:"text-[#8a7077] text-sm mb-8",children:e("zip.lead")}),u.jsxs("form",{onSubmit:d,className:"bg-white/90 backdrop-blur rounded-4xl shadow-bloom p-7 border border-blush-100",children:[u.jsxs("label",{className:"flex items-center gap-2 text-sm text-blush-700 font-medium mb-3 justify-center",children:[u.jsx(dm,{size:16})," ",e("zip.enterZip")]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{value:t,onChange:p=>n(p.target.value.replace(/\D/g,"").slice(0,5)),placeholder:e("zip.placeholder"),inputMode:"numeric",autoFocus:!0,className:"flex-1 px-4 py-3.5 rounded-2xl bg-blush-50 border border-blush-100 text-center text-lg tracking-[0.3em] outline-none focus:border-blush-400 transition-colors"}),u.jsx(Ua,{type:"submit",disabled:i,className:"px-7 rounded-2xl bg-blush-500 text-white font-semibold hover:bg-blush-600 disabled:opacity-60 flex items-center gap-1",children:i?"…":u.jsxs(u.Fragment,{children:[e("zip.go")," ",u.jsx(Es,{size:16})]})})]}),o&&u.jsx("p",{className:"text-blush-500 text-xs mt-3",children:o}),(r==null?void 0:r.deliverable)&&u.jsxs(Nt.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-6 text-left overflow-hidden",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-sage-700 font-medium mb-3",children:[u.jsx(Ud,{size:15})," ",e("zip.availableStores")]}),u.jsx("div",{className:"space-y-2",children:(r.stores||[]).map(p=>u.jsxs(Ua,{onClick:()=>h(p),className:"w-full flex items-center justify-between bg-blush-50 hover:bg-blush-100 border border-blush-100 rounded-2xl px-4 py-3.5 text-left",children:[u.jsxs("span",{children:[u.jsxs("span",{className:"font-medium text-sm flex items-center gap-1.5 text-blush-900",children:[u.jsx(Bd,{size:14,className:"text-blush-500"}),p.storeName]}),u.jsx("span",{className:"block text-xs text-[#8a7077] mt-0.5",children:e("zip.radiusSameDay",{radius:p.radiusMi,cutoff:p.sameDayCutoff,tz:p.timezone})})]}),u.jsx(Es,{size:16,className:"text-blush-500"})]},p.storeId))})]})]}),u.jsxs("div",{className:"flex items-center justify-center gap-2 mt-6 text-[12px] text-[#8a7077]",children:[u.jsx("span",{className:"flex text-gold",children:[1,2,3,4,5].map(p=>u.jsx(Wa,{size:13,fill:"currentColor"},p))}),ke.rating,"★ · ",e("zip.reviews",{n:ke.reviewCount.toLocaleString()})]}),u.jsx("button",{onClick:()=>f("/home"),className:"text-xs text-[#a08a90] hover:text-blush-600 mt-4 underline-offset-2 hover:underline",children:e("zip.browsePickup")})]})]})}function a5({size:e=18}){return u.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12c0 4.24 2.64 7.85 6.36 9.31-.09-.79-.17-2 .03-2.86.18-.78 1.17-4.97 1.17-4.97s-.3-.6-.3-1.48c0-1.39.81-2.43 1.81-2.43.85 0 1.27.64 1.27 1.41 0 .86-.55 2.14-.83 3.33-.24 1 .5 1.81 1.48 1.81 1.78 0 3.14-1.88 3.14-4.58 0-2.4-1.72-4.07-4.19-4.07-2.85 0-4.52 2.14-4.52 4.35 0 .86.33 1.78.74 2.28.08.1.09.19.07.29l-.27 1.13c-.04.18-.14.22-.33.13-1.25-.58-2.03-2.4-2.03-3.87 0-3.15 2.29-6.04 6.6-6.04 3.46 0 6.16 2.47 6.16 5.77 0 3.44-2.17 6.21-5.18 6.21-1.01 0-1.97-.53-2.29-1.15l-.62 2.37c-.23.86-.83 1.94-1.24 2.6.94.29 1.92.44 2.95.44 5.52 0 10-4.48 10-10S17.52 2 12 2z"})})}function BX({size:e=18}){return u.jsxs("svg",{viewBox:"0 0 24 24",width:e,height:e,"aria-hidden":"true",children:[u.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"}),u.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23z"}),u.jsx("path",{fill:"#FBBC05",d:"M5.84 14.1a6.6 6.6 0 0 1 0-4.2V7.06H2.18a11 11 0 0 0 0 9.88l3.66-2.84z"}),u.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1A11 11 0 0 0 2.18 7.06l3.66 2.84C6.71 7.3 9.14 5.38 12 5.38z"})]})}function UX({size:e=18}){return u.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M12.27 13.3l4.45-2.16c.51-.25.66-.92.31-1.36-1.13-1.44-2.7-2.49-4.49-2.99-.55-.15-1.08.27-1.08.84l-.02 5.04c0 .65.72 1.06 1.32.77zM12.6 15.34l4.46 2.13c.51.25 1.13-.07 1.21-.63.25-1.8-.06-3.66-.92-5.31-.27-.51-.96-.6-1.36-.18l-3.5 3.42c-.45.45-.31 1.18.11 1.4v-.84zm-2.59.4l-3.45-3.4c-.41-.4-1.09-.32-1.37.18-.86 1.64-1.18 3.49-.95 5.29.07.56.69.89 1.21.64l4.45-2.12c.6-.29.74-1.02.06-1.43zm.08 2.36l-.02 4.95c0 .57.53.99 1.08.84 1.78-.49 3.34-1.53 4.48-2.96.35-.44.2-1.11-.31-1.36l-4.45-2.15c-.6-.29-1.31.13-1.31.78l.84.01zm-.45-7.1L5.66 7.06c-.43-.7-1.46-.56-1.69.23-.13.45-.22.92-.27 1.4-.16 1.55.05 3.12.61 4.56.21.53.91.62 1.27.13l3.95-5.32c.32-.43.06-1.05-.5-1.16l.39.56z"})})}const FX={instagram:({size:e})=>u.jsx(yk,{size:e}),facebook:({size:e})=>u.jsx(pk,{size:e}),pinterest:a5,google:BX,yelp:UX},VX={instagram:"Instagram",facebook:"Facebook",pinterest:"Pinterest",google:"Google Business",yelp:"Yelp"},HX=["instagram","facebook","pinterest","google","yelp"];function qX({size:e=18,className:t="",iconClass:n=""}){return u.jsx("div",{className:`flex items-center gap-3 ${t}`,children:HX.map(r=>{const a=ke.social[r];if(!a)return null;const i=FX[r];return u.jsx("a",{href:a,target:"_blank",rel:"noreferrer","aria-label":VX[r],className:`transition-colors ${n}`,children:u.jsx(i,{size:e})},r)})})}function KX({url:e,title:t,image:n,className:r=""}){const a=encodeURIComponent(e),i=encodeURIComponent(t||ke.name),s=encodeURIComponent(n||""),o=`https://www.facebook.com/sharer/sharer.php?u=${a}`,l=`https://pinterest.com/pin/create/button/?url=${a}&media=${s}&description=${i}`,c=ke.social.instagram,f=d=>window.open(d,"_blank","noopener,width=640,height=600");return u.jsxs("div",{className:`flex items-center gap-2 ${r}`,children:[u.jsx("span",{className:"text-xs text-[#a08a90]",children:"Share:"}),u.jsx("button",{type:"button",onClick:()=>f(c),"aria-label":"Share on Instagram",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(yk,{size:16})}),u.jsx("button",{type:"button",onClick:()=>f(o),"aria-label":"Share on Facebook",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(pk,{size:16})}),u.jsx("button",{type:"button",onClick:()=>f(l),"aria-label":"Share on Pinterest",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(a5,{size:16})})]})}function GX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Visa",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("text",{x:"24",y:"21",textAnchor:"middle",fontFamily:"Georgia, serif",fontWeight:"700",fontStyle:"italic",fontSize:"13",fill:"#1a1f71",children:"VISA"})]})}function YX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Mastercard",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("circle",{cx:"20",cy:"16",r:"8",fill:"#eb001b"}),u.jsx("circle",{cx:"28",cy:"16",r:"8",fill:"#f79e1b",fillOpacity:"0.85"})]})}function XX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"American Express",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#2e77bb"}),u.jsx("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"9",fill:"#fff",children:"AMEX"})]})}function WX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Discover",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("circle",{cx:"36",cy:"22",r:"9",fill:"#f68121"}),u.jsx("text",{x:"22",y:"19",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"7",fill:"#231f20",children:"DISCOVER"})]})}function QX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Apple Pay",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#000"}),u.jsx("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"-apple-system, Helvetica, sans-serif",fontWeight:"600",fontSize:"9",fill:"#fff",children:" Pay"})]})}function ZX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Google Pay",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsxs("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"9",children:[u.jsx("tspan",{fill:"#4285f4",children:"G"}),u.jsx("tspan",{fill:"#ea4335",children:"o"}),u.jsx("tspan",{fill:"#fbbc05",children:"o"}),u.jsx("tspan",{fill:"#4285f4",children:"g"}),u.jsx("tspan",{fill:"#34a853",children:"l"}),u.jsx("tspan",{fill:"#ea4335",children:"e"}),u.jsx("tspan",{fill:"#5f6368",children:" Pay"})]})]})}const i5={Visa:GX,Mastercard:YX,Amex:XX,Discover:WX,"Apple Pay":QX,"Google Pay":ZX};function s5({items:e,className:t=""}){return u.jsx("div",{className:`flex flex-wrap items-center gap-1.5 ${t}`,children:e.map(n=>{const r=i5[n];return r?u.jsx(r,{},n):u.jsx("span",{className:"text-[10px] bg-cream/10 rounded px-2 py-1",children:n},n)})})}function JX(e){const t=e.replace(/\D/g,"");return t.length<4?"•••• •••• •••• ••••":`•••• •••• •••• ${t.slice(-4)}`}function eW(e){return e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim()}function tW({method:e,onMethod:t,onCardChange:n,cards:r=["Visa","Mastercard","Amex","Discover"],wallets:a=["Apple Pay","Google Pay"]}){const[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(""),[d,h]=A.useState(""),[p,m]=A.useState(!1),g=i.replace(/\D/g,""),b=(v=i,x=o,w=c)=>{const S=v.replace(/\D/g,""),j=S.length>=15&&/^\d{2}\/\d{2}$/.test(x)&&w.replace(/\D/g,"").length>=3;n==null||n({last4:S.slice(-4),expiry:x,complete:j})},y=v=>v==="Apple Pay"?"APPLE_PAY":"GOOGLE_PAY";return u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[u.jsxs("button",{type:"button",onClick:()=>t("CARD"),className:`flex items-center justify-center gap-1.5 py-2.5 rounded-xl border text-sm ${e==="CARD"?"border-bloom bg-petal text-bloom2 font-semibold":"border-blush-100 text-[#6b5258]"}`,children:[u.jsx(WE,{size:16})," Card"]}),a.map(v=>{const x=y(v),w=i5[v];return u.jsx("button",{type:"button",onClick:()=>t(x),className:`flex items-center justify-center py-2 rounded-xl border ${e===x?"border-bloom bg-petal":"border-blush-100"}`,"aria-label":v,children:w?u.jsx(w,{}):u.jsx("span",{className:"text-sm",children:v})},v)})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-[11px] text-gray-400",children:"Accepted:"}),u.jsx(s5,{items:r})]}),e==="CARD"?u.jsxs("div",{className:"rounded-2xl border border-blush-100 p-4 space-y-3 bg-white",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Card number"}),u.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 rounded-xl border border-blush-100 focus-within:border-bloom",children:[u.jsx(WE,{size:16,className:"text-blush-400 shrink-0"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-number",value:p?eW(i):g?JX(i):"",onFocus:()=>m(!0),onBlur:()=>m(!1),onChange:v=>{const x=v.target.value;s(x),b(x)},placeholder:"1234 1234 1234 1234",className:"flex-1 bg-transparent text-sm outline-none tracking-wider"})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Expiry (MM/YY)"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-exp",value:o,onChange:v=>{let x=v.target.value.replace(/\D/g,"").slice(0,4);x.length>=3&&(x=x.slice(0,2)+"/"+x.slice(2)),l(x),b(i,x)},placeholder:"MM/YY",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"CVC"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-csc",value:c,onChange:v=>{const x=v.target.value.replace(/\D/g,"").slice(0,4);f(x),b(i,o,x)},placeholder:"•••",type:"password",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Name on card"}),u.jsx("input",{autoComplete:"cc-name",value:d,onChange:v=>h(v.target.value),placeholder:"Full name",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("p",{className:"flex items-center gap-1 text-[11px] text-gray-400",children:[u.jsx(QE,{size:11})," Card number is masked and never stored on this device. Processed via GUARDiA PaymentGateway."]})]}):u.jsxs("div",{className:"rounded-2xl border border-blush-100 p-4 bg-white",children:[u.jsx("button",{type:"button",className:`w-full py-3 rounded-xl font-semibold flex items-center justify-center gap-2 ${e==="APPLE_PAY"?"bg-black text-white":"bg-white border border-edge text-[#3c4043]"}`,children:e==="APPLE_PAY"?" Pay":"G Pay"}),u.jsxs("p",{className:"flex items-center gap-1 text-[11px] text-gray-400 mt-2",children:[u.jsx(QE,{size:11})," ",e==="APPLE_PAY"?"Apple Pay":"Google Pay"," via secure wallet. If unconfigured, processed as mock at checkout."]})]})]})}const nW=[{to:"/home",key:"home"},{to:"/category",key:"shopAll"},{to:"/category?occasion=ROMANCE",key:"loveRomance"},{to:"/category?occasion=BIRTHDAY",key:"birthday"},{to:"/category?occasion=SYMPATHY",key:"sympathy"},{to:"/daily-standard",key:"todaysBouquet",accent:!0},{to:"/subscription",key:"subscriptions"},{to:"/events",key:"offers"}];function rW(){const{t:e}=ni(),{zip:t,storeName:n,custToken:r,cartCount:a,setCartCount:i}=bn(),s=Kt(),o=jr(),l=ti(),[c,f]=A.useState("");A.useEffect(()=>{if(!r){i(0);return}hj().then(h=>i((h||[]).reduce((p,m)=>p+(m.quantity||1),0))).catch(()=>{})},[r]);const d=h=>{h.preventDefault(),c.trim()&&s(`/search?q=${encodeURIComponent(c.trim())}`)};return u.jsxs("div",{className:"min-h-screen bg-cream text-[#43343a] flex flex-col",children:[u.jsx("div",{className:"bg-sage-700 text-cream/95 text-[12px] tracking-wide",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-9 flex items-center justify-center sm:justify-between gap-3",children:[u.jsxs("span",{className:"hidden sm:flex items-center gap-1.5",children:[u.jsx(ft,{size:13})," ",ke.tagline]}),u.jsxs("span",{className:"flex items-center gap-3",children:[u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(Wa,{size:12,className:"text-gold",fill:"currentColor"})," ",ke.rating,"★ · ",e("shop.topbar.reviews",{n:ke.reviewCount.toLocaleString()})]}),u.jsxs("a",{href:`tel:${ke.phoneTel}`,className:"hidden sm:flex items-center gap-1 hover:text-white",children:[u.jsx(ZE,{size:12})," ",ke.phone]})]})]})}),u.jsxs("header",{className:"sticky top-0 z-30 bg-cream/90 backdrop-blur-md border-b border-blush-100",children:[u.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-[72px] flex items-center gap-4",children:[u.jsxs(Le,{to:"/home",className:"flex items-center gap-2.5 shrink-0",children:[u.jsx(Nt.span,{animate:l?void 0:{rotate:[0,8,-6,0]},transition:{duration:7,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{className:"text-blush-500",size:28})}),u.jsxs("span",{className:"leading-none",children:[u.jsx("span",{className:"block font-serif text-[20px] font-bold text-blush-900 tracking-tight",children:"Montvale"}),u.jsx("span",{className:"block font-display text-[12px] tracking-[0.35em] text-sage-600 uppercase -mt-0.5",children:"Florist"})]})]}),u.jsxs("form",{onSubmit:d,className:"flex-1 max-w-md hidden md:flex items-center bg-white border border-blush-100 rounded-full px-4 py-2.5 shadow-soft",children:[u.jsx(rj,{size:16,className:"text-blush-400"}),u.jsx("input",{value:c,onChange:h=>f(h.target.value),placeholder:e("common.searchPlaceholder"),className:"flex-1 bg-transparent ml-2 text-sm outline-none placeholder:text-blush-300"})]}),u.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-3 ml-auto",children:[u.jsx(ag,{variant:"shop"}),u.jsxs(Le,{to:"/",className:"hidden sm:flex items-center gap-1 text-sm text-sage-700 hover:text-blush-500 transition-colors",children:[u.jsx(dm,{size:15})," ",t?`${t}`:e("shop.header.zip")]}),u.jsx(Le,{to:"/wishlist","aria-label":e("shop.header.wishlist"),className:"p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:u.jsx(Rf,{size:20})}),u.jsxs(Le,{to:"/cart",className:"relative p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:[u.jsx(sj,{size:20}),u.jsx(nx,{children:a>0&&u.jsx(Nt.span,{initial:l?!1:{scale:0},animate:{scale:1},exit:{scale:0},className:"absolute -top-1 -right-1 bg-blush-500 text-white text-[10px] rounded-full min-w-[18px] h-[18px] px-1 flex items-center justify-center",children:a},a)})]}),u.jsx(Le,{to:r?"/mypage":"/account",className:"p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:u.jsx(wk,{size:20})})]})]}),u.jsx("nav",{className:"border-t border-blush-50 bg-white/60",children:u.jsx("div",{className:"max-w-6xl mx-auto px-4 h-11 flex items-center gap-7 text-[13px] overflow-x-auto thin-scroll",children:nW.map(h=>{const p=o.pathname+o.search===h.to||h.to==="/home"&&o.pathname==="/home";return u.jsxs(Le,{to:h.to,className:`relative whitespace-nowrap py-1 transition-colors ${h.accent?"text-sage-700 font-medium":"text-[#6b5258] hover:text-blush-500"} ${p?"text-blush-600":""}`,children:[e(`shop.nav.${h.key}`),p&&u.jsx(Nt.span,{layoutId:"nav-underline",className:"absolute -bottom-[1px] left-0 right-0 h-[2px] bg-blush-500 rounded-full"})]},h.to)})})})]}),u.jsx("main",{className:"flex-1",children:u.jsx(f$,{})}),u.jsxs("footer",{className:"mt-16 bg-sage-800 text-cream/85",children:[u.jsx("div",{className:"botanical-divider py-6 opacity-50",children:u.jsx(ft,{size:16})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 pb-10 grid md:grid-cols-4 gap-8",children:[u.jsxs("div",{className:"md:col-span-1",children:[u.jsx("div",{className:"font-serif text-xl font-bold text-white mb-1",children:"Montvale Florist"}),u.jsx("p",{className:"font-display text-[13px] tracking-[0.3em] uppercase text-sage-300 mb-3",children:e("shop.footer.since",{year:ke.founded})}),u.jsx("p",{className:"text-[13px] leading-relaxed text-cream/70",children:ke.tagline}),u.jsx(qX,{size:18,className:"mt-4 text-cream/80",iconClass:"hover:text-white"})]}),u.jsxs("div",{children:[u.jsx("div",{className:"font-semibold text-white mb-3 text-sm",children:e("shop.footer.visitUs")}),u.jsxs("p",{className:"text-[13px] flex items-start gap-1.5 text-cream/75 mb-1.5",children:[u.jsx(dm,{size:14,className:"mt-0.5 shrink-0"})," ",ke.address]}),u.jsxs("a",{href:`tel:${ke.phoneTel}`,className:"text-[13px] flex items-center gap-1.5 text-cream/75 hover:text-white mb-1.5",children:[u.jsx(ZE,{size:14})," ",ke.phone]}),u.jsx("p",{className:"text-[13px] text-cream/60",children:ke.email})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"font-semibold text-white mb-3 text-sm flex items-center gap-1.5",children:[u.jsx(ck,{size:14})," ",e("shop.footer.hours")]}),ke.hours.map(h=>u.jsxs("div",{className:"text-[13px] text-cream/75 mb-1",children:[u.jsx("span",{className:"inline-block w-20",children:h.day})," ",h.open]},h.day))]}),u.jsxs("div",{children:[u.jsx("div",{className:"font-semibold text-white mb-3 text-sm",children:e("shop.footer.customerCare")}),u.jsxs(Le,{to:"/cs",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.contactAiHelp")]}),u.jsxs(Le,{to:"/orders",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.orderStatus")]}),u.jsxs(Le,{to:"/subscription",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.subscriptions")]}),u.jsxs(Le,{to:"/app",className:"flex items-center gap-1 text-[13px] text-gold hover:text-white mb-3 font-medium",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.getApp")]}),u.jsx("div",{className:"text-[11px] text-cream/50 mb-1.5",children:e("shop.footer.weAccept")}),u.jsx(s5,{items:ke.payments})]})]}),u.jsx("div",{className:"border-t border-cream/10",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex flex-col sm:flex-row items-center justify-between gap-2 text-[11px] text-cream/50",children:[u.jsxs("span",{children:["© 2026 Montvale Florist · ",ke.address]}),u.jsx("span",{className:"flex flex-wrap gap-3",children:ke.policies.map(h=>u.jsx("span",{className:"hover:text-cream/80",children:h},h))})]})})]})]})}function Zl({p:e}){var a;const t=ti(),n=e.salePrice!=null&&e.salePrice>0&&e.salePrice<(e.price||0),r=n?Math.round((1-e.salePrice/e.price)*100):0;return u.jsx(Nt.div,{whileHover:t?void 0:{y:-8},transition:{type:"spring",stiffness:300,damping:24},className:"group h-full",children:u.jsxs(Le,{to:`/product/${e.id}`,className:"block h-full bg-white rounded-3xl overflow-hidden border border-blush-100/70 shadow-soft hover:shadow-bloom transition-shadow duration-500",children:[u.jsxs("div",{className:"relative aspect-[4/5] zoom-frame bg-gradient-to-br from-blush-50 to-ivory flex items-center justify-center",children:[e.thumbnail?u.jsx("img",{src:e.thumbnail,alt:e.name,loading:"lazy",className:"w-full h-full object-cover group-hover:scale-110"}):u.jsx(ft,{className:"text-blush-200",size:56}),n&&u.jsxs("span",{className:"absolute top-3 left-3 bg-blush-500 text-white text-[11px] font-semibold px-2.5 py-1 rounded-full shadow-petal",children:["-",r,"%"]}),e.occasion&&u.jsx("span",{className:"absolute top-3 right-3 bg-white/85 backdrop-blur text-sage-700 text-[10px] uppercase tracking-wide px-2.5 py-1 rounded-full",children:e.occasion}),u.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 bg-gradient-to-t from-blush-900/10 to-transparent"})]}),u.jsxs("div",{className:"p-4",children:[e.brand&&u.jsx("div",{className:"text-[10px] uppercase tracking-[0.12em] text-sage-600 mb-0.5",children:e.brand}),u.jsx("div",{className:"font-serif text-[15px] leading-snug text-blush-900 truncate",children:e.name}),u.jsxs("div",{className:"flex items-center justify-between mt-2",children:[u.jsx("div",{className:"flex items-baseline gap-1.5",children:n?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-blush-600 font-bold",children:Ee(e.salePrice)}),u.jsx("span",{className:"text-gray-400 line-through text-xs",children:Ee(e.price)})]}):u.jsx("span",{className:"font-bold text-blush-900",children:Ee(e.price)})}),e.ratingAvg!=null&&e.reviewCount?u.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-gold",children:[u.jsx(Wa,{size:12,fill:"currentColor"}),(a=e.ratingAvg)==null?void 0:a.toFixed(1)]}):null]})]})]})})}const aW=[wK,ft,aj],iW=6e3;function sW(){const{storeName:e}=bn(),t=ti(),n=A.useRef(null),{scrollYProgress:r}=mq({target:n,offset:["start start","end start"]}),a=Jv(r,[0,1],["0%",t?"0%":"28%"]),i=Jv(r,[0,1],[1,t?1:1.12]),s=Jv(r,[0,.8],[1,t?1:.2]),[o,l]=A.useState(0),[c,f]=A.useState(1),d=lb.length,h=A.useCallback(m=>{f(m>o||o===d-1&&m===0?1:-1),l((m%d+d)%d)},[o,d]);A.useEffect(()=>{if(t)return;const m=setInterval(()=>{f(1),l(g=>(g+1)%d)},iW);return()=>clearInterval(m)},[t,d]);const p=lb[o];return u.jsxs("section",{ref:n,className:"relative overflow-hidden min-h-[78vh] flex items-center",children:[u.jsxs(Nt.div,{style:{y:a,scale:i},className:"absolute inset-0 z-0",children:[u.jsx(nx,{initial:!1,children:u.jsx(Nt.img,{src:p.img,alt:"",className:"absolute inset-0 w-full h-full object-cover",initial:{opacity:0,scale:t?1:1.06},animate:{opacity:1,scale:1},exit:{opacity:0},transition:{duration:t?0:1.1,ease:[.22,1,.36,1]}},p.img)}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blush-900/70 via-blush-900/40 to-transparent"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-sage-900/40 to-transparent"})]}),u.jsx(Kd,{count:16,className:"z-[1]"}),u.jsx(Nt.div,{style:{opacity:s},className:"relative z-10 max-w-6xl mx-auto px-4 w-full py-20",children:u.jsx(nx,{mode:"wait",custom:c,children:u.jsxs(Nt.div,{className:"max-w-xl",custom:c,initial:t?!1:{opacity:0,x:c*36},animate:{opacity:1,x:0},exit:t?{opacity:0}:{opacity:0,x:c*-36},transition:{duration:.7,ease:[.22,1,.36,1]},children:[u.jsxs("div",{className:"inline-flex items-center gap-2 text-cream/90 text-[12px] tracking-[0.25em] uppercase mb-5",children:[u.jsx("span",{className:"h-px w-8 bg-gold"})," ",p.eyebrow]}),u.jsx("h1",{className:"font-serif text-5xl md:text-6xl font-bold text-white leading-[1.05] mb-5 whitespace-pre-line drop-shadow-sm",children:p.headline}),u.jsxs("p",{className:"text-cream/90 text-lg leading-relaxed mb-8 max-w-md font-light",children:[p.subtext,e?` Same-day from ${e}.`:""]}),u.jsxs("div",{className:"flex flex-wrap gap-3",children:[u.jsx(Le,{to:p.to,children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 bg-white text-blush-700 font-semibold px-7 py-3.5 rounded-full shadow-bloom hover:bg-cream",children:[p.cta," ",u.jsx(Es,{size:17})]})}),u.jsx(Le,{to:"/daily-standard",children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 border border-white/70 text-white px-7 py-3.5 rounded-full hover:bg-white/10",children:[u.jsx(ej,{size:16})," Today's Bouquet"]})})]}),u.jsxs("div",{className:"flex items-center gap-2 mt-7 text-cream/85 text-sm",children:[u.jsx("span",{className:"flex text-gold",children:[1,2,3,4,5].map(m=>u.jsx(Wa,{size:15,fill:"currentColor"},m))}),u.jsx("span",{className:"font-medium",children:ke.rating}),u.jsxs("span",{className:"text-cream/60",children:["· ",ke.reviewCount.toLocaleString()," happy customers"]})]})]},o)})}),u.jsx("button",{"aria-label":"Previous slide",onClick:()=>h(o-1),className:"absolute left-3 md:left-5 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 backdrop-blur-sm text-white flex items-center justify-center transition-colors",children:u.jsx(gK,{size:22})}),u.jsx("button",{"aria-label":"Next slide",onClick:()=>h(o+1),className:"absolute right-3 md:right-5 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 backdrop-blur-sm text-white flex items-center justify-center transition-colors",children:u.jsx(Pu,{size:22})}),u.jsx("div",{className:"absolute bottom-7 left-1/2 -translate-x-1/2 z-20 flex items-center gap-2.5",children:lb.map((m,g)=>u.jsx("button",{"aria-label":`Go to slide ${g+1}`,onClick:()=>h(g),className:`h-2.5 rounded-full transition-all duration-300 ${g===o?"w-8 bg-white":"w-2.5 bg-white/45 hover:bg-white/70"}`},g))}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -bottom-6 right-6 z-[2] text-white/20 hidden md:block pointer-events-none",animate:t?void 0:{rotate:[0,5,-4,0],y:[0,-8,0]},transition:{duration:9,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{size:130,strokeWidth:1})})]})}function oW(){var i,s,o;const{data:e}=se({queryKey:["ai-rec"],queryFn:()=>t5("","",8)}),{data:t}=se({queryKey:["best"],queryFn:()=>Ql({sort:"sales",size:8})}),{data:n}=se({queryKey:["feat"],queryFn:()=>Ql({sort:"rating",size:12})}),r=(t==null?void 0:t.items)||[],a=(n==null?void 0:n.items)||[];return u.jsxs("div",{children:[u.jsx(sW,{}),u.jsx("section",{className:"bg-ivory border-b border-blush-100",children:u.jsx("div",{className:"max-w-6xl mx-auto px-4 py-10 grid md:grid-cols-3 gap-6",children:ke.promise.map((l,c)=>{const f=aW[c];return u.jsxs(Gr,{delay:c*.1,className:"flex items-start gap-3",children:[u.jsx("span",{className:"shrink-0 w-11 h-11 rounded-full bg-blush-50 text-blush-500 flex items-center justify-center",children:u.jsx(f,{size:20})}),u.jsxs("div",{children:[u.jsx("div",{className:"font-serif text-lg text-blush-900",children:l.title}),u.jsx("p",{className:"text-sm text-[#6b5258] leading-relaxed mt-0.5",children:l.desc})]})]},l.title)})})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-14 space-y-20",children:[u.jsxs("section",{children:[u.jsxs(Gr,{className:"flex items-end justify-between mb-7",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-600 text-[12px] tracking-[0.2em] uppercase mb-2",children:[u.jsx(xr,{size:15})," Curated by GUARDiA AI · On-premise"]}),u.jsx("h2",{className:"font-serif text-3xl text-blush-900",children:"Picked Just for You"})]}),u.jsxs(Le,{to:"/category",className:"hidden sm:flex items-center gap-1 text-sm text-blush-500 hover:text-blush-700",children:["View all ",u.jsx(Es,{size:15})]})]}),u.jsxs(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:[(e||[]).slice(0,8).map(l=>u.jsx(mm,{children:u.jsx(Zl,{p:l})},l.id)),!(e||[]).length&&u.jsx("div",{className:"col-span-4 text-blush-300 text-sm py-12 text-center",children:"Curating fresh picks…"})]})]}),u.jsx("div",{className:"botanical-divider",children:u.jsx(ft,{size:18})}),u.jsx(Gr,{children:u.jsxs("section",{className:"relative overflow-hidden rounded-4xl bg-gradient-to-br from-sage-700 to-sage-800 text-white",children:[u.jsx(Kd,{count:8}),u.jsxs("div",{className:"relative z-10 p-8 md:p-12 flex flex-col md:flex-row items-center justify-between gap-6",children:[u.jsxs("div",{className:"max-w-lg",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-200 text-[12px] tracking-[0.2em] uppercase mb-3",children:[u.jsx(ej,{size:15})," Farmgirl-style daily"]}),u.jsx("h3",{className:"font-serif text-3xl md:text-4xl font-bold mb-3",children:"Today's Designer Bouquet"}),u.jsx("p",{className:"text-cream/85 leading-relaxed",children:"Made fresh each morning with whatever's most beautiful in the cooler — hand-designed by our florists and curated by GUARDiA AI. Limited daily stock."})]}),u.jsx(Le,{to:"/daily-standard",children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 bg-white text-sage-800 font-semibold px-7 py-3.5 rounded-full shadow-bloom",children:["See today's bouquet ",u.jsx(Es,{size:16})]})})]})]})}),u.jsxs("section",{children:[u.jsxs(Gr,{className:"flex items-end justify-between mb-7",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-600 text-[12px] tracking-[0.2em] uppercase mb-2",children:[u.jsx(Wa,{size:14})," Most loved"]}),u.jsx("h2",{className:"font-serif text-3xl text-blush-900",children:"Bestsellers"})]}),u.jsxs(Le,{to:"/category?sort=sales",className:"hidden sm:flex items-center gap-1 text-sm text-blush-500 hover:text-blush-700",children:["View all ",u.jsx(Es,{size:15})]})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:r.map(l=>u.jsx(mm,{children:u.jsx(Zl,{p:l})},l.id))})]}),u.jsx(Gr,{children:u.jsx("section",{className:"grid md:grid-cols-3 gap-5",children:[{to:"/category?occasion=ROMANCE",label:"Love & Romance",sub:"Roses that speak from the heart",img:(i=a[1])==null?void 0:i.thumbnail},{to:"/category?occasion=SYMPATHY",label:"Sympathy & Comfort",sub:"Thoughtful tributes, gently delivered",img:(s=a[2])==null?void 0:s.thumbnail},{to:"/subscription",label:"Flower Subscriptions",sub:"Fresh blooms, week after week",img:(o=a[3])==null?void 0:o.thumbnail}].map((l,c)=>u.jsxs(Le,{to:l.to,className:"group relative rounded-3xl overflow-hidden zoom-frame aspect-[5/4] block shadow-soft",children:[l.img?u.jsx("img",{src:l.img,alt:"",loading:"lazy",className:"w-full h-full object-cover group-hover:scale-110"}):u.jsx("div",{className:"w-full h-full bg-gradient-to-br from-blush-100 to-sage-100"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-blush-900/75 via-blush-900/20 to-transparent"}),u.jsxs("div",{className:"absolute bottom-0 left-0 p-6 text-white",children:[u.jsx("div",{className:"font-serif text-xl font-semibold mb-0.5",children:l.label}),u.jsx("p",{className:"text-cream/85 text-sm",children:l.sub}),u.jsxs("span",{className:"inline-flex items-center gap-1 text-[13px] text-gold mt-2 group-hover:gap-2 transition-all",children:["Explore ",u.jsx(Es,{size:14})]})]})]},l.to))})}),u.jsx(Gr,{children:u.jsxs("section",{className:"rounded-4xl bg-blush-50 border border-blush-100 p-8 md:p-10 text-center",children:[u.jsx("div",{className:"flex justify-center mb-4",children:u.jsx("span",{className:"w-12 h-12 rounded-full bg-white text-blush-500 flex items-center justify-center shadow-soft",children:u.jsx(Ud,{size:22})})}),u.jsxs("h3",{className:"font-serif text-2xl text-blush-900 mb-2",children:["Your Local Florist Since ",ke.founded]}),u.jsx("p",{className:"text-[#6b5258] max-w-xl mx-auto leading-relaxed text-[15px]",children:ke.about}),u.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 mt-5 text-[12px] text-sage-700",children:[u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"Same-Day Delivery"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"Hand-Delivered"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"100% Satisfaction"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"No-Contact Available"})]})]})})]})]})}const gT=[["","All"],["BIRTHDAY","Birthday"],["ANNIVERSARY","Anniversary"],["SYMPATHY","Sympathy"],["CONGRATS","Congrats"],["ROMANCE","Romance"]],lW=[["","Recommended"],["price_asc","Price ↑"],["price_desc","Price ↓"],["sales","Bestselling"],["rating","Top rated"]];function cW(){var b;const[e,t]=m$(),n=e.get("occasion")||"",[r,a]=A.useState(e.get("sort")||""),[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(null);se({queryKey:["cats"],queryFn:PY});const{data:d}=se({queryKey:["products",n,r,i],queryFn:()=>Ql({occasion:n,sort:r,maxPrice:i?Number(i):void 0,size:24})}),h=c?c.items:(d==null?void 0:d.items)||[],p=y=>{const v=new URLSearchParams(e);y?v.set("occasion",y):v.delete("occasion"),t(v),f(null)},m=async y=>{if(y.preventDefault(),!o.trim()){f(null);return}const v=await n5(o.trim()).catch(()=>null);f(v)},g=((b=gT.find(y=>y[0]===n))==null?void 0:b[1])||"All";return u.jsxs("div",{children:[u.jsx("section",{className:"bg-gradient-to-br from-blush-50 to-ivory border-b border-blush-100",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10",children:[u.jsx("div",{className:"text-[12px] tracking-[0.2em] uppercase text-sage-600 mb-2",children:"Shop the collection"}),u.jsx("h1",{className:"font-serif text-4xl text-blush-900",children:g==="All"?"All Flowers":g})]})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("form",{onSubmit:m,className:"flex items-center gap-2 bg-white border border-blush-100 rounded-full px-5 py-3 mb-6 max-w-xl shadow-soft",children:[u.jsx(xr,{size:16,className:"text-blush-500"}),u.jsx("input",{value:o,onChange:y=>l(y.target.value),placeholder:'Try "anniversary roses under $80"',className:"flex-1 text-sm outline-none bg-transparent placeholder:text-blush-300"}),u.jsx("button",{className:"text-blush-500 text-sm font-semibold",children:"AI Search"})]}),c&&u.jsxs("div",{className:"text-xs text-sage-700 mb-4",children:["AI understood: ",u.jsx("span",{className:"font-medium",children:JSON.stringify(c.parsed)})," · ",c.source]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-7",children:[gT.map(([y,v])=>u.jsx("button",{onClick:()=>p(y),className:`px-4 py-1.5 rounded-full text-sm border transition-colors ${n===y?"bg-blush-500 text-white border-blush-500":"bg-white text-[#6b5258] border-blush-100 hover:border-blush-300"}`,children:v},y)),u.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[u.jsx(CK,{size:15,className:"text-blush-300"}),u.jsx("input",{value:i,onChange:y=>{s(y.target.value.replace(/\D/g,"")),f(null)},placeholder:"Max $",className:"w-24 px-3 py-1.5 rounded-full border border-blush-100 text-sm outline-none focus:border-blush-300"}),u.jsx("select",{value:r,onChange:y=>{a(y.target.value),f(null)},className:"px-3 py-1.5 rounded-full border border-blush-100 text-sm outline-none bg-white",children:lW.map(([y,v])=>u.jsx("option",{value:y,children:v},y))})]})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:h.map(y=>u.jsx(mm,{children:u.jsx(Zl,{p:y})},y.id))}),!h.length&&u.jsxs(Gr,{className:"text-center text-blush-300 py-20",children:[u.jsx(ft,{size:40,className:"mx-auto mb-3 text-blush-200"}),"No flowers match those filters."]})]})]})}function uW(){const{t:e}=ni(),[t]=m$(),n=t.get("q")||"",{data:r,isLoading:a}=se({queryKey:["nl-search",n],queryFn:()=>n5(n),enabled:!!n}),i=(r==null?void 0:r.items)||[];return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(xr,{className:"text-bloom",size:20}),u.jsx("h1",{className:"font-serif text-2xl font-bold",children:e("search.resultsFor",{query:n})})]}),(r==null?void 0:r.parsed)&&u.jsxs("div",{className:"text-xs text-bloom2 mb-5",children:[e("search.aiUnderstood")," ",u.jsx("span",{className:"font-medium",children:JSON.stringify(r.parsed)})," · ",r.source]}),a&&u.jsx("div",{className:"text-gray-400 py-10 text-center",children:e("search.searching")}),u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:i.map(s=>u.jsx(Zl,{p:s},s.id))}),!a&&!i.length&&u.jsx("div",{className:"text-center text-gray-400 py-16",children:e("search.noResults")})]})}function fW(){var te,Z,ye;const{id:e}=o$(),t=Number(e),n=Kt(),r=ti(),{custToken:a,setCartCount:i}=bn(),[s,o]=A.useState(""),[l,c]=A.useState(null),[f,d]=A.useState(null),[h,p]=A.useState(""),[m,g]=A.useState(1),[b,y]=A.useState(""),[v,x]=A.useState(!1),[w,S]=A.useState(null),{data:j}=se({queryKey:["product",t],queryFn:()=>CY(t)}),{data:O}=se({queryKey:["reviews",t],queryFn:()=>WY(t)}),{data:E}=se({queryKey:["rstats",t],queryFn:()=>QY(t)}),{data:T}=se({queryKey:["aisum",t],queryFn:()=>cX(t)});if(!j)return u.jsx("div",{className:"max-w-6xl mx-auto px-4 py-24 text-center text-blush-300",children:"Loading…"});const N=j.sizes||[],M=N.find(J=>J.sizeCode===s)||N[0],C=j.options||[],L=C.filter(J=>J.optionType==="VASE"),D=C.filter(J=>J.optionType==="WRAP"),$=J=>C.find(st=>st.id===J),P=M?M.price:j.salePrice&&j.salePrice>0?j.salePrice:j.price,k=(((te=$(l))==null?void 0:te.extraPrice)||0)+(((Z=$(f))==null?void 0:Z.extraPrice)||0),I=(P+k)*m,F=w||j.thumbnail,H=async()=>{if(!a){n("/account");return}try{await LY({productId:j.id,optionId:l||f||null,sizeCode:(M==null?void 0:M.sizeCode)||"",cardMessage:h,quantity:m}),i(J=>J+m),y("Added to your cart.")}catch{y("Could not add to cart.")}},Y=async()=>{await H(),n("/cart")},q=async()=>{if(!a){n("/account");return}x(!0),setTimeout(()=>x(!1),700),await rX(j.id).catch(()=>{}),y("Saved to your wishlist.")};return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10",children:[u.jsxs("div",{className:"grid md:grid-cols-2 gap-10",children:[u.jsxs(Gr,{children:[u.jsx("div",{className:"relative aspect-[4/5] rounded-4xl overflow-hidden bg-gradient-to-br from-blush-50 to-ivory flex items-center justify-center shadow-soft",children:F?u.jsx(Nt.img,{src:F,alt:j.name,initial:r?!1:{opacity:0,scale:1.04},animate:{opacity:1,scale:1},transition:{duration:.6},className:"w-full h-full object-cover"},F):u.jsx(ft,{className:"text-blush-200",size:96})}),!!(j.images||[]).length&&u.jsxs("div",{className:"flex gap-2 mt-3",children:[u.jsx("button",{onClick:()=>S(null),className:`w-16 h-16 rounded-2xl overflow-hidden border-2 ${w?"border-blush-100":"border-blush-400"}`,children:j.thumbnail?u.jsx("img",{src:j.thumbnail,className:"w-full h-full object-cover"}):u.jsx(ft,{className:"text-blush-200 m-auto",size:20})}),j.images.map((J,st)=>u.jsx("button",{onClick:()=>S(J),className:`w-16 h-16 rounded-2xl overflow-hidden border-2 ${w===J?"border-blush-400":"border-blush-100"}`,children:u.jsx("img",{src:J,className:"w-full h-full object-cover"})},st))]})]}),u.jsxs(Gr,{delay:.1,children:[j.brand&&u.jsx("div",{className:"text-[11px] uppercase tracking-[0.2em] text-sage-600 mb-1",children:j.brand}),u.jsx("h1",{className:"font-serif text-3xl font-bold text-blush-900 mb-2 leading-tight",children:j.name}),u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gold mb-4",children:[u.jsx(Wa,{size:15,fill:"currentColor"})," ",((ye=j.ratingAvg)==null?void 0:ye.toFixed(1))||"–",u.jsxs("span",{className:"text-[#a08a90]",children:["(",j.reviewCount||0," reviews)"]}),j.occasion&&u.jsx("span",{className:"text-xs bg-blush-50 text-blush-700 px-2.5 py-0.5 rounded-full ml-1",children:j.occasion})]}),u.jsx("p",{className:"text-[#6b5258] text-[15px] mb-6 leading-relaxed",children:j.description}),!!N.length&&u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Choose your size"}),u.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:N.map(J=>u.jsxs(Ua,{onClick:()=>o(J.sizeCode),className:`rounded-2xl border p-3 text-center transition-colors ${(M==null?void 0:M.sizeCode)===J.sizeCode?"border-blush-400 bg-blush-50":"border-blush-100 hover:border-blush-300"}`,children:[u.jsx("div",{className:"font-semibold text-sm text-blush-900",children:J.label}),u.jsxs("div",{className:"text-xs text-[#8a7077]",children:[J.stemCount," stems"]}),u.jsx("div",{className:"text-blush-600 font-bold text-sm mt-1",children:Ee(J.price)})]},J.sizeCode))})]}),!!L.length&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Add a vase"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Ch,{active:l===null,onClick:()=>c(null),children:"No vase"}),L.map(J=>u.jsxs(Ch,{active:l===J.id,onClick:()=>c(J.id),children:[J.optionValue," +",Ee(J.extraPrice)]},J.id))]})]}),!!D.length&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Wrapping"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Ch,{active:f===null,onClick:()=>d(null),children:"Standard"}),D.map(J=>u.jsxs(Ch,{active:f===J.id,onClick:()=>d(J.id),children:[J.optionValue," +",Ee(J.extraPrice)]},J.id))]})]}),u.jsxs("div",{className:"mb-5",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("span",{className:"text-sm font-medium text-blush-900",children:"Card message"}),u.jsxs(Le,{to:"/cs",className:"text-xs text-blush-500 flex items-center gap-1",children:[u.jsx(xr,{size:12})," AI message helper"]})]}),u.jsx("textarea",{value:h,onChange:J=>p(J.target.value),rows:2,maxLength:200,placeholder:"Write a heartfelt note for the recipient…",className:"w-full px-3.5 py-2.5 rounded-2xl border border-blush-100 text-sm outline-none focus:border-blush-400"})]}),u.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[u.jsxs("div",{className:"flex items-center border border-blush-100 rounded-full",children:[u.jsx("button",{onClick:()=>g(J=>Math.max(1,J-1)),className:"px-3.5 py-1.5 text-blush-600",children:"−"}),u.jsx("span",{className:"px-2 text-sm w-8 text-center",children:m}),u.jsx("button",{onClick:()=>g(J=>J+1),className:"px-3.5 py-1.5 text-blush-600",children:"+"})]}),u.jsx("div",{className:"font-serif text-2xl font-bold text-blush-900",children:Ee(I)})]}),b&&u.jsx("div",{className:"text-sm text-sage-700 mb-3",children:b}),u.jsxs("div",{className:"flex gap-3",children:[u.jsxs(Ua,{onClick:H,className:"flex-1 flex items-center justify-center gap-2 border border-blush-400 text-blush-600 font-semibold py-3.5 rounded-full hover:bg-blush-50",children:[u.jsx(sj,{size:18})," Add to Cart"]}),u.jsx(Ua,{onClick:Y,className:"flex-1 bg-blush-500 text-white font-semibold py-3.5 rounded-full hover:bg-blush-600 shadow-petal",children:"Buy Now"}),u.jsx("button",{onClick:q,className:`px-4 border border-blush-100 rounded-full text-blush-500 hover:bg-blush-50 ${v?"animate-heartbeat":""}`,children:u.jsx(Rf,{size:18,fill:v?"currentColor":"none"})})]}),u.jsxs("div",{className:"flex items-center gap-5 mt-5 text-xs text-sage-700",children:[u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(Ud,{size:14})," Same-day local delivery"]}),u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(aj,{size:14})," 100% satisfaction"]})]}),u.jsx("div",{className:"mt-4 pt-4 border-t border-blush-100/60",children:u.jsx(KX,{url:typeof window<"u"?window.location.href:"",title:j.name,image:j.thumbnail||""})})]})]}),u.jsxs("div",{className:"mt-16",children:[u.jsx("div",{className:"botanical-divider mb-8",children:u.jsx(ft,{size:16})}),u.jsxs("h2",{className:"font-serif text-2xl font-bold text-blush-900 mb-5",children:["Reviews (",(E==null?void 0:E.count)??j.reviewCount??0,")"]}),(T==null?void 0:T.summary)&&u.jsxs(Gr,{className:"bg-gradient-to-br from-blush-50 to-sage-50 border border-blush-100 rounded-3xl p-5 mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2 text-blush-700 font-medium text-sm mb-1.5",children:[u.jsx(xr,{size:15})," AI Review Summary ",u.jsx("span",{className:"text-xs text-[#a08a90]",children:T.source})]}),u.jsx("p",{className:"text-sm text-[#5a474d] leading-relaxed",children:T.summary})]}),u.jsxs("div",{className:"space-y-3",children:[(O||[]).map(J=>u.jsxs("div",{className:"bg-white rounded-3xl border border-blush-100/70 p-5 shadow-soft",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"font-medium text-sm text-blush-900",children:J.title||"Review"}),u.jsxs("span",{className:"flex items-center gap-0.5 text-gold text-sm",children:[u.jsx(Wa,{size:13,fill:"currentColor"}),J.rating]})]}),u.jsx("p",{className:"text-sm text-[#6b5258] mt-1.5 leading-relaxed",children:J.content})]},J.id)),!(O||[]).length&&u.jsx("div",{className:"text-blush-300 text-sm py-8 text-center",children:"No reviews yet — be the first."})]}),u.jsx(Le,{to:`/review/${j.id}`,className:"inline-flex items-center gap-1 mt-5 text-sm text-blush-500 font-semibold hover:text-blush-700",children:"Write a review →"})]})]})}function Ch({active:e,onClick:t,children:n}){return u.jsx("button",{onClick:t,className:`px-3.5 py-1.5 rounded-full text-sm border transition-colors ${e?"bg-blush-500 text-white border-blush-500":"border-blush-100 text-[#6b5258] hover:border-blush-300"}`,children:n})}function dW(){const{t:e}=ni(),t=nn(),n=Kt(),{custToken:r,setCartCount:a}=bn(),{data:i}=se({queryKey:["cart"],queryFn:hj,enabled:!!r}),s=()=>t.invalidateQueries({queryKey:["cart"]}),o=async(d,h)=>{h<1||(await zY(d,h),s())},l=async d=>{await IY(d),s(),a(h=>Math.max(0,h-1))};if(!r)return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-20 text-center",children:[u.jsx(sj,{className:"mx-auto text-bloom/40 mb-3",size:48}),u.jsx("p",{className:"text-gray-500 mb-4",children:e("cart.signInPrompt")}),u.jsx(Le,{to:"/account",className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:e("cart.signInRegister")})]});const c=i||[],f=c.reduce((d,h)=>d+(h.price||(h.unitPrice||0)*(h.quantity||1)),0);return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsx("h1",{className:"font-serif text-2xl font-bold mb-6",children:e("cart.title")}),c.length?u.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[u.jsx("div",{className:"md:col-span-2 space-y-3",children:c.map(d=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex gap-4",children:[u.jsx("div",{className:"w-20 h-20 bg-petal rounded-xl flex items-center justify-center overflow-hidden shrink-0",children:d.thumbnail?u.jsx("img",{src:d.thumbnail,className:"w-full h-full object-cover"}):u.jsx(ft,{className:"text-bloom/30",size:32})}),u.jsxs("div",{className:"flex-1",children:[u.jsx("div",{className:"font-medium text-sm",children:d.productName||`Product #${d.productId}`}),u.jsxs("div",{className:"text-xs text-gray-500",children:[d.sizeCode,d.cardMessage?` · ${e("cart.card")}: ${d.cardMessage.slice(0,20)}`:""]}),u.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[u.jsxs("div",{className:"flex items-center border border-blush-100 rounded-full text-sm",children:[u.jsx("button",{onClick:()=>o(d.id,(d.quantity||1)-1),className:"px-2.5 py-1 text-bloom2",children:"−"}),u.jsx("span",{className:"px-1 w-6 text-center",children:d.quantity||1}),u.jsx("button",{onClick:()=>o(d.id,(d.quantity||1)+1),className:"px-2.5 py-1 text-bloom2",children:"+"})]}),u.jsx("button",{onClick:()=>l(d.id),className:"text-blush-400 hover:text-blush-600",children:u.jsx(PK,{size:16})})]})]}),u.jsx("div",{className:"font-bold text-bloom2 text-sm",children:Ee(d.price||(d.unitPrice||0)*(d.quantity||1))})]},d.id))}),u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 h-fit",children:[u.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[u.jsx("span",{className:"text-gray-500",children:e("cart.subtotal")}),u.jsx("span",{className:"font-medium",children:Ee(f)})]}),u.jsxs("div",{className:"flex justify-between text-sm mb-3",children:[u.jsx("span",{className:"text-gray-500",children:e("cart.shippingTax")}),u.jsx("span",{className:"text-gray-400",children:e("cart.calcAtCheckout")})]}),u.jsxs("div",{className:"border-t border-blush-100/60 pt-3 flex justify-between font-bold",children:[u.jsx("span",{children:e("cart.total")}),u.jsx("span",{className:"text-bloom2",children:Ee(f)})]}),u.jsx("button",{onClick:()=>n("/checkout"),className:"w-full mt-4 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2",children:e("cart.checkout")})]})]}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:[e("cart.empty")," ",u.jsx(Le,{to:"/category",className:"text-bloom",children:e("cart.startShopping")})]})]})}function hW(e){const t=[],n=new Date;for(let r=0;rSo(!0)}),{data:st}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!t}),{data:Ve}=se({queryKey:["holidays"],queryFn:Wk}),{data:G}=se({queryKey:["avail",o,c],queryFn:()=>$Y(o,c),enabled:!!o&&!!c});A.useEffect(()=>{!o&&(J!=null&&J.length)&&l(J[0].id)},[J]);const oe=ye||[],X=oe.reduce((le,zt)=>le+(zt.price||(zt.unitPrice||0)*(zt.quantity||1)),0),V=G!=null&&G.surgeMultiplier&&G.surgeMultiplier>1?X*(G.surgeMultiplier-1):0,_e=((Co=st==null?void 0:st.benefit)==null?void 0:Co.discountRate)||0,ge=X*(_e/100),Xe=(k==null?void 0:k.taxAmount)||0,ot=(st==null?void 0:st.pointBalance)||0,dt=Math.min(ot,Math.floor(X)),Rn=Math.max(0,X+V+Xe-ge-T),oi=A.useMemo(()=>new Set((Ve||[]).filter(le=>le.blocked).map(le=>le.holidayDate)),[Ve]),No=async()=>{if(!y||!x)return;const le=await oX(y,x).catch(()=>null);P(le)},pa=async()=>{var Er;const le=((Er=J==null?void 0:J.find(nh=>nh.id===o))==null?void 0:Er.state)||"",zt=await sX(X,x||"",le).catch(()=>null);I(zt)};A.useEffect(()=>{X>0&&o&&pa()},[X,o,x]);const ma=async()=>{var le,zt;if(Z(""),!t){e("/account");return}if(!oe.length){Z("Your cart is empty.");return}if(!c||!d){Z("Please select a delivery/pickup date and time slot.");return}if(i==="DELIVERY"&&(!y||!p)){Z("Please enter the recipient and delivery address.");return}if(M==="CARD"&&!L.complete){Z("Please enter your card details.");return}H(!0);try{const Er=await UY({storeId:o,fulfillmentType:i,receiverName:p,receiverPhone:g,address:i==="DELIVERY"?y:"",deliveryZip:x,scheduledDate:c,slotId:d.id,slotLabel:d.label,cardMessage:S,memo:O,couponId:null,discountAmount:Math.round((ge+T)*100)/100,taxAmount:Xe,surgeAmount:Math.round(V*100)/100});await VY({orderId:Er.id,amount:Rn,method:M,usePoints:T,cardLast4:M==="CARD"?L.last4:""}).catch(()=>{}),a(0),q(Er)}catch(Er){Z(((zt=(le=Er==null?void 0:Er.response)==null?void 0:le.data)==null?void 0:zt.message)||"Order failed. Please try again in a moment.")}finally{H(!1)}};return t?Y?u.jsxs("div",{className:"max-w-lg mx-auto px-4 py-20 text-center",children:[u.jsx(vK,{className:"mx-auto text-leaf mb-4",size:56}),u.jsx("h1",{className:"font-serif text-2xl font-bold mb-2",children:"Your order has been placed"}),u.jsxs("p",{className:"text-gray-500 mb-1",children:["Order Number ",u.jsx("span",{className:"font-semibold text-bloom2",children:Y.orderNo||`#${Y.id}`})]}),u.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:[c," · ",d==null?void 0:d.label," · ",Ee(Rn)]}),u.jsxs("div",{className:"flex gap-3 justify-center",children:[u.jsx("button",{onClick:()=>e("/orders"),className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Order History"}),u.jsx("button",{onClick:()=>e("/home"),className:"border border-blush-100 px-6 py-2.5 rounded-full text-bloom2",children:"Continue Shopping"})]})]}):u.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[u.jsx("h1",{className:"font-serif text-2xl font-bold mb-6",children:"Checkout"}),u.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[u.jsxs("div",{className:"md:col-span-2 space-y-5",children:[u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Fulfillment Method"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("button",{onClick:()=>s("DELIVERY"),className:`flex items-center gap-2 justify-center py-3 rounded-xl border ${i==="DELIVERY"?"border-bloom bg-petal text-bloom2":"border-blush-100"}`,children:[u.jsx(Ud,{size:18})," Local Delivery"]}),u.jsxs("button",{onClick:()=>s("PICKUP"),className:`flex items-center gap-2 justify-center py-3 rounded-xl border ${i==="PICKUP"?"border-bloom bg-petal text-bloom2":"border-blush-100"}`,children:[u.jsx(Bd,{size:18})," Store Pickup"]})]}),u.jsxs("div",{className:"mt-3",children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Store"}),u.jsx("select",{value:o,onChange:le=>l(Number(le.target.value)),className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:(J||[]).map(le=>u.jsxs("option",{value:le.id,children:[le.name," (",le.city,", ",le.state,")"]},le.id))})]})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold mb-3",children:[u.jsx(yK,{size:16,className:"text-bloom"})," Delivery / Pickup Date"]}),u.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2",children:hW(14).map(le=>{const zt=oi.has(le),Er=c===le,nh=new Date(le);return u.jsxs("button",{disabled:zt,onClick:()=>{f(le),h(null)},className:`shrink-0 w-16 py-2 rounded-xl border text-center text-xs ${zt?"opacity-30 cursor-not-allowed border-blush-100":Er?"border-bloom bg-bloom text-white":"border-blush-100 hover:border-bloom"}`,children:[u.jsx("div",{className:"font-semibold",children:nh.toLocaleDateString("en-US",{weekday:"short"})}),u.jsx("div",{className:"text-base",children:nh.getDate()}),zt&&u.jsx("div",{className:"text-[9px]",children:"Closed"})]},le)})}),c&&G&&u.jsxs("div",{className:"mt-3",children:[G.blocked&&u.jsxs("div",{className:"flex items-center gap-1.5 text-blush-500 text-xs mb-2",children:[u.jsx(RK,{size:13})," Delivery is unavailable on this date (peak season / closed)."]}),G.surgeMultiplier>1&&u.jsxs("div",{className:"text-xs text-amber-600 mb-2",children:["⚡ Peak-season surge pricing ×",G.surgeMultiplier," applied"]}),G.sameDayAvailable&&u.jsxs("div",{className:"text-xs text-leaf mb-2",children:["Same-Day Delivery available (order by ",G.sameDayCutoff,")"]}),u.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium mb-2",children:[u.jsx(ck,{size:14,className:"text-bloom"})," Delivery Time Slot"]}),u.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[(G.slots||[]).map(le=>{const zt=le.available===!1||le.capacity!=null&&le.booked>=le.capacity;return u.jsx("button",{disabled:zt,onClick:()=>h({id:le.id,label:le.slotLabel}),className:`py-2 rounded-lg border text-xs ${zt?"opacity-30 cursor-not-allowed":(d==null?void 0:d.id)===le.id?"border-bloom bg-petal text-bloom2 font-semibold":"border-blush-100 hover:border-bloom"}`,children:le.slotLabel},le.id)}),!(G.slots||[]).length&&u.jsx("div",{className:"col-span-3 text-gray-400 text-xs py-2",children:"No time slots available."})]})]})]}),i==="DELIVERY"&&u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3",children:[u.jsx("div",{className:"text-sm font-semibold",children:"Recipient Information"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx("input",{value:p,onChange:le=>m(le.target.value),placeholder:"Recipient Name",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:g,onChange:le=>b(le.target.value),placeholder:"Phone",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{value:y,onChange:le=>v(le.target.value),placeholder:"Delivery Address",className:"flex-1 px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:x,onChange:le=>w(le.target.value.replace(/\D/g,"").slice(0,5)),placeholder:"ZIP",className:"w-24 px-3 py-2 rounded-xl border border-blush-100 text-sm text-center outline-none focus:border-bloom"}),u.jsxs("button",{onClick:No,className:"px-3 rounded-xl border border-bloom text-bloom text-sm font-semibold flex items-center gap-1",children:[u.jsx(dm,{size:14})," Verify"]})]}),$&&u.jsx("div",{className:`text-xs ${$.valid?"text-leaf":"text-blush-500"}`,children:$.valid?`Verified: ${$.normalized||y} (${$.provider})`:`Address verification failed (${$.provider})`})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("div",{className:"text-sm font-semibold",children:"Gift Card Message"}),u.jsxs("span",{className:"text-xs text-bloom flex items-center gap-1",children:[u.jsx(xr,{size:12})," AI writing is on the product page"]})]}),u.jsx("textarea",{value:S,onChange:le=>j(le.target.value),rows:2,maxLength:200,placeholder:"Message for the recipient",className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:O,onChange:le=>E(le.target.value),placeholder:"Special Instructions (optional)",className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Payment Method"}),u.jsx(tW,{method:M,onMethod:C,onCardChange:D,cards:ke.cards,wallets:ke.wallets})]})]}),u.jsxs("aside",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 h-fit sticky top-20",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Order Summary"}),u.jsxs("div",{className:"space-y-1.5 text-sm",children:[u.jsx(fu,{k:"Subtotal",v:Ee(X)}),V>0&&u.jsx(fu,{k:"Surge Pricing",v:`+${Ee(V)}`,amber:!0}),u.jsx(fu,{k:"Tax",v:Ee(Xe),sub:k?`${k.provider} ${(k.rate*100).toFixed(1)}%`:""}),ge>0&&u.jsx(fu,{k:`Tier Discount (${(st==null?void 0:st.tierName)||""} ${_e}%)`,v:`-${Ee(ge)}`,green:!0}),T>0&&u.jsx(fu,{k:"Points Used",v:`-${Ee(T)}`,green:!0})]}),!!t&&u.jsxs("div",{className:"mt-4 bg-petal rounded-xl p-3",children:[u.jsxs("div",{className:"flex items-center justify-between text-xs text-bloom2 mb-1",children:[u.jsxs("span",{children:["Points Balance ",ot.toLocaleString()," pts"]}),u.jsx("button",{onClick:()=>N(dt),className:"text-bloom font-semibold",children:"Use All"})]}),u.jsx("input",{type:"range",min:0,max:dt,value:T,onChange:le=>N(Number(le.target.value)),className:"w-full accent-bloom"}),u.jsxs("div",{className:"text-xs text-gray-500 text-right",children:[T.toLocaleString()," pts used"]})]}),u.jsxs("div",{className:"border-t border-blush-100/60 mt-4 pt-3 flex justify-between font-bold text-base",children:[u.jsx("span",{children:"Order Total"}),u.jsx("span",{className:"text-bloom2",children:Ee(Rn)})]}),te&&u.jsx("div",{className:"text-blush-500 text-xs mt-3",children:te}),u.jsx("button",{onClick:ma,disabled:F,className:"w-full mt-4 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2 disabled:opacity-60",children:F?"Processing…":`Place Order · ${Ee(Rn)}`}),u.jsx("p",{className:"text-[11px] text-gray-400 text-center mt-2",children:"Payments processed via GUARDiA PaymentGateway (secure adapter) · Card details not stored"})]})]})]}):(e("/account"),null)}function fu({k:e,v:t,sub:n,amber:r,green:a}){return u.jsxs("div",{className:"flex justify-between",children:[u.jsxs("span",{className:"text-gray-500",children:[e,n&&u.jsx("span",{className:"text-[10px] text-gray-400 ml-1",children:n})]}),u.jsx("span",{className:r?"text-amber-600":a?"text-leaf":"font-medium",children:t})]})}const mW={PAID:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",CONFIRMED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",DELIVERED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",COMPLETED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",APPROVED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",PUBLISHED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",ACTIVE:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",RESOLVED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",SHIPPED:"bg-sky-500/15 text-sky-400 border-sky-500/30",PREPARING:"bg-sky-500/15 text-sky-400 border-sky-500/30",REQUESTED:"bg-sky-500/15 text-sky-400 border-sky-500/30",IN_PROGRESS:"bg-sky-500/15 text-sky-400 border-sky-500/30",PENDING:"bg-amber-500/15 text-amber-400 border-amber-500/30",PAUSED:"bg-amber-500/15 text-amber-400 border-amber-500/30",OPEN:"bg-amber-500/15 text-amber-400 border-amber-500/30",DRAFT:"bg-slate-500/15 text-slate-400 border-slate-500/30",ENDED:"bg-slate-600/20 text-slate-400 border-slate-600/30",CANCELLED:"bg-slate-600/20 text-slate-400 border-slate-600/30",REJECTED:"bg-rose-500/15 text-rose-400 border-rose-500/30",REFUNDED:"bg-rose-500/15 text-rose-400 border-rose-500/30",FAILED:"bg-rose-500/15 text-rose-400 border-rose-500/30",BASIC:"bg-slate-500/15 text-slate-300 border-slate-500/30",SILVER:"bg-slate-300/20 text-slate-200 border-slate-300/30",GOLD:"bg-amber-400/15 text-amber-300 border-amber-400/30",VIP:"bg-violet-500/15 text-violet-300 border-violet-500/30"},yW={PENDING:"Pending",PAID:"Paid",PREPARING:"Preparing",SHIPPED:"Out for Delivery",DELIVERED:"Delivered",CONFIRMED:"Confirmed",CANCELLED:"Cancelled",REFUNDED:"Refunded",ACTIVE:"Active",PAUSED:"Paused",REQUESTED:"Requested",APPROVED:"Approved",REJECTED:"Rejected",COMPLETED:"Completed",PUBLISHED:"Published",DRAFT:"Draft",ENDED:"Ended",OPEN:"Open",IN_PROGRESS:"Processing",RESOLVED:"Resolved"};function Ur({status:e}){if(!e)return null;const t=mW[e]||"bg-slate-500/15 text-slate-400 border-slate-500/30";return u.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs font-medium border ${t}`,children:yW[e]||e})}const vT=[["WEEKLY","Weekly"],["BIWEEKLY","Every 2 Weeks"],["MONTHLY","Monthly"]];function gW(){const e=nn(),t=Kt(),{custToken:n,storeId:r}=bn(),[a,i]=A.useState("WEEKLY"),[s,o]=A.useState(0),[l,c]=A.useState(!1),{data:f}=se({queryKey:["subs"],queryFn:HY,enabled:!!n}),{data:d}=se({queryKey:["stores"],queryFn:()=>So(!0)}),{data:h}=se({queryKey:["sub-prods"],queryFn:()=>Ql({size:12,sort:"sales"})}),p=(h==null?void 0:h.items)||[],m=async()=>{var x;if(!n){t("/account");return}const y=r||((x=d==null?void 0:d[0])==null?void 0:x.id),v=p.find(w=>w.id===s)||p[0];v&&(await qY({storeId:y,productId:v.id,sizeCode:"ORIGINAL",frequency:a,receiverName:"",receiverPhone:"",address:"",deliveryZip:"",price:v.price}).catch(()=>{}),c(!1),e.invalidateQueries({queryKey:["subs"]}))},g=async(y,v)=>{await mT(y,v==="ACTIVE"?"PAUSED":"ACTIVE").catch(()=>{}),e.invalidateQueries({queryKey:["subs"]})},b=async y=>{await mT(y,"CANCELLED").catch(()=>{}),e.invalidateQueries({queryKey:["subs"]})};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Qy,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"Flower Subscription"})]}),u.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Get fresh flowers delivered weekly, every two weeks, or monthly."}),!n&&u.jsxs("div",{className:"bg-petal rounded-2xl p-6 text-center text-sm text-gray-600 mb-6",children:["Please log in to start a subscription. ",u.jsx(Le,{to:"/account",className:"text-bloom font-semibold",children:"Log In →"})]}),u.jsx("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 mb-6",children:l?u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"Delivery Frequency"}),u.jsx("div",{className:"flex gap-2",children:vT.map(([y,v])=>u.jsx("button",{onClick:()=>i(y),className:`px-4 py-2 rounded-full text-sm border ${a===y?"bg-bloom text-white border-bloom":"border-blush-100"}`,children:v},y))})]}),u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"Choose a Product"}),u.jsxs("select",{value:s,onChange:y=>o(Number(y.target.value)),className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:[u.jsx("option",{value:0,children:"Best Seller (Recommended)"}),p.map(y=>u.jsxs("option",{value:y.id,children:[y.name," — ",Ee(y.price)]},y.id))]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{onClick:m,className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Start Subscription"}),u.jsx("button",{onClick:()=>c(!1),className:"border border-blush-100 px-6 py-2.5 rounded-full text-gray-600",children:"Cancel"})]})]}):u.jsx("button",{onClick:()=>n?c(!0):t("/account"),className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Start a New Subscription"})}),u.jsx("h2",{className:"font-serif text-lg font-bold mb-3",children:"My Subscriptions"}),u.jsxs("div",{className:"space-y-3",children:[(f||[]).map(y=>{var v;return u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex items-center gap-4",children:[u.jsx("div",{className:"w-14 h-14 bg-petal rounded-xl flex items-center justify-center",children:u.jsx(ft,{className:"text-bloom/40",size:26})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("div",{className:"font-medium text-sm",children:[y.productName||`상품 #${y.productId}`," · ",((v=vT.find(x=>x[0]===y.frequency))==null?void 0:v[1])||y.frequency]}),u.jsxs("div",{className:"text-xs text-gray-500",children:["다음 배송 ",y.nextDeliveryDate||"-"," · ",Ee(y.price)]})]}),u.jsx(Ur,{status:y.status}),y.status!=="CANCELLED"&&u.jsxs(u.Fragment,{children:[u.jsx("button",{onClick:()=>g(y.id,y.status),className:"text-xs text-bloom2 border border-blush-100 rounded-full px-3 py-1.5",children:y.status==="ACTIVE"?"일시정지":"재개"}),u.jsx("button",{onClick:()=>b(y.id),className:"text-xs text-blush-400 border border-blush-100 rounded-full px-3 py-1.5",children:"해지"})]})]},y.id)}),!(f||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-8 text-center",children:"아직 구독이 없습니다."})]})]})}function vW(){const{storeName:e}=bn(),{data:t}=se({queryKey:["daily-rec"],queryFn:()=>t5("daily","",8)}),{data:n}=se({queryKey:["daily-fresh"],queryFn:()=>Ql({sort:"rating",size:8})}),r=(t&&t.length?t:n==null?void 0:n.items)||[];return u.jsxs("div",{children:[u.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-sage-700 to-sage-800 text-white",children:[u.jsx(Kd,{count:12}),u.jsxs("div",{className:"relative z-10 max-w-6xl mx-auto px-4 py-16",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-200 text-[12px] tracking-[0.2em] uppercase mb-3",children:[u.jsx(ej,{size:15})," Fresh today, gone tomorrow"]}),u.jsx("h1",{className:"font-serif text-5xl font-bold mb-4",children:"Today's Designer Bouquet"}),u.jsxs("p",{className:"text-cream/85 max-w-xl leading-relaxed text-lg font-light",children:["Hand-designed each morning with the freshest stems in our cooler, then curated by ",u.jsx("b",{className:"font-medium",children:"GUARDiA AI"}),". Limited daily stock · ",e||"your nearest store"," same-day delivery."]})]})]}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-12",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(xr,{className:"text-blush-500",size:18}),u.jsx("h2",{className:"font-serif text-2xl font-bold text-blush-900",children:"Today's Picks"}),u.jsx("span",{className:"text-xs text-sage-600",children:"AI-curated"})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:r.map(a=>u.jsx(mm,{children:u.jsx(Zl,{p:a})},a.id))}),!r.length&&u.jsxs("div",{className:"text-center text-blush-300 py-20",children:[u.jsx(ft,{className:"mx-auto text-blush-200 mb-3",size:40}),"Today's bouquet is being designed. ",u.jsx(Le,{to:"/category",className:"text-blush-500",children:"Browse all flowers →"})]})]})]})}const bW={DISCOUNT:_K,POINT_BONUS:Mf,GIFT:mk,TIER_ONLY:Mf,SEASON:Df};function xW(){const{custToken:e}=bn(),t=Kt(),[n,r]=A.useState(""),{data:a}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!e}),i=(a==null?void 0:a.tier)||"",{data:s}=se({queryKey:["ongoing-events",i],queryFn:()=>TX(i)}),o=async l=>{var c,f;if(!e){t("/account");return}r("");try{const d=await NX(l);r(d!=null&&d.coupon?`참여 완료! 쿠폰 발급: ${d.coupon.name} (${d.coupon.code})`:"이벤트에 참여했습니다.")}catch(d){r(((f=(c=d==null?void 0:d.response)==null?void 0:c.data)==null?void 0:f.message)||"참여 자격이 없거나 이미 참여했습니다.")}};return u.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Df,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"이벤트 / 캠페인"})]}),i&&u.jsxs("p",{className:"text-sm text-gray-500 mb-2",children:["현재 등급 ",u.jsx("span",{className:"font-semibold text-bloom2",children:(a==null?void 0:a.tierName)||i})," · 등급 전용 이벤트가 함께 표시됩니다."]}),n&&u.jsx("div",{className:"bg-petal text-bloom2 text-sm rounded-xl px-4 py-2 mb-4",children:n}),u.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mt-4",children:[(s||[]).map(l=>{const c=bW[l.eventType]||Df,f=(l.banners||[])[0];return u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 overflow-hidden",children:[u.jsx("div",{className:"bg-gradient-to-r from-bloom2 to-bloom text-white p-5",children:f?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"font-serif text-lg font-bold",children:f.headline||l.title}),u.jsx("p",{className:"text-white/85 text-sm mt-1",children:f.subtext||l.description})]}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"font-serif text-lg font-bold",children:l.title}),u.jsx("p",{className:"text-white/85 text-sm mt-1",children:l.description})]})}),u.jsxs("div",{className:"p-4 flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[u.jsx(c,{size:16,className:"text-bloom"}),u.jsx("span",{children:l.eventType}),l.bonusPointRate>0&&u.jsxs("span",{className:"text-xs text-leaf",children:["+",l.bonusPointRate,"% 포인트"]}),l.targetTiers&&u.jsxs("span",{className:"text-xs bg-petal text-bloom2 px-2 py-0.5 rounded-full",children:[l.targetTiers," 전용"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ur,{status:l.status}),u.jsx("button",{onClick:()=>o(l.id),className:"bg-bloom text-white text-sm font-semibold px-4 py-2 rounded-full hover:bg-bloom2",children:"참여"})]})]}),u.jsxs("div",{className:"px-4 pb-3 text-[11px] text-gray-400",children:[l.startDate," ~ ",l.endDate]})]},l.id)}),!(s||[]).length&&u.jsx("div",{className:"col-span-2 text-center text-gray-400 py-16",children:"진행 중인 이벤트가 없습니다."})]})]})}function SW(){const{t:e}=ni(),t=nn(),n=Kt(),{custToken:r}=bn(),{data:a}=se({queryKey:["wishlist"],queryFn:nX,enabled:!!r});if(!r)return n("/account"),null;const i=a||[],s=async o=>{await aX(o).catch(()=>{}),t.invalidateQueries({queryKey:["wishlist"]})};return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(Rf,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:e("wishlist.title")})]}),i.length?u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:i.map(o=>u.jsxs("div",{className:"relative",children:[u.jsx(Zl,{p:{...o,id:o.productId||o.id}}),u.jsx("button",{onClick:()=>s(o.productId||o.id),className:"absolute top-2 right-2 bg-white/90 rounded-full p-1.5 text-bloom shadow",children:u.jsx(Rf,{size:16,fill:"currentColor"})})]},o.id||o.productId))}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:[e("wishlist.empty")," ",u.jsx(Le,{to:"/category",className:"text-bloom",children:e("wishlist.startShopping")})]})]})}const bT={BASIC:"from-slate-400 to-slate-500",SILVER:"from-slate-300 to-slate-400",GOLD:"from-amber-400 to-amber-500",VIP:"from-violet-500 to-fuchsia-500"};function wW(){const{custToken:e,setCustToken:t}=bn(),n=Kt(),{data:r}=se({queryKey:["member"],queryFn:JY,enabled:!!e}),{data:a}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!e}),{data:i}=se({queryKey:["point-history"],queryFn:()=>AX(20),enabled:!!e});if(!e)return n("/account"),null;const s=(a==null?void 0:a.tier)||"BASIC",o=a==null?void 0:a.nextTier,l=()=>{t(null),n("/home")};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center justify-between mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(wk,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"My Account"})]}),u.jsxs("button",{onClick:l,className:"flex items-center gap-1.5 text-sm text-gray-500 hover:text-bloom",children:[u.jsx(gk,{size:16})," Log Out"]})]}),u.jsxs("div",{className:`rounded-2xl bg-gradient-to-r ${bT[s]||bT.BASIC} text-white p-6 mb-5`,children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-xs uppercase tracking-widest text-white/70",children:"Membership Tier"}),u.jsxs("div",{className:"font-serif text-2xl font-bold flex items-center gap-2",children:[u.jsx(Mf,{size:24})," ",(a==null?void 0:a.tierName)||s]}),u.jsxs("div",{className:"text-sm text-white/85 mt-1",children:["Spent in last 12 months ",Ee(a==null?void 0:a.spend12m)," · ",(a==null?void 0:a.orderCount12m)||0," orders"]})]}),u.jsxs("div",{className:"text-right",children:[u.jsx("div",{className:"text-xs text-white/70",children:"Points Balance"}),u.jsxs("div",{className:"text-3xl font-bold",children:[((a==null?void 0:a.pointBalance)||0).toLocaleString(),u.jsx("span",{className:"text-base",children:"P"})]})]})]}),o&&!o.isTop&&u.jsxs("div",{className:"mt-4 text-xs text-white/85 bg-white/15 rounded-lg px-3 py-2",children:["Spend ",Ee(o.spendNeeded)," more or place ",o.ordersNeeded," more orders to reach ",u.jsx("b",{children:o.nextTierName}),"."]})]}),(a==null?void 0:a.benefit)&&u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 mb-5",children:[u.jsxs("div",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[u.jsx(mk,{size:16,className:"text-bloom"})," My Tier Benefits"]}),u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 text-sm",children:[u.jsx(_h,{label:"Discount",value:`${a.benefit.discountRate}%`}),u.jsx(_h,{label:"Earn Rate",value:`${a.benefit.pointEarnRate}%`}),u.jsx(_h,{label:"Free Shipping",value:a.benefit.freeShipThreshold===0?"Always":a.benefit.freeShipThreshold?Ee(a.benefit.freeShipThreshold)+"+":"None"}),u.jsx(_h,{label:"Priority Slot",value:a.benefit.prioritySlot?"Included":"–"})]})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-6",children:[u.jsx(cb,{to:"/orders",icon:vk,label:"Order History"}),u.jsx(cb,{to:"/wishlist",icon:Rf,label:"Wishlist"}),u.jsx(cb,{to:"/subscription",icon:Qy,label:"Manage Subscription"})]}),u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[u.jsx(uk,{size:16,className:"text-bloom"})," Points Earned / Used History"]}),u.jsxs("div",{className:"divide-y divide-blush-100/60",children:[(i||[]).map(c=>u.jsxs("div",{className:"flex items-center justify-between py-2 text-sm",children:[u.jsxs("div",{children:[u.jsx("span",{className:"text-gray-700",children:c.reason||c.entryType}),c.orderNo&&u.jsx("span",{className:"text-xs text-gray-400 ml-2",children:c.orderNo}),u.jsx("div",{className:"text-[11px] text-gray-400",children:(c.createdAt||"").slice(0,10)})]}),u.jsxs("span",{className:c.points>=0?"text-leaf font-semibold":"text-blush-500 font-semibold",children:[c.points>=0?"+":"",c.points,"P"]})]},c.id)),!(i||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-6 text-center",children:"No points history yet."})]})]}),(r==null?void 0:r.username)&&u.jsx("div",{className:"text-center text-xs text-gray-400 mt-6",children:r.displayName||r.username})]})}function _h({label:e,value:t}){return u.jsxs("div",{className:"bg-petal rounded-xl p-3 text-center",children:[u.jsx("div",{className:"text-[11px] text-gray-500",children:e}),u.jsx("div",{className:"font-bold text-bloom2",children:t})]})}function cb({to:e,icon:t,label:n}){return u.jsxs(Le,{to:e,className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex flex-col items-center gap-1.5 hover:border-bloom",children:[u.jsx(t,{size:22,className:"text-bloom"}),u.jsx("span",{className:"text-sm",children:n})]})}function jW(){const e=nn(),t=Kt(),{custToken:n}=bn(),{data:r}=se({queryKey:["my-orders"],queryFn:()=>BY(""),enabled:!!n});if(!n)return t("/account"),null;const a=r||[],i=async(s,o)=>{await Qk(s,o).catch(()=>{}),e.invalidateQueries({queryKey:["my-orders"]})};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(vk,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"주문 내역"})]}),a.length?u.jsx("div",{className:"space-y-3",children:a.map(s=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("div",{className:"font-semibold text-sm",children:s.orderNo||`주문 #${s.id}`}),u.jsx(Ur,{status:s.status})]}),u.jsxs("div",{className:"text-xs text-gray-500 mb-3",children:[(s.createdAt||"").slice(0,16).replace("T"," ")," · ",s.fulfillmentType==="PICKUP"?"매장 픽업":"배송"," · ",s.scheduledDate," ",s.slotLabel]}),u.jsx("div",{className:"space-y-1.5",children:(s.items||[]).map(o=>u.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[u.jsx("div",{className:"w-9 h-9 bg-petal rounded-lg flex items-center justify-center",children:u.jsx(ft,{className:"text-bloom/40",size:16})}),u.jsxs("span",{className:"flex-1",children:[o.productName||`상품 #${o.productId}`," ",o.sizeCode&&`· ${o.sizeCode}`," ×",o.quantity]}),u.jsx("span",{className:"text-gray-600",children:Ee(o.price||o.unitPrice)})]},o.id))}),u.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-blush-100/60",children:[u.jsx("span",{className:"font-bold text-bloom2",children:Ee(s.payAmount??s.totalAmount)}),u.jsxs("div",{className:"flex gap-2",children:[s.status==="DELIVERED"&&u.jsx("button",{onClick:()=>i(s.id,"CONFIRMED"),className:"text-xs bg-bloom text-white px-3 py-1.5 rounded-full",children:"구매확정"}),["PENDING","PAID"].includes(s.status)&&u.jsx("button",{onClick:()=>i(s.id,"CANCELLED"),className:"text-xs border border-blush-100 text-blush-400 px-3 py-1.5 rounded-full",children:"주문취소"})]})]})]},s.id))}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:["주문 내역이 없습니다. ",u.jsx(Le,{to:"/category",className:"text-bloom",children:"쇼핑하기 →"})]})]})}function AW(){const{productId:e}=o$(),t=Number(e),n=Kt(),{custToken:r}=bn(),[a,i]=A.useState(5),[s,o]=A.useState(""),[l,c]=A.useState(""),[f,d]=A.useState(""),[h,p]=A.useState("");if(!r)return n("/account"),null;const m=async g=>{g.preventDefault(),p("");try{await ZY({productId:t,rating:a,title:s,content:l,imageUrl:f}),p("리뷰가 등록되었습니다."),setTimeout(()=>n(`/product/${t}`),800)}catch{p("등록에 실패했습니다. (구매 이력이 필요할 수 있습니다)")}};return u.jsxs("div",{className:"max-w-lg mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(OK,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"리뷰 작성"})]}),u.jsxs("form",{onSubmit:m,className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"별점"}),u.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(g=>u.jsx("button",{type:"button",onClick:()=>i(g),className:"text-amber-400",children:u.jsx(Wa,{size:28,fill:g<=a?"currentColor":"none"})},g))})]}),u.jsx("input",{value:s,onChange:g=>o(g.target.value),placeholder:"제목",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("textarea",{value:l,onChange:g=>c(g.target.value),rows:5,required:!0,placeholder:"상품은 어떠셨나요? 신선도, 배송, 디자인 등을 적어주세요.",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:f,onChange:g=>d(g.target.value),placeholder:"사진 URL (선택)",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),h&&u.jsx("div",{className:"text-sm text-leaf",children:h}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{className:"flex-1 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2",children:"등록"}),u.jsx("button",{type:"button",onClick:()=>n(-1),className:"px-6 border border-blush-100 rounded-full text-gray-600",children:"취소"})]})]})]})}function OW(){const[e,t]=A.useState("login"),[n,r]=A.useState(""),[a,i]=A.useState(""),[s,o]=A.useState(""),[l,c]=A.useState(""),[f,d]=A.useState(!1),{setCustToken:h}=bn(),p=Kt(),m=async g=>{var b,y;g.preventDefault(),c(""),d(!0);try{const x=(y=(b=(e==="login"?await Yk(n,a):await EY(n,a,s||n)).data)==null?void 0:b.data)==null?void 0:y.token;if(!x)throw new Error("no token");h(x),p("/home")}catch{c(e==="login"?"Login failed — check your username and password.":"Sign-up failed — that username may already be taken.")}finally{d(!1)}};return u.jsxs("div",{className:"relative min-h-screen bg-gradient-to-br from-blush-100 via-cream to-sage-100 flex items-center justify-center px-4 overflow-hidden",children:[u.jsx(Kd,{count:12}),u.jsxs(Nt.form,{onSubmit:m,initial:{opacity:0,y:22},animate:{opacity:1,y:0},transition:{duration:.7,ease:[.22,1,.36,1]},className:"relative z-10 w-full max-w-sm bg-white/90 backdrop-blur rounded-4xl shadow-bloom p-8 border border-blush-100",children:[u.jsxs(Le,{to:"/home",className:"flex flex-col items-center gap-1 mb-6",children:[u.jsx(ft,{className:"text-blush-500",size:32}),u.jsx("span",{className:"font-serif text-xl font-bold text-blush-900",children:"Montvale Florist"})]}),u.jsx("div",{className:"flex gap-2 mb-6 bg-blush-50 rounded-full p-1 text-sm",children:["login","register"].map(g=>u.jsx("button",{type:"button",onClick:()=>{t(g),c("")},className:`flex-1 py-2 rounded-full font-medium transition-colors ${e===g?"bg-blush-500 text-white shadow-petal":"text-blush-700"}`,children:g==="login"?"Sign In":"Create Account"},g))}),u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Username"}),u.jsx("input",{value:n,onChange:g=>r(g.target.value),required:!0,className:"w-full mb-3 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"}),e==="register"&&u.jsxs(u.Fragment,{children:[u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Name"}),u.jsx("input",{value:s,onChange:g=>o(g.target.value),className:"w-full mb-3 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"})]}),u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Password"}),u.jsx("input",{type:"password",value:a,onChange:g=>i(g.target.value),required:!0,className:"w-full mb-4 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"}),l&&u.jsx("p",{className:"text-blush-500 text-xs mb-3",children:l}),u.jsx(Ua,{type:"submit",disabled:f,className:"w-full py-2.5 rounded-full bg-blush-500 text-white font-semibold hover:bg-blush-600 disabled:opacity-60",children:f?"Please wait…":e==="login"?"Sign In":"Create Account"}),u.jsxs("p",{className:"text-center text-[11px] text-[#a08a90] mt-4",children:["Store & owner staff → ",u.jsx("a",{href:"/admin/login",className:"text-blush-600",children:"Admin Console"})]}),u.jsx("p",{className:"text-center text-[11px] text-sage-600 mt-2",children:ke.tagline})]})]})}const EW=["DELIVERY","PRODUCT","PAYMENT","REFUND","OTHER"];function TW(){const e=nn(),t=Kt(),{custToken:n}=bn(),[r,a]=A.useState("DELIVERY"),[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(""),[d,h]=A.useState(""),[p,m]=A.useState("Birthday"),[g,b]=A.useState("Warm"),[y,v]=A.useState(""),[x,w]=A.useState([]),{data:S}=se({queryKey:["cs"],queryFn:eX,enabled:!!n}),j=async E=>{if(E.preventDefault(),h(""),!n){t("/account");return}try{const T=await tX({orderNo:i,category:r,subject:o,content:c});h(T!=null&&T.aiReply?`AI auto-reply: ${T.aiReply}`:"Your request has been submitted."),l(""),f(""),e.invalidateQueries({queryKey:["cs"]})}catch{h("Failed to submit your request.")}},O=async()=>{const E=await uX(p,g,y).catch(()=>null);w((E==null?void 0:E.messages)||[])};return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(jK,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"Customer Support (1:1)"})]}),u.jsxs("div",{className:"bg-petal rounded-2xl p-5 mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2 text-bloom2 font-medium text-sm mb-3",children:[u.jsx(xr,{size:16})," AI Card Message Helper"]}),u.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[u.jsx("input",{value:p,onChange:E=>m(E.target.value),placeholder:"Occasion (e.g. Birthday)",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"}),u.jsx("input",{value:g,onChange:E=>b(E.target.value),placeholder:"Tone",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"}),u.jsx("input",{value:y,onChange:E=>v(E.target.value),placeholder:"Recipient",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"})]}),u.jsx("button",{onClick:O,className:"bg-bloom text-white text-sm font-semibold px-4 py-2 rounded-full",children:"Suggest Messages"}),!!x.length&&u.jsx("ul",{className:"mt-3 space-y-2",children:x.map((E,T)=>u.jsx("li",{className:"bg-white rounded-lg px-3 py-2 text-sm text-gray-700",children:E},T))})]}),u.jsxs("form",{onSubmit:j,className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3 mb-8",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx("select",{value:r,onChange:E=>a(E.target.value),className:"px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:EW.map(E=>u.jsx("option",{value:E,children:E},E))}),u.jsx("input",{value:i,onChange:E=>s(E.target.value),placeholder:"Order number (optional)",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsx("input",{value:o,onChange:E=>l(E.target.value),required:!0,placeholder:"Subject",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("textarea",{value:c,onChange:E=>f(E.target.value),rows:4,required:!0,placeholder:"Tell us how we can help. Our AI will try to answer first.",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),d&&u.jsx("div",{className:"text-sm text-leaf bg-leaf/10 rounded-lg px-3 py-2",children:d}),u.jsxs("button",{className:"flex items-center gap-1.5 bg-bloom text-white font-semibold px-6 py-2.5 rounded-full hover:bg-bloom2",children:[u.jsx(NK,{size:16})," Submit Request"]}),!n&&u.jsxs("p",{className:"text-xs text-gray-400",children:["Please log in to submit a request. ",u.jsx(Le,{to:"/account",className:"text-bloom",children:"Log In"})]})]}),u.jsx("h2",{className:"font-serif text-lg font-bold mb-3",children:"My Requests"}),u.jsxs("div",{className:"space-y-2",children:[(S||[]).map(E=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"font-medium text-sm",children:E.subject}),u.jsx(Ur,{status:E.status})]}),u.jsx("p",{className:"text-sm text-gray-600 mt-1",children:E.content}),E.aiReply&&u.jsxs("div",{className:"mt-2 text-xs text-bloom2 bg-petal rounded-lg px-3 py-2",children:[u.jsx("b",{children:"AI Reply:"})," ",E.aiReply]}),E.itsmSrId&&u.jsxs("div",{className:"text-[11px] text-gray-400 mt-1",children:["ITSM SR: ",E.itsmSrId]})]},E.id)),!(S||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-6 text-center",children:"No requests submitted yet."})]})]})}const o5="https://itsm.zioinfo.co.kr",ub=e=>e==null?void 0:e.replace(/https?:\/\/zioinfo\.co\.kr:8443/g,o5);function NW(){const[e,t]=A.useState(null),[n,r]=A.useState(!0),[a,i]=A.useState(""),[s,o]=A.useState(!1),l=()=>{r(!0),i(""),fetch(`${o5}/api/app/public-latest`).then(f=>f.json()).then(f=>t({...f,qr_url:ub(f.qr_url),landing_url:ub(f.landing_url),download_url:ub(f.download_url)})).catch(()=>i("Unable to connect to the app store. Please try again in a moment.")).finally(()=>r(!1))};A.useEffect(()=>{l()},[]);const c=async()=>{if(e!=null&&e.landing_url)try{await navigator.clipboard.writeText(e.landing_url),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-10",children:[u.jsxs("div",{className:"text-center mb-8",children:[u.jsxs("div",{className:"flex items-center gap-2 justify-center mb-2",children:[u.jsx(bl,{className:"text-bloom",size:26}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-bloom2",children:"Order with the App"})]}),u.jsxs("p",{className:"text-sm text-gray-500",children:["Scan the QR code to open the ",u.jsx("span",{className:"text-bloom font-semibold",children:"GUARDiA Mall"})," customer app install page.",u.jsx("br",{}),"Enjoy same-day delivery alerts, easy reordering, and subscription management right in the app."]})]}),n&&u.jsx("div",{className:"text-center text-gray-400 py-10",children:"Loading…"}),a&&u.jsx("div",{className:"bg-petal border border-blush-100 rounded-2xl p-6 text-center text-blush-500 text-sm",children:a}),!n&&!a&&e&&!e.has_version&&u.jsxs("div",{className:"bg-white border border-blush-100/60 rounded-2xl p-10 text-center text-gray-400",children:[u.jsx(ft,{size:40,className:"mx-auto mb-3 text-bloom/30"}),"No app version has been published yet.",u.jsx("br",{}),u.jsx("span",{className:"text-xs",children:"App uploads and version management are handled in GUARDiA Manager."})]}),!n&&!a&&(e==null?void 0:e.has_version)&&u.jsxs("div",{className:"bg-white border border-blush-100/60 rounded-2xl p-6 grid md:grid-cols-[200px_1fr] gap-6 items-start shadow-sm",children:[u.jsx("div",{className:"bg-petal rounded-2xl p-3 flex items-center justify-center",children:e.qr_url?u.jsx("img",{src:e.qr_url,alt:"App install QR code",className:"w-44 h-44"}):u.jsx(bl,{size:64,className:"text-bloom/40"})}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[u.jsx("span",{className:"text-lg font-bold",children:e.app_name||"GUARDiA Mall"}),u.jsxs("span",{className:"px-2 py-0.5 rounded-md bg-bloom text-white text-xs font-semibold",children:["v",e.version]})]}),u.jsxs("div",{className:"text-xs text-gray-500 mb-4",children:[e.platform," ",e.file_size_mb?`· ${e.file_size_mb}MB`:"",e.download_count!=null&&` · ${e.download_count} downloads`]}),e.release_notes&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-[11px] font-semibold text-gray-400 uppercase tracking-wider mb-1",children:"What's New"}),u.jsx("div",{className:"text-sm text-gray-600 whitespace-pre-line bg-petal rounded-lg p-3 max-h-32 overflow-auto",children:e.release_notes})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.landing_url&&u.jsxs("a",{href:e.landing_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-4 py-2 rounded-full bg-bloom text-white text-sm font-semibold hover:bg-bloom2",children:[u.jsx(hk,{size:15})," Install Page"]}),e.download_url&&u.jsxs("a",{href:e.download_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-4 py-2 rounded-full border border-blush-100 text-bloom2 text-sm hover:bg-petal",children:[u.jsx(dk,{size:15})," Download APK"]}),u.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 px-4 py-2 rounded-full border border-blush-100 text-bloom2 text-sm hover:bg-petal",children:[s?u.jsx(lk,{size:15,className:"text-leaf"}):u.jsx(fk,{size:15}),s?"Copied":"Copy Link"]}),u.jsx("button",{onClick:l,className:"flex items-center gap-1.5 px-3 py-2 rounded-full border border-blush-100 text-gray-500 text-sm hover:bg-petal",children:u.jsx(nj,{size:15})})]})]})]})]})}function CW(){const{t:e}=ni(),[t,n]=A.useState("admin"),[r,a]=A.useState(""),[i,s]=A.useState(""),o=Kt();A.useEffect(()=>(document.documentElement.classList.add("admin-shell"),()=>document.documentElement.classList.remove("admin-shell")),[]);const l=async c=>{var f,d;c.preventDefault(),s("");try{const p=(d=(f=(await Yk(t,r)).data)==null?void 0:f.data)==null?void 0:d.token;if(!p)throw new Error("no token");localStorage.setItem("mall_admin_token",p);const m=await Xk().catch(()=>null);if(m!=null&&m.role&&localStorage.setItem("mall_role",m.role),m!=null&&m.username&&localStorage.setItem("mall_admin_user",m.username),(m==null?void 0:m.role)==="USER"){s(e("admin.login.errNoPriv")),localStorage.removeItem("mall_admin_token");return}o("/admin/dashboard")}catch{s(e("admin.login.errFailed"))}};return u.jsxs("div",{className:"admin-shell min-h-screen flex items-center justify-center bg-ink text-[#e6edf6]",children:[u.jsx("div",{className:"absolute top-5 right-5",children:u.jsx(ag,{variant:"admin"})}),u.jsxs("form",{onSubmit:l,className:"w-[360px] bg-panel border border-edge rounded-2xl p-8",children:[u.jsxs("div",{className:"flex items-center gap-2 justify-center mb-6",children:[u.jsx(ft,{className:"text-brand",size:28}),u.jsx("span",{className:"text-xl font-bold",children:e("admin.login.title")})]}),u.jsx("p",{className:"text-center text-sm text-slate-400 mb-6",children:e("admin.login.subtitle")}),u.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e("admin.login.username")}),u.jsx("input",{value:t,onChange:c=>n(c.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),u.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e("admin.login.password")}),u.jsx("input",{type:"password",value:r,onChange:c=>a(c.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),i&&u.jsx("p",{className:"text-rose-400 text-xs mb-3",children:i}),u.jsx("button",{className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90",children:e("admin.login.signIn")}),u.jsxs("p",{className:"text-center text-[11px] text-slate-500 mt-4",children:[e("admin.login.storefrontHere")," ",u.jsx("a",{href:"/",className:"text-brand",children:e("admin.login.here")})]})]})]})}const _W=[{to:"/admin/dashboard",key:"dashboard",icon:AK,roles:["ADMIN","MANAGER"]},{to:"/admin/stores",key:"stores",icon:Bd,roles:["ADMIN","MANAGER"]},{to:"/admin/products",key:"products",icon:ft,roles:["ADMIN","MANAGER"]},{to:"/admin/inventory",key:"inventory",icon:sk,roles:["ADMIN","MANAGER"]},{to:"/admin/orders",key:"orders",icon:ij,roles:["ADMIN","MANAGER"]},{to:"/admin/transfers",key:"transfers",icon:ik,roles:["ADMIN","MANAGER"]},{to:"/admin/members",key:"members",icon:jk,roles:["ADMIN","MANAGER"]},{to:"/admin/loyalty",key:"loyalty",icon:Mf,roles:["ADMIN","MANAGER"]},{to:"/admin/events",key:"events",icon:Df,roles:["ADMIN","MANAGER"]},{to:"/admin/subscriptions",key:"subscriptions",icon:Qy,roles:["ADMIN","MANAGER"]},{to:"/admin/schedule",key:"schedule",icon:ok,roles:["ADMIN","MANAGER"]},{to:"/admin/analytics",key:"analytics",icon:Jw,roles:["ADMIN","MANAGER"]}],PW=[{to:"/admin/users",key:"users",icon:Sk,roles:["ADMIN"]},{to:"/admin/audit",key:"audit",icon:bk,roles:["ADMIN","MANAGER"]},{to:"/admin/settings",key:"settings",icon:xk,roles:["ADMIN"]},{to:"/admin/app",key:"appInstall",icon:bl,roles:["ADMIN","MANAGER"]}],xT=({isActive:e})=>`flex items-center gap-3 px-5 py-2.5 text-sm transition-colors ${e?"bg-card text-brand border-r-2 border-brand":"text-slate-300 hover:bg-card/60"}`;function MW(){const{t:e}=ni(),t=localStorage.getItem("mall_admin_token"),[n,r]=A.useState(()=>localStorage.getItem("mall_role")||""),[a,i]=A.useState(()=>localStorage.getItem("mall_admin_user")||""),s=Kt();if(A.useEffect(()=>(document.documentElement.classList.add("admin-shell"),()=>document.documentElement.classList.remove("admin-shell")),[]),A.useEffect(()=>{t&&Xk().then(f=>{f!=null&&f.role&&(localStorage.setItem("mall_role",f.role),r(f.role)),f!=null&&f.username&&(localStorage.setItem("mall_admin_user",f.username),i(f.username))}).catch(()=>{})},[t]),!t)return u.jsx(em,{to:"/admin/login",replace:!0});if(n&&n==="USER")return u.jsx(em,{to:"/admin/login",replace:!0});const o=_W.filter(f=>!n||f.roles.includes(n)),l=PW.filter(f=>f.roles.includes(n)),c=()=>{localStorage.removeItem("mall_admin_token"),localStorage.removeItem("mall_role"),localStorage.removeItem("mall_admin_user"),s("/admin/login")};return u.jsxs("div",{className:"admin-shell flex h-screen bg-ink text-[#e6edf6]",children:[u.jsxs("aside",{className:"w-60 bg-panel border-r border-edge flex flex-col",children:[u.jsxs("div",{className:"h-16 flex items-center gap-2 px-5 border-b border-edge",children:[u.jsx(ft,{className:"text-brand",size:22}),u.jsxs("div",{children:[u.jsx("div",{className:"font-bold text-base leading-tight",children:"GUARDiA Mall"}),u.jsx("div",{className:"text-[11px] text-slate-400",children:e("admin.console")})]})]}),u.jsxs("nav",{className:"flex-1 py-2 overflow-auto",children:[o.map(({to:f,key:d,icon:h})=>u.jsxs(tx,{to:f,className:xT,children:[u.jsx(h,{size:18}),e(`admin.nav.${d}`)]},f)),l.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"px-5 pt-4 pb-1.5 text-[10px] font-semibold tracking-wider text-slate-500 uppercase border-t border-edge mt-3",children:e("admin.system")}),l.map(({to:f,key:d,icon:h})=>u.jsxs(tx,{to:f,className:xT,children:[u.jsx(h,{size:18}),e(`admin.nav.${d}`)]},f))]})]}),u.jsx("div",{className:"p-4 text-[11px] text-slate-500 border-t border-edge",children:e("admin.onPremiseTag")})]}),u.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[u.jsxs("header",{className:"h-16 bg-panel border-b border-edge flex items-center justify-between px-6",children:[u.jsx("div",{className:"text-sm text-slate-400 truncate",children:e("admin.header")}),u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(ag,{variant:"admin"}),u.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-slate-300",children:[u.jsx(bK,{size:18})," ",a||"admin"," ",u.jsx("span",{className:"text-[10px] text-brand",children:n})]}),u.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 text-sm text-slate-400 hover:text-brand",children:[u.jsx(gk,{size:16})," ",e("admin.signOut")]})]})]}),u.jsx("main",{className:"flex-1 overflow-auto p-6",children:u.jsx(f$,{})})]})]})}function l5(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t-1}var PZ=_Z,MZ=sg;function RZ(e,t){var n=this.__data__,r=MZ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var DZ=RZ,$Z=gZ,kZ=OZ,LZ=NZ,zZ=PZ,IZ=DZ;function Vc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Ns=function(t){return oo(t)&&t.indexOf("%")===t.length-1},K=function(t){return iee(t)&&!qc(t)},cee=function(t){return me(t)},$t=function(t){return K(t)||oo(t)},uee=0,jo=function(t){var n=++uee;return"".concat(t||"").concat(n)},pn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!K(t)&&!oo(t))return r;var i;if(Ns(t)){var s=t.indexOf("%");i=n*parseFloat(t.slice(0,s))/100}else i=+t;return qc(i)&&(i=r),a&&i>n&&(i=n),i},xi=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},fee=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Cx(e){"@babel/helpers - typeof";return Cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cx(e)}var MT={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Fa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},RT=null,hb=null,Ej=function e(t){if(t===RT&&Array.isArray(hb))return hb;var n=[];return A.Children.forEach(t,function(r){me(r)||(eee.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),hb=n,RT=t,n};function Wn(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Fa(a)}):r=[Fa(t)],Ej(e).forEach(function(a){var i=Xn(a,"type.displayName")||Xn(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function Ln(e,t){var n=Wn(e,t);return n&&n[0]}var DT=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!K(r)||r<=0||!K(a)||a<=0)},bee=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],xee=function(t){return t&&t.type&&oo(t.type)&&bee.indexOf(t.type)>=0},S5=function(t){return t&&Cx(t)==="object"&&"clipDot"in t},See=function(t,n,r,a){var i,s=(i=db==null?void 0:db[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!de(t)&&(a&&s.includes(n)||pee.includes(n))||r&&Oj.includes(n)},ie=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(A.isValidElement(t)&&(a=t.props),!Uc(a))return null;var i={};return Object.keys(a).forEach(function(s){var o;See((o=a)===null||o===void 0?void 0:o[s],s,n,r)&&(i[s]=a[s])}),i},_x=function e(t,n){if(t===n)return!0;var r=A.Children.count(t);if(r!==A.Children.count(n))return!1;if(r===0)return!0;if(r===1)return $T(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Eee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mx(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,s=e.style,o=e.title,l=e.desc,c=Oee(e,Aee),f=a||{width:n,height:r,x:0,y:0},d=ve("recharts-surface",i);return _.createElement("svg",Px({},ie(c,!0,"svg"),{className:d,width:n,height:r,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),_.createElement("title",null,o),_.createElement("desc",null,l),t)}var Tee=["children","className"];function Rx(){return Rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ae=_.forwardRef(function(e,t){var n=e.children,r=e.className,a=Nee(e,Tee),i=ve("recharts-layer",r);return _.createElement("g",Rx({className:i},ie(a,!0),{ref:t}),n)}),kr=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;ia?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r=r?e:Mee(e,t,n)}var Dee=Ree,$ee="\\ud800-\\udfff",kee="\\u0300-\\u036f",Lee="\\ufe20-\\ufe2f",zee="\\u20d0-\\u20ff",Iee=kee+Lee+zee,Bee="\\ufe0e\\ufe0f",Uee="\\u200d",Fee=RegExp("["+Uee+$ee+Iee+Bee+"]");function Vee(e){return Fee.test(e)}var w5=Vee;function Hee(e){return e.split("")}var qee=Hee,j5="\\ud800-\\udfff",Kee="\\u0300-\\u036f",Gee="\\ufe20-\\ufe2f",Yee="\\u20d0-\\u20ff",Xee=Kee+Gee+Yee,Wee="\\ufe0e\\ufe0f",Qee="["+j5+"]",Dx="["+Xee+"]",$x="\\ud83c[\\udffb-\\udfff]",Zee="(?:"+Dx+"|"+$x+")",A5="[^"+j5+"]",O5="(?:\\ud83c[\\udde6-\\uddff]){2}",E5="[\\ud800-\\udbff][\\udc00-\\udfff]",Jee="\\u200d",T5=Zee+"?",N5="["+Wee+"]?",ete="(?:"+Jee+"(?:"+[A5,O5,E5].join("|")+")"+N5+T5+")*",tte=N5+T5+ete,nte="(?:"+[A5+Dx+"?",Dx,O5,E5,Qee].join("|")+")",rte=RegExp($x+"(?="+$x+")|"+nte+tte,"g");function ate(e){return e.match(rte)||[]}var ite=ate,ste=qee,ote=w5,lte=ite;function cte(e){return ote(e)?lte(e):ste(e)}var ute=cte,fte=Dee,dte=w5,hte=ute,pte=m5;function mte(e){return function(t){t=pte(t);var n=dte(t)?hte(t):void 0,r=n?n[0]:t.charAt(0),a=n?fte(n,1).join(""):t.slice(1);return r[e]()+a}}var yte=mte,gte=yte,vte=gte("toUpperCase"),bte=vte;const xg=Ie(bte);function Qe(e){return function(){return e}}const C5=Math.cos,vm=Math.sin,Fr=Math.sqrt,bm=Math.PI,Sg=2*bm,kx=Math.PI,Lx=2*kx,xs=1e-6,xte=Lx-xs;function _5(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return _5;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;axs)if(!(Math.abs(d*l-c*f)>xs)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-s,m=a-o,g=l*l+c*c,b=p*p+m*m,y=Math.sqrt(g),v=Math.sqrt(h),x=i*Math.tan((kx-Math.acos((g+h-b)/(2*y*v)))/2),w=x/v,S=x/y;Math.abs(w-1)>xs&&this._append`L${t+w*f},${n+w*d}`,this._append`A${i},${i},0,0,${+(d*p>f*m)},${this._x1=t+S*l},${this._y1=n+S*c}`}}arc(t,n,r,a,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(a),l=r*Math.sin(a),c=t+o,f=n+l,d=1^s,h=s?a-i:i-a;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>xs||Math.abs(this._y1-f)>xs)&&this._append`L${c},${f}`,r&&(h<0&&(h=h%Lx+Lx),h>xte?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=f}`:h>xs&&this._append`A${r},${r},0,${+(h>=kx)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function Tj(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new wte(t)}function Nj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function P5(e){this._context=e}P5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function wg(e){return new P5(e)}function M5(e){return e[0]}function R5(e){return e[1]}function D5(e,t){var n=Qe(!0),r=null,a=wg,i=null,s=Tj(o);e=typeof e=="function"?e:e===void 0?M5:Qe(e),t=typeof t=="function"?t:t===void 0?R5:Qe(t);function o(l){var c,f=(l=Nj(l)).length,d,h=!1,p;for(r==null&&(i=a(p=s())),c=0;c<=f;++c)!(c=p;--m)o.point(x[m],w[m]);o.lineEnd(),o.areaEnd()}y&&(x[h]=+e(b,h,d),w[h]=+t(b,h,d),o.point(r?+r(b,h,d):x[h],n?+n(b,h,d):w[h]))}if(v)return o=null,v+""||null}function f(){return D5().defined(a).curve(s).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Qe(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Qe(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Qe(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:Qe(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Qe(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Qe(+d),c):n},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(n)},c.lineX1=function(){return f().x(r).y(t)},c.defined=function(d){return arguments.length?(a=typeof d=="function"?d:Qe(!!d),c):a},c.curve=function(d){return arguments.length?(s=d,i!=null&&(o=s(i)),c):s},c.context=function(d){return arguments.length?(d==null?i=o=null:o=s(i=d),c):i},c}class $5{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function jte(e){return new $5(e,!0)}function Ate(e){return new $5(e,!1)}const Cj={draw(e,t){const n=Fr(t/bm);e.moveTo(n,0),e.arc(0,0,n,0,Sg)}},Ote={draw(e,t){const n=Fr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},k5=Fr(1/3),Ete=k5*2,Tte={draw(e,t){const n=Fr(t/Ete),r=n*k5;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Nte={draw(e,t){const n=Fr(t),r=-n/2;e.rect(r,r,n,n)}},Cte=.8908130915292852,L5=vm(bm/10)/vm(7*bm/10),_te=vm(Sg/10)*L5,Pte=-C5(Sg/10)*L5,Mte={draw(e,t){const n=Fr(t*Cte),r=_te*n,a=Pte*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const s=Sg*i/5,o=C5(s),l=vm(s);e.lineTo(l*n,-o*n),e.lineTo(o*r-l*a,l*r+o*a)}e.closePath()}},pb=Fr(3),Rte={draw(e,t){const n=-Fr(t/(pb*3));e.moveTo(0,n*2),e.lineTo(-pb*n,-n),e.lineTo(pb*n,-n),e.closePath()}},nr=-.5,rr=Fr(3)/2,zx=1/Fr(12),Dte=(zx/2+1)*3,$te={draw(e,t){const n=Fr(t/Dte),r=n/2,a=n*zx,i=r,s=n*zx+n,o=-i,l=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(o,l),e.lineTo(nr*r-rr*a,rr*r+nr*a),e.lineTo(nr*i-rr*s,rr*i+nr*s),e.lineTo(nr*o-rr*l,rr*o+nr*l),e.lineTo(nr*r+rr*a,nr*a-rr*r),e.lineTo(nr*i+rr*s,nr*s-rr*i),e.lineTo(nr*o+rr*l,nr*l-rr*o),e.closePath()}};function kte(e,t){let n=null,r=Tj(a);e=typeof e=="function"?e:Qe(e||Cj),t=typeof t=="function"?t:Qe(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Qe(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Qe(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function xm(){}function Sm(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function z5(e){this._context=e}z5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Sm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lte(e){return new z5(e)}function I5(e){this._context=e}I5.prototype={areaStart:xm,areaEnd:xm,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zte(e){return new I5(e)}function B5(e){this._context=e}B5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ite(e){return new B5(e)}function U5(e){this._context=e}U5.prototype={areaStart:xm,areaEnd:xm,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Bte(e){return new U5(e)}function LT(e){return e<0?-1:1}function zT(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return(LT(i)+LT(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function IT(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function mb(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function wm(e){this._context=e}wm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mb(this,this._t0,IT(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,mb(this,IT(this,n=zT(this,e,t)),n);break;default:mb(this,this._t0,n=zT(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function F5(e){this._context=new V5(e)}(F5.prototype=Object.create(wm.prototype)).point=function(e,t){wm.prototype.point.call(this,t,e)};function V5(e){this._context=e}V5.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function Ute(e){return new wm(e)}function Fte(e){return new F5(e)}function H5(e){this._context=e}H5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=BT(e),a=BT(t),i=0,s=1;s=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Hte(e){return new jg(e,.5)}function qte(e){return new jg(e,0)}function Kte(e){return new jg(e,1)}function Jl(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,o=i.length;n=0;)n[t]=t;return n}function Gte(e,t){return e[t]}function Yte(e){const t=[];return t.key=e,t}function Xte(){var e=Qe([]),t=Ix,n=Jl,r=Gte;function a(i){var s=Array.from(e.apply(this,arguments),Yte),o,l=s.length,c=-1,f;for(const d of i)for(o=0,++c;o0){for(var n,r,a=0,i=e[0].length,s;a0){for(var n=0,r=e[t[0]],a,i=r.length;n0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ane(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var q5={symbolCircle:Cj,symbolCross:Ote,symbolDiamond:Tte,symbolSquare:Nte,symbolStar:Mte,symbolTriangle:Rte,symbolWye:$te},ine=Math.PI/180,sne=function(t){var n="symbol".concat(xg(t));return q5[n]||Cj},one=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*ine;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},lne=function(t,n){q5["symbol".concat(xg(t))]=n},_j=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,s=t.sizeType,o=s===void 0?"area":s,l=rne(t,Jte),c=FT(FT({},l),{},{type:r,size:i,sizeType:o}),f=function(){var b=sne(r),y=kte().type(b).size(one(i,o,r));return y()},d=c.className,h=c.cx,p=c.cy,m=ie(c,!0);return h===+h&&p===+p&&i===+i?_.createElement("path",Bx({},m,{className:ve("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(p,")"),d:f()})):null};_j.registerSymbol=lne;function ec(e){"@babel/helpers - typeof";return ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(e)}function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var v=p.inactive?c:p.color;return _.createElement("li",Ux({className:b,style:d,key:"legend-item-".concat(m)},lo(r.props,p,m)),_.createElement(Mx,{width:s,height:s,viewBox:f,style:h},r.renderIcon(p)),_.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},g?g(y,p,m):y))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,s=r.align;if(!a||!a.length)return null;var o={padding:0,margin:0,textAlign:i==="horizontal"?s:"left"};return _.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(A.PureComponent);kf(Pj,"displayName","Legend");kf(Pj,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var vne=og;function bne(){this.__data__=new vne,this.size=0}var xne=bne;function Sne(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var wne=Sne;function jne(e){return this.__data__.get(e)}var Ane=jne;function One(e){return this.__data__.has(e)}var Ene=One,Tne=og,Nne=vj,Cne=bj,_ne=200;function Pne(e,t){var n=this.__data__;if(n instanceof Tne){var r=n.__data__;if(!Nne||r.length<_ne-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Cne(r)}return n.set(e,t),this.size=n.size,this}var Mne=Pne,Rne=og,Dne=xne,$ne=wne,kne=Ane,Lne=Ene,zne=Mne;function Kc(e){var t=this.__data__=new Rne(e);this.size=t.size}Kc.prototype.clear=Dne;Kc.prototype.delete=$ne;Kc.prototype.get=kne;Kc.prototype.has=Lne;Kc.prototype.set=zne;var Y5=Kc,Ine="__lodash_hash_undefined__";function Bne(e){return this.__data__.set(e,Ine),this}var Une=Bne;function Fne(e){return this.__data__.has(e)}var Vne=Fne,Hne=bj,qne=Une,Kne=Vne;function Am(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Hne;++to))return!1;var c=i.get(e),f=i.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=n&Jne?new Xne:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=rae}var $j=aae,iae=ri,sae=$j,oae=ai,lae="[object Arguments]",cae="[object Array]",uae="[object Boolean]",fae="[object Date]",dae="[object Error]",hae="[object Function]",pae="[object Map]",mae="[object Number]",yae="[object Object]",gae="[object RegExp]",vae="[object Set]",bae="[object String]",xae="[object WeakMap]",Sae="[object ArrayBuffer]",wae="[object DataView]",jae="[object Float32Array]",Aae="[object Float64Array]",Oae="[object Int8Array]",Eae="[object Int16Array]",Tae="[object Int32Array]",Nae="[object Uint8Array]",Cae="[object Uint8ClampedArray]",_ae="[object Uint16Array]",Pae="[object Uint32Array]",tt={};tt[jae]=tt[Aae]=tt[Oae]=tt[Eae]=tt[Tae]=tt[Nae]=tt[Cae]=tt[_ae]=tt[Pae]=!0;tt[lae]=tt[cae]=tt[Sae]=tt[uae]=tt[wae]=tt[fae]=tt[dae]=tt[hae]=tt[pae]=tt[mae]=tt[yae]=tt[gae]=tt[vae]=tt[bae]=tt[xae]=!1;function Mae(e){return oae(e)&&sae(e.length)&&!!tt[iae(e)]}var Rae=Mae;function Dae(e){return function(t){return e(t)}}var n4=Dae,Em={exports:{}};Em.exports;(function(e,t){var n=c5,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i&&n.process,o=function(){try{var l=a&&a.require&&a.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(Em,Em.exports);var $ae=Em.exports,kae=Rae,Lae=n4,XT=$ae,WT=XT&&XT.isTypedArray,zae=WT?Lae(WT):kae,r4=zae,Iae=Fre,Bae=Rj,Uae=Mn,Fae=t4,Vae=Dj,Hae=r4,qae=Object.prototype,Kae=qae.hasOwnProperty;function Gae(e,t){var n=Uae(e),r=!n&&Bae(e),a=!n&&!r&&Fae(e),i=!n&&!r&&!a&&Hae(e),s=n||r||a||i,o=s?Iae(e.length,String):[],l=o.length;for(var c in e)(t||Kae.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vae(c,l)))&&o.push(c);return o}var Yae=Gae,Xae=Object.prototype;function Wae(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Xae;return e===n}var Qae=Wae;function Zae(e,t){return function(n){return e(t(n))}}var a4=Zae,Jae=a4,eie=Jae(Object.keys,Object),tie=eie,nie=Qae,rie=tie,aie=Object.prototype,iie=aie.hasOwnProperty;function sie(e){if(!nie(e))return rie(e);var t=[];for(var n in Object(e))iie.call(e,n)&&n!="constructor"&&t.push(n);return t}var oie=sie,lie=yj,cie=$j;function uie(e){return e!=null&&cie(e.length)&&!lie(e)}var Yd=uie,fie=Yae,die=oie,hie=Yd;function pie(e){return hie(e)?fie(e):die(e)}var Ag=pie,mie=_re,yie=Bre,gie=Ag;function vie(e){return mie(e,gie,yie)}var bie=vie,QT=bie,xie=1,Sie=Object.prototype,wie=Sie.hasOwnProperty;function jie(e,t,n,r,a,i){var s=n&xie,o=QT(e),l=o.length,c=QT(t),f=c.length;if(l!=f&&!s)return!1;for(var d=l;d--;){var h=o[d];if(!(s?h in t:wie.call(t,h)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var b=s;++d-1}var Soe=xoe;function woe(e,t,n){for(var r=-1,a=e==null?0:e.length;++r=Loe){var c=t?null:$oe(e);if(c)return koe(c);s=!1,a=Doe,l=new Poe}else l=t?[]:o;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Joe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ele(e){return e.value}function tle(e,t){if(_.isValidElement(e))return _.cloneElement(e,t);if(typeof e=="function")return _.createElement(e,t);t.ref;var n=Zoe(t,Hoe);return _.createElement(Pj,n)}var hN=1,Jr=function(e){function t(){var n;qoe(this,t);for(var r=arguments.length,a=new Array(r),i=0;ihN||Math.abs(a.height-this.lastBoundingBox.height)>hN)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Sa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,s=a.align,o=a.verticalAlign,l=a.margin,c=a.chartWidth,f=a.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((c||0)-p.width)/2}}else d=s==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var m=this.getBBoxSnapshot();h={top:((f||0)-m.height)/2}}else h=o==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Sa(Sa({},d),h)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,s=a.width,o=a.height,l=a.wrapperStyle,c=a.payloadUniqBy,f=a.payload,d=Sa(Sa({position:"absolute",width:s||"auto",height:o||"auto"},this.getDefaultPosition(l)),l);return _.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},tle(i,Sa(Sa({},this.props),{},{payload:f4(f,c,ele)})))}}],[{key:"getWithHeight",value:function(r,a){var i=Sa(Sa({},this.defaultProps),r.props),s=i.layout;return s==="vertical"&&K(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||a}:null}}])}(A.PureComponent);Og(Jr,"displayName","Legend");Og(Jr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var pN=Gd,nle=Rj,rle=Mn,mN=pN?pN.isConcatSpreadable:void 0;function ale(e){return rle(e)||nle(e)||!!(mN&&e&&e[mN])}var ile=ale,sle=J5,ole=ile;function p4(e,t,n,r,a){var i=-1,s=e.length;for(n||(n=ole),a||(a=[]);++i0&&n(o)?t>1?p4(o,t-1,n,r,a):sle(a,o):r||(a[a.length]=o)}return a}var m4=p4;function lle(e){return function(t,n,r){for(var a=-1,i=Object(t),s=r(t),o=s.length;o--;){var l=s[e?o:++a];if(n(i[l],l,i)===!1)break}return t}}var cle=lle,ule=cle,fle=ule(),dle=fle,hle=dle,ple=Ag;function mle(e,t){return e&&hle(e,t,ple)}var y4=mle,yle=Yd;function gle(e,t){return function(n,r){if(n==null)return n;if(!yle(n))return e(n,r);for(var a=n.length,i=t?a:-1,s=Object(n);(t?i--:++it||i&&s&&l&&!o&&!c||r&&s&&l||!n&&l||!a)return 1;if(!r&&!i&&!c&&e=o)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var Ple=_le,bb=Sj,Mle=wj,Rle=ha,Dle=g4,$le=Ele,kle=n4,Lle=Ple,zle=Yc,Ile=Mn;function Ble(e,t,n){t.length?t=bb(t,function(i){return Ile(i)?function(s){return Mle(s,i.length===1?i[0]:i)}:i}):t=[zle];var r=-1;t=bb(t,kle(Rle));var a=Dle(e,function(i,s,o){var l=bb(t,function(c){return c(i)});return{criteria:l,index:++r,value:i}});return $le(a,function(i,s){return Lle(i,s,n)})}var Ule=Ble;function Fle(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Vle=Fle,Hle=Vle,gN=Math.max;function qle(e,t,n){return t=gN(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=gN(r.length-t,0),s=Array(i);++a0){if(++t>=tce)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ice=ace,sce=ece,oce=ice,lce=oce(sce),cce=lce,uce=Yc,fce=Kle,dce=cce;function hce(e,t){return dce(fce(e,t,uce),e+"")}var pce=hce,mce=gj,yce=Yd,gce=Dj,vce=rs;function bce(e,t,n){if(!vce(n))return!1;var r=typeof t;return(r=="number"?yce(n)&&gce(t,n.length):r=="string"&&t in n)?mce(n[t],e):!1}var Eg=bce,xce=m4,Sce=Ule,wce=pce,bN=Eg,jce=wce(function(e,t){if(e==null)return[];var n=t.length;return n>1&&bN(e,t[0],t[1])?t=[]:n>2&&bN(t[0],t[1],t[2])&&(t=[t[0]]),Sce(e,xce(t,1),[])}),Ace=jce;const zj=Ie(Ace);function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function Xx(){return Xx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(hu,"-left"),K(n)&&t&&K(t.x)&&n=t.y),"".concat(hu,"-top"),K(r)&&t&&K(t.y)&&rg?Math.max(f,l[r]):Math.max(d,l[r])}function Ice(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Bce(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipBox,o=e.useTranslate3d,l=e.viewBox,c,f,d;return s.height>0&&s.width>0&&n?(f=wN({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),d=wN({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),c=Ice({translateX:f,translateY:d,useTranslate3d:o})):c=Lce,{cssProperties:c,cssClasses:zce({translateX:f,translateY:d,coordinate:n})}}function nc(e){"@babel/helpers - typeof";return nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nc(e)}function jN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function AN(e){for(var t=1;tON||Math.abs(r.height-this.state.lastBoundingBox.height)>ON)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,o=a.animationDuration,l=a.animationEasing,c=a.children,f=a.coordinate,d=a.hasPayload,h=a.isAnimationActive,p=a.offset,m=a.position,g=a.reverseDirection,b=a.useTranslate3d,y=a.viewBox,v=a.wrapperStyle,x=Bce({allowEscapeViewBox:s,coordinate:f,offsetTopLeft:p,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:y}),w=x.cssClasses,S=x.cssProperties,j=AN(AN({transition:h&&i?"transform ".concat(o,"ms ").concat(l):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},v);return _.createElement("div",{tabIndex:-1,className:w,style:j,ref:function(E){r.wrapperNode=E}},c)}}])}(A.PureComponent),Wce=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},as={isSsr:Wce()};function rc(e){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}function EN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function TN(e){for(var t=1;t0;return _.createElement(Xce,{allowEscapeViewBox:s,animationDuration:o,animationEasing:l,isAnimationActive:h,active:i,coordinate:f,hasPayload:j,offset:p,position:b,reverseDirection:y,useTranslate3d:v,viewBox:x,wrapperStyle:w},sue(c,TN(TN({},this.props),{},{payload:S})))}}])}(A.PureComponent);Ij(Bn,"displayName","Tooltip");Ij(Bn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!as.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var oue=da,lue=function(){return oue.Date.now()},cue=lue,uue=/\s/;function fue(e){for(var t=e.length;t--&&uue.test(e.charAt(t)););return t}var due=fue,hue=due,pue=/^\s+/;function mue(e){return e&&e.slice(0,hue(e)+1).replace(pue,"")}var yue=mue,gue=yue,NN=rs,vue=Bc,CN=NaN,bue=/^[-+]0x[0-9a-f]+$/i,xue=/^0b[01]+$/i,Sue=/^0o[0-7]+$/i,wue=parseInt;function jue(e){if(typeof e=="number")return e;if(vue(e))return CN;if(NN(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=NN(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gue(e);var n=xue.test(e);return n||Sue.test(e)?wue(e.slice(2),n?2:8):bue.test(e)?CN:+e}var j4=jue,Aue=rs,Sb=cue,_N=j4,Oue="Expected a function",Eue=Math.max,Tue=Math.min;function Nue(e,t,n){var r,a,i,s,o,l,c=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Oue);t=_N(t)||0,Aue(n)&&(f=!!n.leading,d="maxWait"in n,i=d?Eue(_N(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(j){var O=r,E=a;return r=a=void 0,c=j,s=e.apply(E,O),s}function m(j){return c=j,o=setTimeout(y,t),f?p(j):s}function g(j){var O=j-l,E=j-c,T=t-O;return d?Tue(T,i-E):T}function b(j){var O=j-l,E=j-c;return l===void 0||O>=t||O<0||d&&E>=i}function y(){var j=Sb();if(b(j))return v(j);o=setTimeout(y,g(j))}function v(j){return o=void 0,h&&r?p(j):(r=a=void 0,s)}function x(){o!==void 0&&clearTimeout(o),c=0,r=l=a=o=void 0}function w(){return o===void 0?s:v(Sb())}function S(){var j=Sb(),O=b(j);if(r=arguments,a=this,l=j,O){if(o===void 0)return m(l);if(d)return clearTimeout(o),o=setTimeout(y,t),p(l)}return o===void 0&&(o=setTimeout(y,t)),s}return S.cancel=x,S.flush=w,S}var Cue=Nue,_ue=Cue,Pue=rs,Mue="Expected a function";function Rue(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(Mue);return Pue(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),_ue(e,t,{leading:r,maxWait:t,trailing:a})}var Due=Rue;const A4=Ie(Due);function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function PN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Dh(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(L=A4(L,g,{trailing:!0,leading:!1}));var D=new ResizeObserver(L),$=S.current.getBoundingClientRect(),P=$.width,k=$.height;return M(P,k),D.observe(S.current),function(){D.disconnect()}},[M,g]);var C=A.useMemo(function(){var L=T.containerWidth,D=T.containerHeight;if(L<0||D<0)return null;kr(Ns(s)||Ns(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,s,l),kr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var $=Ns(s)?L:s,P=Ns(l)?D:l;n&&n>0&&($?P=$/n:P&&($=P*n),h&&P>h&&(P=h)),kr($>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,$,P,s,l,f,d,n);var k=!Array.isArray(p)&&Fa(p.type).endsWith("Chart");return _.Children.map(p,function(I){return _.isValidElement(I)?A.cloneElement(I,Dh({width:$,height:P},k?{style:Dh({height:"100%",width:"100%",maxHeight:P,maxWidth:$},I.props.style)}:{})):I})},[n,p,l,h,d,f,T,s]);return _.createElement("div",{id:b?"".concat(b):void 0,className:ve("recharts-responsive-container",y),style:Dh(Dh({},w),{},{width:s,height:l,minWidth:f,minHeight:d,maxHeight:h}),ref:S},C)}),Tg=function(t){return null};Tg.displayName="Cell";function Bf(e){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(e)}function RN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Jx(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||as.isSsr)return{width:0,height:0};var r=Yue(n),a=JSON.stringify({text:t,copyStyle:r});if(Ro.widthCache[a])return Ro.widthCache[a];try{var i=document.getElementById(DN);i||(i=document.createElement("span"),i.setAttribute("id",DN),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var s=Jx(Jx({},Gue),r);Object.assign(i.style,s),i.textContent="".concat(t);var o=i.getBoundingClientRect(),l={width:o.width,height:o.height};return Ro.widthCache[a]=l,++Ro.cacheCount>Kue&&(Ro.cacheCount=0,Ro.widthCache={}),l}catch{return{width:0,height:0}}},Xue=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Uf(e){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uf(e)}function _m(e,t){return Jue(e)||Zue(e,t)||Que(e,t)||Wue()}function Wue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Que(e,t){if(e){if(typeof e=="string")return $N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $N(e,t)}}function $N(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function UN(e,t){return gfe(e)||yfe(e,t)||mfe(e,t)||pfe()}function pfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mfe(e,t){if(e){if(typeof e=="string")return FN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FN(e,t)}}function FN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(P,k){var I=k.word,F=k.width,H=P[P.length-1];if(H&&(a==null||i||H.width+F+rk.width?P:k})};if(!f)return p;for(var g="…",b=function($){var P=d.slice(0,$),k=N4({breakAll:c,style:l,children:P+g}).wordsWithComputedWidth,I=h(k),F=I.length>s||m(I).width>Number(a);return[F,I]},y=0,v=d.length-1,x=0,w;y<=v&&x<=d.length-1;){var S=Math.floor((y+v)/2),j=S-1,O=b(j),E=UN(O,2),T=E[0],N=E[1],M=b(S),C=UN(M,1),L=C[0];if(!T&&!L&&(y=S+1),T&&L&&(v=S-1),!T&&L){w=N;break}x++}return w||p},VN=function(t){var n=me(t)?[]:t.toString().split(T4);return[{words:n}]},bfe=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,s=t.breakAll,o=t.maxLines;if((n||r)&&!as.isSsr){var l,c,f=N4({breakAll:s,children:a,style:i});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;l=d,c=h}else return VN(a);return vfe({breakAll:s,children:a,maxLines:o,style:i},l,c,n,r)}return VN(a)},HN="#808080",co=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,s=t.lineHeight,o=s===void 0?"1em":s,l=t.capHeight,c=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,g=m===void 0?"end":m,b=t.fill,y=b===void 0?HN:b,v=BN(t,ffe),x=A.useMemo(function(){return bfe({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:d,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,d,v.style,v.width]),w=v.dx,S=v.dy,j=v.angle,O=v.className,E=v.breakAll,T=BN(v,dfe);if(!$t(r)||!$t(i))return null;var N=r+(K(w)?w:0),M=i+(K(S)?S:0),C;switch(g){case"start":C=wb("calc(".concat(c,")"));break;case"middle":C=wb("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(c," / 2))"));break;default:C=wb("calc(".concat(x.length-1," * -").concat(o,")"));break}var L=[];if(d){var D=x[0].width,$=v.width;L.push("scale(".concat((K($)?$/D:1)/D,")"))}return j&&L.push("rotate(".concat(j,", ").concat(N,", ").concat(M,")")),L.length&&(T.transform=L.join(" ")),_.createElement("text",e1({},ie(T,!0),{x:N,y:M,className:ve("recharts-text",O),textAnchor:p,fill:y.includes("url")?HN:y}),x.map(function(P,k){var I=P.words.join(E?"":" ");return _.createElement("tspan",{x:N,dy:k===0?C:o,key:"".concat(I,"-").concat(k)},I)}))};function Ki(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function xfe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Bj(e){let t,n,r;e.length!==2?(t=Ki,n=(o,l)=>Ki(e(o),l),r=(o,l)=>e(o)-l):(t=e===Ki||e===xfe?e:Sfe,n=e,r=e);function a(o,l,c=0,f=o.length){if(c>>1;n(o[d],l)<0?c=d+1:f=d}while(c>>1;n(o[d],l)<=0?c=d+1:f=d}while(cc&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:a,center:s,right:i}}function Sfe(){return 0}function C4(e){return e===null?NaN:+e}function*wfe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const jfe=Bj(Ki),Xd=jfe.right;Bj(C4).center;class qN extends Map{constructor(t,n=Efe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(KN(this,t))}has(t){return super.has(KN(this,t))}set(t,n){return super.set(Afe(this,t),n)}delete(t){return super.delete(Ofe(this,t))}}function KN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Afe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Ofe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Efe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Tfe(e=Ki){if(e===Ki)return _4;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function _4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Nfe=Math.sqrt(50),Cfe=Math.sqrt(10),_fe=Math.sqrt(2);function Pm(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),s=i>=Nfe?10:i>=Cfe?5:i>=_fe?2:1;let o,l,c;return a<0?(c=Math.pow(10,-a)/s,o=Math.round(e*c),l=Math.round(t*c),o/ct&&--l,c=-c):(c=Math.pow(10,a)*s,o=Math.round(e/c),l=Math.round(t/c),o*ct&&--l),l0))return[];if(e===t)return[e];const r=t=a))return[];const o=i-a+1,l=new Array(o);if(r)if(s<0)for(let c=0;c=r)&&(n=r);return n}function YN(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function P4(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?_4:Tfe(a);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+h)),m=Math.min(r,Math.floor(t+(l-c)*d/l+h));P4(e,t,p,m,a)}const i=e[t];let s=n,o=r;for(pu(e,n,t),a(e[r],i)>0&&pu(e,n,r);s0;)--o}a(e[n],i)===0?pu(e,n,o):(++o,pu(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function pu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Pfe(e,t,n){if(e=Float64Array.from(wfe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return YN(e);if(t>=1)return GN(e);var r,a=(r-1)*t,i=Math.floor(a),s=GN(P4(e,i).subarray(0,i+1)),o=YN(e.subarray(i+1));return s+(o-s)*(a-i)}}function Mfe(e,t,n=C4){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return s+(o-s)*(a-i)}}function Rfe(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Lh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Lh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$fe.exec(e))?new Tn(t[1],t[2],t[3],1):(t=kfe.exec(e))?new Tn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Lfe.exec(e))?Lh(t[1],t[2],t[3],t[4]):(t=zfe.exec(e))?Lh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ife.exec(e))?tC(t[1],t[2]/100,t[3]/100,1):(t=Bfe.exec(e))?tC(t[1],t[2]/100,t[3]/100,t[4]):XN.hasOwnProperty(e)?ZN(XN[e]):e==="transparent"?new Tn(NaN,NaN,NaN,0):null}function ZN(e){return new Tn(e>>16&255,e>>8&255,e&255,1)}function Lh(e,t,n,r){return r<=0&&(e=t=n=NaN),new Tn(e,t,n,r)}function Vfe(e){return e instanceof Wd||(e=qf(e)),e?(e=e.rgb(),new Tn(e.r,e.g,e.b,e.opacity)):new Tn}function i1(e,t,n,r){return arguments.length===1?Vfe(e):new Tn(e,t,n,r??1)}function Tn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Fj(Tn,i1,R4(Wd,{brighter(e){return e=e==null?Mm:Math.pow(Mm,e),new Tn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Vf:Math.pow(Vf,e),new Tn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Tn(Xs(this.r),Xs(this.g),Xs(this.b),Rm(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JN,formatHex:JN,formatHex8:Hfe,formatRgb:eC,toString:eC}));function JN(){return`#${Cs(this.r)}${Cs(this.g)}${Cs(this.b)}`}function Hfe(){return`#${Cs(this.r)}${Cs(this.g)}${Cs(this.b)}${Cs((isNaN(this.opacity)?1:this.opacity)*255)}`}function eC(){const e=Rm(this.opacity);return`${e===1?"rgb(":"rgba("}${Xs(this.r)}, ${Xs(this.g)}, ${Xs(this.b)}${e===1?")":`, ${e})`}`}function Rm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cs(e){return e=Xs(e),(e<16?"0":"")+e.toString(16)}function tC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Dr(e,t,n,r)}function D4(e){if(e instanceof Dr)return new Dr(e.h,e.s,e.l,e.opacity);if(e instanceof Wd||(e=qf(e)),!e)return new Dr;if(e instanceof Dr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,l=(i+a)/2;return o?(t===i?s=(n-r)/o+(n0&&l<1?0:s,new Dr(s,o,l,e.opacity)}function qfe(e,t,n,r){return arguments.length===1?D4(e):new Dr(e,t,n,r??1)}function Dr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fj(Dr,qfe,R4(Wd,{brighter(e){return e=e==null?Mm:Math.pow(Mm,e),new Dr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Vf:Math.pow(Vf,e),new Dr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Tn(jb(e>=240?e-240:e+120,a,r),jb(e,a,r),jb(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Dr(nC(this.h),zh(this.s),zh(this.l),Rm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Rm(this.opacity);return`${e===1?"hsl(":"hsla("}${nC(this.h)}, ${zh(this.s)*100}%, ${zh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function nC(e){return e=(e||0)%360,e<0?e+360:e}function zh(e){return Math.max(0,Math.min(1,e||0))}function jb(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Vj=e=>()=>e;function Kfe(e,t){return function(n){return e+n*t}}function Gfe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Yfe(e){return(e=+e)==1?$4:function(t,n){return n-t?Gfe(t,n,e):Vj(isNaN(t)?n:t)}}function $4(e,t){var n=t-e;return n?Kfe(e,n):Vj(isNaN(e)?t:e)}const rC=function e(t){var n=Yfe(t);function r(a,i){var s=n((a=i1(a)).r,(i=i1(i)).r),o=n(a.g,i.g),l=n(a.b,i.b),c=$4(a.opacity,i.opacity);return function(f){return a.r=s(f),a.g=o(f),a.b=l(f),a.opacity=c(f),a+""}}return r.gamma=e,r}(1);function Xfe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;an&&(i=t.slice(n,i),o[s]?o[s]+=i:o[++s]=i),(r=r[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,l.push({i:s,x:Dm(r,a)})),n=Ab.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function sde(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a2?ode:sde,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?i:(l||(l=o(e.map(r),t,n)))(r(s(h)))}return d.invert=function(h){return s(a((c||(c=o(t,e.map(r),Dm)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,$m),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Hj,f()},d.clamp=function(h){return arguments.length?(s=h?!0:mn,f()):s!==mn},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(i=h,d):i},function(h,p){return r=h,a=p,f()}}function qj(){return Ng()(mn,mn)}function lde(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function km(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ac(e){return e=km(Math.abs(e)),e?e[1]:NaN}function cde(e,t){return function(n,r){for(var a=n.length,i=[],s=0,o=e[0],l=0;a>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),i.push(n.substring(a-=o,a+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function ude(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var fde=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kf(e){if(!(t=fde.exec(e)))throw new Error("invalid format: "+e);var t;return new Kj({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Kf.prototype=Kj.prototype;function Kj(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Kj.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function dde(e){e:for(var t=e.length,n=1,r=-1,a;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var Lm;function hde(e,t){var n=km(e,t);if(!n)return Lm=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(Lm=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+km(e,Math.max(0,t+i-1))[0]}function iC(e,t){var n=km(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const sC={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:lde,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>iC(e*100,t),r:iC,s:hde,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function oC(e){return e}var lC=Array.prototype.map,cC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pde(e){var t=e.grouping===void 0||e.thousands===void 0?oC:cde(lC.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?oC:ude(lC.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d,h){d=Kf(d);var p=d.fill,m=d.align,g=d.sign,b=d.symbol,y=d.zero,v=d.width,x=d.comma,w=d.precision,S=d.trim,j=d.type;j==="n"?(x=!0,j="g"):sC[j]||(w===void 0&&(w=12),S=!0,j="g"),(y||p==="0"&&m==="=")&&(y=!0,p="0",m="=");var O=(h&&h.prefix!==void 0?h.prefix:"")+(b==="$"?n:b==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),E=(b==="$"?r:/[%p]/.test(j)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),T=sC[j],N=/[defgprs%]/.test(j);w=w===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function M(C){var L=O,D=E,$,P,k;if(j==="c")D=T(C)+D,C="";else{C=+C;var I=C<0||1/C<0;if(C=isNaN(C)?l:T(Math.abs(C),w),S&&(C=dde(C)),I&&+C==0&&g!=="+"&&(I=!1),L=(I?g==="("?g:o:g==="-"||g==="("?"":g)+L,D=(j==="s"&&!isNaN(C)&&Lm!==void 0?cC[8+Lm/3]:"")+D+(I&&g==="("?")":""),N){for($=-1,P=C.length;++$k||k>57){D=(k===46?a+C.slice($+1):C.slice($))+D,C=C.slice(0,$);break}}}x&&!y&&(C=t(C,1/0));var F=L.length+C.length+D.length,H=F>1)+L+C+D+H.slice(F);break;default:C=H+L+C+D;break}return i(C)}return M.toString=function(){return d+""},M}function f(d,h){var p=Math.max(-8,Math.min(8,Math.floor(ac(h)/3)))*3,m=Math.pow(10,-p),g=c((d=Kf(d),d.type="f",d),{suffix:cC[8+p/3]});return function(b){return g(m*b)}}return{format:c,formatPrefix:f}}var Ih,Gj,k4;mde({thousands:",",grouping:[3],currency:["$",""]});function mde(e){return Ih=pde(e),Gj=Ih.format,k4=Ih.formatPrefix,Ih}function yde(e){return Math.max(0,-ac(Math.abs(e)))}function gde(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ac(t)/3)))*3-ac(Math.abs(e)))}function vde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ac(t)-ac(e))+1}function L4(e,t,n,r){var a=r1(e,t,n),i;switch(r=Kf(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=gde(a,s))&&(r.precision=i),k4(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=vde(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=yde(a))&&(r.precision=i-(r.type==="%")*2);break}}return Gj(r)}function is(e){var t=e.domain;return e.ticks=function(n){var r=t();return t1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return L4(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],o=r[i],l,c,f=10;for(o0;){if(c=n1(s,o,n),c===l)return r[a]=s,r[i]=o,t(r);if(c>0)s=Math.floor(s/c)*c,o=Math.ceil(o/c)*c;else if(c<0)s=Math.ceil(s*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function zm(){var e=qj();return e.copy=function(){return Qd(e,zm())},Or.apply(e,arguments),is(e)}function z4(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,$m),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return z4(e).unknown(t)},e=arguments.length?Array.from(e,$m):[0,1],is(n)}function I4(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return iMath.pow(e,t)}function jde(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function dC(e){return(t,n)=>-e(-t,n)}function Yj(e){const t=e(uC,fC),n=t.domain;let r=10,a,i;function s(){return a=jde(r),i=wde(r),n()[0]<0?(a=dC(a),i=dC(i),e(bde,xde)):e(uC,fC),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const l=n();let c=l[0],f=l[l.length-1];const d=f0){for(;h<=p;++h)for(m=1;mf)break;y.push(g)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(g=h>0?m/i(-h):m*i(h),!(gf)break;y.push(g)}y.length*2{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Kf(l)).precision==null&&(l.trim=!0),l=Gj(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return f=>{let d=f/i(Math.round(a(f)));return d*rn(I4(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function B4(){const e=Yj(Ng()).domain([1,10]);return e.copy=()=>Qd(e,B4()).base(e.base()),Or.apply(e,arguments),e}function hC(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function pC(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Xj(e){var t=1,n=e(hC(t),pC(t));return n.constant=function(r){return arguments.length?e(hC(t=+r),pC(t)):t},is(n)}function U4(){var e=Xj(Ng());return e.copy=function(){return Qd(e,U4()).constant(e.constant())},Or.apply(e,arguments)}function mC(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ade(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ode(e){return e<0?-e*e:e*e}function Wj(e){var t=e(mn,mn),n=1;function r(){return n===1?e(mn,mn):n===.5?e(Ade,Ode):e(mC(n),mC(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},is(t)}function Qj(){var e=Wj(Ng());return e.copy=function(){return Qd(e,Qj()).exponent(e.exponent())},Or.apply(e,arguments),e}function Ede(){return Qj.apply(null,arguments).exponent(.5)}function yC(e){return Math.sign(e)*e*e}function Tde(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function F4(){var e=qj(),t=[0,1],n=!1,r;function a(i){var s=Tde(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(yC(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,$m)).map(yC)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return F4(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Or.apply(a,arguments),is(a)}function V4(){var e=[],t=[],n=[],r;function a(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s0?n[o-1]:e[0],o=n?[r[n-1],t]:[r[c-1],r[c]]},s.unknown=function(l){return arguments.length&&(i=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return H4().domain([e,t]).range(a).unknown(i)},Or.apply(is(s),arguments)}function q4(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Xd(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return q4().domain(e).range(t).unknown(n)},Or.apply(a,arguments)}const Ob=new Date,Eb=new Date;function Lt(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const l=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i0))return l;let c;do l.push(c=new Date(+i)),t(i,o),e(i);while(cLt(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(Ob.setTime(+i),Eb.setTime(+s),e(Ob),e(Eb),Math.floor(n(Ob,Eb))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Im=Lt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Im.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Lt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Im);Im.range;const Ma=1e3,mr=Ma*60,Ra=mr*60,Qa=Ra*24,Zj=Qa*7,gC=Qa*30,Tb=Qa*365,_s=Lt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ma)},(e,t)=>(t-e)/Ma,e=>e.getUTCSeconds());_s.range;const Jj=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma)},(e,t)=>{e.setTime(+e+t*mr)},(e,t)=>(t-e)/mr,e=>e.getMinutes());Jj.range;const eA=Lt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*mr)},(e,t)=>(t-e)/mr,e=>e.getUTCMinutes());eA.range;const tA=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma-e.getMinutes()*mr)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getHours());tA.range;const nA=Lt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getUTCHours());nA.range;const Zd=Lt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*mr)/Qa,e=>e.getDate()-1);Zd.range;const Cg=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>e.getUTCDate()-1);Cg.range;const K4=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>Math.floor(e/Qa));K4.range;function Ao(e){return Lt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*mr)/Zj)}const _g=Ao(0),Bm=Ao(1),Nde=Ao(2),Cde=Ao(3),ic=Ao(4),_de=Ao(5),Pde=Ao(6);_g.range;Bm.range;Nde.range;Cde.range;ic.range;_de.range;Pde.range;function Oo(e){return Lt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Zj)}const Pg=Oo(0),Um=Oo(1),Mde=Oo(2),Rde=Oo(3),sc=Oo(4),Dde=Oo(5),$de=Oo(6);Pg.range;Um.range;Mde.range;Rde.range;sc.range;Dde.range;$de.range;const rA=Lt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());rA.range;const aA=Lt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());aA.range;const Za=Lt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Za.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Za.range;const Ja=Lt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ja.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ja.range;function G4(e,t,n,r,a,i){const s=[[_s,1,Ma],[_s,5,5*Ma],[_s,15,15*Ma],[_s,30,30*Ma],[i,1,mr],[i,5,5*mr],[i,15,15*mr],[i,30,30*mr],[a,1,Ra],[a,3,3*Ra],[a,6,6*Ra],[a,12,12*Ra],[r,1,Qa],[r,2,2*Qa],[n,1,Zj],[t,1,gC],[t,3,3*gC],[e,1,Tb]];function o(c,f,d){const h=fb).right(s,h);if(p===s.length)return e.every(r1(c/Tb,f/Tb,d));if(p===0)return Im.every(Math.max(r1(c,f,d),1));const[m,g]=s[h/s[p-1][2]53)return null;"w"in V||(V.w=1),"Z"in V?(ge=Cb(mu(V.y,0,1)),Xe=ge.getUTCDay(),ge=Xe>4||Xe===0?Um.ceil(ge):Um(ge),ge=Cg.offset(ge,(V.V-1)*7),V.y=ge.getUTCFullYear(),V.m=ge.getUTCMonth(),V.d=ge.getUTCDate()+(V.w+6)%7):(ge=Nb(mu(V.y,0,1)),Xe=ge.getDay(),ge=Xe>4||Xe===0?Bm.ceil(ge):Bm(ge),ge=Zd.offset(ge,(V.V-1)*7),V.y=ge.getFullYear(),V.m=ge.getMonth(),V.d=ge.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),Xe="Z"in V?Cb(mu(V.y,0,1)).getUTCDay():Nb(mu(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(Xe+5)%7:V.w+V.U*7-(Xe+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,Cb(V)):Nb(V)}}function E(G,oe,X,V){for(var _e=0,ge=oe.length,Xe=X.length,ot,dt;_e=Xe)return-1;if(ot=oe.charCodeAt(_e++),ot===37){if(ot=oe.charAt(_e++),dt=S[ot in vC?oe.charAt(_e++):ot],!dt||(V=dt(G,X,V))<0)return-1}else if(ot!=X.charCodeAt(V++))return-1}return V}function T(G,oe,X){var V=c.exec(oe.slice(X));return V?(G.p=f.get(V[0].toLowerCase()),X+V[0].length):-1}function N(G,oe,X){var V=p.exec(oe.slice(X));return V?(G.w=m.get(V[0].toLowerCase()),X+V[0].length):-1}function M(G,oe,X){var V=d.exec(oe.slice(X));return V?(G.w=h.get(V[0].toLowerCase()),X+V[0].length):-1}function C(G,oe,X){var V=y.exec(oe.slice(X));return V?(G.m=v.get(V[0].toLowerCase()),X+V[0].length):-1}function L(G,oe,X){var V=g.exec(oe.slice(X));return V?(G.m=b.get(V[0].toLowerCase()),X+V[0].length):-1}function D(G,oe,X){return E(G,t,oe,X)}function $(G,oe,X){return E(G,n,oe,X)}function P(G,oe,X){return E(G,r,oe,X)}function k(G){return s[G.getDay()]}function I(G){return i[G.getDay()]}function F(G){return l[G.getMonth()]}function H(G){return o[G.getMonth()]}function Y(G){return a[+(G.getHours()>=12)]}function q(G){return 1+~~(G.getMonth()/3)}function te(G){return s[G.getUTCDay()]}function Z(G){return i[G.getUTCDay()]}function ye(G){return l[G.getUTCMonth()]}function J(G){return o[G.getUTCMonth()]}function st(G){return a[+(G.getUTCHours()>=12)]}function Ve(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var oe=j(G+="",x);return oe.toString=function(){return G},oe},parse:function(G){var oe=O(G+="",!1);return oe.toString=function(){return G},oe},utcFormat:function(G){var oe=j(G+="",w);return oe.toString=function(){return G},oe},utcParse:function(G){var oe=O(G+="",!0);return oe.toString=function(){return G},oe}}}var vC={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,Ude=/^%/,Fde=/[\\^$*+?|[\]().{}]/g;function Pe(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i[t.toLowerCase(),n]))}function Hde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function qde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Kde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Gde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Yde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function bC(e,t,n){var r=Gt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function xC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xde(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Wde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Qde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function SC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zde(e,t,n){var r=Gt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function wC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Jde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ehe(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function the(e,t,n){var r=Gt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nhe(e,t,n){var r=Gt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rhe(e,t,n){var r=Ude.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ahe(e,t,n){var r=Gt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ihe(e,t,n){var r=Gt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function jC(e,t){return Pe(e.getDate(),t,2)}function she(e,t){return Pe(e.getHours(),t,2)}function ohe(e,t){return Pe(e.getHours()%12||12,t,2)}function lhe(e,t){return Pe(1+Zd.count(Za(e),e),t,3)}function Y4(e,t){return Pe(e.getMilliseconds(),t,3)}function che(e,t){return Y4(e,t)+"000"}function uhe(e,t){return Pe(e.getMonth()+1,t,2)}function fhe(e,t){return Pe(e.getMinutes(),t,2)}function dhe(e,t){return Pe(e.getSeconds(),t,2)}function hhe(e){var t=e.getDay();return t===0?7:t}function phe(e,t){return Pe(_g.count(Za(e)-1,e),t,2)}function X4(e){var t=e.getDay();return t>=4||t===0?ic(e):ic.ceil(e)}function mhe(e,t){return e=X4(e),Pe(ic.count(Za(e),e)+(Za(e).getDay()===4),t,2)}function yhe(e){return e.getDay()}function ghe(e,t){return Pe(Bm.count(Za(e)-1,e),t,2)}function vhe(e,t){return Pe(e.getFullYear()%100,t,2)}function bhe(e,t){return e=X4(e),Pe(e.getFullYear()%100,t,2)}function xhe(e,t){return Pe(e.getFullYear()%1e4,t,4)}function She(e,t){var n=e.getDay();return e=n>=4||n===0?ic(e):ic.ceil(e),Pe(e.getFullYear()%1e4,t,4)}function whe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Pe(t/60|0,"0",2)+Pe(t%60,"0",2)}function AC(e,t){return Pe(e.getUTCDate(),t,2)}function jhe(e,t){return Pe(e.getUTCHours(),t,2)}function Ahe(e,t){return Pe(e.getUTCHours()%12||12,t,2)}function Ohe(e,t){return Pe(1+Cg.count(Ja(e),e),t,3)}function W4(e,t){return Pe(e.getUTCMilliseconds(),t,3)}function Ehe(e,t){return W4(e,t)+"000"}function The(e,t){return Pe(e.getUTCMonth()+1,t,2)}function Nhe(e,t){return Pe(e.getUTCMinutes(),t,2)}function Che(e,t){return Pe(e.getUTCSeconds(),t,2)}function _he(e){var t=e.getUTCDay();return t===0?7:t}function Phe(e,t){return Pe(Pg.count(Ja(e)-1,e),t,2)}function Q4(e){var t=e.getUTCDay();return t>=4||t===0?sc(e):sc.ceil(e)}function Mhe(e,t){return e=Q4(e),Pe(sc.count(Ja(e),e)+(Ja(e).getUTCDay()===4),t,2)}function Rhe(e){return e.getUTCDay()}function Dhe(e,t){return Pe(Um.count(Ja(e)-1,e),t,2)}function $he(e,t){return Pe(e.getUTCFullYear()%100,t,2)}function khe(e,t){return e=Q4(e),Pe(e.getUTCFullYear()%100,t,2)}function Lhe(e,t){return Pe(e.getUTCFullYear()%1e4,t,4)}function zhe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?sc(e):sc.ceil(e),Pe(e.getUTCFullYear()%1e4,t,4)}function Ihe(){return"+0000"}function OC(){return"%"}function EC(e){return+e}function TC(e){return Math.floor(+e/1e3)}var Do,Z4,J4;Bhe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Bhe(e){return Do=Bde(e),Z4=Do.format,Do.parse,J4=Do.utcFormat,Do.utcParse,Do}function Uhe(e){return new Date(e)}function Fhe(e){return e instanceof Date?+e:+new Date(+e)}function iA(e,t,n,r,a,i,s,o,l,c){var f=qj(),d=f.invert,h=f.domain,p=c(".%L"),m=c(":%S"),g=c("%I:%M"),b=c("%I %p"),y=c("%a %d"),v=c("%b %d"),x=c("%B"),w=c("%Y");function S(j){return(l(j)t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Pfe(e,i/r))},n.copy=function(){return rL(t).domain(e)},ii.apply(n,arguments)}function Rg(){var e=0,t=.5,n=1,r=1,a,i,s,o,l,c=mn,f,d=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+f(g))-i)*(r*gt}var oL=Xhe,Whe=Dg,Qhe=oL,Zhe=Yc;function Jhe(e){return e&&e.length?Whe(e,Zhe,Qhe):void 0}var epe=Jhe;const Di=Ie(epe);function tpe(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*nt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ne.dividedBy=ne.div=function(e){return Va(this,new this.constructor(e))};ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,n=t.constructor;return Ge(Va(t,new n(e),0,1),n.precision)};ne.equals=ne.eq=function(e){return!this.cmp(e)};ne.exponent=function(){return _t(this)};ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0};ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0};ne.isInteger=ne.isint=function(){return this.e>this.d.length-2};ne.isNegative=ne.isneg=function(){return this.s<0};ne.isPositive=ne.ispos=function(){return this.s>0};ne.isZero=function(){return this.s===0};ne.lessThan=ne.lt=function(e){return this.cmp(e)<0};ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1};ne.logarithm=ne.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Vn))throw Error(Sr+"NaN");if(n.s<1)throw Error(Sr+(n.s?"NaN":"-Infinity"));return n.eq(Vn)?new r(0):(ct=!1,t=Va(Gf(n,i),Gf(e,i),i),ct=!0,Ge(t,a))};ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dL(t,e):uL(t,(e.s=-e.s,e))};ne.modulo=ne.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(Sr+"NaN");return n.s?(ct=!1,t=Va(n,e,0,1).times(e),ct=!0,n.minus(t)):Ge(new r(n),a)};ne.naturalExponential=ne.exp=function(){return fL(this)};ne.naturalLogarithm=ne.ln=function(){return Gf(this)};ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?uL(t,e):dL(t,(e.s=-e.s,e))};ne.precision=ne.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ws+e);if(t=_t(a)+1,r=a.d.length-1,n=r*nt+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ne.squareRoot=ne.sqrt=function(){var e,t,n,r,a,i,s,o=this,l=o.constructor;if(o.s<1){if(!o.s)return new l(0);throw Error(Sr+"NaN")}for(e=_t(o),ct=!1,a=Math.sqrt(+o),a==0||a==1/0?(t=ea(o.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Qc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(a.toString()),n=l.precision,a=s=n+3;;)if(i=r,r=i.plus(Va(o,i,s+2)).times(.5),ea(i.d).slice(0,s)===(t=ea(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Ge(i,n+1,0),i.times(i).eq(o)){r=i;break}}else if(t!="9999")break;s+=4}return ct=!0,Ge(r,n)};ne.times=ne.mul=function(e){var t,n,r,a,i,s,o,l,c,f=this,d=f.constructor,h=f.d,p=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=h.length,c=p.length,l=0;){for(t=0,a=l+r;a>r;)o=i[a]+p[r]*h[a-r-1]+t,i[a--]=o%Ut|0,t=o/Ut|0;i[a]=(i[a]+t)%Ut|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,ct?Ge(e,d.precision):e};ne.toDecimalPlaces=ne.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ca(e,0,Wc),t===void 0?t=r.rounding:ca(t,0,8),Ge(n,e+_t(n)+1,t))};ne.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=fo(r,!0):(ca(e,0,Wc),t===void 0?t=a.rounding:ca(t,0,8),r=Ge(new a(r),e+1,t),n=fo(r,!0,e+1)),n};ne.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?fo(a):(ca(e,0,Wc),t===void 0?t=i.rounding:ca(t,0,8),r=Ge(new i(a),e+_t(a)+1,t),n=fo(r.abs(),!1,e+_t(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return Ge(new t(e),_t(e)+1,t.rounding)};ne.toNumber=function(){return+this};ne.toPower=ne.pow=function(e){var t,n,r,a,i,s,o=this,l=o.constructor,c=12,f=+(e=new l(e));if(!e.s)return new l(Vn);if(o=new l(o),!o.s){if(e.s<1)throw Error(Sr+"Infinity");return o}if(o.eq(Vn))return o;if(r=l.precision,e.eq(Vn))return Ge(o,r);if(t=e.e,n=e.d.length-1,s=t>=n,i=o.s,s){if((n=f<0?-f:f)<=cL){for(a=new l(Vn),t=Math.ceil(r/nt+4),ct=!1;n%2&&(a=a.times(o),_C(a.d,t)),n=Qc(n/2),n!==0;)o=o.times(o),_C(o.d,t);return ct=!0,e.s<0?new l(Vn).div(a):Ge(a,r)}}else if(i<0)throw Error(Sr+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,ct=!1,a=e.times(Gf(o,r+c)),ct=!0,a=fL(a),a.s=i,a};ne.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=_t(a),r=fo(a,n<=i.toExpNeg||n>=i.toExpPos)):(ca(e,1,Wc),t===void 0?t=i.rounding:ca(t,0,8),a=Ge(new i(a),e,t),n=_t(a),r=fo(a,e<=n||n<=i.toExpNeg,e)),r};ne.toSignificantDigits=ne.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ca(e,1,Wc),t===void 0?t=r.rounding:ca(t,0,8)),Ge(new r(n),e,t)};ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=_t(e),n=e.constructor;return fo(e,t<=n.toExpNeg||t>=n.toExpPos)};function uL(e,t){var n,r,a,i,s,o,l,c,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),ct?Ge(t,d):t;if(l=e.d,c=t.d,s=e.e,a=t.e,l=l.slice(),i=s-a,i){for(i<0?(r=l,i=-i,o=c.length):(r=c,a=s,o=l.length),s=Math.ceil(d/nt),o=s>o?s+1:o+1,i>o&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(o=l.length,i=c.length,o-i<0&&(i=o,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/Ut|0,l[i]%=Ut;for(n&&(l.unshift(n),++a),o=l.length;l[--o]==0;)l.pop();return t.d=l,t.e=a,ct?Ge(t,d):t}function ca(e,t,n){if(e!==~~e||en)throw Error(Ws+e)}function ea(e){var t,n,r,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;ts?1:-1;else for(o=l=0;oa[o]?1:-1;break}return l}function n(r,a,i){for(var s=0;i--;)r[i]-=s,s=r[i]1;)r.shift()}return function(r,a,i,s){var o,l,c,f,d,h,p,m,g,b,y,v,x,w,S,j,O,E,T=r.constructor,N=r.s==a.s?1:-1,M=r.d,C=a.d;if(!r.s)return new T(r);if(!a.s)throw Error(Sr+"Division by zero");for(l=r.e-a.e,O=C.length,S=M.length,p=new T(N),m=p.d=[],c=0;C[c]==(M[c]||0);)++c;if(C[c]>(M[c]||0)&&--l,i==null?v=i=T.precision:s?v=i+(_t(r)-_t(a))+1:v=i,v<0)return new T(0);if(v=v/nt+2|0,c=0,O==1)for(f=0,C=C[0],v++;(c1&&(C=e(C,f),M=e(M,f),O=C.length,S=M.length),w=O,g=M.slice(0,O),b=g.length;b=Ut/2&&++j;do f=0,o=t(C,g,O,b),o<0?(y=g[0],O!=b&&(y=y*Ut+(g[1]||0)),f=y/j|0,f>1?(f>=Ut&&(f=Ut-1),d=e(C,f),h=d.length,b=g.length,o=t(d,g,h,b),o==1&&(f--,n(d,O16)throw Error(lA+_t(e));if(!e.s)return new f(Vn);for(ct=!1,o=d,s=new f(.03125);e.abs().gte(.1);)e=e.times(s),c+=5;for(r=Math.log(ws(2,c))/Math.LN10*2+5|0,o+=r,n=a=i=new f(Vn),f.precision=o;;){if(a=Ge(a.times(e),o),n=n.times(++l),s=i.plus(Va(a,n,o)),ea(s.d).slice(0,o)===ea(i.d).slice(0,o)){for(;c--;)i=Ge(i.times(i),o);return f.precision=d,t==null?(ct=!0,Ge(i,d)):i}i=s}}function _t(e){for(var t=e.e*nt,n=e.d[0];n>=10;n/=10)t++;return t}function _b(e,t,n){if(t>e.LN10.sd())throw ct=!0,n&&(e.precision=n),Error(Sr+"LN10 precision limit exceeded");return Ge(new e(e.LN10),t)}function mi(e){for(var t="";e--;)t+="0";return t}function Gf(e,t){var n,r,a,i,s,o,l,c,f,d=1,h=10,p=e,m=p.d,g=p.constructor,b=g.precision;if(p.s<1)throw Error(Sr+(p.s?"NaN":"-Infinity"));if(p.eq(Vn))return new g(0);if(t==null?(ct=!1,c=b):c=t,p.eq(10))return t==null&&(ct=!0),_b(g,c);if(c+=h,g.precision=c,n=ea(m),r=n.charAt(0),i=_t(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ea(p.d),r=n.charAt(0),d++;i=_t(p),r>1?(p=new g("0."+n),i++):p=new g(r+"."+n.slice(1))}else return l=_b(g,c+2,b).times(i+""),p=Gf(new g(r+"."+n.slice(1)),c-h).plus(l),g.precision=b,t==null?(ct=!0,Ge(p,b)):p;for(o=s=p=Va(p.minus(Vn),p.plus(Vn),c),f=Ge(p.times(p),c),a=3;;){if(s=Ge(s.times(f),c),l=o.plus(Va(s,new g(a),c)),ea(l.d).slice(0,c)===ea(o.d).slice(0,c))return o=o.times(2),i!==0&&(o=o.plus(_b(g,c+2,b).times(i+""))),o=Va(o,new g(d),c),g.precision=b,t==null?(ct=!0,Ge(o,b)):o;o=l,a+=2}}function CC(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=Qc(n/nt),e.d=[],r=(n+1)%nt,n<0&&(r+=nt),rFm||e.e<-Fm))throw Error(lA+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ge(e,t,n){var r,a,i,s,o,l,c,f,d=e.d;for(s=1,i=d[0];i>=10;i/=10)s++;if(r=t-s,r<0)r+=nt,a=t,c=d[f=0];else{if(f=Math.ceil((r+1)/nt),i=d.length,f>=i)return e;for(c=i=d[f],s=1;i>=10;i/=10)s++;r%=nt,a=r-nt+s}if(n!==void 0&&(i=ws(10,s-a-1),o=c/i%10|0,l=t<0||d[f+1]!==void 0||c%i,l=n<4?(o||l)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||l||n==6&&(r>0?a>0?c/ws(10,s-a):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=_t(e),d.length=1,t=t-i-1,d[0]=ws(10,(nt-t%nt)%nt),e.e=Qc(-t/nt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,i=1,f--):(d.length=f+1,i=ws(10,nt-r),d[f]=a>0?(c/ws(10,s-a)%ws(10,a)|0)*i:0),l)for(;;)if(f==0){(d[0]+=i)==Ut&&(d[0]=1,++e.e);break}else{if(d[f]+=i,d[f]!=Ut)break;d[f--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(ct&&(e.e>Fm||e.e<-Fm))throw Error(lA+_t(e));return e}function dL(e,t){var n,r,a,i,s,o,l,c,f,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ct?Ge(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),s=c-r,s){for(f=s<0,f?(n=l,s=-s,o=d.length):(n=d,r=c,o=l.length),a=Math.max(Math.ceil(p/nt),o)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,o=d.length,f=a0;--a)l[o++]=0;for(a=d.length;a>s;){if(l[--a]0?i=i.charAt(0)+"."+i.slice(1)+mi(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+mi(-a-1)+i,n&&(r=n-s)>0&&(i+=mi(r))):a>=s?(i+=mi(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+mi(r))):((r=a+1)
this.bindToMotionValue(r,n)),Qw.current||q3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:lm.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){TE.delete(this.current),this.projection&&this.projection.unmount(),Lr(this.notifyUpdate),Lr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=xo.has(t),a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Re.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Gl){const n=Gl[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):bt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Qr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(d3(a)||r3(a))?a=parseFloat(a):!DH(a)&&Ji.test(n)&&(a=c3(t,n)),this.setBaseTarget(t,cn(a)?a.get():a)),cn(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let a;if(typeof r=="string"||typeof r=="object"){const s=Ow(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(a=s[t])}if(r&&a!==void 0)return a;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!cn(i)?i:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Iw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class K3 extends kH{constructor(){super(...arguments),this.KeyframeResolver=y3}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;cn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function LH(e){return window.getComputedStyle(e)}class zH extends K3{constructor(){super(...arguments),this.type="html",this.renderInstance=P$}readValueFromInstance(t,n){if(xo.has(n)){const r=qw(n);return r&&r.default||0}else{const r=LH(t),a=(N$(n)?r.getPropertyValue(n):r[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return D3(t,n)}build(t,n,r){Nw(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Mw(t,n,r)}}class IH extends K3{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=bt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(xo.has(n)){const r=qw(n);return r&&r.default||0}return n=M$.has(n)?n:ww(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return $$(t,n,r)}build(t,n,r){Cw(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,a){R$(t,n,r,a)}mount(t){this.isSVGTag=Pw(t.tagName),super.mount(t)}}const BH=(e,t)=>Aw(e)?new IH(t):new zH(t,{allowProjection:e!==A.Fragment}),UH=gF({...f9,...PH,...xH,...MH},BH),Nt=M7(UH);function G3(e,t){let n;const r=()=>{const{currentTime:a}=t,s=(a===null?0:a.value)/100;n!==s&&e(s),n=s};return Re.update(r,!0),()=>Lr(r)}const mp=new WeakMap;let fi;function FH(e,t){if(t){const{inlineSize:n,blockSize:r}=t[0];return{width:n,height:r}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function VH({target:e,contentRect:t,borderBoxSize:n}){var r;(r=mp.get(e))===null||r===void 0||r.forEach(a=>{a({target:e,contentSize:t,get size(){return FH(e,n)}})})}function HH(e){e.forEach(VH)}function qH(){typeof ResizeObserver>"u"||(fi=new ResizeObserver(HH))}function KH(e,t){fi||qH();const n=H$(e);return n.forEach(r=>{let a=mp.get(r);a||(a=new Set,mp.set(r,a)),a.add(t),fi==null||fi.observe(r)}),()=>{n.forEach(r=>{const a=mp.get(r);a==null||a.delete(t),a!=null&&a.size||fi==null||fi.unobserve(r)})}}const yp=new Set;let Zu;function GH(){Zu=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};yp.forEach(n=>n(t))},window.addEventListener("resize",Zu)}function YH(e){return yp.add(e),Zu||GH(),()=>{yp.delete(e),!yp.size&&Zu&&(Zu=void 0)}}function XH(e,t){return typeof e=="function"?YH(e):KH(e,t)}const WH=50,CE=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),QH=()=>({time:0,x:CE(),y:CE()}),ZH={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function _E(e,t,n,r){const a=n[t],{length:i,position:s}=ZH[t],o=a.current,l=n.time;a.current=e[`scroll${s}`],a.scrollLength=e[`scroll${i}`]-e[`client${i}`],a.offset.length=0,a.offset[0]=0,a.offset[1]=a.scrollLength,a.progress=ro(0,a.scrollLength,a.current);const c=r-l;a.velocity=c>WH?0:Bw(a.current-o,c)}function JH(e,t,n){_E(e,"x",t,n),_E(e,"y",t,n),t.time=n}function eq(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const a=r.getBoundingClientRect();r=r.parentElement;const i=r.getBoundingClientRect();n.x+=a.left-i.left,n.y+=a.top-i.top}else if(r instanceof SVGGraphicsElement){const{x:a,y:i}=r.getBBox();n.x+=a,n.y+=i;let s=null,o=r.parentNode;for(;!s;)o.tagName==="svg"&&(s=o),o=r.parentNode;r=s}else break;return n}const vx={start:0,center:.5,end:1};function PE(e,t,n=0){let r=0;if(e in vx&&(e=vx[e]),typeof e=="string"){const a=parseFloat(e);e.endsWith("px")?r=a:e.endsWith("%")?e=a/100:e.endsWith("vw")?r=a/100*document.documentElement.clientWidth:e.endsWith("vh")?r=a/100*document.documentElement.clientHeight:e=a}return typeof e=="number"&&(r=t*e),n+r}const tq=[0,0];function nq(e,t,n,r){let a=Array.isArray(e)?e:tq,i=0,s=0;return typeof e=="number"?a=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?a=e.split(" "):a=[e,vx[e]?e:"0"]),i=PE(a[0],n,r),s=PE(a[1],t),i-s}const rq={All:[[0,0],[1,1]]},aq={x:0,y:0};function iq(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function sq(e,t,n){const{offset:r=rq.All}=n,{target:a=e,axis:i="y"}=n,s=i==="y"?"height":"width",o=a!==e?eq(a,e):aq,l=a===e?{width:e.scrollWidth,height:e.scrollHeight}:iq(a),c={width:e.clientWidth,height:e.clientHeight};t[i].offset.length=0;let f=!t[i].interpolate;const d=r.length;for(let h=0;hoq(e,r.target,n),update:a=>{JH(e,n,a),(r.offset||r.target)&&sq(e,n,r)},notify:()=>t(n)}}const lu=new WeakMap,ME=new WeakMap,Qv=new WeakMap,RE=e=>e===document.documentElement?window:e;function Zw(e,{container:t=document.documentElement,...n}={}){let r=Qv.get(t);r||(r=new Set,Qv.set(t,r));const a=QH(),i=lq(t,e,a,n);if(r.add(i),!lu.has(t)){const o=()=>{for(const h of r)h.measure()},l=()=>{for(const h of r)h.update(Bt.timestamp)},c=()=>{for(const h of r)h.notify()},f=()=>{Re.read(o,!1,!0),Re.read(l,!1,!0),Re.update(c,!1,!0)};lu.set(t,f);const d=RE(t);window.addEventListener("resize",f,{passive:!0}),t!==document.documentElement&&ME.set(t,XH(t,f)),d.addEventListener("scroll",f,{passive:!0})}const s=lu.get(t);return Re.read(s,!1,!0),()=>{var o;Lr(s);const l=Qv.get(t);if(!l||(l.delete(i),l.size))return;const c=lu.get(t);lu.delete(t),c&&(RE(t).removeEventListener("scroll",c),(o=ME.get(t))===null||o===void 0||o(),window.removeEventListener("resize",c))}}function cq({source:e,container:t,axis:n="y"}){e&&(t=e);const r={value:0},a=Zw(i=>{r.value=i[n].progress*100},{container:t,axis:n});return{currentTime:r,cancel:a}}const Zv=new Map;function Y3({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),Zv.has(t)||Zv.set(t,{});const r=Zv.get(t);return r[n]||(r[n]=z$()?new ScrollTimeline({source:t,axis:n}):cq({source:t,axis:n})),r[n]}function uq(e){return e.length===2}function X3(e){return e&&(e.target||e.offset)}function fq(e,t){return uq(e)||X3(t)?Zw(n=>{e(n[t.axis].progress,n)},t):G3(e,Y3(t))}function dq(e,t){if(e.flatten(),X3(t))return e.pause(),Zw(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=Y3(t);return e.attachTimeline?e.attachTimeline(n,r=>(r.pause(),G3(a=>{r.time=r.duration*a},n))):yn}}function hq(e,{axis:t="y",...n}={}){const r={axis:t,...n};return typeof e=="function"?fq(e,r):dq(e,r)}function DE(e,t){A7(!!(!t||t.current))}const pq=()=>({scrollX:Qr(0),scrollY:Qr(0),scrollXProgress:Qr(0),scrollYProgress:Qr(0)});function mq({container:e,target:t,layoutEffect:n=!0,...r}={}){const a=kc(pq);return(n?Hy:A.useEffect)(()=>(DE("target",t),DE("container",e),hq((s,{x:o,y:l})=>{a.scrollX.set(o.current),a.scrollXProgress.set(o.progress),a.scrollY.set(l.current),a.scrollYProgress.set(l.progress)},{...r,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0})),[e,t,JSON.stringify(r.offset)]),a}function yq(e){const t=kc(()=>Qr(e)),{isStatic:n}=A.useContext(Vy);if(n){const[,r]=A.useState(e);A.useEffect(()=>t.on("change",r),[])}return t}function W3(e,t){const n=yq(t()),r=()=>n.set(t());return r(),Hy(()=>{const a=()=>Re.preRender(r,!1,!0),i=e.map(s=>s.on("change",a));return()=>{i.forEach(s=>s()),Lr(r)}}),n}const gq=e=>e&&typeof e=="object"&&e.mix,vq=e=>gq(e)?e.mix:void 0;function bq(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],a=e[1+n],i=e[2+n],s=e[3+n],o=Yw(a,i,{mixer:vq(i[0]),...s});return t?o(r):o}function xq(e){Gu.current=[],e();const t=W3(Gu.current,e);return Gu.current=void 0,t}function Jv(e,t,n,r){if(typeof e=="function")return xq(e);const a=typeof t=="function"?t:bq(t,n,r);return Array.isArray(e)?$E(e,a):$E([e],([i])=>a(i))}function $E(e,t){const n=kc(()=>[]);return W3(e,()=>{n.length=0;const r=e.length;for(let a=0;atypeof e=="string",cu=()=>{let e,t;const n=new Promise((r,a)=>{e=r,t=a});return n.resolve=e,n.reject=t,n},kE=e=>e==null?"":String(e),Sq=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},wq=/###/g,LE=e=>e&&e.includes("###")?e.replace(wq,"."):e,zE=e=>!e||pe(e),Ju=(e,t,n)=>{const r=pe(t)?t.split("."):t;let a=0;for(;a{const{obj:r,k:a}=Ju(e,t,Object);if(r!==void 0||t.length===1){r[a]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),o=Ju(e,s,Object);for(;o.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),o=Ju(e,s,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${i}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${i}`]=n},jq=(e,t,n,r)=>{const{obj:a,k:i}=Ju(e,t,Object);a[i]=a[i]||[],a[i].push(n)},cm=(e,t)=>{const{obj:n,k:r}=Ju(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Aq=(e,t,n)=>{const r=cm(e,n);return r!==void 0?r:cm(t,n)},Q3=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?pe(e[r])||e[r]instanceof String||pe(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Q3(e[r],t[r],n):e[r]=t[r]);return e},xa=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Oq={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Eq=e=>pe(e)?e.replace(/[&<>"'\/]/g,t=>Oq[t]):e;class Tq{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Nq=[" ",",","?","!",";"],Cq=new Tq(20),_q=(e,t,n)=>{t=t||"",n=n||"";const r=Nq.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const a=Cq.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!a.test(e);if(!i){const s=e.indexOf(n);s>0&&!a.test(e.substring(0,s))&&(i=!0)}return i},bx=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let a=e;for(let i=0;ie==null?void 0:e.replace(/_/g,"-"),Pq={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class um{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Pq,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,a){return a&&!this.debug?null:(t=t.map(i=>pe(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),pe(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new um(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new um(this.logger,t)}}var Zr=new um;let Wy=class{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const a=this.observers[r].get(n)||0;this.observers[r].set(n,a+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...a)=>{n(...a),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([a,i])=>{for(let s=0;s{for(let s=0;s-1&&this.options.ns.splice(n,1)}getResource(t,n,r,a={}){var c,f;const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;t.includes(".")?o=t.split("."):(o=[t,n],r&&(Array.isArray(r)?o.push(...r):pe(r)&&i?o.push(...r.split(i)):o.push(r)));const l=cm(this.data,o);return!l&&!n&&!r&&t.includes(".")&&(t=o[0],n=o[1],r=o.slice(2).join(".")),l||!s||!pe(r)?l:bx((f=(c=this.data)==null?void 0:c[t])==null?void 0:f[n],r,i)}addResource(t,n,r,a,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let o=[t,n];r&&(o=o.concat(s?r.split(s):r)),t.includes(".")&&(o=t.split("."),a=n,n=o[1]),this.addNamespaces(n),IE(this.data,o,a),i.silent||this.emit("added",t,n,r,a)}addResources(t,n,r,a={silent:!1}){for(const i in r)(pe(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});a.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,a,i,s={silent:!1,skipCopy:!1}){let o=[t,n];t.includes(".")&&(o=t.split("."),a=r,r=n,n=o[1]),this.addNamespaces(n);let l=cm(this.data,o)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),a?Q3(l,r,i):l={...l,...r},IE(this.data,o,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(a=>n[a]&&Object.keys(n[a]).length>0)}toJSON(){return this.data}}var Z3={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,a){return e.forEach(i=>{var s;t=((s=this.processors[i])==null?void 0:s.process(t,n,r,a))??t}),t}};const J3=Symbol("i18next/PATH_KEY");function Mq(){const e=[],t=Object.create(null);let n;return t.get=(r,a)=>{var i;return(i=n==null?void 0:n.revoke)==null||i.call(n),a===J3?e:(e.push(a),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function vl(e,t){const{[J3]:n}=e(Mq()),r=(t==null?void 0:t.keySeparator)??".",a=(t==null?void 0:t.nsSeparator)??":",i=(t==null?void 0:t.enableSelector)==="strict";if(n.length>1&&a){const s=t==null?void 0:t.ns,o=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(o&&(i?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${a}${n.slice(1).join(r)}`}return n.join(r)}const eb=e=>!pe(e)&&typeof e!="boolean"&&typeof e!="number";class fm extends Wy{constructor(t,n={}){super(),Sq(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zr.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const a=this.resolve(t,r);if((a==null?void 0:a.res)===void 0)return!1;const i=eb(a.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!_q(t,r,a);if(s&&!o){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:pe(i)?[i]:i};const c=t.split(r);(r!==a||r===a&&this.options.ns.includes(c[0]))&&(i=c.shift()),t=c.join(a)}return{key:t,namespaces:pe(i)?[i]:i}}translate(t,n,r){let a=typeof n=="object"?{...n}:n;if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";typeof t=="function"&&(t=vl(t,{...this.options,...a})),Array.isArray(t)||(t=[String(t)]),t=t.map(L=>typeof L=="function"?vl(L,{...this.options,...a}):String(L));const i=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(t[t.length-1],a),c=l[l.length-1];let f=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const d=a.lng||this.language,h=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return h?i?{res:`${c}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:`${c}${f}${o}`:i?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:o;const p=this.resolve(t,a);let m=p==null?void 0:p.res;const g=(p==null?void 0:p.usedKey)||o,b=(p==null?void 0:p.exactUsedKey)||o,y=["[object Number]","[object Function]","[object RegExp]"],v=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,w=a.count!==void 0&&!pe(a.count),S=fm.hasDefaultValue(a),j=w?this.pluralResolver.getSuffix(d,a.count,a):"",O=a.ordinal&&w?this.pluralResolver.getSuffix(d,a.count,{ordinal:!1}):"",E=w&&!a.ordinal&&a.count===0,T=E&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${j}`]||a[`defaultValue${O}`]||a.defaultValue;let N=m;x&&!m&&S&&(N=T);const M=eb(N),C=Object.prototype.toString.apply(N);if(x&&N&&M&&!y.includes(C)&&!(pe(v)&&Array.isArray(N))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,N,{...a,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(p.res=L,p.usedParams=this.getUsedParamsDetails(a),p):L}if(s){const L=Array.isArray(N),D=L?[]:{},$=L?b:g;for(const P in N)if(Object.prototype.hasOwnProperty.call(N,P)){const k=`${$}${s}${P}`;S&&!m?D[P]=this.translate(k,{...a,defaultValue:eb(T)?T[P]:void 0,joinArrays:!1,ns:l}):D[P]=this.translate(k,{...a,joinArrays:!1,ns:l}),D[P]===k&&(D[P]=N[P])}m=D}}else if(x&&pe(v)&&Array.isArray(m))m=m.join(v),m&&(m=this.extendTranslation(m,t,a,r));else{let L=!1,D=!1;!this.isValidLookup(m)&&S&&(L=!0,m=T),this.isValidLookup(m)||(D=!0,m=o);const P=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:m,k=S&&T!==m&&this.options.updateMissing;if(D||L||k){if(this.logger.log(k?"updateKey":"missingKey",d,c,w&&!k?`${o}${this.pluralResolver.getSuffix(d,a.count,a)}`:o,k?T:m),s){const Y=this.resolve(o,{...a,keySeparator:!1});Y&&Y.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let I=[];const F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(let Y=0;Y{var ye;const Z=S&&te!==m?te:P;this.options.missingKeyHandler?this.options.missingKeyHandler(Y,c,q,Z,k,a):(ye=this.backendConnector)!=null&&ye.saveMissing&&this.backendConnector.saveMissing(Y,c,q,Z,k,a),this.emit("missingKey",Y,c,q,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?I.forEach(Y=>{const q=this.pluralResolver.getSuffixes(Y,a);E&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!q.includes(`${this.options.pluralSeparator}zero`)&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(te=>{H([Y],o+te,a[`defaultValue${te}`]||T)})}):H(I,o,T))}m=this.extendTranslation(m,t,a,p,r),D&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${c}${f}${o}`),(D||L)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${o}`:o,L?m:void 0,a))}return i?(p.res=m,p.usedParams=this.getUsedParamsDetails(a),p):m}extendTranslation(t,n,r,a,i){var l,c;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=pe(t)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(f){const p=t.match(this.interpolator.nestingRegexp);d=p&&p.length}let h=r.replace&&!pe(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||a.usedLng,r),f){const p=t.match(this.interpolator.nestingRegexp),m=p&&p.length;d(i==null?void 0:i[0])===p[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):this.translate(...p,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,o=pe(s)?[s]:s;return t!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(t=Z3.handle(o,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,a,i,s,o;return pe(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(l=>typeof l=="function"?vl(l,{...this.options,...n}):l)),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),f=c.key;a=f;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=n.count!==void 0&&!pe(n.count),p=h&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(pe(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(b=>{var y,v;this.isValidLookup(r)||(o=b,!this.checkedLoadedFor[`${g[0]}-${b}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((v=this.utils)!=null&&v.hasLoadedNamespace(o))&&(this.checkedLoadedFor[`${g[0]}-${b}`]=!0,this.logger.warn(`key "${a}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(x=>{var j;if(this.isValidLookup(r))return;s=x;const w=[f];if((j=this.i18nFormat)!=null&&j.addLookupKeys)this.i18nFormat.addLookupKeys(w,f,x,b,n);else{let O;h&&(O=this.pluralResolver.getSuffix(x,n.count,n));const E=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&O.startsWith(T)&&w.push(f+O.replace(T,this.options.pluralSeparator)),w.push(f+O),p&&w.push(f+E)),m){const N=`${f}${this.options.contextSeparator||"_"}${n.context}`;w.push(N),h&&(n.ordinal&&O.startsWith(T)&&w.push(N+O.replace(T,this.options.pluralSeparator)),w.push(N+O),p&&w.push(N+E))}}let S;for(;S=w.pop();)this.isValidLookup(r)||(i=S,r=this.getResource(x,b,S,n))}))})}),{res:r,usedKey:a,exactUsedKey:i,usedLng:s,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,a={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,a):this.resourceStore.getResource(t,n,r,a)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!pe(t.replace);let a=r?t.replace:t;if(r&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!r){a={...a};for(const i of n)delete a[i]}return a}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class UE{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zr.create("languageUtils")}getScriptPartFromCode(t){if(t=Pf(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Pf(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(pe(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const a=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const a=this.getScriptPartFromCode(r);if(this.isSupportedCode(a))return n=a;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),pe(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),a=[],i=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return pe(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):pe(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{a.includes(s)||i(this.formatLanguageCode(s))}),a}}const FE={zero:0,one:1,two:2,few:3,many:4,other:5},VE={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Rq{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Zr.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Pf(t==="dev"?"en":t),a=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:a});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:a})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),VE;if(!t.match(/-|_/))return VE;const l=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(l,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(a=>`${n}${a}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((a,i)=>FE[a]-FE[i]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,n,r={}){const a=this.getRule(t,r);return a?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const HE=(e,t,n,r=".",a=!0)=>{let i=Aq(e,t,n);return!i&&a&&pe(n)&&(i=bx(e,n,r),i===void 0&&(i=bx(t,n,r))),i},tb=e=>e.replace(/\$/g,"$$$$");class qE{constructor(t={}){var n;this.logger=Zr.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:a,prefix:i,prefixEscaped:s,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:f,unescapePrefix:d,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:b,maxReplaces:y,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:Eq,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=i?xa(i):s||"{{",this.suffix=o?xa(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":d?xa(d):"-",this.unescapeSuffix=this.unescapePrefix?"":f?xa(f):"",this.nestingPrefix=h?xa(h):p||xa("$t("),this.nestingSuffix=m?xa(m):g||xa(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=y||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,a){var p;let i,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=m=>{if(!m.includes(this.formatSeparator)){const v=HE(n,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...a,...n,interpolationkey:m}):v}const g=m.split(this.formatSeparator),b=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(HE(n,l,b,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...a,...n,interpolationkey:b})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const f=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((p=a==null?void 0:a.interpolation)==null?void 0:p.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>tb(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?tb(this.escape(m)):tb(m)}].forEach(m=>{for(o=0;i=m.regex.exec(t);){const g=i[1].trim();if(s=c(g),s===void 0)if(typeof f=="function"){const y=f(t,i,a);s=pe(y)?y:""}else if(a&&Object.prototype.hasOwnProperty.call(a,g))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else!pe(s)&&!this.useRawValueToEscape&&(s=kE(s));const b=m.safeValue(s);if(t=t.replace(i[0],b),d?(m.regex.lastIndex+=s.length,m.regex.lastIndex-=i[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,n,r={}){let a,i,s;const o=(l,c)=>{const f=this.nestingOptionsSeparator;if(!l.includes(f))return l;const d=l.split(new RegExp(`${xa(f)}[ ]*{`));let h=`{${d[1]}`;l=d[0],h=this.interpolate(h,s);const p=h.match(/'/g),m=h.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!m||((m==null?void 0:m.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),c&&(s={...c,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${f}${h}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,l};for(;a=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&!pe(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(c!==-1&&(l=a[1].slice(c).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),a[1]=a[1].slice(0,c)),i=n(o.call(this,a[1].trim(),s),s),i&&a[0]===t&&!pe(i))return i;pe(i)||(i=kE(i)),i||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),i=""),l.length&&(i=l.reduce((f,d)=>this.format(f,d,r.lng,{...r,interpolationkey:a[1].trim()}),i.trim())),t=t.replace(a[0],i),this.regexp.lastIndex=0}return t}}const Dq=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const a=r[1].slice(0,-1);t==="currency"&&!a.includes(":")?n.currency||(n.currency=a.trim()):t==="relativetime"&&!a.includes(":")?n.range||(n.range=a.trim()):a.split(";").forEach(s=>{if(s){const[o,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();n[f]||(n[f]=c),c==="false"&&(n[f]=!1),c==="true"&&(n[f]=!0),isNaN(c)||(n[f]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},KE=e=>{const t={};return(n,r,a)=>{let i=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(i={...i,[a.interpolationkey]:void 0});const s=r+JSON.stringify(i);let o=t[s];return o||(o=e(Pf(r),a),t[s]=o),o(n)}},$q=e=>(t,n,r)=>e(Pf(n),r)(t);class kq{constructor(t={}){this.logger=Zr.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?KE:$q;this.formats={number:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i});return o=>s.format(o)}),currency:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i,style:"currency"});return o=>s.format(o)}),datetime:r((a,i)=>{const s=new Intl.DateTimeFormat(a,{...i});return o=>s.format(o)}),relativetime:r((a,i)=>{const s=new Intl.RelativeTimeFormat(a,{...i});return o=>s.format(o,i.range||"day")}),list:r((a,i)=>{const s=new Intl.ListFormat(a,{...i});return o=>s.format(o)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=KE(n)}format(t,n,r,a={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&!i[0].includes(")")&&i.find(o=>o.includes(")"))){const o=i.findIndex(l=>l.includes(")"));i[0]=[i[0],...i.splice(1,o)].join(this.formatSeparator)}return i.reduce((o,l)=>{var d;const{formatName:c,formatOptions:f}=Dq(l);if(this.formats[c]){let h=o;try{const p=((d=a==null?void 0:a.formatParams)==null?void 0:d[a.interpolationkey])||{},m=p.locale||p.lng||a.locale||a.lng||r;h=this.formats[c](o,m,{...f,...a,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn(`there was no format function for ${c}`);return o},t)}}const Lq=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class zq extends Wy{constructor(t,n,r,a={}){var i,s;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=a,this.logger=Zr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(s=(i=this.backend)==null?void 0:i.init)==null||s.call(i,r,a.backend,a)}queueLoad(t,n,r,a){const i={},s={},o={},l={};return t.forEach(c=>{let f=!0;n.forEach(d=>{const h=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,f=!1,s[h]===void 0&&(s[h]=!0),i[h]===void 0&&(i[h]=!0),l[d]===void 0&&(l[d]=!0)))}),f||(o[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const a=t.split("|"),i=a[0],s=a[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const o={};this.queue.forEach(l=>{jq(l.loaded,[i],s),Lq(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const f=l.loaded[c];f.length&&f.forEach(d=>{o[c][d]===void 0&&(o[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r,a=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:a,wait:i,callback:s});return}this.readingCalls++;const o=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&f&&a{this.read(t,n,r,a+1,i*2,s)},i);return}s(c,f)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}return}return l(t,n,o)}prepareLoading(t,n,r={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();pe(t)&&(t=this.languageUtils.toResolveHierarchy(t)),pe(n)&&(n=[n]);const i=this.queueLoad(t,n,r,a);if(!i.toLoad.length)return i.pending.length||a(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),a=r[0],i=r[1];this.read(a,i,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${a} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${i} for language ${a}`,o),this.loaded(t,s,o)})}saveMissing(t,n,r,a,i,s={},o=()=>{}){var l,c,f,d,h;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((d=(f=this.services)==null?void 0:f.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((h=this.backend)!=null&&h.create){const p={...s,isUpdate:i},m=this.backend.create.bind(this.backend);if(m.length<6)try{let g;m.length===5?g=m(t,n,r,a,p):g=m(t,n,r,a),g&&typeof g.then=="function"?g.then(b=>o(null,b)).catch(o):o(null,g)}catch(g){o(g)}else m(t,n,r,a,o,p)}!t||!t[0]||this.store.addResource(t[0],n,r,a)}}}const nb=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),pe(e[1])&&(t.defaultValue=e[1]),pe(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),GE=e=>(pe(e.ns)&&(e.ns=[e.ns]),pe(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),pe(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Th=()=>{},Iq=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ef extends Wy{constructor(t={},n){if(super(),this.options=GE(t),this.services={},this.logger=Zr,this.modules={external:[]},Iq(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(pe(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=nb();this.options={...r,...this.options,...GE(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const a=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Zr.init(a(this.modules.logger),this.options):Zr.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=kq;const f=new UE(this.options);this.store=new BE(this.options.resources,this.options);const d=this.services;d.logger=Zr,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new Rq(f,{prepend:this.options.pluralSeparator}),c&&(d.formatter=a(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new qE(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new zq(a(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(d.languageDetector=a(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=a(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new fm(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Th),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...f)=>this.store[c](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...f)=>(this.store[c](...f),this)});const o=cu(),l=()=>{const c=(f,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(d),n(f,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(t,n=Th){var i,s;let r=n;const a=pe(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((a==null?void 0:a.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(d=>{d!=="cimode"&&(o.includes(d)||o.push(d))})};a?l(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>l(f)),(s=(i=this.options.preload)==null?void 0:i.forEach)==null||s.call(i,c=>l(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const a=cu();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Th),this.services.backendConnector.reload(t,n,i=>{a.resolve(),r(i)}),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Z3.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},i=(o,l)=>{l?this.isLanguageChangingTo===t&&(a(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(o,(...c)=>this.t(...c))},s=o=>{var f,d;!t&&!o&&this.services.languageDetector&&(o=[]);const l=pe(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(pe(o)?[o]:o);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),(d=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||d.call(f,c)),this.loadResources(c,h=>{i(h,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,a){const i=a==null?void 0:a.scopeNs,s=(o,l,...c)=>{let f;typeof l!="object"?f=this.options.overloadTranslationOptionHandler([o,l].concat(c)):f={...l},f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs;const d=f.ns!==void 0&&f.ns!==null;f.ns=f.ns||s.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||r||s.keyPrefix);const h={...this.options,...f};Array.isArray(i)&&!d&&(h.ns=i),typeof f.keyPrefix=="function"&&(f.keyPrefix=vl(f.keyPrefix,h));const p=this.options.keySeparator||".";let m;return f.keyPrefix&&Array.isArray(o)?m=o.map(g=>(typeof g=="function"&&(g=vl(g,h)),`${f.keyPrefix}${p}${g}`)):(typeof o=="function"&&(o=vl(o,h)),m=f.keyPrefix?`${f.keyPrefix}${p}${o}`:o),this.t(m,f)};return pe(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!a||s(i,t)))}loadNamespaces(t,n){const r=cu();return this.options.ns?(pe(t)&&(t=[t]),t.forEach(a=>{this.options.ns.includes(a)||this.options.ns.push(a)}),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=cu();pe(t)&&(t=[t]);const a=this.options.preload||[],i=t.filter(s=>!a.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=a.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var a,i;if(t||(t=this.resolvedLanguage||(((a=this.languages)==null?void 0:a.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const s=new Intl.Locale(t);if(s&&s.getTextInfo){const o=s.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new UE(nb());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new ef(t,n);return r.createInstance=ef.createInstance,r}cloneInstance(t={},n=Th){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const a={...this.options,...t,isClone:!0},i=new ef(a);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(o=>{i[o]=this[o]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((f,d)=>(f[d]={...l[c][d]},f),l[c]),l),{});i.store=new BE(o,a),i.services.resourceStore=i.store}if(t.interpolation){const l={...nb().interpolation,...this.options.interpolation,...t.interpolation},c={...a,interpolation:l};i.services.interpolator=new qE(c)}return i.translator=new fm(i.services,a),i.translator.on("*",(o,...l)=>{i.emit(o,...l)}),i.init(a,n),i.translator.options=a,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const rn=ef.createInstance();rn.createInstance;rn.dir;rn.init;rn.loadResources;rn.reloadResources;rn.use;rn.changeLanguage;rn.getFixedT;rn.t;rn.exists;rn.setDefaultNamespace;rn.hasLoadedNamespace;rn.loadNamespaces;rn.loadLanguages;const Bq=(e,t,n,r)=>{var i,s,o,l;const a=[n,{code:t,...r||{}}];if((s=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&s.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);ao(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(l=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&l.warn?e.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},YE={},xx=(e,t,n,r)=>{ao(n)&&YE[n]||(ao(n)&&(YE[n]=new Date),Bq(e,t,n,r))},ek=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Sx=(e,t,n)=>{e.loadNamespaces(t,ek(e,n))},XE=(e,t,n,r)=>{if(ao(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Sx(e,n,r);n.forEach(a=>{e.options.ns.indexOf(a)<0&&e.options.ns.push(a)}),e.loadLanguages(t,ek(e,r))},Uq=(e,t,n={})=>!t.languages||!t.languages.length?(xx(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!a(r.isLanguageChangingTo,e))return!1}}),ao=e=>typeof e=="string",Fq=e=>typeof e=="object"&&e!==null,Vq=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Hq={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},qq=e=>Hq[e],Kq=e=>e.replace(Vq,qq);let wx={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Kq,transDefaultProps:void 0};const Gq=(e={})=>{wx={...wx,...e}},Yq=()=>wx;let tk;const Xq=e=>{tk=e},Wq=()=>tk,Qq={type:"3rdParty",init(e){Gq(e.options.react),Xq(e)}},Zq=A.createContext();class Jq{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var nk={exports:{}},rk={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Xl=A;function eK(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tK=typeof Object.is=="function"?Object.is:eK,nK=Xl.useState,rK=Xl.useEffect,aK=Xl.useLayoutEffect,iK=Xl.useDebugValue;function sK(e,t){var n=t(),r=nK({inst:{value:n,getSnapshot:t}}),a=r[0].inst,i=r[1];return aK(function(){a.value=n,a.getSnapshot=t,rb(a)&&i({inst:a})},[e,n,t]),rK(function(){return rb(a)&&i({inst:a}),e(function(){rb(a)&&i({inst:a})})},[e]),iK(n),n}function rb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tK(e,n)}catch{return!0}}function oK(e,t){return t()}var lK=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oK:sK;rk.useSyncExternalStore=Xl.useSyncExternalStore!==void 0?Xl.useSyncExternalStore:lK;nk.exports=rk;var cK=nk.exports;const uK=(e,t)=>{if(ao(t))return t;if(Fq(t)&&ao(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const n=e[e.length-1];return typeof n=="function"?"":n}return e},fK={t:uK,ready:!1},dK=()=>()=>{},ni=(e,t={})=>{var T,N,M;const{i18n:n}=t,{i18n:r,defaultNS:a}=A.useContext(Zq)||{},i=n||r||Wq();i&&!i.reportNamespaces&&(i.reportNamespaces=new Jq),i||xx(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const s=A.useMemo(()=>{var C;return{...Yq(),...(C=i==null?void 0:i.options)==null?void 0:C.react,...t}},[i,t]),{useSuspense:o,keyPrefix:l}=s,c=a||((T=i==null?void 0:i.options)==null?void 0:T.defaultNS),f=ao(c)?[c]:c||["translation"],d=A.useMemo(()=>f,f);(M=(N=i==null?void 0:i.reportNamespaces)==null?void 0:N.addUsedNamespaces)==null||M.call(N,d);const h=A.useRef(0),p=A.useCallback(C=>{if(!i)return dK;const{bindI18n:L,bindI18nStore:D}=s,$=()=>{h.current+=1,C()};return L&&i.on(L,$),D&&i.store.on(D,$),()=>{L&&L.split(" ").forEach(P=>i.off(P,$)),D&&D.split(" ").forEach(P=>i.store.off(P,$))}},[i,s]),m=A.useRef(),g=A.useCallback(()=>{if(!i)return fK;const C=!!(i.isInitialized||i.initializedStoreOnce)&&d.every(I=>Uq(I,i,s)),L=t.lng||i.language,D=h.current,$=m.current;if($&&$.ready===C&&$.lng===L&&$.keyPrefix===l&&$.revision===D)return $;const k={t:i.getFixedT(L,s.nsMode==="fallback"?d:d[0],l,{scopeNs:d}),ready:C,lng:L,keyPrefix:l,revision:D};return m.current=k,k},[i,d,l,s,t.lng]),[b,y]=A.useState(0),{t:v,ready:x}=cK.useSyncExternalStore(p,g,g);A.useEffect(()=>{if(i&&!x&&!o){const C=()=>y(L=>L+1);t.lng?XE(i,t.lng,d,C):Sx(i,d,C)}},[i,t.lng,d,x,o,b]);const w=i||{},S=A.useRef(null),j=A.useRef(),O=C=>{const L=Object.getOwnPropertyDescriptors(C);L.__original&&delete L.__original;const D=Object.create(Object.getPrototypeOf(C),L);if(!Object.prototype.hasOwnProperty.call(D,"__original"))try{Object.defineProperty(D,"__original",{value:C,writable:!1,enumerable:!1,configurable:!1})}catch{}return D},E=A.useMemo(()=>{const C=w,L=C==null?void 0:C.language;let D=C;C&&(S.current&&S.current.__original===C?j.current!==L?(D=O(C),S.current=D,j.current=L):D=S.current:(D=O(C),S.current=D,j.current=L));const $=!x&&!o?(...k)=>(xx(i,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),v(...k)):v,P=[$,D,x];return P.t=$,P.i18n=D,P.ready=x,P},[v,w,x,w.resolvedLanguage,w.language,w.languages]);if(i&&o&&!x)throw new Promise(C=>{const L=()=>C();t.lng?XE(i,t.lng,d,L):Sx(i,d,L)});return E};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hK=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ak=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var pK={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mK=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...o},l)=>A.createElement("svg",{ref:l,...pK,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ak("lucide",a),...o},[...s.map(([c,f])=>A.createElement(c,f)),...Array.isArray(i)?i:[i]]));/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ae=(e,t)=>{const n=A.forwardRef(({className:r,...a},i)=>A.createElement(mK,{ref:i,iconNode:t,className:ak(`lucide-${hK(e)}`,r),...a}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ik=ae("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Es=ae("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jw=ae("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sk=ae("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ok=ae("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yK=ae("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lk=ae("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gK=ae("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pu=ae("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vK=ae("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bK=ae("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ck=ae("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uk=ae("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fk=ae("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WE=ae("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mf=ae("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xK=ae("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dk=ae("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hk=ae("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pk=ae("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ft=ae("Flower2",[["path",{d:"M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1",key:"3pnvol"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M12 10v12",key:"6ubwww"}],["path",{d:"M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z",key:"9hd38g"}],["path",{d:"M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z",key:"ufn41s"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mk=ae("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SK=ae("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wK=ae("HandHeart",[["path",{d:"M11 14h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 16",key:"1ifwr1"}],["path",{d:"m7 20 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"17abbs"}],["path",{d:"m2 15 6 6",key:"10dquu"}],["path",{d:"M19.5 8.5c.7-.7 1.5-1.6 1.5-2.7A2.73 2.73 0 0 0 16 4a2.78 2.78 0 0 0-5 1.8c0 1.2.8 2 1.5 2.8L16 12Z",key:"1h3036"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jK=ae("Headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rf=ae("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yk=ae("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const AK=ae("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ej=ae("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QE=ae("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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gk=ae("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dm=ae("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Df=ae("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vk=ae("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OK=ae("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZE=ae("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EK=ae("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tj=ae("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const TK=ae("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JE=ae("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nj=ae("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qy=ae("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bk=ae("ScrollText",[["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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rj=ae("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NK=ae("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xk=ae("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aj=ae("ShieldCheck",[["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",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ij=ae("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sj=ae("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CK=ae("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bl=ae("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xr=ae("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wa=ae("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bd=ae("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _K=ae("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PK=ae("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MK=ae("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const RK=ae("TriangleAlert",[["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"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ud=ae("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sk=ae("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wk=ae("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.400.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jk=ae("Users",[["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"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);function Ak(e,t){return function(){return e.apply(t,arguments)}}const{toString:DK}=Object.prototype,{getPrototypeOf:Zy}=Object,{iterator:Jy,toStringTag:Ok}=Symbol,eg=(e=>t=>{const n=DK.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Br=e=>(e=e.toLowerCase(),t=>eg(t)===e),tg=e=>t=>typeof t===e,{isArray:io}=Array,Wl=tg("undefined");function Ic(e){return e!==null&&!Wl(e)&&e.constructor!==null&&!Wl(e.constructor)&&Cn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ek=Br("ArrayBuffer");function $K(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ek(e.buffer),t}const kK=tg("string"),Cn=tg("function"),Tk=tg("number"),Fd=e=>e!==null&&typeof e=="object",LK=e=>e===!0||e===!1,gp=e=>{if(eg(e)!=="object")return!1;const t=Zy(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ok in e)&&!(Jy in e)},zK=e=>{if(!Fd(e)||Ic(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},IK=Br("Date"),BK=Br("File"),UK=e=>!!(e&&typeof e.uri<"u"),FK=e=>e&&typeof e.getParts<"u",VK=Br("Blob"),HK=Br("FileList"),qK=e=>Fd(e)&&Cn(e.pipe);function KK(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const eT=KK(),tT=typeof eT.FormData<"u"?eT.FormData:void 0,GK=e=>{if(!e)return!1;if(tT&&e instanceof tT)return!0;const t=Zy(e);if(!t||t===Object.prototype||!Cn(e.append))return!1;const n=eg(e);return n==="formdata"||n==="object"&&Cn(e.toString)&&e.toString()==="[object FormData]"},YK=Br("URLSearchParams"),[XK,WK,QK,ZK]=["ReadableStream","Request","Response","Headers"].map(Br),JK=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vd(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),io(e))for(r=0,a=e.length;r0;)if(a=n[r],t===a.toLowerCase())return a;return null}const Ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ck=e=>!Wl(e)&&e!==Ts;function jx(...e){const{caseless:t,skipUndefined:n}=Ck(this)&&this||{},r={},a=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const o=t&&typeof s=="string"&&Nk(r,s)||s,l=Ax(r,o)?r[o]:void 0;gp(l)&&gp(i)?r[o]=jx(l,i):gp(i)?r[o]=jx({},i):io(i)?r[o]=i.slice():(!n||!Wl(i))&&(r[o]=i)};for(let i=0,s=e.length;i(Vd(t,(a,i)=>{n&&Cn(a)?Object.defineProperty(e,i,{__proto__:null,value:Ak(a,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),tG=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),nG=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},rG=(e,t,n,r)=>{let a,i,s;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!r||r(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=n!==!1&&Zy(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},aG=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},iG=e=>{if(!e)return null;if(io(e))return e;let t=e.length;if(!Tk(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sG=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zy(Uint8Array)),oG=(e,t)=>{const r=(e&&e[Jy]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},lG=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},cG=Br("HTMLFormElement"),uG=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),Ax=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),{propertyIsEnumerable:fG}=Object.prototype,dG=Br("RegExp"),_k=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Vd(n,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(r[i]=s||a)}),Object.defineProperties(e,r)},hG=e=>{_k(e,(t,n)=>{if(Cn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Cn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},pG=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return io(e)?r(e):r(String(e).split(t)),n},mG=()=>{},yG=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function gG(e){return!!(e&&Cn(e.append)&&e[Ok]==="FormData"&&e[Jy])}const vG=e=>{const t=new WeakSet,n=r=>{if(Fd(r)){if(t.has(r))return;if(Ic(r))return r;if(!("toJSON"in r)){t.add(r);const a=io(r)?[]:{};return Vd(r,(i,s)=>{const o=n(i);!Wl(o)&&(a[s]=o)}),t.delete(r),a}}return r};return n(e)},bG=Br("AsyncFunction"),xG=e=>e&&(Fd(e)||Cn(e))&&Cn(e.then)&&Cn(e.catch),Pk=((e,t)=>e?setImmediate:t?((n,r)=>(Ts.addEventListener("message",({source:a,data:i})=>{a===Ts&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Ts.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Cn(Ts.postMessage)),SG=typeof queueMicrotask<"u"?queueMicrotask.bind(Ts):typeof process<"u"&&process.nextTick||Pk,wG=e=>e!=null&&Cn(e[Jy]),z={isArray:io,isArrayBuffer:Ek,isBuffer:Ic,isFormData:GK,isArrayBufferView:$K,isString:kK,isNumber:Tk,isBoolean:LK,isObject:Fd,isPlainObject:gp,isEmptyObject:zK,isReadableStream:XK,isRequest:WK,isResponse:QK,isHeaders:ZK,isUndefined:Wl,isDate:IK,isFile:BK,isReactNativeBlob:UK,isReactNative:FK,isBlob:VK,isRegExp:dG,isFunction:Cn,isStream:qK,isURLSearchParams:YK,isTypedArray:sG,isFileList:HK,forEach:Vd,merge:jx,extend:eG,trim:JK,stripBOM:tG,inherits:nG,toFlatObject:rG,kindOf:eg,kindOfTest:Br,endsWith:aG,toArray:iG,forEachEntry:oG,matchAll:lG,isHTMLForm:cG,hasOwnProperty:Ax,hasOwnProp:Ax,reduceDescriptors:_k,freezeMethods:hG,toObjectSet:pG,toCamelCase:uG,noop:mG,toFiniteNumber:yG,findKey:Nk,global:Ts,isContextDefined:Ck,isSpecCompliantForm:gG,toJSONObject:vG,isAsyncFn:bG,isThenable:xG,setImmediate:Pk,asap:SG,isIterable:wG},jG=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),AG=e=>{const t={};let n,r,a;return e&&e.split(` +`).forEach(function(s){a=s.indexOf(":"),n=s.substring(0,a).trim().toLowerCase(),r=s.substring(a+1).trim(),!(!n||t[n]&&jG[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function OG(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const EG=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),TG=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function oj(e,t){return z.isArray(e)?e.map(n=>oj(n,t)):OG(String(e).replace(t,""))}const NG=e=>oj(e,EG),CG=e=>oj(e,TG);function Mk(e){const t=Object.create(null);return z.forEach(e.toJSON(),(n,r)=>{t[r]=CG(n)}),t}const nT=Symbol("internals");function uu(e){return e&&String(e).trim().toLowerCase()}function vp(e){return e===!1||e==null?e:z.isArray(e)?e.map(vp):NG(String(e))}function _G(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const PG=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ab(e,t,n,r,a){if(z.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!z.isString(t)){if(z.isString(r))return t.indexOf(r)!==-1;if(z.isRegExp(r))return r.test(t)}}function MG(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function RG(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(a,i,s){return this[r].call(this,t,a,i,s)},configurable:!0})})}let gn=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(o,l,c){const f=uu(l);if(!f)return;const d=z.findKey(a,f);(!d||a[d]===void 0||c===!0||c===void 0&&a[d]!==!1)&&(a[d||l]=vp(o))}const s=(o,l)=>z.forEach(o,(c,f)=>i(c,f,l));if(z.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(z.isString(t)&&(t=t.trim())&&!PG(t))s(AG(t),n);else if(z.isObject(t)&&z.isIterable(t)){let o={},l,c;for(const f of t){if(!z.isArray(f))throw new TypeError("Object iterator must return a key-value pair");o[c=f[0]]=(l=o[c])?z.isArray(l)?[...l,f[1]]:[l,f[1]]:f[1]}s(o,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=uu(t),t){const r=z.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return _G(a);if(z.isFunction(n))return n.call(this,a,r);if(z.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=uu(t),t){const r=z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ab(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(s){if(s=uu(s),s){const o=z.findKey(r,s);o&&(!n||ab(r,r[o],o,n))&&(delete r[o],a=!0)}}return z.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||ab(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return z.forEach(this,(a,i)=>{const s=z.findKey(r,i);if(s){n[s]=vp(a),delete n[i];return}const o=t?MG(i):String(i).trim();o!==i&&delete n[i],n[o]=vp(a),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return z.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&z.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[nT]=this[nT]={accessors:{}}).accessors,a=this.prototype;function i(s){const o=uu(s);r[o]||(RG(a,s),r[o]=!0)}return z.isArray(t)?t.forEach(i):i(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});z.freezeMethods(gn);const DG="[REDACTED ****]";function $G(e){if(z.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function kG(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],a=i=>{if(i===null||typeof i!="object"||z.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof gn&&(i=i.toJSON()),r.push(i);let s;if(z.isArray(i))s=[],i.forEach((o,l)=>{const c=a(o);z.isUndefined(c)||(s[l]=c)});else{if(!z.isPlainObject(i)&&$G(i))return r.pop(),i;s=Object.create(null);for(const[o,l]of Object.entries(i)){const c=n.has(o.toLowerCase())?DG:a(l);z.isUndefined(c)||(s[o]=c)}}return r.pop(),s};return a(e)}let re=class Rk extends Error{static from(t,n,r,a,i,s){const o=new Rk(t.message,n||t.code,r,a,i);return o.cause=t,o.name=t.name,t.status!=null&&o.status==null&&(o.status=t.status),s&&Object.assign(o,s),o}constructor(t,n,r,a,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&z.hasOwnProp(t,"redact")?t.redact:void 0,r=z.isArray(n)&&n.length>0?kG(t,n):z.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};re.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";re.ERR_BAD_OPTION="ERR_BAD_OPTION";re.ECONNABORTED="ECONNABORTED";re.ETIMEDOUT="ETIMEDOUT";re.ECONNREFUSED="ECONNREFUSED";re.ERR_NETWORK="ERR_NETWORK";re.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";re.ERR_DEPRECATED="ERR_DEPRECATED";re.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";re.ERR_BAD_REQUEST="ERR_BAD_REQUEST";re.ERR_CANCELED="ERR_CANCELED";re.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";re.ERR_INVALID_URL="ERR_INVALID_URL";re.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const LG=null;function Ox(e){return z.isPlainObject(e)||z.isArray(e)}function Dk(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function ib(e,t,n){return e?e.concat(t).map(function(a,i){return a=Dk(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function zG(e){return z.isArray(e)&&!e.some(Ox)}const IG=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function ng(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,y){return!z.isUndefined(y[b])});const r=n.metaTokens,a=n.visitor||d,i=n.dots,s=n.indexes,o=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,c=o&&z.isSpecCompliantForm(t);if(!z.isFunction(a))throw new TypeError("visitor must be a function");function f(g){if(g===null)return"";if(z.isDate(g))return g.toISOString();if(z.isBoolean(g))return g.toString();if(!c&&z.isBlob(g))throw new re("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(g)||z.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,b,y){let v=g;if(z.isReactNative(t)&&z.isReactNativeBlob(g))return t.append(ib(y,b,i),f(g)),!1;if(g&&!y&&typeof g=="object"){if(z.endsWith(b,"{}"))b=r?b:b.slice(0,-2),g=JSON.stringify(g);else if(z.isArray(g)&&zG(g)||(z.isFileList(g)||z.endsWith(b,"[]"))&&(v=z.toArray(g)))return b=Dk(b),v.forEach(function(w,S){!(z.isUndefined(w)||w===null)&&t.append(s===!0?ib([b],S,i):s===null?b:b+"[]",f(w))}),!1}return Ox(g)?!0:(t.append(ib(y,b,i),f(g)),!1)}const h=[],p=Object.assign(IG,{defaultVisitor:d,convertValue:f,isVisitable:Ox});function m(g,b,y=0){if(!z.isUndefined(g)){if(y>l)throw new re("Object is too deeply nested ("+y+" levels). Max depth: "+l,re.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(g)!==-1)throw new Error("Circular reference detected in "+b.join("."));h.push(g),z.forEach(g,function(x,w){(!(z.isUndefined(x)||x===null)&&a.call(t,x,z.isString(w)?w.trim():w,b,p))===!0&&m(x,b?b.concat(w):[w],y+1)}),h.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return m(e),t}function rT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function lj(e,t){this._pairs=[],e&&ng(e,this,t)}const $k=lj.prototype;$k.append=function(t,n){this._pairs.push([t,n])};$k.toString=function(t){const n=t?function(r){return t.call(this,r,rT)}:rT;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function BG(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function kk(e,t,n){if(!t)return e;const r=n&&n.encode||BG,a=z.isFunction(n)?{serialize:n}:n,i=a&&a.serialize;let s;if(i?s=i(t,a):s=z.isURLSearchParams(t)?t.toString():new lj(t,a).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class aT{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const cj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},UG=typeof URLSearchParams<"u"?URLSearchParams:lj,FG=typeof FormData<"u"?FormData:null,VG=typeof Blob<"u"?Blob:null,HG={isBrowser:!0,classes:{URLSearchParams:UG,FormData:FG,Blob:VG},protocols:["http","https","file","blob","url","data"]},uj=typeof window<"u"&&typeof document<"u",Ex=typeof navigator=="object"&&navigator||void 0,qG=uj&&(!Ex||["ReactNative","NativeScript","NS"].indexOf(Ex.product)<0),KG=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",GG=uj&&window.location.href||"http://localhost",YG=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:uj,hasStandardBrowserEnv:qG,hasStandardBrowserWebWorkerEnv:KG,navigator:Ex,origin:GG},Symbol.toStringTag,{value:"Module"})),Jt={...YG,...HG};function XG(e,t){return ng(e,new Jt.classes.URLSearchParams,{visitor:function(n,r,a,i){return Jt.isNode&&z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function WG(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function QG(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r=n.length;return s=!s&&z.isArray(a)?a.length:s,l?(z.hasOwnProp(a,s)?a[s]=z.isArray(a[s])?a[s].concat(r):[a[s],r]:a[s]=r,!o):((!z.hasOwnProp(a,s)||!z.isObject(a[s]))&&(a[s]=[]),t(n,r,a[s],i)&&z.isArray(a[s])&&(a[s]=QG(a[s])),!o)}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,(r,a)=>{t(WG(r),a,n,0)}),n}return null}const Mo=(e,t)=>e!=null&&z.hasOwnProp(e,t)?e[t]:void 0;function ZG(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Hd={transitional:cj,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=z.isObject(t);if(i&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return a?JSON.stringify(Lk(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){const l=Mo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return XG(t,l).toString();if((o=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=Mo(this,"env"),f=c&&c.FormData;return ng(o?{"files[]":t}:t,f&&new f,l)}}return i||a?(n.setContentType("application/json",!1),ZG(t)):t}],transformResponse:[function(t){const n=Mo(this,"transitional")||Hd.transitional,r=n&&n.forcedJSONParsing,a=Mo(this,"responseType"),i=a==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(r&&!a||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,Mo(this,"parseReviver"))}catch(l){if(o)throw l.name==="SyntaxError"?re.from(l,re.ERR_BAD_RESPONSE,this,null,Mo(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Jt.classes.FormData,Blob:Jt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch","query"],e=>{Hd.headers[e]={}});function sb(e,t){const n=this||Hd,r=t||n,a=gn.from(r.headers);let i=r.data;return z.forEach(e,function(o){i=o.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function zk(e){return!!(e&&e.__CANCEL__)}let qd=class extends re{constructor(t,n,r){super(t??"canceled",re.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ik(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new re("Request failed with status code "+n.status,n.status>=400&&n.status<500?re.ERR_BAD_REQUEST:re.ERR_BAD_RESPONSE,n.config,n.request,n))}function JG(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function eY(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),f=r[i];s||(s=c),n[a]=l,r[a]=c;let d=i,h=0;for(;d!==a;)h+=n[d++],d=d%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-s{n=f,a=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{const f=Date.now(),d=f-n;d>=r?s(c,f):(a=c,i||(i=setTimeout(()=>{i=null,s(a)},r-d)))},()=>a&&s(a)]}const hm=(e,t,n=3)=>{let r=0;const a=eY(50,250);return tY(i=>{if(!i||typeof i.loaded!="number")return;const s=i.loaded,o=i.lengthComputable?i.total:void 0,l=o!=null?Math.min(s,o):s,c=Math.max(0,l-r),f=a(c);r=Math.max(r,l);const d={loaded:l,total:o,progress:o?l/o:void 0,bytes:c,rate:f||void 0,estimated:f&&o?(o-l)/f:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(d)},n)},iT=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},sT=e=>(...t)=>z.asap(()=>e(...t)),nY=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,rY=Jt.hasStandardBrowserEnv?{write(e,t,n,r,a,i,s){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];z.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),z.isString(r)&&o.push(`path=${r}`),z.isString(a)&&o.push(`domain=${a}`),i===!0&&o.push("secure"),z.isString(s)&&o.push(`SameSite=${s}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof gn?{...e}:e;function so(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,f,d,h){return z.isPlainObject(c)&&z.isPlainObject(f)?z.merge.call({caseless:h},c,f):z.isPlainObject(f)?z.merge({},f):z.isArray(f)?f.slice():f}function a(c,f,d,h){if(z.isUndefined(f)){if(!z.isUndefined(c))return r(void 0,c,d,h)}else return r(c,f,d,h)}function i(c,f){if(!z.isUndefined(f))return r(void 0,f)}function s(c,f){if(z.isUndefined(f)){if(!z.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function o(c,f,d){if(z.hasOwnProp(t,d))return r(c,f);if(z.hasOwnProp(e,d))return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:o,headers:(c,f,d)=>a(oT(c),oT(f),d,!0)};return z.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const d=z.hasOwnProp(l,f)?l[f]:a,h=z.hasOwnProp(e,f)?e[f]:void 0,p=z.hasOwnProp(t,f)?t[f]:void 0,m=d(h,p,f);z.isUndefined(m)&&d!==o||(n[f]=m)}),n}const sY=["content-type","content-length"];function oY(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,a])=>{sY.includes(r.toLowerCase())&&e.set(r,a)})}const lY=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Uk(e){const t=so({},e),n=h=>z.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let a=n("withXSRFToken");const i=n("xsrfHeaderName"),s=n("xsrfCookieName");let o=n("headers");const l=n("auth"),c=n("baseURL"),f=n("allowAbsoluteUrls"),d=n("url");if(t.headers=o=gn.from(o),t.url=kk(Bk(c,d,f),n("params"),n("paramsSerializer")),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?lY(l.password):""))),z.isFormData(r)&&(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv||z.isReactNative(r)?o.setContentType(void 0):z.isFunction(r.getHeaders)&&oY(o,r.getHeaders(),n("formDataHeaderPolicy"))),Jt.hasStandardBrowserEnv&&(z.isFunction(a)&&(a=a(t)),a===!0||a==null&&nY(t.url))){const p=i&&s&&rY.read(s);p&&o.set(i,p)}return t}const cY=typeof XMLHttpRequest<"u",uY=cY&&function(e){return new Promise(function(n,r){const a=Uk(e);let i=a.data;const s=gn.from(a.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=a,f,d,h,p,m;function g(){p&&p(),m&&m(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(a.method.toUpperCase(),a.url,!0),b.timeout=a.timeout;function y(){if(!b)return;const x=gn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),S={data:!o||o==="text"||o==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:x,config:e,request:b};Ik(function(O){n(O),g()},function(O){r(O),g()},S),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(y)},b.onabort=function(){b&&(r(new re("Request aborted",re.ECONNABORTED,e,b)),g(),b=null)},b.onerror=function(w){const S=w&&w.message?w.message:"Network Error",j=new re(S,re.ERR_NETWORK,e,b);j.event=w||null,r(j),g(),b=null},b.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const S=a.transitional||cj;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),r(new re(w,S.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,b)),g(),b=null},i===void 0&&s.setContentType(null),"setRequestHeader"in b&&z.forEach(Mk(s),function(w,S){b.setRequestHeader(S,w)}),z.isUndefined(a.withCredentials)||(b.withCredentials=!!a.withCredentials),o&&o!=="json"&&(b.responseType=a.responseType),c&&([h,m]=hm(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,p]=hm(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(f=x=>{b&&(r(!x||x.type?new qd(null,e,b):x),b.abort(),g(),b=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const v=JG(a.url);if(v&&!Jt.protocols.includes(v)){r(new re("Unsupported protocol "+v+":",re.ERR_BAD_REQUEST,e));return}b.send(i||null)})},fY=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const a=function(l){if(!r){r=!0,s();const c=l instanceof Error?l:this.reason;n.abort(c instanceof re?c:new qd(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,a(new re(`timeout of ${t}ms exceeded`,re.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),e=null)};e.forEach(l=>l.addEventListener("abort",a));const{signal:o}=n;return o.unsubscribe=()=>z.asap(s),o},dY=function*(e,t){let n=e.byteLength;if(n{const a=hY(e,t);let i=0,s,o=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:f}=await a.next();if(c){o(),l.close();return}let d=f.byteLength;if(n){let h=i+=d;n(h)}l.enqueue(new Uint8Array(f))}catch(c){throw o(c),c}},cancel(l){return o(l),a.return()}},{highWaterMark:2})};function mY(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let s=r.length;const o=r.length;for(let p=0;p=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(s-=2,p+=2)}let l=0,c=o-1;const f=p=>p>=2&&r.charCodeAt(p-2)===37&&r.charCodeAt(p-1)===51&&(r.charCodeAt(p)===68||r.charCodeAt(p)===100);c>=0&&(r.charCodeAt(c)===61?(l++,c--):f(c)&&(l++,c-=3)),l===1&&c>=0&&(r.charCodeAt(c)===61||f(c))&&l++;const h=Math.floor(s/4)*3-(l||0);return h>0?h:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let i=0;for(let s=0,o=r.length;s=55296&&l<=56319&&s+1=56320&&c<=57343?(i+=4,s++):i+=3}else i+=3}return i}const fj="1.17.0",cT=64*1024,{isFunction:Nh}=z,yY=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),uT=e=>{if(!z.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},fT=(e,...t)=>{try{return!!e(...t)}catch{return!1}},gY=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},vY=e=>{const t=z.global!==void 0&&z.global!==null?z.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:i,Response:s}=e,o=a?Nh(a):typeof fetch=="function",l=Nh(i),c=Nh(s);if(!o)return!1;const f=o&&Nh(n),d=o&&(typeof r=="function"?(y=>v=>y.encode(v))(new r):async y=>new Uint8Array(await new i(y).arrayBuffer())),h=l&&f&&fT(()=>{let y=!1;const v=new i(Jt.origin,{body:new n,method:"POST",get duplex(){return y=!0,"half"}}),x=v.headers.has("Content-Type");return v.body!=null&&v.body.cancel(),y&&!x}),p=c&&f&&fT(()=>z.isReadableStream(new s("").body)),m={stream:p&&(y=>y.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!m[y]&&(m[y]=(v,x)=>{let w=v&&v[y];if(w)return w.call(v);throw new re(`Response type '${y}' is not supported`,re.ERR_NOT_SUPPORT,x)})});const g=async y=>{if(y==null)return 0;if(z.isBlob(y))return y.size;if(z.isSpecCompliantForm(y))return(await new i(Jt.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(z.isArrayBufferView(y)||z.isArrayBuffer(y))return y.byteLength;if(z.isURLSearchParams(y)&&(y=y+""),z.isString(y))return(await d(y)).byteLength},b=async(y,v)=>{const x=z.toFiniteNumber(y.getContentLength());return x??g(v)};return async y=>{let{url:v,method:x,data:w,signal:S,cancelToken:j,timeout:O,onDownloadProgress:E,onUploadProgress:T,responseType:N,headers:M,withCredentials:C="same-origin",fetchOptions:L,maxContentLength:D,maxBodyLength:$}=Uk(y);const P=z.isNumber(D)&&D>-1,k=z.isNumber($)&&$>-1,I=Z=>z.hasOwnProp(y,Z)?y[Z]:void 0;let F=a||fetch;N=N?(N+"").toLowerCase():"text";let H=fY([S,j&&j.toAbortSignal()],O),Y=null;const q=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let te;try{let Z;const ye=I("auth");if(ye){const X=ye.username||"",V=ye.password||"";Z={username:X,password:V}}if(gY(v)){const X=new URL(v,Jt.origin);if(!Z&&(X.username||X.password)){const V=uT(X.username),_e=uT(X.password);Z={username:V,password:_e}}(X.username||X.password)&&(X.username="",X.password="",v=X.href)}if(Z&&(M.delete("authorization"),M.set("Authorization","Basic "+btoa(yY((Z.username||"")+":"+(Z.password||""))))),P&&typeof v=="string"&&v.startsWith("data:")&&mY(v)>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y);if(k&&x!=="get"&&x!=="head"){const X=await b(M,w);if(typeof X=="number"&&isFinite(X)&&X>$)throw new re("Request body larger than maxBodyLength limit",re.ERR_BAD_REQUEST,y,Y)}if(T&&h&&x!=="get"&&x!=="head"&&(te=await b(M,w))!==0){let X=new i(v,{method:"POST",body:w,duplex:"half"}),V;if(z.isFormData(w)&&(V=X.headers.get("content-type"))&&M.setContentType(V),X.body){const[_e,ge]=iT(te,hm(sT(T)));w=lT(X.body,cT,_e,ge)}}z.isString(C)||(C=C?"include":"omit");const J=l&&"credentials"in i.prototype;if(z.isFormData(w)){const X=M.getContentType();X&&/^multipart\/form-data/i.test(X)&&!/boundary=/i.test(X)&&M.delete("content-type")}M.set("User-Agent","axios/"+fj,!1);const st={...L,signal:H,method:x.toUpperCase(),headers:Mk(M.normalize()),body:w,duplex:"half",credentials:J?C:void 0};Y=l&&new i(v,st);let Ve=await(l?F(Y,L):F(v,st));if(P){const X=z.toFiniteNumber(Ve.headers.get("content-length"));if(X!=null&&X>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y)}const G=p&&(N==="stream"||N==="response");if(p&&Ve.body&&(E||P||G&&q)){const X={};["status","statusText","headers"].forEach(dt=>{X[dt]=Ve[dt]});const V=z.toFiniteNumber(Ve.headers.get("content-length")),[_e,ge]=E&&iT(V,hm(sT(E),!0))||[];let Xe=0;const ot=dt=>{if(P&&(Xe=dt,Xe>D))throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y);_e&&_e(dt)};Ve=new s(lT(Ve.body,cT,ot,()=>{ge&&ge(),q&&q()}),X)}N=N||"text";let oe=await m[z.findKey(m,N)||"text"](Ve,y);if(P&&!p&&!G){let X;if(oe!=null&&(typeof oe.byteLength=="number"?X=oe.byteLength:typeof oe.size=="number"?X=oe.size:typeof oe=="string"&&(X=typeof r=="function"?new r().encode(oe).byteLength:oe.length)),typeof X=="number"&&X>D)throw new re("maxContentLength size of "+D+" exceeded",re.ERR_BAD_RESPONSE,y,Y)}return!G&&q&&q(),await new Promise((X,V)=>{Ik(X,V,{data:oe,headers:gn.from(Ve.headers),status:Ve.status,statusText:Ve.statusText,config:y,request:Y})})}catch(Z){if(q&&q(),H&&H.aborted&&H.reason instanceof re){const ye=H.reason;throw ye.config=y,Y&&(ye.request=Y),Z!==ye&&(ye.cause=Z),ye}throw Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)?Object.assign(new re("Network Error",re.ERR_NETWORK,y,Y,Z&&Z.response),{cause:Z.cause||Z}):re.from(Z,Z&&Z.code,y,Y,Z&&Z.response)}}},bY=new Map,Fk=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let s=i.length,o=s,l,c,f=bY;for(;o--;)l=i[o],c=f.get(l),c===void 0&&f.set(l,c=o?new Map:vY(t)),f=c;return c};Fk();const dj={http:LG,xhr:uY,fetch:{get:Fk}};z.forEach(dj,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const dT=e=>`- ${e}`,xY=e=>z.isFunction(e)||e===null||e===!1;function SY(e,t){e=z.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let s=0;s`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=n?s.length>1?`since : +`+s.map(dT).join(` +`):" "+dT(s[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return a}const Vk={getAdapter:SY,adapters:dj};function ob(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qd(null,e)}function hT(e){return ob(e),e.headers=gn.from(e.headers),e.data=sb.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vk.getAdapter(e.adapter||Hd.adapter,e)(e).then(function(r){ob(e),e.response=r;try{r.data=sb.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=gn.from(r.headers),r},function(r){if(!zk(r)&&(ob(e),r&&r.response)){e.response=r.response;try{r.response.data=sb.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=gn.from(r.response.headers)}return Promise.reject(r)})}const rg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rg[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pT={};rg.transitional=function(t,n,r){function a(i,s){return"[Axios v"+fj+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,o)=>{if(t===!1)throw new re(a(s," has been removed"+(n?" in "+n:"")),re.ERR_DEPRECATED);return n&&!pT[s]&&(pT[s]=!0,console.warn(a(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,o):!0}};rg.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function wY(e,t,n){if(typeof e!="object")throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],s=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(s){const o=e[i],l=o===void 0||s(o,i,e);if(l!==!0)throw new re("option "+i+" must be "+l,re.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new re("Unknown option "+i,re.ERR_BAD_OPTION)}}const bp={assertOptions:wY,validators:rg},wn=bp.validators;let Ys=class{constructor(t){this.defaults=t||{},this.interceptors={request:new aT,response:new aT}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=(()=>{if(!a.stack)return"";const s=a.stack.indexOf(` +`);return s===-1?"":a.stack.slice(s+1)})();try{if(!r.stack)r.stack=i;else if(i){const s=i.indexOf(` +`),o=s===-1?-1:i.indexOf(` +`,s+1),l=o===-1?"":i.slice(o+1);String(r.stack).endsWith(l)||(r.stack+=` +`+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=so(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&bp.assertOptions(r,{silentJSONParsing:wn.transitional(wn.boolean),forcedJSONParsing:wn.transitional(wn.boolean),clarifyTimeoutError:wn.transitional(wn.boolean),legacyInterceptorReqResOrdering:wn.transitional(wn.boolean),advertiseZstdAcceptEncoding:wn.transitional(wn.boolean)},!1),a!=null&&(z.isFunction(a)?n.paramsSerializer={serialize:a}:bp.assertOptions(a,{encode:wn.function,serialize:wn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),bp.assertOptions(n,{baseUrl:wn.spelling("baseURL"),withXsrfToken:wn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&z.merge(i.common,i[n.method]);i&&z.forEach(["delete","get","head","post","put","patch","query","common"],m=>{delete i[m]}),n.headers=gn.concat(s,i);const o=[];let l=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;l=l&&g.synchronous;const b=n.transitional||cj;b&&b.legacyInterceptorReqResOrdering?o.unshift(g.fulfilled,g.rejected):o.push(g.fulfilled,g.rejected)});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let f,d=0,h;if(!l){const m=[hT.bind(this),void 0];for(m.unshift(...o),m.push(...c),h=m.length,f=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const s=new Promise(o=>{r.subscribe(o),i=o}).then(a);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,o){r.reason||(r.reason=new qd(i,s,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Hk(function(a){t=a}),cancel:t}}};function AY(e){return function(n){return e.apply(null,n)}}function OY(e){return z.isObject(e)&&e.isAxiosError===!0}const Tx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Tx).forEach(([e,t])=>{Tx[t]=e});function qk(e){const t=new Ys(e),n=Ak(Ys.prototype.request,t);return z.extend(n,Ys.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return qk(so(e,a))},n}const jt=qk(Hd);jt.Axios=Ys;jt.CanceledError=qd;jt.CancelToken=jY;jt.isCancel=zk;jt.VERSION=fj;jt.toFormData=ng;jt.AxiosError=re;jt.Cancel=jt.CanceledError;jt.all=function(t){return Promise.all(t)};jt.spread=AY;jt.isAxiosError=OY;jt.mergeConfig=so;jt.AxiosHeaders=gn;jt.formToJSON=e=>Lk(z.isHTMLForm(e)?new FormData(e):e);jt.getAdapter=Vk.getAdapter;jt.HttpStatusCode=Tx;jt.default=jt;const{Axios:YAe,AxiosError:XAe,CanceledError:WAe,isCancel:QAe,CancelToken:ZAe,VERSION:JAe,all:e2e,Cancel:t2e,isAxiosError:n2e,spread:r2e,toFormData:a2e,AxiosHeaders:i2e,HttpStatusCode:s2e,formToJSON:o2e,getAdapter:l2e,mergeConfig:c2e,create:u2e}=jt,W=jt.create({baseURL:""}),Kk=()=>location.pathname.startsWith("/admin"),Gk=()=>Kk()?"mall_admin_token":"mall_token";W.interceptors.request.use(e=>{const t=localStorage.getItem(Gk());return t&&(e.headers.Authorization=`Bearer ${t}`),e});W.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem(Gk()),Kk()&&location.pathname!=="/admin/login"&&(location.href="/admin/login")),Promise.reject(e)});const Q=e=>e.then(t=>{var n;return(n=t.data)==null?void 0:n.data}),Yk=(e,t)=>W.post("/api/mall/auth/login",{username:e,password:t}),EY=(e,t,n)=>W.post("/api/mall/auth/register",{username:e,password:t,displayName:n}),Xk=()=>Q(W.get("/api/mall/auth/me")),So=(e=!0)=>Q(W.get(`/api/mall/store?activeOnly=${e}`)),TY=(e,t)=>Q(W.put(`/api/mall/store/${e}/active`,{active:t})),NY=e=>Q(W.get(`/api/mall/zone/lookup?zip=${encodeURIComponent(e)}`)),Ql=(e={})=>{const t=new URLSearchParams;return Object.entries(e).forEach(([n,r])=>{r!==void 0&&r!==""&&r!==null&&t.set(n,String(r))}),Q(W.get(`/api/mall/product?${t}`))},CY=e=>Q(W.get(`/api/mall/product/${e}`)),_Y=(e,t)=>Q(W.put(`/api/mall/product/${e}/status`,{status:t})),PY=()=>Q(W.get("/api/mall/category")),MY=e=>Q(W.get(`/api/mall/store-inventory/store/${e}`)),RY=(e,t,n)=>Q(W.put(`/api/mall/store-inventory/store/${e}/product/${t}/toggle`,{available:n})),DY=(e,t,n)=>Q(W.put(`/api/mall/store-inventory/store/${e}/product/${t}/adjust`,{delta:n})),$Y=(e,t)=>Q(W.get(`/api/mall/schedule/availability?storeId=${e}&date=${t}`)),Wk=()=>Q(W.get("/api/mall/schedule/holidays")),kY=e=>Q(W.post("/api/mall/schedule/holiday",e)),hj=()=>Q(W.get("/api/mall/cart")),LY=e=>Q(W.post("/api/mall/cart",e)),zY=(e,t)=>Q(W.put(`/api/mall/cart/${e}`,{quantity:t})),IY=e=>W.delete(`/api/mall/cart/${e}`),BY=(e="")=>Q(W.get(`/api/mall/order?status=${e}`)),UY=e=>Q(W.post("/api/mall/order/checkout",e)),Qk=(e,t)=>Q(W.put(`/api/mall/order/${e}/status`,{status:t})),FY=(e="",t=100)=>Q(W.get(`/api/mall/order/admin?status=${e}&limit=${t}`)),VY=e=>Q(W.post("/api/mall/payment",e)),HY=()=>Q(W.get("/api/mall/subscription")),qY=e=>Q(W.post("/api/mall/subscription",e)),mT=(e,t)=>Q(W.put(`/api/mall/subscription/${e}/status`,{status:t})),KY=()=>Q(W.get("/api/mall/subscription/admin")),GY=(e="",t="")=>{const n=new URLSearchParams;return e&&n.set("status",e),t&&n.set("storeId",t),Q(W.get(`/api/mall/transfer?${n}`))},YY=e=>Q(W.put(`/api/mall/transfer/${e}/approve`,{})),XY=e=>Q(W.put(`/api/mall/transfer/${e}/reject`,{})),WY=e=>Q(W.get(`/api/mall/review/product/${e}`)),QY=e=>Q(W.get(`/api/mall/review/product/${e}/stats`)),ZY=e=>Q(W.post("/api/mall/review",e)),JY=()=>Q(W.get("/api/mall/member/me")),eX=()=>Q(W.get("/api/mall/cs")),tX=e=>Q(W.post("/api/mall/cs",e)),nX=()=>Q(W.get("/api/mall/wishlist")),rX=e=>Q(W.post(`/api/mall/wishlist/${e}`,{})),aX=e=>W.delete(`/api/mall/wishlist/${e}`),iX=(e=1,t=500)=>Q(W.get(`/api/mall/analytics/dashboard?days=${e}&bigOrderThreshold=${t}`)),Zk=(e=7)=>Q(W.get(`/api/mall/analytics/store-sales?days=${e}`)),Jk=(e=14)=>Q(W.get(`/api/mall/analytics/trend?days=${e}`)),e5=(e=10)=>Q(W.get(`/api/mall/analytics/top-products?limit=${e}`)),sX=(e,t,n)=>Q(W.post("/api/mall/gateway/tax/quote",{amount:e,zip:t,state:n})),oX=(e,t)=>Q(W.post("/api/mall/gateway/address/verify",{address:e,zip:t})),lX=()=>Q(W.get("/api/mall/gateway/providers")),t5=(e="",t="",n=6)=>{const r=new URLSearchParams;return e&&r.set("occasion",e),t&&r.set("keyword",t),r.set("limit",String(n)),Q(W.get(`/api/mall/ai/recommend?${r}`))},cX=e=>Q(W.get(`/api/mall/ai/review-summary/${e}`)),n5=e=>Q(W.post("/api/mall/ai/nl-search",{query:e})),uX=(e,t,n)=>Q(W.post("/api/mall/ai/card-message",{occasion:e,tone:t,recipient:n})),fX=(e="valentine",t=14)=>Q(W.get(`/api/mall/ai/demand-forecast?season=${e}&days=${t}`)),dX=e=>Q(W.post("/api/mall/ai/transfer-recommend",{storeIds:e})),hX=()=>Q(W.get("/api/admin/users")),pX=e=>Q(W.post("/api/admin/users",e)),mX=(e,t)=>Q(W.put(`/api/admin/users/${e}/role`,{role:t})),yX=(e,t)=>Q(W.put(`/api/admin/users/${e}/active`,{active:t})),gX=(e,t)=>Q(W.put(`/api/admin/users/${e}/password`,{password:t})),vX=e=>W.delete(`/api/admin/users/${e}`),bX=(e="",t="",n=100)=>{const r=new URLSearchParams;return e&&r.set("action",e),t&&r.set("actor",t),r.set("limit",String(n)),Q(W.get(`/api/admin/audit?${r}`))},xX=()=>Q(W.get("/api/admin/settings")),SX=(e,t)=>Q(W.put(`/api/admin/settings/${encodeURIComponent(e)}`,{value:t})),wX=(e=!0)=>Q(W.get(`/api/mall/loyalty/tiers?activeOnly=${e}`)),jX=(e,t)=>Q(W.put(`/api/mall/loyalty/tiers/${e}`,t)),pj=()=>Q(W.get("/api/mall/loyalty/me")),AX=(e=100)=>Q(W.get(`/api/mall/loyalty/points/history?limit=${e}`)),OX=(e,t,n)=>Q(W.post("/api/mall/loyalty/points/adjust",{owner:e,points:t,reason:n})),EX=()=>Q(W.post("/api/mall/loyalty/recalc-all",{})),r5=(e=30)=>Q(W.get(`/api/mall/loyalty/analytics/by-tier?days=${e}`)),TX=(e="")=>Q(W.get(`/api/mall/event/ongoing${e?`?tier=${e}`:""}`)),NX=e=>Q(W.post(`/api/mall/event/${e}/join`,{})),CX=(e="",t="",n=!1)=>{const r=new URLSearchParams;return e&&r.set("status",e),t&&r.set("type",t),r.set("activeOnly",String(n)),Q(W.get(`/api/mall/event?${r}`))},_X=e=>Q(W.post("/api/mall/event",e)),PX=e=>Q(W.post(`/api/mall/event/${e}/publish`,{})),MX=e=>Q(W.post(`/api/mall/event/${e}/end`,{})),RX=e=>W.delete(`/api/mall/event/${e}`),DX=e=>Q(W.get(`/api/mall/event/${e}/performance`)),$X=(e,t,n)=>Q(W.post("/api/mall/event/ai/copy",{eventType:e,theme:t,tone:n}));function Gr({children:e,delay:t=0,y:n=24,className:r="",as:a="div"}){const i=ti(),s=Nt[a];return u.jsx(s,{className:r,initial:i?!1:{opacity:0,y:n},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7,delay:t,ease:[.22,1,.36,1]},children:e})}const kX={hidden:{},show:{transition:{staggerChildren:.07,delayChildren:.05}}},LX={hidden:{opacity:0,y:22},show:{opacity:1,y:0,transition:{duration:.6,ease:[.22,1,.36,1]}}};function pm({children:e,className:t=""}){const n=ti();return u.jsx(Nt.div,{className:t,variants:n?void 0:kX,initial:n?!1:"hidden",whileInView:"show",viewport:{once:!0,margin:"-40px"},children:e})}function mm({children:e,className:t=""}){const n=ti();return u.jsx(Nt.div,{className:t,variants:n?void 0:LX,children:e})}const yT=["","sage","cream"];function Kd({count:e=14,className:t=""}){const n=ti(),r=A.useMemo(()=>Array.from({length:e}).map((a,i)=>{const s=8+Math.round(Math.random()*14);return{left:Math.round(Math.random()*100),size:s,delay:+(Math.random()*12).toFixed(2),duration:+(10+Math.random()*10).toFixed(2),kind:yT[i%yT.length]}}),[e]);return n?null:u.jsx("div",{className:`petal-layer ${t}`,"aria-hidden":"true",children:r.map((a,i)=>u.jsx("span",{className:`petal ${a.kind}`,style:{left:`${a.left}%`,width:`${a.size}px`,height:`${a.size}px`,animationDelay:`${a.delay}s`,animationDuration:`${a.duration}s`}},i))})}function Ua({children:e,className:t="",onClick:n,type:r="button",disabled:a}){const i=ti();return u.jsx(Nt.button,{type:r,onClick:n,disabled:a,className:t,whileHover:i||a?void 0:{scale:1.03,y:-1},whileTap:i||a?void 0:{scale:.97},transition:{type:"spring",stiffness:380,damping:22},children:e})}const ke={name:"Montvale Florist",tagline:"100% Florist-Designed and Hand-Delivered!",founded:2010,address:"6 Railroad Ave, Montvale, NJ 07645",phone:"(201) 690-6721",phoneTel:"+12016906721",email:"wecare@montvalefloristnj.com",rating:4.9,reviewCount:44893,promise:[{title:"100% Florist-Designed",desc:"Every arrangement is crafted by hand in our shop — never mass-produced."},{title:"Locally Independent",desc:"A real, community-focused florist in Montvale since 2010 — not an online middleman."},{title:"100% Satisfaction",desc:"We stand behind every bouquet with our satisfaction guarantee."}],hours:[{day:"Mon – Fri",open:"9:00 AM – 5:30 PM",cutoff:"Same-day by 1:00 PM"},{day:"Saturday",open:"9:00 AM – 4:00 PM",cutoff:"Same-day by 12:00 PM"},{day:"Sunday",open:"9:00 AM – 12:00 PM",cutoff:"Same-day by 10:00 AM"}],social:{instagram:"https://instagram.com/themontvaleflorist",instagramHandle:"@themontvaleflorist",facebook:"https://facebook.com/montvaleflorist1",pinterest:"https://pinterest.com/montvaleflorist",google:"https://www.google.com/search?q=Montvale+Florist",yelp:"https://yelp.com/biz/montvale-florist-montvale-3"},payments:["Visa","Mastercard","Amex","Discover","Apple Pay","Google Pay"],wallets:["Apple Pay","Google Pay"],cards:["Visa","Mastercard","Amex","Discover"],policies:["Terms of Service","Privacy Policy","Accessibility Statement","Delivery Policy"],about:"Montvale Florist is your go-to local florist, delivering not just flowers, but joy, comfort, and memories. An independent, community-focused florist dedicated to craftsmanship and personal service since 2010."},lb=[{img:"/img/hero/slide-1.jpg",eyebrow:"Birthday Blooms",headline:`Make Their Birthday +Unforgettable`,subtext:"Florist-designed bouquets, hand-delivered the same day — a celebration in every petal.",cta:"Find the Perfect Gift",to:"/category?occasion=BIRTHDAY"},{img:"/img/hero/slide-2.jpg",eyebrow:"Sympathy & Comfort",headline:`Honor Their Memory +with Heartfelt Flowers`,subtext:"Thoughtful tributes, gently arranged and delivered with care and compassion.",cta:"Send Your Condolences",to:"/category?occasion=SYMPATHY"},{img:"/img/hero/slide-3.jpg",eyebrow:"Just Because",headline:`Brighten Their Day, +Just Because`,subtext:"No occasion needed — send a smile with fresh, locally designed blooms.",cta:"Send a Smile",to:"/category?occasion=JUST_BECAUSE"}],zX=[{code:"en",label:"EN"},{code:"ko",label:"한국어"}];function ag({variant:e="shop"}){const{i18n:t}=ni(),n=(t.language||"en").split("-")[0],r=s=>{s!==n&&t.changeLanguage(s)},a=e==="admin",i=a?"flex items-center gap-0.5 rounded-lg border border-edge bg-card/60 p-0.5":"flex items-center gap-0.5 rounded-full border border-blush-100 bg-white/70 p-0.5 shadow-soft";return u.jsxs("div",{className:"flex items-center gap-1.5","aria-label":"Language",children:[u.jsx(SK,{size:15,className:a?"text-slate-400":"text-sage-600"}),u.jsx("div",{className:i,role:"group",children:zX.map(s=>{const o=s.code===n,l="px-2 py-0.5 text-[11px] font-medium rounded-full transition-colors",c=a?o?"bg-brand text-ink":"text-slate-300 hover:text-brand":o?"bg-blush-500 text-white":"text-sage-700 hover:text-blush-600";return u.jsx("button",{type:"button",onClick:()=>r(s.code),"aria-pressed":o,className:`${l} ${a?"rounded-md":""} ${c}`,children:s.label},s.code)})})]})}function IX(){const{t:e}=ni(),[t,n]=A.useState(""),[r,a]=A.useState(null),[i,s]=A.useState(!1),[o,l]=A.useState(""),{setZone:c}=bn(),f=Kt(),d=async p=>{if(p.preventDefault(),l(""),a(null),!/^\d{5}$/.test(t)){l(e("zip.errInvalid"));return}s(!0);try{const m=await NY(t);a(m),m!=null&&m.deliverable||l(e("zip.errNotDeliverable"))}catch{l(e("zip.errFailed"))}finally{s(!1)}},h=p=>{c(t,p.storeId,p.storeName),f("/home")};return u.jsxs("div",{className:"relative min-h-screen bg-gradient-to-br from-blush-100 via-cream to-sage-100 flex items-center justify-center px-4 overflow-hidden",children:[u.jsx("div",{className:"absolute top-5 right-5 z-20",children:u.jsx(ag,{variant:"shop"})}),u.jsx(Kd,{count:18}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -top-20 -left-20 text-blush-200/40",animate:{rotate:[0,360]},transition:{duration:80,repeat:1/0,ease:"linear"},children:u.jsx(ft,{size:320,strokeWidth:.5})}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -bottom-24 -right-16 text-sage-300/40",animate:{rotate:[360,0]},transition:{duration:90,repeat:1/0,ease:"linear"},children:u.jsx(ft,{size:260,strokeWidth:.5})}),u.jsxs(Nt.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"relative z-10 w-full max-w-lg text-center",children:[u.jsxs("div",{className:"flex flex-col items-center mb-5",children:[u.jsx(Nt.span,{animate:{rotate:[0,8,-6,0]},transition:{duration:7,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{className:"text-blush-500",size:44})}),u.jsx("h1",{className:"font-serif text-4xl font-bold text-blush-900 mt-3",children:"Montvale Florist"}),u.jsx("p",{className:"font-display text-[13px] tracking-[0.35em] uppercase text-sage-600 mt-1",children:e("zip.since",{year:ke.founded})})]}),u.jsx("p",{className:"font-display text-2xl text-[#6b5258] mb-1",children:ke.tagline}),u.jsx("p",{className:"text-[#8a7077] text-sm mb-8",children:e("zip.lead")}),u.jsxs("form",{onSubmit:d,className:"bg-white/90 backdrop-blur rounded-4xl shadow-bloom p-7 border border-blush-100",children:[u.jsxs("label",{className:"flex items-center gap-2 text-sm text-blush-700 font-medium mb-3 justify-center",children:[u.jsx(dm,{size:16})," ",e("zip.enterZip")]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{value:t,onChange:p=>n(p.target.value.replace(/\D/g,"").slice(0,5)),placeholder:e("zip.placeholder"),inputMode:"numeric",autoFocus:!0,className:"flex-1 px-4 py-3.5 rounded-2xl bg-blush-50 border border-blush-100 text-center text-lg tracking-[0.3em] outline-none focus:border-blush-400 transition-colors"}),u.jsx(Ua,{type:"submit",disabled:i,className:"px-7 rounded-2xl bg-blush-500 text-white font-semibold hover:bg-blush-600 disabled:opacity-60 flex items-center gap-1",children:i?"…":u.jsxs(u.Fragment,{children:[e("zip.go")," ",u.jsx(Es,{size:16})]})})]}),o&&u.jsx("p",{className:"text-blush-500 text-xs mt-3",children:o}),(r==null?void 0:r.deliverable)&&u.jsxs(Nt.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-6 text-left overflow-hidden",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-sage-700 font-medium mb-3",children:[u.jsx(Ud,{size:15})," ",e("zip.availableStores")]}),u.jsx("div",{className:"space-y-2",children:(r.stores||[]).map(p=>u.jsxs(Ua,{onClick:()=>h(p),className:"w-full flex items-center justify-between bg-blush-50 hover:bg-blush-100 border border-blush-100 rounded-2xl px-4 py-3.5 text-left",children:[u.jsxs("span",{children:[u.jsxs("span",{className:"font-medium text-sm flex items-center gap-1.5 text-blush-900",children:[u.jsx(Bd,{size:14,className:"text-blush-500"}),p.storeName]}),u.jsx("span",{className:"block text-xs text-[#8a7077] mt-0.5",children:e("zip.radiusSameDay",{radius:p.radiusMi,cutoff:p.sameDayCutoff,tz:p.timezone})})]}),u.jsx(Es,{size:16,className:"text-blush-500"})]},p.storeId))})]})]}),u.jsxs("div",{className:"flex items-center justify-center gap-2 mt-6 text-[12px] text-[#8a7077]",children:[u.jsx("span",{className:"flex text-gold",children:[1,2,3,4,5].map(p=>u.jsx(Wa,{size:13,fill:"currentColor"},p))}),ke.rating,"★ · ",e("zip.reviews",{n:ke.reviewCount.toLocaleString()})]}),u.jsx("button",{onClick:()=>f("/home"),className:"text-xs text-[#a08a90] hover:text-blush-600 mt-4 underline-offset-2 hover:underline",children:e("zip.browsePickup")})]})]})}function a5({size:e=18}){return u.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12c0 4.24 2.64 7.85 6.36 9.31-.09-.79-.17-2 .03-2.86.18-.78 1.17-4.97 1.17-4.97s-.3-.6-.3-1.48c0-1.39.81-2.43 1.81-2.43.85 0 1.27.64 1.27 1.41 0 .86-.55 2.14-.83 3.33-.24 1 .5 1.81 1.48 1.81 1.78 0 3.14-1.88 3.14-4.58 0-2.4-1.72-4.07-4.19-4.07-2.85 0-4.52 2.14-4.52 4.35 0 .86.33 1.78.74 2.28.08.1.09.19.07.29l-.27 1.13c-.04.18-.14.22-.33.13-1.25-.58-2.03-2.4-2.03-3.87 0-3.15 2.29-6.04 6.6-6.04 3.46 0 6.16 2.47 6.16 5.77 0 3.44-2.17 6.21-5.18 6.21-1.01 0-1.97-.53-2.29-1.15l-.62 2.37c-.23.86-.83 1.94-1.24 2.6.94.29 1.92.44 2.95.44 5.52 0 10-4.48 10-10S17.52 2 12 2z"})})}function BX({size:e=18}){return u.jsxs("svg",{viewBox:"0 0 24 24",width:e,height:e,"aria-hidden":"true",children:[u.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"}),u.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23z"}),u.jsx("path",{fill:"#FBBC05",d:"M5.84 14.1a6.6 6.6 0 0 1 0-4.2V7.06H2.18a11 11 0 0 0 0 9.88l3.66-2.84z"}),u.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1A11 11 0 0 0 2.18 7.06l3.66 2.84C6.71 7.3 9.14 5.38 12 5.38z"})]})}function UX({size:e=18}){return u.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M12.27 13.3l4.45-2.16c.51-.25.66-.92.31-1.36-1.13-1.44-2.7-2.49-4.49-2.99-.55-.15-1.08.27-1.08.84l-.02 5.04c0 .65.72 1.06 1.32.77zM12.6 15.34l4.46 2.13c.51.25 1.13-.07 1.21-.63.25-1.8-.06-3.66-.92-5.31-.27-.51-.96-.6-1.36-.18l-3.5 3.42c-.45.45-.31 1.18.11 1.4v-.84zm-2.59.4l-3.45-3.4c-.41-.4-1.09-.32-1.37.18-.86 1.64-1.18 3.49-.95 5.29.07.56.69.89 1.21.64l4.45-2.12c.6-.29.74-1.02.06-1.43zm.08 2.36l-.02 4.95c0 .57.53.99 1.08.84 1.78-.49 3.34-1.53 4.48-2.96.35-.44.2-1.11-.31-1.36l-4.45-2.15c-.6-.29-1.31.13-1.31.78l.84.01zm-.45-7.1L5.66 7.06c-.43-.7-1.46-.56-1.69.23-.13.45-.22.92-.27 1.4-.16 1.55.05 3.12.61 4.56.21.53.91.62 1.27.13l3.95-5.32c.32-.43.06-1.05-.5-1.16l.39.56z"})})}const FX={instagram:({size:e})=>u.jsx(yk,{size:e}),facebook:({size:e})=>u.jsx(pk,{size:e}),pinterest:a5,google:BX,yelp:UX},VX={instagram:"Instagram",facebook:"Facebook",pinterest:"Pinterest",google:"Google Business",yelp:"Yelp"},HX=["instagram","facebook","pinterest","google","yelp"];function qX({size:e=18,className:t="",iconClass:n=""}){return u.jsx("div",{className:`flex items-center gap-3 ${t}`,children:HX.map(r=>{const a=ke.social[r];if(!a)return null;const i=FX[r];return u.jsx("a",{href:a,target:"_blank",rel:"noreferrer","aria-label":VX[r],className:`transition-colors ${n}`,children:u.jsx(i,{size:e})},r)})})}function KX({url:e,title:t,image:n,className:r=""}){const a=encodeURIComponent(e),i=encodeURIComponent(t||ke.name),s=encodeURIComponent(n||""),o=`https://www.facebook.com/sharer/sharer.php?u=${a}`,l=`https://pinterest.com/pin/create/button/?url=${a}&media=${s}&description=${i}`,c=ke.social.instagram,f=d=>window.open(d,"_blank","noopener,width=640,height=600");return u.jsxs("div",{className:`flex items-center gap-2 ${r}`,children:[u.jsx("span",{className:"text-xs text-[#a08a90]",children:"Share:"}),u.jsx("button",{type:"button",onClick:()=>f(c),"aria-label":"Share on Instagram",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(yk,{size:16})}),u.jsx("button",{type:"button",onClick:()=>f(o),"aria-label":"Share on Facebook",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(pk,{size:16})}),u.jsx("button",{type:"button",onClick:()=>f(l),"aria-label":"Share on Pinterest",className:"p-2 rounded-full border border-blush-100 text-blush-500 hover:bg-blush-50 transition-colors",children:u.jsx(a5,{size:16})})]})}function GX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Visa",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("text",{x:"24",y:"21",textAnchor:"middle",fontFamily:"Georgia, serif",fontWeight:"700",fontStyle:"italic",fontSize:"13",fill:"#1a1f71",children:"VISA"})]})}function YX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Mastercard",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("circle",{cx:"20",cy:"16",r:"8",fill:"#eb001b"}),u.jsx("circle",{cx:"28",cy:"16",r:"8",fill:"#f79e1b",fillOpacity:"0.85"})]})}function XX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"American Express",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#2e77bb"}),u.jsx("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"9",fill:"#fff",children:"AMEX"})]})}function WX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Discover",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsx("circle",{cx:"36",cy:"22",r:"9",fill:"#f68121"}),u.jsx("text",{x:"22",y:"19",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"7",fill:"#231f20",children:"DISCOVER"})]})}function QX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Apple Pay",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#000"}),u.jsx("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"-apple-system, Helvetica, sans-serif",fontWeight:"600",fontSize:"9",fill:"#fff",children:" Pay"})]})}function ZX(){return u.jsxs("svg",{viewBox:"0 0 48 32",className:"h-7 w-auto",role:"img","aria-label":"Google Pay",children:[u.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#fff",stroke:"#e7e2dc"}),u.jsxs("text",{x:"24",y:"20",textAnchor:"middle",fontFamily:"Arial, sans-serif",fontWeight:"700",fontSize:"9",children:[u.jsx("tspan",{fill:"#4285f4",children:"G"}),u.jsx("tspan",{fill:"#ea4335",children:"o"}),u.jsx("tspan",{fill:"#fbbc05",children:"o"}),u.jsx("tspan",{fill:"#4285f4",children:"g"}),u.jsx("tspan",{fill:"#34a853",children:"l"}),u.jsx("tspan",{fill:"#ea4335",children:"e"}),u.jsx("tspan",{fill:"#5f6368",children:" Pay"})]})]})}const i5={Visa:GX,Mastercard:YX,Amex:XX,Discover:WX,"Apple Pay":QX,"Google Pay":ZX};function s5({items:e,className:t=""}){return u.jsx("div",{className:`flex flex-wrap items-center gap-1.5 ${t}`,children:e.map(n=>{const r=i5[n];return r?u.jsx(r,{},n):u.jsx("span",{className:"text-[10px] bg-cream/10 rounded px-2 py-1",children:n},n)})})}function JX(e){const t=e.replace(/\D/g,"");return t.length<4?"•••• •••• •••• ••••":`•••• •••• •••• ${t.slice(-4)}`}function eW(e){return e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim()}function tW({method:e,onMethod:t,onCardChange:n,cards:r=["Visa","Mastercard","Amex","Discover"],wallets:a=["Apple Pay","Google Pay"]}){const[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(""),[d,h]=A.useState(""),[p,m]=A.useState(!1),g=i.replace(/\D/g,""),b=(v=i,x=o,w=c)=>{const S=v.replace(/\D/g,""),j=S.length>=15&&/^\d{2}\/\d{2}$/.test(x)&&w.replace(/\D/g,"").length>=3;n==null||n({last4:S.slice(-4),expiry:x,complete:j})},y=v=>v==="Apple Pay"?"APPLE_PAY":"GOOGLE_PAY";return u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[u.jsxs("button",{type:"button",onClick:()=>t("CARD"),className:`flex items-center justify-center gap-1.5 py-2.5 rounded-xl border text-sm ${e==="CARD"?"border-bloom bg-petal text-bloom2 font-semibold":"border-blush-100 text-[#6b5258]"}`,children:[u.jsx(WE,{size:16})," Card"]}),a.map(v=>{const x=y(v),w=i5[v];return u.jsx("button",{type:"button",onClick:()=>t(x),className:`flex items-center justify-center py-2 rounded-xl border ${e===x?"border-bloom bg-petal":"border-blush-100"}`,"aria-label":v,children:w?u.jsx(w,{}):u.jsx("span",{className:"text-sm",children:v})},v)})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-[11px] text-gray-400",children:"Accepted:"}),u.jsx(s5,{items:r})]}),e==="CARD"?u.jsxs("div",{className:"rounded-2xl border border-blush-100 p-4 space-y-3 bg-white",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Card number"}),u.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 rounded-xl border border-blush-100 focus-within:border-bloom",children:[u.jsx(WE,{size:16,className:"text-blush-400 shrink-0"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-number",value:p?eW(i):g?JX(i):"",onFocus:()=>m(!0),onBlur:()=>m(!1),onChange:v=>{const x=v.target.value;s(x),b(x)},placeholder:"1234 1234 1234 1234",className:"flex-1 bg-transparent text-sm outline-none tracking-wider"})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Expiry (MM/YY)"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-exp",value:o,onChange:v=>{let x=v.target.value.replace(/\D/g,"").slice(0,4);x.length>=3&&(x=x.slice(0,2)+"/"+x.slice(2)),l(x),b(i,x)},placeholder:"MM/YY",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"CVC"}),u.jsx("input",{inputMode:"numeric",autoComplete:"cc-csc",value:c,onChange:v=>{const x=v.target.value.replace(/\D/g,"").slice(0,4);f(x),b(i,o,x)},placeholder:"•••",type:"password",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Name on card"}),u.jsx("input",{autoComplete:"cc-name",value:d,onChange:v=>h(v.target.value),placeholder:"Full name",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("p",{className:"flex items-center gap-1 text-[11px] text-gray-400",children:[u.jsx(QE,{size:11})," Card number is masked and never stored on this device. Processed via GUARDiA PaymentGateway."]})]}):u.jsxs("div",{className:"rounded-2xl border border-blush-100 p-4 bg-white",children:[u.jsx("button",{type:"button",className:`w-full py-3 rounded-xl font-semibold flex items-center justify-center gap-2 ${e==="APPLE_PAY"?"bg-black text-white":"bg-white border border-edge text-[#3c4043]"}`,children:e==="APPLE_PAY"?" Pay":"G Pay"}),u.jsxs("p",{className:"flex items-center gap-1 text-[11px] text-gray-400 mt-2",children:[u.jsx(QE,{size:11})," ",e==="APPLE_PAY"?"Apple Pay":"Google Pay"," via secure wallet. If unconfigured, processed as mock at checkout."]})]})]})}const nW=[{to:"/home",key:"home"},{to:"/category",key:"shopAll"},{to:"/category?occasion=ROMANCE",key:"loveRomance"},{to:"/category?occasion=BIRTHDAY",key:"birthday"},{to:"/category?occasion=SYMPATHY",key:"sympathy"},{to:"/daily-standard",key:"todaysBouquet",accent:!0},{to:"/subscription",key:"subscriptions"},{to:"/events",key:"offers"}];function rW(){const{t:e}=ni(),{zip:t,storeName:n,custToken:r,cartCount:a,setCartCount:i}=bn(),s=Kt(),o=jr(),l=ti(),[c,f]=A.useState("");A.useEffect(()=>{if(!r){i(0);return}hj().then(h=>i((h||[]).reduce((p,m)=>p+(m.quantity||1),0))).catch(()=>{})},[r]);const d=h=>{h.preventDefault(),c.trim()&&s(`/search?q=${encodeURIComponent(c.trim())}`)};return u.jsxs("div",{className:"min-h-screen bg-cream text-[#43343a] flex flex-col",children:[u.jsx("div",{className:"bg-sage-700 text-cream/95 text-[12px] tracking-wide",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-9 flex items-center justify-center sm:justify-between gap-3",children:[u.jsxs("span",{className:"hidden sm:flex items-center gap-1.5",children:[u.jsx(ft,{size:13})," ",ke.tagline]}),u.jsxs("span",{className:"flex items-center gap-3",children:[u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(Wa,{size:12,className:"text-gold",fill:"currentColor"})," ",ke.rating,"★ · ",e("shop.topbar.reviews",{n:ke.reviewCount.toLocaleString()})]}),u.jsxs("a",{href:`tel:${ke.phoneTel}`,className:"hidden sm:flex items-center gap-1 hover:text-white",children:[u.jsx(ZE,{size:12})," ",ke.phone]})]})]})}),u.jsxs("header",{className:"sticky top-0 z-30 bg-cream/90 backdrop-blur-md border-b border-blush-100",children:[u.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-[72px] flex items-center gap-4",children:[u.jsxs(Le,{to:"/home",className:"flex items-center gap-2.5 shrink-0",children:[u.jsx(Nt.span,{animate:l?void 0:{rotate:[0,8,-6,0]},transition:{duration:7,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{className:"text-blush-500",size:28})}),u.jsxs("span",{className:"leading-none",children:[u.jsx("span",{className:"block font-serif text-[20px] font-bold text-blush-900 tracking-tight",children:"Montvale"}),u.jsx("span",{className:"block font-display text-[12px] tracking-[0.35em] text-sage-600 uppercase -mt-0.5",children:"Florist"})]})]}),u.jsxs("form",{onSubmit:d,className:"flex-1 max-w-md hidden md:flex items-center bg-white border border-blush-100 rounded-full px-4 py-2.5 shadow-soft",children:[u.jsx(rj,{size:16,className:"text-blush-400"}),u.jsx("input",{value:c,onChange:h=>f(h.target.value),placeholder:e("common.searchPlaceholder"),className:"flex-1 bg-transparent ml-2 text-sm outline-none placeholder:text-blush-300"})]}),u.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-3 ml-auto",children:[u.jsx(ag,{variant:"shop"}),u.jsxs(Le,{to:"/",className:"hidden sm:flex items-center gap-1 text-sm text-sage-700 hover:text-blush-500 transition-colors",children:[u.jsx(dm,{size:15})," ",t?`${t}`:e("shop.header.zip")]}),u.jsx(Le,{to:"/wishlist","aria-label":e("shop.header.wishlist"),className:"p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:u.jsx(Rf,{size:20})}),u.jsxs(Le,{to:"/cart",className:"relative p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:[u.jsx(sj,{size:20}),u.jsx(nx,{children:a>0&&u.jsx(Nt.span,{initial:l?!1:{scale:0},animate:{scale:1},exit:{scale:0},className:"absolute -top-1 -right-1 bg-blush-500 text-white text-[10px] rounded-full min-w-[18px] h-[18px] px-1 flex items-center justify-center",children:a},a)})]}),u.jsx(Le,{to:r?"/mypage":"/account",className:"p-1.5 text-blush-700 hover:text-blush-500 transition-colors",children:u.jsx(wk,{size:20})})]})]}),u.jsx("nav",{className:"border-t border-blush-50 bg-white/60",children:u.jsx("div",{className:"max-w-6xl mx-auto px-4 h-11 flex items-center gap-7 text-[13px] overflow-x-auto thin-scroll",children:nW.map(h=>{const p=o.pathname+o.search===h.to||h.to==="/home"&&o.pathname==="/home";return u.jsxs(Le,{to:h.to,className:`relative whitespace-nowrap py-1 transition-colors ${h.accent?"text-sage-700 font-medium":"text-[#6b5258] hover:text-blush-500"} ${p?"text-blush-600":""}`,children:[e(`shop.nav.${h.key}`),p&&u.jsx(Nt.span,{layoutId:"nav-underline",className:"absolute -bottom-[1px] left-0 right-0 h-[2px] bg-blush-500 rounded-full"})]},h.to)})})})]}),u.jsx("main",{className:"flex-1",children:u.jsx(f$,{})}),u.jsxs("footer",{className:"mt-16 bg-sage-800 text-cream/85",children:[u.jsx("div",{className:"botanical-divider py-6 opacity-50",children:u.jsx(ft,{size:16})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 pb-10 grid md:grid-cols-4 gap-8",children:[u.jsxs("div",{className:"md:col-span-1",children:[u.jsx("div",{className:"font-serif text-xl font-bold text-white mb-1",children:"Montvale Florist"}),u.jsx("p",{className:"font-display text-[13px] tracking-[0.3em] uppercase text-sage-300 mb-3",children:e("shop.footer.since",{year:ke.founded})}),u.jsx("p",{className:"text-[13px] leading-relaxed text-cream/70",children:ke.tagline}),u.jsx(qX,{size:18,className:"mt-4 text-cream/80",iconClass:"hover:text-white"})]}),u.jsxs("div",{children:[u.jsx("div",{className:"font-semibold text-white mb-3 text-sm",children:e("shop.footer.visitUs")}),u.jsxs("p",{className:"text-[13px] flex items-start gap-1.5 text-cream/75 mb-1.5",children:[u.jsx(dm,{size:14,className:"mt-0.5 shrink-0"})," ",ke.address]}),u.jsxs("a",{href:`tel:${ke.phoneTel}`,className:"text-[13px] flex items-center gap-1.5 text-cream/75 hover:text-white mb-1.5",children:[u.jsx(ZE,{size:14})," ",ke.phone]}),u.jsx("p",{className:"text-[13px] text-cream/60",children:ke.email})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"font-semibold text-white mb-3 text-sm flex items-center gap-1.5",children:[u.jsx(ck,{size:14})," ",e("shop.footer.hours")]}),ke.hours.map(h=>u.jsxs("div",{className:"text-[13px] text-cream/75 mb-1",children:[u.jsx("span",{className:"inline-block w-20",children:h.day})," ",h.open]},h.day))]}),u.jsxs("div",{children:[u.jsx("div",{className:"font-semibold text-white mb-3 text-sm",children:e("shop.footer.customerCare")}),u.jsxs(Le,{to:"/cs",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.contactAiHelp")]}),u.jsxs(Le,{to:"/orders",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.orderStatus")]}),u.jsxs(Le,{to:"/subscription",className:"flex items-center gap-1 text-[13px] text-cream/75 hover:text-white mb-1.5",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.subscriptions")]}),u.jsxs(Le,{to:"/app",className:"flex items-center gap-1 text-[13px] text-gold hover:text-white mb-3 font-medium",children:[u.jsx(Pu,{size:13})," ",e("shop.footer.getApp")]}),u.jsx("div",{className:"text-[11px] text-cream/50 mb-1.5",children:e("shop.footer.weAccept")}),u.jsx(s5,{items:ke.payments})]})]}),u.jsx("div",{className:"border-t border-cream/10",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex flex-col sm:flex-row items-center justify-between gap-2 text-[11px] text-cream/50",children:[u.jsxs("span",{children:["© 2026 Montvale Florist · ",ke.address]}),u.jsx("span",{className:"flex flex-wrap gap-3",children:ke.policies.map(h=>u.jsx("span",{className:"hover:text-cream/80",children:h},h))})]})})]})]})}function Zl({p:e}){var a;const t=ti(),n=e.salePrice!=null&&e.salePrice>0&&e.salePrice<(e.price||0),r=n?Math.round((1-e.salePrice/e.price)*100):0;return u.jsx(Nt.div,{whileHover:t?void 0:{y:-8},transition:{type:"spring",stiffness:300,damping:24},className:"group h-full",children:u.jsxs(Le,{to:`/product/${e.id}`,className:"block h-full bg-white rounded-3xl overflow-hidden border border-blush-100/70 shadow-soft hover:shadow-bloom transition-shadow duration-500",children:[u.jsxs("div",{className:"relative aspect-[4/5] zoom-frame bg-gradient-to-br from-blush-50 to-ivory flex items-center justify-center",children:[e.thumbnail?u.jsx("img",{src:e.thumbnail,alt:e.name,loading:"lazy",className:"w-full h-full object-cover group-hover:scale-110"}):u.jsx(ft,{className:"text-blush-200",size:56}),n&&u.jsxs("span",{className:"absolute top-3 left-3 bg-blush-500 text-white text-[11px] font-semibold px-2.5 py-1 rounded-full shadow-petal",children:["-",r,"%"]}),e.occasion&&u.jsx("span",{className:"absolute top-3 right-3 bg-white/85 backdrop-blur text-sage-700 text-[10px] uppercase tracking-wide px-2.5 py-1 rounded-full",children:e.occasion}),u.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 bg-gradient-to-t from-blush-900/10 to-transparent"})]}),u.jsxs("div",{className:"p-4",children:[e.brand&&u.jsx("div",{className:"text-[10px] uppercase tracking-[0.12em] text-sage-600 mb-0.5",children:e.brand}),u.jsx("div",{className:"font-serif text-[15px] leading-snug text-blush-900 truncate",children:e.name}),u.jsxs("div",{className:"flex items-center justify-between mt-2",children:[u.jsx("div",{className:"flex items-baseline gap-1.5",children:n?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-blush-600 font-bold",children:Ee(e.salePrice)}),u.jsx("span",{className:"text-gray-400 line-through text-xs",children:Ee(e.price)})]}):u.jsx("span",{className:"font-bold text-blush-900",children:Ee(e.price)})}),e.ratingAvg!=null&&e.reviewCount?u.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-gold",children:[u.jsx(Wa,{size:12,fill:"currentColor"}),(a=e.ratingAvg)==null?void 0:a.toFixed(1)]}):null]})]})]})})}const aW=[wK,ft,aj],iW=6e3;function sW(){const{storeName:e}=bn(),t=ti(),n=A.useRef(null),{scrollYProgress:r}=mq({target:n,offset:["start start","end start"]}),a=Jv(r,[0,1],["0%",t?"0%":"28%"]),i=Jv(r,[0,1],[1,t?1:1.12]),s=Jv(r,[0,.8],[1,t?1:.2]),[o,l]=A.useState(0),[c,f]=A.useState(1),d=lb.length,h=A.useCallback(m=>{f(m>o||o===d-1&&m===0?1:-1),l((m%d+d)%d)},[o,d]);A.useEffect(()=>{if(t)return;const m=setInterval(()=>{f(1),l(g=>(g+1)%d)},iW);return()=>clearInterval(m)},[t,d]);const p=lb[o];return u.jsxs("section",{ref:n,className:"relative overflow-hidden min-h-[78vh] flex items-center",children:[u.jsxs(Nt.div,{style:{y:a,scale:i},className:"absolute inset-0 z-0",children:[u.jsx(nx,{initial:!1,children:u.jsx(Nt.img,{src:p.img,alt:"",className:"absolute inset-0 w-full h-full object-cover",initial:{opacity:0,scale:t?1:1.06},animate:{opacity:1,scale:1},exit:{opacity:0},transition:{duration:t?0:1.1,ease:[.22,1,.36,1]}},p.img)}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blush-900/70 via-blush-900/40 to-transparent"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-sage-900/40 to-transparent"})]}),u.jsx(Kd,{count:16,className:"z-[1]"}),u.jsx(Nt.div,{style:{opacity:s},className:"relative z-10 max-w-6xl mx-auto px-4 w-full py-20",children:u.jsx(nx,{mode:"wait",custom:c,children:u.jsxs(Nt.div,{className:"max-w-xl",custom:c,initial:t?!1:{opacity:0,x:c*36},animate:{opacity:1,x:0},exit:t?{opacity:0}:{opacity:0,x:c*-36},transition:{duration:.7,ease:[.22,1,.36,1]},children:[u.jsxs("div",{className:"inline-flex items-center gap-2 text-cream/90 text-[12px] tracking-[0.25em] uppercase mb-5",children:[u.jsx("span",{className:"h-px w-8 bg-gold"})," ",p.eyebrow]}),u.jsx("h1",{className:"font-serif text-5xl md:text-6xl font-bold text-white leading-[1.05] mb-5 whitespace-pre-line drop-shadow-sm",children:p.headline}),u.jsxs("p",{className:"text-cream/90 text-lg leading-relaxed mb-8 max-w-md font-light",children:[p.subtext,e?` Same-day from ${e}.`:""]}),u.jsxs("div",{className:"flex flex-wrap gap-3",children:[u.jsx(Le,{to:p.to,children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 bg-white text-blush-700 font-semibold px-7 py-3.5 rounded-full shadow-bloom hover:bg-cream",children:[p.cta," ",u.jsx(Es,{size:17})]})}),u.jsx(Le,{to:"/daily-standard",children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 border border-white/70 text-white px-7 py-3.5 rounded-full hover:bg-white/10",children:[u.jsx(ej,{size:16})," Today's Bouquet"]})})]}),u.jsxs("div",{className:"flex items-center gap-2 mt-7 text-cream/85 text-sm",children:[u.jsx("span",{className:"flex text-gold",children:[1,2,3,4,5].map(m=>u.jsx(Wa,{size:15,fill:"currentColor"},m))}),u.jsx("span",{className:"font-medium",children:ke.rating}),u.jsxs("span",{className:"text-cream/60",children:["· ",ke.reviewCount.toLocaleString()," happy customers"]})]})]},o)})}),u.jsx("button",{"aria-label":"Previous slide",onClick:()=>h(o-1),className:"absolute left-3 md:left-5 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 backdrop-blur-sm text-white flex items-center justify-center transition-colors",children:u.jsx(gK,{size:22})}),u.jsx("button",{"aria-label":"Next slide",onClick:()=>h(o+1),className:"absolute right-3 md:right-5 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 backdrop-blur-sm text-white flex items-center justify-center transition-colors",children:u.jsx(Pu,{size:22})}),u.jsx("div",{className:"absolute bottom-7 left-1/2 -translate-x-1/2 z-20 flex items-center gap-2.5",children:lb.map((m,g)=>u.jsx("button",{"aria-label":`Go to slide ${g+1}`,onClick:()=>h(g),className:`h-2.5 rounded-full transition-all duration-300 ${g===o?"w-8 bg-white":"w-2.5 bg-white/45 hover:bg-white/70"}`},g))}),u.jsx(Nt.div,{"aria-hidden":!0,className:"absolute -bottom-6 right-6 z-[2] text-white/20 hidden md:block pointer-events-none",animate:t?void 0:{rotate:[0,5,-4,0],y:[0,-8,0]},transition:{duration:9,repeat:1/0,ease:"easeInOut"},children:u.jsx(ft,{size:130,strokeWidth:1})})]})}function oW(){var i,s,o;const{data:e}=se({queryKey:["ai-rec"],queryFn:()=>t5("","",8)}),{data:t}=se({queryKey:["best"],queryFn:()=>Ql({sort:"sales",size:8})}),{data:n}=se({queryKey:["feat"],queryFn:()=>Ql({sort:"rating",size:12})}),r=(t==null?void 0:t.items)||[],a=(n==null?void 0:n.items)||[];return u.jsxs("div",{children:[u.jsx(sW,{}),u.jsx("section",{className:"bg-ivory border-b border-blush-100",children:u.jsx("div",{className:"max-w-6xl mx-auto px-4 py-10 grid md:grid-cols-3 gap-6",children:ke.promise.map((l,c)=>{const f=aW[c];return u.jsxs(Gr,{delay:c*.1,className:"flex items-start gap-3",children:[u.jsx("span",{className:"shrink-0 w-11 h-11 rounded-full bg-blush-50 text-blush-500 flex items-center justify-center",children:u.jsx(f,{size:20})}),u.jsxs("div",{children:[u.jsx("div",{className:"font-serif text-lg text-blush-900",children:l.title}),u.jsx("p",{className:"text-sm text-[#6b5258] leading-relaxed mt-0.5",children:l.desc})]})]},l.title)})})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-14 space-y-20",children:[u.jsxs("section",{children:[u.jsxs(Gr,{className:"flex items-end justify-between mb-7",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-600 text-[12px] tracking-[0.2em] uppercase mb-2",children:[u.jsx(xr,{size:15})," Curated by GUARDiA AI · On-premise"]}),u.jsx("h2",{className:"font-serif text-3xl text-blush-900",children:"Picked Just for You"})]}),u.jsxs(Le,{to:"/category",className:"hidden sm:flex items-center gap-1 text-sm text-blush-500 hover:text-blush-700",children:["View all ",u.jsx(Es,{size:15})]})]}),u.jsxs(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:[(e||[]).slice(0,8).map(l=>u.jsx(mm,{children:u.jsx(Zl,{p:l})},l.id)),!(e||[]).length&&u.jsx("div",{className:"col-span-4 text-blush-300 text-sm py-12 text-center",children:"Curating fresh picks…"})]})]}),u.jsx("div",{className:"botanical-divider",children:u.jsx(ft,{size:18})}),u.jsx(Gr,{children:u.jsxs("section",{className:"relative overflow-hidden rounded-4xl bg-gradient-to-br from-sage-700 to-sage-800 text-white",children:[u.jsx(Kd,{count:8}),u.jsxs("div",{className:"relative z-10 p-8 md:p-12 flex flex-col md:flex-row items-center justify-between gap-6",children:[u.jsxs("div",{className:"max-w-lg",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-200 text-[12px] tracking-[0.2em] uppercase mb-3",children:[u.jsx(ej,{size:15})," Farmgirl-style daily"]}),u.jsx("h3",{className:"font-serif text-3xl md:text-4xl font-bold mb-3",children:"Today's Designer Bouquet"}),u.jsx("p",{className:"text-cream/85 leading-relaxed",children:"Made fresh each morning with whatever's most beautiful in the cooler — hand-designed by our florists and curated by GUARDiA AI. Limited daily stock."})]}),u.jsx(Le,{to:"/daily-standard",children:u.jsxs(Ua,{className:"inline-flex items-center gap-2 bg-white text-sage-800 font-semibold px-7 py-3.5 rounded-full shadow-bloom",children:["See today's bouquet ",u.jsx(Es,{size:16})]})})]})]})}),u.jsxs("section",{children:[u.jsxs(Gr,{className:"flex items-end justify-between mb-7",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-600 text-[12px] tracking-[0.2em] uppercase mb-2",children:[u.jsx(Wa,{size:14})," Most loved"]}),u.jsx("h2",{className:"font-serif text-3xl text-blush-900",children:"Bestsellers"})]}),u.jsxs(Le,{to:"/category?sort=sales",className:"hidden sm:flex items-center gap-1 text-sm text-blush-500 hover:text-blush-700",children:["View all ",u.jsx(Es,{size:15})]})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:r.map(l=>u.jsx(mm,{children:u.jsx(Zl,{p:l})},l.id))})]}),u.jsx(Gr,{children:u.jsx("section",{className:"grid md:grid-cols-3 gap-5",children:[{to:"/category?occasion=ROMANCE",label:"Love & Romance",sub:"Roses that speak from the heart",img:(i=a[1])==null?void 0:i.thumbnail},{to:"/category?occasion=SYMPATHY",label:"Sympathy & Comfort",sub:"Thoughtful tributes, gently delivered",img:(s=a[2])==null?void 0:s.thumbnail},{to:"/subscription",label:"Flower Subscriptions",sub:"Fresh blooms, week after week",img:(o=a[3])==null?void 0:o.thumbnail}].map((l,c)=>u.jsxs(Le,{to:l.to,className:"group relative rounded-3xl overflow-hidden zoom-frame aspect-[5/4] block shadow-soft",children:[l.img?u.jsx("img",{src:l.img,alt:"",loading:"lazy",className:"w-full h-full object-cover group-hover:scale-110"}):u.jsx("div",{className:"w-full h-full bg-gradient-to-br from-blush-100 to-sage-100"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-blush-900/75 via-blush-900/20 to-transparent"}),u.jsxs("div",{className:"absolute bottom-0 left-0 p-6 text-white",children:[u.jsx("div",{className:"font-serif text-xl font-semibold mb-0.5",children:l.label}),u.jsx("p",{className:"text-cream/85 text-sm",children:l.sub}),u.jsxs("span",{className:"inline-flex items-center gap-1 text-[13px] text-gold mt-2 group-hover:gap-2 transition-all",children:["Explore ",u.jsx(Es,{size:14})]})]})]},l.to))})}),u.jsx(Gr,{children:u.jsxs("section",{className:"rounded-4xl bg-blush-50 border border-blush-100 p-8 md:p-10 text-center",children:[u.jsx("div",{className:"flex justify-center mb-4",children:u.jsx("span",{className:"w-12 h-12 rounded-full bg-white text-blush-500 flex items-center justify-center shadow-soft",children:u.jsx(Ud,{size:22})})}),u.jsxs("h3",{className:"font-serif text-2xl text-blush-900 mb-2",children:["Your Local Florist Since ",ke.founded]}),u.jsx("p",{className:"text-[#6b5258] max-w-xl mx-auto leading-relaxed text-[15px]",children:ke.about}),u.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 mt-5 text-[12px] text-sage-700",children:[u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"Same-Day Delivery"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"Hand-Delivered"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"100% Satisfaction"}),u.jsx("span",{className:"bg-white rounded-full px-3 py-1.5 shadow-soft",children:"No-Contact Available"})]})]})})]})]})}const gT=[["","All"],["BIRTHDAY","Birthday"],["ANNIVERSARY","Anniversary"],["SYMPATHY","Sympathy"],["CONGRATS","Congrats"],["ROMANCE","Romance"]],lW=[["","Recommended"],["price_asc","Price ↑"],["price_desc","Price ↓"],["sales","Bestselling"],["rating","Top rated"]];function cW(){var b;const[e,t]=m$(),n=e.get("occasion")||"",[r,a]=A.useState(e.get("sort")||""),[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(null);se({queryKey:["cats"],queryFn:PY});const{data:d}=se({queryKey:["products",n,r,i],queryFn:()=>Ql({occasion:n,sort:r,maxPrice:i?Number(i):void 0,size:24})}),h=c?c.items:(d==null?void 0:d.items)||[],p=y=>{const v=new URLSearchParams(e);y?v.set("occasion",y):v.delete("occasion"),t(v),f(null)},m=async y=>{if(y.preventDefault(),!o.trim()){f(null);return}const v=await n5(o.trim()).catch(()=>null);f(v)},g=((b=gT.find(y=>y[0]===n))==null?void 0:b[1])||"All";return u.jsxs("div",{children:[u.jsx("section",{className:"bg-gradient-to-br from-blush-50 to-ivory border-b border-blush-100",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10",children:[u.jsx("div",{className:"text-[12px] tracking-[0.2em] uppercase text-sage-600 mb-2",children:"Shop the collection"}),u.jsx("h1",{className:"font-serif text-4xl text-blush-900",children:g==="All"?"All Flowers":g})]})}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("form",{onSubmit:m,className:"flex items-center gap-2 bg-white border border-blush-100 rounded-full px-5 py-3 mb-6 max-w-xl shadow-soft",children:[u.jsx(xr,{size:16,className:"text-blush-500"}),u.jsx("input",{value:o,onChange:y=>l(y.target.value),placeholder:'Try "anniversary roses under $80"',className:"flex-1 text-sm outline-none bg-transparent placeholder:text-blush-300"}),u.jsx("button",{className:"text-blush-500 text-sm font-semibold",children:"AI Search"})]}),c&&u.jsxs("div",{className:"text-xs text-sage-700 mb-4",children:["AI understood: ",u.jsx("span",{className:"font-medium",children:JSON.stringify(c.parsed)})," · ",c.source]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-7",children:[gT.map(([y,v])=>u.jsx("button",{onClick:()=>p(y),className:`px-4 py-1.5 rounded-full text-sm border transition-colors ${n===y?"bg-blush-500 text-white border-blush-500":"bg-white text-[#6b5258] border-blush-100 hover:border-blush-300"}`,children:v},y)),u.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[u.jsx(CK,{size:15,className:"text-blush-300"}),u.jsx("input",{value:i,onChange:y=>{s(y.target.value.replace(/\D/g,"")),f(null)},placeholder:"Max $",className:"w-24 px-3 py-1.5 rounded-full border border-blush-100 text-sm outline-none focus:border-blush-300"}),u.jsx("select",{value:r,onChange:y=>{a(y.target.value),f(null)},className:"px-3 py-1.5 rounded-full border border-blush-100 text-sm outline-none bg-white",children:lW.map(([y,v])=>u.jsx("option",{value:y,children:v},y))})]})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:h.map(y=>u.jsx(mm,{children:u.jsx(Zl,{p:y})},y.id))}),!h.length&&u.jsxs(Gr,{className:"text-center text-blush-300 py-20",children:[u.jsx(ft,{size:40,className:"mx-auto mb-3 text-blush-200"}),"No flowers match those filters."]})]})]})}function uW(){const{t:e}=ni(),[t]=m$(),n=t.get("q")||"",{data:r,isLoading:a}=se({queryKey:["nl-search",n],queryFn:()=>n5(n),enabled:!!n}),i=(r==null?void 0:r.items)||[];return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(xr,{className:"text-bloom",size:20}),u.jsx("h1",{className:"font-serif text-2xl font-bold",children:e("search.resultsFor",{query:n})})]}),(r==null?void 0:r.parsed)&&u.jsxs("div",{className:"text-xs text-bloom2 mb-5",children:[e("search.aiUnderstood")," ",u.jsx("span",{className:"font-medium",children:JSON.stringify(r.parsed)})," · ",r.source]}),a&&u.jsx("div",{className:"text-gray-400 py-10 text-center",children:e("search.searching")}),u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:i.map(s=>u.jsx(Zl,{p:s},s.id))}),!a&&!i.length&&u.jsx("div",{className:"text-center text-gray-400 py-16",children:e("search.noResults")})]})}function fW(){var te,Z,ye;const{id:e}=o$(),t=Number(e),n=Kt(),r=ti(),{custToken:a,setCartCount:i}=bn(),[s,o]=A.useState(""),[l,c]=A.useState(null),[f,d]=A.useState(null),[h,p]=A.useState(""),[m,g]=A.useState(1),[b,y]=A.useState(""),[v,x]=A.useState(!1),[w,S]=A.useState(null),{data:j}=se({queryKey:["product",t],queryFn:()=>CY(t)}),{data:O}=se({queryKey:["reviews",t],queryFn:()=>WY(t)}),{data:E}=se({queryKey:["rstats",t],queryFn:()=>QY(t)}),{data:T}=se({queryKey:["aisum",t],queryFn:()=>cX(t)});if(!j)return u.jsx("div",{className:"max-w-6xl mx-auto px-4 py-24 text-center text-blush-300",children:"Loading…"});const N=j.sizes||[],M=N.find(J=>J.sizeCode===s)||N[0],C=j.options||[],L=C.filter(J=>J.optionType==="VASE"),D=C.filter(J=>J.optionType==="WRAP"),$=J=>C.find(st=>st.id===J),P=M?M.price:j.salePrice&&j.salePrice>0?j.salePrice:j.price,k=(((te=$(l))==null?void 0:te.extraPrice)||0)+(((Z=$(f))==null?void 0:Z.extraPrice)||0),I=(P+k)*m,F=w||j.thumbnail,H=async()=>{if(!a){n("/account");return}try{await LY({productId:j.id,optionId:l||f||null,sizeCode:(M==null?void 0:M.sizeCode)||"",cardMessage:h,quantity:m}),i(J=>J+m),y("Added to your cart.")}catch{y("Could not add to cart.")}},Y=async()=>{await H(),n("/cart")},q=async()=>{if(!a){n("/account");return}x(!0),setTimeout(()=>x(!1),700),await rX(j.id).catch(()=>{}),y("Saved to your wishlist.")};return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-10",children:[u.jsxs("div",{className:"grid md:grid-cols-2 gap-10",children:[u.jsxs(Gr,{children:[u.jsx("div",{className:"relative aspect-[4/5] rounded-4xl overflow-hidden bg-gradient-to-br from-blush-50 to-ivory flex items-center justify-center shadow-soft",children:F?u.jsx(Nt.img,{src:F,alt:j.name,initial:r?!1:{opacity:0,scale:1.04},animate:{opacity:1,scale:1},transition:{duration:.6},className:"w-full h-full object-cover"},F):u.jsx(ft,{className:"text-blush-200",size:96})}),!!(j.images||[]).length&&u.jsxs("div",{className:"flex gap-2 mt-3",children:[u.jsx("button",{onClick:()=>S(null),className:`w-16 h-16 rounded-2xl overflow-hidden border-2 ${w?"border-blush-100":"border-blush-400"}`,children:j.thumbnail?u.jsx("img",{src:j.thumbnail,className:"w-full h-full object-cover"}):u.jsx(ft,{className:"text-blush-200 m-auto",size:20})}),j.images.map((J,st)=>u.jsx("button",{onClick:()=>S(J),className:`w-16 h-16 rounded-2xl overflow-hidden border-2 ${w===J?"border-blush-400":"border-blush-100"}`,children:u.jsx("img",{src:J,className:"w-full h-full object-cover"})},st))]})]}),u.jsxs(Gr,{delay:.1,children:[j.brand&&u.jsx("div",{className:"text-[11px] uppercase tracking-[0.2em] text-sage-600 mb-1",children:j.brand}),u.jsx("h1",{className:"font-serif text-3xl font-bold text-blush-900 mb-2 leading-tight",children:j.name}),u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gold mb-4",children:[u.jsx(Wa,{size:15,fill:"currentColor"})," ",((ye=j.ratingAvg)==null?void 0:ye.toFixed(1))||"–",u.jsxs("span",{className:"text-[#a08a90]",children:["(",j.reviewCount||0," reviews)"]}),j.occasion&&u.jsx("span",{className:"text-xs bg-blush-50 text-blush-700 px-2.5 py-0.5 rounded-full ml-1",children:j.occasion})]}),u.jsx("p",{className:"text-[#6b5258] text-[15px] mb-6 leading-relaxed",children:j.description}),!!N.length&&u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Choose your size"}),u.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:N.map(J=>u.jsxs(Ua,{onClick:()=>o(J.sizeCode),className:`rounded-2xl border p-3 text-center transition-colors ${(M==null?void 0:M.sizeCode)===J.sizeCode?"border-blush-400 bg-blush-50":"border-blush-100 hover:border-blush-300"}`,children:[u.jsx("div",{className:"font-semibold text-sm text-blush-900",children:J.label}),u.jsxs("div",{className:"text-xs text-[#8a7077]",children:[J.stemCount," stems"]}),u.jsx("div",{className:"text-blush-600 font-bold text-sm mt-1",children:Ee(J.price)})]},J.sizeCode))})]}),!!L.length&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Add a vase"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Ch,{active:l===null,onClick:()=>c(null),children:"No vase"}),L.map(J=>u.jsxs(Ch,{active:l===J.id,onClick:()=>c(J.id),children:[J.optionValue," +",Ee(J.extraPrice)]},J.id))]})]}),!!D.length&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-sm font-medium text-blush-900 mb-2",children:"Wrapping"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Ch,{active:f===null,onClick:()=>d(null),children:"Standard"}),D.map(J=>u.jsxs(Ch,{active:f===J.id,onClick:()=>d(J.id),children:[J.optionValue," +",Ee(J.extraPrice)]},J.id))]})]}),u.jsxs("div",{className:"mb-5",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("span",{className:"text-sm font-medium text-blush-900",children:"Card message"}),u.jsxs(Le,{to:"/cs",className:"text-xs text-blush-500 flex items-center gap-1",children:[u.jsx(xr,{size:12})," AI message helper"]})]}),u.jsx("textarea",{value:h,onChange:J=>p(J.target.value),rows:2,maxLength:200,placeholder:"Write a heartfelt note for the recipient…",className:"w-full px-3.5 py-2.5 rounded-2xl border border-blush-100 text-sm outline-none focus:border-blush-400"})]}),u.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[u.jsxs("div",{className:"flex items-center border border-blush-100 rounded-full",children:[u.jsx("button",{onClick:()=>g(J=>Math.max(1,J-1)),className:"px-3.5 py-1.5 text-blush-600",children:"−"}),u.jsx("span",{className:"px-2 text-sm w-8 text-center",children:m}),u.jsx("button",{onClick:()=>g(J=>J+1),className:"px-3.5 py-1.5 text-blush-600",children:"+"})]}),u.jsx("div",{className:"font-serif text-2xl font-bold text-blush-900",children:Ee(I)})]}),b&&u.jsx("div",{className:"text-sm text-sage-700 mb-3",children:b}),u.jsxs("div",{className:"flex gap-3",children:[u.jsxs(Ua,{onClick:H,className:"flex-1 flex items-center justify-center gap-2 border border-blush-400 text-blush-600 font-semibold py-3.5 rounded-full hover:bg-blush-50",children:[u.jsx(sj,{size:18})," Add to Cart"]}),u.jsx(Ua,{onClick:Y,className:"flex-1 bg-blush-500 text-white font-semibold py-3.5 rounded-full hover:bg-blush-600 shadow-petal",children:"Buy Now"}),u.jsx("button",{onClick:q,className:`px-4 border border-blush-100 rounded-full text-blush-500 hover:bg-blush-50 ${v?"animate-heartbeat":""}`,children:u.jsx(Rf,{size:18,fill:v?"currentColor":"none"})})]}),u.jsxs("div",{className:"flex items-center gap-5 mt-5 text-xs text-sage-700",children:[u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(Ud,{size:14})," Same-day local delivery"]}),u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(aj,{size:14})," 100% satisfaction"]})]}),u.jsx("div",{className:"mt-4 pt-4 border-t border-blush-100/60",children:u.jsx(KX,{url:typeof window<"u"?window.location.href:"",title:j.name,image:j.thumbnail||""})})]})]}),u.jsxs("div",{className:"mt-16",children:[u.jsx("div",{className:"botanical-divider mb-8",children:u.jsx(ft,{size:16})}),u.jsxs("h2",{className:"font-serif text-2xl font-bold text-blush-900 mb-5",children:["Reviews (",(E==null?void 0:E.count)??j.reviewCount??0,")"]}),(T==null?void 0:T.summary)&&u.jsxs(Gr,{className:"bg-gradient-to-br from-blush-50 to-sage-50 border border-blush-100 rounded-3xl p-5 mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2 text-blush-700 font-medium text-sm mb-1.5",children:[u.jsx(xr,{size:15})," AI Review Summary ",u.jsx("span",{className:"text-xs text-[#a08a90]",children:T.source})]}),u.jsx("p",{className:"text-sm text-[#5a474d] leading-relaxed",children:T.summary})]}),u.jsxs("div",{className:"space-y-3",children:[(O||[]).map(J=>u.jsxs("div",{className:"bg-white rounded-3xl border border-blush-100/70 p-5 shadow-soft",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"font-medium text-sm text-blush-900",children:J.title||"Review"}),u.jsxs("span",{className:"flex items-center gap-0.5 text-gold text-sm",children:[u.jsx(Wa,{size:13,fill:"currentColor"}),J.rating]})]}),u.jsx("p",{className:"text-sm text-[#6b5258] mt-1.5 leading-relaxed",children:J.content})]},J.id)),!(O||[]).length&&u.jsx("div",{className:"text-blush-300 text-sm py-8 text-center",children:"No reviews yet — be the first."})]}),u.jsx(Le,{to:`/review/${j.id}`,className:"inline-flex items-center gap-1 mt-5 text-sm text-blush-500 font-semibold hover:text-blush-700",children:"Write a review →"})]})]})}function Ch({active:e,onClick:t,children:n}){return u.jsx("button",{onClick:t,className:`px-3.5 py-1.5 rounded-full text-sm border transition-colors ${e?"bg-blush-500 text-white border-blush-500":"border-blush-100 text-[#6b5258] hover:border-blush-300"}`,children:n})}function dW(){const{t:e}=ni(),t=nn(),n=Kt(),{custToken:r,setCartCount:a}=bn(),{data:i}=se({queryKey:["cart"],queryFn:hj,enabled:!!r}),s=()=>t.invalidateQueries({queryKey:["cart"]}),o=async(d,h)=>{h<1||(await zY(d,h),s())},l=async d=>{await IY(d),s(),a(h=>Math.max(0,h-1))};if(!r)return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-20 text-center",children:[u.jsx(sj,{className:"mx-auto text-bloom/40 mb-3",size:48}),u.jsx("p",{className:"text-gray-500 mb-4",children:e("cart.signInPrompt")}),u.jsx(Le,{to:"/account",className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:e("cart.signInRegister")})]});const c=i||[],f=c.reduce((d,h)=>d+(h.price||(h.unitPrice||0)*(h.quantity||1)),0);return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsx("h1",{className:"font-serif text-2xl font-bold mb-6",children:e("cart.title")}),c.length?u.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[u.jsx("div",{className:"md:col-span-2 space-y-3",children:c.map(d=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex gap-4",children:[u.jsx("div",{className:"w-20 h-20 bg-petal rounded-xl flex items-center justify-center overflow-hidden shrink-0",children:d.thumbnail?u.jsx("img",{src:d.thumbnail,className:"w-full h-full object-cover"}):u.jsx(ft,{className:"text-bloom/30",size:32})}),u.jsxs("div",{className:"flex-1",children:[u.jsx("div",{className:"font-medium text-sm",children:d.productName||`Product #${d.productId}`}),u.jsxs("div",{className:"text-xs text-gray-500",children:[d.sizeCode,d.cardMessage?` · ${e("cart.card")}: ${d.cardMessage.slice(0,20)}`:""]}),u.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[u.jsxs("div",{className:"flex items-center border border-blush-100 rounded-full text-sm",children:[u.jsx("button",{onClick:()=>o(d.id,(d.quantity||1)-1),className:"px-2.5 py-1 text-bloom2",children:"−"}),u.jsx("span",{className:"px-1 w-6 text-center",children:d.quantity||1}),u.jsx("button",{onClick:()=>o(d.id,(d.quantity||1)+1),className:"px-2.5 py-1 text-bloom2",children:"+"})]}),u.jsx("button",{onClick:()=>l(d.id),className:"text-blush-400 hover:text-blush-600",children:u.jsx(PK,{size:16})})]})]}),u.jsx("div",{className:"font-bold text-bloom2 text-sm",children:Ee(d.price||(d.unitPrice||0)*(d.quantity||1))})]},d.id))}),u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 h-fit",children:[u.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[u.jsx("span",{className:"text-gray-500",children:e("cart.subtotal")}),u.jsx("span",{className:"font-medium",children:Ee(f)})]}),u.jsxs("div",{className:"flex justify-between text-sm mb-3",children:[u.jsx("span",{className:"text-gray-500",children:e("cart.shippingTax")}),u.jsx("span",{className:"text-gray-400",children:e("cart.calcAtCheckout")})]}),u.jsxs("div",{className:"border-t border-blush-100/60 pt-3 flex justify-between font-bold",children:[u.jsx("span",{children:e("cart.total")}),u.jsx("span",{className:"text-bloom2",children:Ee(f)})]}),u.jsx("button",{onClick:()=>n("/checkout"),className:"w-full mt-4 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2",children:e("cart.checkout")})]})]}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:[e("cart.empty")," ",u.jsx(Le,{to:"/category",className:"text-bloom",children:e("cart.startShopping")})]})]})}function hW(e){const t=[],n=new Date;for(let r=0;rSo(!0)}),{data:st}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!t}),{data:Ve}=se({queryKey:["holidays"],queryFn:Wk}),{data:G}=se({queryKey:["avail",o,c],queryFn:()=>$Y(o,c),enabled:!!o&&!!c});A.useEffect(()=>{!o&&(J!=null&&J.length)&&l(J[0].id)},[J]);const oe=ye||[],X=oe.reduce((le,zt)=>le+(zt.price||(zt.unitPrice||0)*(zt.quantity||1)),0),V=G!=null&&G.surgeMultiplier&&G.surgeMultiplier>1?X*(G.surgeMultiplier-1):0,_e=((Co=st==null?void 0:st.benefit)==null?void 0:Co.discountRate)||0,ge=X*(_e/100),Xe=(k==null?void 0:k.taxAmount)||0,ot=(st==null?void 0:st.pointBalance)||0,dt=Math.min(ot,Math.floor(X)),Rn=Math.max(0,X+V+Xe-ge-T),oi=A.useMemo(()=>new Set((Ve||[]).filter(le=>le.blocked).map(le=>le.holidayDate)),[Ve]),No=async()=>{if(!y||!x)return;const le=await oX(y,x).catch(()=>null);P(le)},pa=async()=>{var Er;const le=((Er=J==null?void 0:J.find(nh=>nh.id===o))==null?void 0:Er.state)||"",zt=await sX(X,x||"",le).catch(()=>null);I(zt)};A.useEffect(()=>{X>0&&o&&pa()},[X,o,x]);const ma=async()=>{var le,zt;if(Z(""),!t){e("/account");return}if(!oe.length){Z("Your cart is empty.");return}if(!c||!d){Z("Please select a delivery/pickup date and time slot.");return}if(i==="DELIVERY"&&(!y||!p)){Z("Please enter the recipient and delivery address.");return}if(M==="CARD"&&!L.complete){Z("Please enter your card details.");return}H(!0);try{const Er=await UY({storeId:o,fulfillmentType:i,receiverName:p,receiverPhone:g,address:i==="DELIVERY"?y:"",deliveryZip:x,scheduledDate:c,slotId:d.id,slotLabel:d.label,cardMessage:S,memo:O,couponId:null,discountAmount:Math.round((ge+T)*100)/100,taxAmount:Xe,surgeAmount:Math.round(V*100)/100});await VY({orderId:Er.id,amount:Rn,method:M,usePoints:T,cardLast4:M==="CARD"?L.last4:""}).catch(()=>{}),a(0),q(Er)}catch(Er){Z(((zt=(le=Er==null?void 0:Er.response)==null?void 0:le.data)==null?void 0:zt.message)||"Order failed. Please try again in a moment.")}finally{H(!1)}};return t?Y?u.jsxs("div",{className:"max-w-lg mx-auto px-4 py-20 text-center",children:[u.jsx(vK,{className:"mx-auto text-leaf mb-4",size:56}),u.jsx("h1",{className:"font-serif text-2xl font-bold mb-2",children:"Your order has been placed"}),u.jsxs("p",{className:"text-gray-500 mb-1",children:["Order Number ",u.jsx("span",{className:"font-semibold text-bloom2",children:Y.orderNo||`#${Y.id}`})]}),u.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:[c," · ",d==null?void 0:d.label," · ",Ee(Rn)]}),u.jsxs("div",{className:"flex gap-3 justify-center",children:[u.jsx("button",{onClick:()=>e("/orders"),className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Order History"}),u.jsx("button",{onClick:()=>e("/home"),className:"border border-blush-100 px-6 py-2.5 rounded-full text-bloom2",children:"Continue Shopping"})]})]}):u.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[u.jsx("h1",{className:"font-serif text-2xl font-bold mb-6",children:"Checkout"}),u.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[u.jsxs("div",{className:"md:col-span-2 space-y-5",children:[u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Fulfillment Method"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("button",{onClick:()=>s("DELIVERY"),className:`flex items-center gap-2 justify-center py-3 rounded-xl border ${i==="DELIVERY"?"border-bloom bg-petal text-bloom2":"border-blush-100"}`,children:[u.jsx(Ud,{size:18})," Local Delivery"]}),u.jsxs("button",{onClick:()=>s("PICKUP"),className:`flex items-center gap-2 justify-center py-3 rounded-xl border ${i==="PICKUP"?"border-bloom bg-petal text-bloom2":"border-blush-100"}`,children:[u.jsx(Bd,{size:18})," Store Pickup"]})]}),u.jsxs("div",{className:"mt-3",children:[u.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Store"}),u.jsx("select",{value:o,onChange:le=>l(Number(le.target.value)),className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:(J||[]).map(le=>u.jsxs("option",{value:le.id,children:[le.name," (",le.city,", ",le.state,")"]},le.id))})]})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold mb-3",children:[u.jsx(yK,{size:16,className:"text-bloom"})," Delivery / Pickup Date"]}),u.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2",children:hW(14).map(le=>{const zt=oi.has(le),Er=c===le,nh=new Date(le);return u.jsxs("button",{disabled:zt,onClick:()=>{f(le),h(null)},className:`shrink-0 w-16 py-2 rounded-xl border text-center text-xs ${zt?"opacity-30 cursor-not-allowed border-blush-100":Er?"border-bloom bg-bloom text-white":"border-blush-100 hover:border-bloom"}`,children:[u.jsx("div",{className:"font-semibold",children:nh.toLocaleDateString("en-US",{weekday:"short"})}),u.jsx("div",{className:"text-base",children:nh.getDate()}),zt&&u.jsx("div",{className:"text-[9px]",children:"Closed"})]},le)})}),c&&G&&u.jsxs("div",{className:"mt-3",children:[G.blocked&&u.jsxs("div",{className:"flex items-center gap-1.5 text-blush-500 text-xs mb-2",children:[u.jsx(RK,{size:13})," Delivery is unavailable on this date (peak season / closed)."]}),G.surgeMultiplier>1&&u.jsxs("div",{className:"text-xs text-amber-600 mb-2",children:["⚡ Peak-season surge pricing ×",G.surgeMultiplier," applied"]}),G.sameDayAvailable&&u.jsxs("div",{className:"text-xs text-leaf mb-2",children:["Same-Day Delivery available (order by ",G.sameDayCutoff,")"]}),u.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium mb-2",children:[u.jsx(ck,{size:14,className:"text-bloom"})," Delivery Time Slot"]}),u.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[(G.slots||[]).map(le=>{const zt=le.available===!1||le.capacity!=null&&le.booked>=le.capacity;return u.jsx("button",{disabled:zt,onClick:()=>h({id:le.id,label:le.slotLabel}),className:`py-2 rounded-lg border text-xs ${zt?"opacity-30 cursor-not-allowed":(d==null?void 0:d.id)===le.id?"border-bloom bg-petal text-bloom2 font-semibold":"border-blush-100 hover:border-bloom"}`,children:le.slotLabel},le.id)}),!(G.slots||[]).length&&u.jsx("div",{className:"col-span-3 text-gray-400 text-xs py-2",children:"No time slots available."})]})]})]}),i==="DELIVERY"&&u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3",children:[u.jsx("div",{className:"text-sm font-semibold",children:"Recipient Information"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx("input",{value:p,onChange:le=>m(le.target.value),placeholder:"Recipient Name",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:g,onChange:le=>b(le.target.value),placeholder:"Phone",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{value:y,onChange:le=>v(le.target.value),placeholder:"Delivery Address",className:"flex-1 px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:x,onChange:le=>w(le.target.value.replace(/\D/g,"").slice(0,5)),placeholder:"ZIP",className:"w-24 px-3 py-2 rounded-xl border border-blush-100 text-sm text-center outline-none focus:border-bloom"}),u.jsxs("button",{onClick:No,className:"px-3 rounded-xl border border-bloom text-bloom text-sm font-semibold flex items-center gap-1",children:[u.jsx(dm,{size:14})," Verify"]})]}),$&&u.jsx("div",{className:`text-xs ${$.valid?"text-leaf":"text-blush-500"}`,children:$.valid?`Verified: ${$.normalized||y} (${$.provider})`:`Address verification failed (${$.provider})`})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("div",{className:"text-sm font-semibold",children:"Gift Card Message"}),u.jsxs("span",{className:"text-xs text-bloom flex items-center gap-1",children:[u.jsx(xr,{size:12})," AI writing is on the product page"]})]}),u.jsx("textarea",{value:S,onChange:le=>j(le.target.value),rows:2,maxLength:200,placeholder:"Message for the recipient",className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:O,onChange:le=>E(le.target.value),placeholder:"Special Instructions (optional)",className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsxs("section",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Payment Method"}),u.jsx(tW,{method:M,onMethod:C,onCardChange:D,cards:ke.cards,wallets:ke.wallets})]})]}),u.jsxs("aside",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 h-fit sticky top-20",children:[u.jsx("div",{className:"text-sm font-semibold mb-3",children:"Order Summary"}),u.jsxs("div",{className:"space-y-1.5 text-sm",children:[u.jsx(fu,{k:"Subtotal",v:Ee(X)}),V>0&&u.jsx(fu,{k:"Surge Pricing",v:`+${Ee(V)}`,amber:!0}),u.jsx(fu,{k:"Tax",v:Ee(Xe),sub:k?`${k.provider} ${(k.rate*100).toFixed(1)}%`:""}),ge>0&&u.jsx(fu,{k:`Tier Discount (${(st==null?void 0:st.tierName)||""} ${_e}%)`,v:`-${Ee(ge)}`,green:!0}),T>0&&u.jsx(fu,{k:"Points Used",v:`-${Ee(T)}`,green:!0})]}),!!t&&u.jsxs("div",{className:"mt-4 bg-petal rounded-xl p-3",children:[u.jsxs("div",{className:"flex items-center justify-between text-xs text-bloom2 mb-1",children:[u.jsxs("span",{children:["Points Balance ",ot.toLocaleString()," pts"]}),u.jsx("button",{onClick:()=>N(dt),className:"text-bloom font-semibold",children:"Use All"})]}),u.jsx("input",{type:"range",min:0,max:dt,value:T,onChange:le=>N(Number(le.target.value)),className:"w-full accent-bloom"}),u.jsxs("div",{className:"text-xs text-gray-500 text-right",children:[T.toLocaleString()," pts used"]})]}),u.jsxs("div",{className:"border-t border-blush-100/60 mt-4 pt-3 flex justify-between font-bold text-base",children:[u.jsx("span",{children:"Order Total"}),u.jsx("span",{className:"text-bloom2",children:Ee(Rn)})]}),te&&u.jsx("div",{className:"text-blush-500 text-xs mt-3",children:te}),u.jsx("button",{onClick:ma,disabled:F,className:"w-full mt-4 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2 disabled:opacity-60",children:F?"Processing…":`Place Order · ${Ee(Rn)}`}),u.jsx("p",{className:"text-[11px] text-gray-400 text-center mt-2",children:"Payments processed via GUARDiA PaymentGateway (secure adapter) · Card details not stored"})]})]})]}):(e("/account"),null)}function fu({k:e,v:t,sub:n,amber:r,green:a}){return u.jsxs("div",{className:"flex justify-between",children:[u.jsxs("span",{className:"text-gray-500",children:[e,n&&u.jsx("span",{className:"text-[10px] text-gray-400 ml-1",children:n})]}),u.jsx("span",{className:r?"text-amber-600":a?"text-leaf":"font-medium",children:t})]})}const mW={PAID:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",CONFIRMED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",DELIVERED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",COMPLETED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",APPROVED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",PUBLISHED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",ACTIVE:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",RESOLVED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",SHIPPED:"bg-sky-500/15 text-sky-400 border-sky-500/30",PREPARING:"bg-sky-500/15 text-sky-400 border-sky-500/30",REQUESTED:"bg-sky-500/15 text-sky-400 border-sky-500/30",IN_PROGRESS:"bg-sky-500/15 text-sky-400 border-sky-500/30",PENDING:"bg-amber-500/15 text-amber-400 border-amber-500/30",PAUSED:"bg-amber-500/15 text-amber-400 border-amber-500/30",OPEN:"bg-amber-500/15 text-amber-400 border-amber-500/30",DRAFT:"bg-slate-500/15 text-slate-400 border-slate-500/30",ENDED:"bg-slate-600/20 text-slate-400 border-slate-600/30",CANCELLED:"bg-slate-600/20 text-slate-400 border-slate-600/30",REJECTED:"bg-rose-500/15 text-rose-400 border-rose-500/30",REFUNDED:"bg-rose-500/15 text-rose-400 border-rose-500/30",FAILED:"bg-rose-500/15 text-rose-400 border-rose-500/30",BASIC:"bg-slate-500/15 text-slate-300 border-slate-500/30",SILVER:"bg-slate-300/20 text-slate-200 border-slate-300/30",GOLD:"bg-amber-400/15 text-amber-300 border-amber-400/30",VIP:"bg-violet-500/15 text-violet-300 border-violet-500/30"},yW={PENDING:"Pending",PAID:"Paid",PREPARING:"Preparing",SHIPPED:"Out for Delivery",DELIVERED:"Delivered",CONFIRMED:"Confirmed",CANCELLED:"Cancelled",REFUNDED:"Refunded",ACTIVE:"Active",PAUSED:"Paused",REQUESTED:"Requested",APPROVED:"Approved",REJECTED:"Rejected",COMPLETED:"Completed",PUBLISHED:"Published",DRAFT:"Draft",ENDED:"Ended",OPEN:"Open",IN_PROGRESS:"Processing",RESOLVED:"Resolved"};function Ur({status:e}){if(!e)return null;const t=mW[e]||"bg-slate-500/15 text-slate-400 border-slate-500/30";return u.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs font-medium border ${t}`,children:yW[e]||e})}const vT=[["WEEKLY","Weekly"],["BIWEEKLY","Every 2 Weeks"],["MONTHLY","Monthly"]];function gW(){const e=nn(),t=Kt(),{custToken:n,storeId:r}=bn(),[a,i]=A.useState("WEEKLY"),[s,o]=A.useState(0),[l,c]=A.useState(!1),{data:f}=se({queryKey:["subs"],queryFn:HY,enabled:!!n}),{data:d}=se({queryKey:["stores"],queryFn:()=>So(!0)}),{data:h}=se({queryKey:["sub-prods"],queryFn:()=>Ql({size:12,sort:"sales"})}),p=(h==null?void 0:h.items)||[],m=async()=>{var x;if(!n){t("/account");return}const y=r||((x=d==null?void 0:d[0])==null?void 0:x.id),v=p.find(w=>w.id===s)||p[0];v&&(await qY({storeId:y,productId:v.id,sizeCode:"ORIGINAL",frequency:a,receiverName:"",receiverPhone:"",address:"",deliveryZip:"",price:v.price}).catch(()=>{}),c(!1),e.invalidateQueries({queryKey:["subs"]}))},g=async(y,v)=>{await mT(y,v==="ACTIVE"?"PAUSED":"ACTIVE").catch(()=>{}),e.invalidateQueries({queryKey:["subs"]})},b=async y=>{await mT(y,"CANCELLED").catch(()=>{}),e.invalidateQueries({queryKey:["subs"]})};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Qy,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"Flower Subscription"})]}),u.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Get fresh flowers delivered weekly, every two weeks, or monthly."}),!n&&u.jsxs("div",{className:"bg-petal rounded-2xl p-6 text-center text-sm text-gray-600 mb-6",children:["Please log in to start a subscription. ",u.jsx(Le,{to:"/account",className:"text-bloom font-semibold",children:"Log In →"})]}),u.jsx("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 mb-6",children:l?u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"Delivery Frequency"}),u.jsx("div",{className:"flex gap-2",children:vT.map(([y,v])=>u.jsx("button",{onClick:()=>i(y),className:`px-4 py-2 rounded-full text-sm border ${a===y?"bg-bloom text-white border-bloom":"border-blush-100"}`,children:v},y))})]}),u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"Choose a Product"}),u.jsxs("select",{value:s,onChange:y=>o(Number(y.target.value)),className:"w-full px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:[u.jsx("option",{value:0,children:"Best Seller (Recommended)"}),p.map(y=>u.jsxs("option",{value:y.id,children:[y.name," — ",Ee(y.price)]},y.id))]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{onClick:m,className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Start Subscription"}),u.jsx("button",{onClick:()=>c(!1),className:"border border-blush-100 px-6 py-2.5 rounded-full text-gray-600",children:"Cancel"})]})]}):u.jsx("button",{onClick:()=>n?c(!0):t("/account"),className:"bg-bloom text-white px-6 py-2.5 rounded-full font-semibold",children:"Start a New Subscription"})}),u.jsx("h2",{className:"font-serif text-lg font-bold mb-3",children:"My Subscriptions"}),u.jsxs("div",{className:"space-y-3",children:[(f||[]).map(y=>{var v;return u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex items-center gap-4",children:[u.jsx("div",{className:"w-14 h-14 bg-petal rounded-xl flex items-center justify-center",children:u.jsx(ft,{className:"text-bloom/40",size:26})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("div",{className:"font-medium text-sm",children:[y.productName||`상품 #${y.productId}`," · ",((v=vT.find(x=>x[0]===y.frequency))==null?void 0:v[1])||y.frequency]}),u.jsxs("div",{className:"text-xs text-gray-500",children:["다음 배송 ",y.nextDeliveryDate||"-"," · ",Ee(y.price)]})]}),u.jsx(Ur,{status:y.status}),y.status!=="CANCELLED"&&u.jsxs(u.Fragment,{children:[u.jsx("button",{onClick:()=>g(y.id,y.status),className:"text-xs text-bloom2 border border-blush-100 rounded-full px-3 py-1.5",children:y.status==="ACTIVE"?"일시정지":"재개"}),u.jsx("button",{onClick:()=>b(y.id),className:"text-xs text-blush-400 border border-blush-100 rounded-full px-3 py-1.5",children:"해지"})]})]},y.id)}),!(f||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-8 text-center",children:"아직 구독이 없습니다."})]})]})}function vW(){const{storeName:e}=bn(),{data:t}=se({queryKey:["daily-rec"],queryFn:()=>t5("daily","",8)}),{data:n}=se({queryKey:["daily-fresh"],queryFn:()=>Ql({sort:"rating",size:8})}),r=(t&&t.length?t:n==null?void 0:n.items)||[];return u.jsxs("div",{children:[u.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-sage-700 to-sage-800 text-white",children:[u.jsx(Kd,{count:12}),u.jsxs("div",{className:"relative z-10 max-w-6xl mx-auto px-4 py-16",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sage-200 text-[12px] tracking-[0.2em] uppercase mb-3",children:[u.jsx(ej,{size:15})," Fresh today, gone tomorrow"]}),u.jsx("h1",{className:"font-serif text-5xl font-bold mb-4",children:"Today's Designer Bouquet"}),u.jsxs("p",{className:"text-cream/85 max-w-xl leading-relaxed text-lg font-light",children:["Hand-designed each morning with the freshest stems in our cooler, then curated by ",u.jsx("b",{className:"font-medium",children:"GUARDiA AI"}),". Limited daily stock · ",e||"your nearest store"," same-day delivery."]})]})]}),u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-12",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(xr,{className:"text-blush-500",size:18}),u.jsx("h2",{className:"font-serif text-2xl font-bold text-blush-900",children:"Today's Picks"}),u.jsx("span",{className:"text-xs text-sage-600",children:"AI-curated"})]}),u.jsx(pm,{className:"grid grid-cols-2 md:grid-cols-4 gap-5",children:r.map(a=>u.jsx(mm,{children:u.jsx(Zl,{p:a})},a.id))}),!r.length&&u.jsxs("div",{className:"text-center text-blush-300 py-20",children:[u.jsx(ft,{className:"mx-auto text-blush-200 mb-3",size:40}),"Today's bouquet is being designed. ",u.jsx(Le,{to:"/category",className:"text-blush-500",children:"Browse all flowers →"})]})]})]})}const bW={DISCOUNT:_K,POINT_BONUS:Mf,GIFT:mk,TIER_ONLY:Mf,SEASON:Df};function xW(){const{custToken:e}=bn(),t=Kt(),[n,r]=A.useState(""),{data:a}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!e}),i=(a==null?void 0:a.tier)||"",{data:s}=se({queryKey:["ongoing-events",i],queryFn:()=>TX(i)}),o=async l=>{var c,f;if(!e){t("/account");return}r("");try{const d=await NX(l);r(d!=null&&d.coupon?`참여 완료! 쿠폰 발급: ${d.coupon.name} (${d.coupon.code})`:"이벤트에 참여했습니다.")}catch(d){r(((f=(c=d==null?void 0:d.response)==null?void 0:c.data)==null?void 0:f.message)||"참여 자격이 없거나 이미 참여했습니다.")}};return u.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Df,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"이벤트 / 캠페인"})]}),i&&u.jsxs("p",{className:"text-sm text-gray-500 mb-2",children:["현재 등급 ",u.jsx("span",{className:"font-semibold text-bloom2",children:(a==null?void 0:a.tierName)||i})," · 등급 전용 이벤트가 함께 표시됩니다."]}),n&&u.jsx("div",{className:"bg-petal text-bloom2 text-sm rounded-xl px-4 py-2 mb-4",children:n}),u.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mt-4",children:[(s||[]).map(l=>{const c=bW[l.eventType]||Df,f=(l.banners||[])[0];return u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 overflow-hidden",children:[u.jsx("div",{className:"bg-gradient-to-r from-bloom2 to-bloom text-white p-5",children:f?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"font-serif text-lg font-bold",children:f.headline||l.title}),u.jsx("p",{className:"text-white/85 text-sm mt-1",children:f.subtext||l.description})]}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"font-serif text-lg font-bold",children:l.title}),u.jsx("p",{className:"text-white/85 text-sm mt-1",children:l.description})]})}),u.jsxs("div",{className:"p-4 flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[u.jsx(c,{size:16,className:"text-bloom"}),u.jsx("span",{children:l.eventType}),l.bonusPointRate>0&&u.jsxs("span",{className:"text-xs text-leaf",children:["+",l.bonusPointRate,"% 포인트"]}),l.targetTiers&&u.jsxs("span",{className:"text-xs bg-petal text-bloom2 px-2 py-0.5 rounded-full",children:[l.targetTiers," 전용"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ur,{status:l.status}),u.jsx("button",{onClick:()=>o(l.id),className:"bg-bloom text-white text-sm font-semibold px-4 py-2 rounded-full hover:bg-bloom2",children:"참여"})]})]}),u.jsxs("div",{className:"px-4 pb-3 text-[11px] text-gray-400",children:[l.startDate," ~ ",l.endDate]})]},l.id)}),!(s||[]).length&&u.jsx("div",{className:"col-span-2 text-center text-gray-400 py-16",children:"진행 중인 이벤트가 없습니다."})]})]})}function SW(){const{t:e}=ni(),t=nn(),n=Kt(),{custToken:r}=bn(),{data:a}=se({queryKey:["wishlist"],queryFn:nX,enabled:!!r});if(!r)return n("/account"),null;const i=a||[],s=async o=>{await aX(o).catch(()=>{}),t.invalidateQueries({queryKey:["wishlist"]})};return u.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(Rf,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:e("wishlist.title")})]}),i.length?u.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:i.map(o=>u.jsxs("div",{className:"relative",children:[u.jsx(Zl,{p:{...o,id:o.productId||o.id}}),u.jsx("button",{onClick:()=>s(o.productId||o.id),className:"absolute top-2 right-2 bg-white/90 rounded-full p-1.5 text-bloom shadow",children:u.jsx(Rf,{size:16,fill:"currentColor"})})]},o.id||o.productId))}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:[e("wishlist.empty")," ",u.jsx(Le,{to:"/category",className:"text-bloom",children:e("wishlist.startShopping")})]})]})}const bT={BASIC:"from-slate-400 to-slate-500",SILVER:"from-slate-300 to-slate-400",GOLD:"from-amber-400 to-amber-500",VIP:"from-violet-500 to-fuchsia-500"};function wW(){const{custToken:e,setCustToken:t}=bn(),n=Kt(),{data:r}=se({queryKey:["member"],queryFn:JY,enabled:!!e}),{data:a}=se({queryKey:["loyalty-me"],queryFn:pj,enabled:!!e}),{data:i}=se({queryKey:["point-history"],queryFn:()=>AX(20),enabled:!!e});if(!e)return n("/account"),null;const s=(a==null?void 0:a.tier)||"BASIC",o=a==null?void 0:a.nextTier,l=()=>{t(null),n("/home")};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center justify-between mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(wk,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"My Account"})]}),u.jsxs("button",{onClick:l,className:"flex items-center gap-1.5 text-sm text-gray-500 hover:text-bloom",children:[u.jsx(gk,{size:16})," Log Out"]})]}),u.jsxs("div",{className:`rounded-2xl bg-gradient-to-r ${bT[s]||bT.BASIC} text-white p-6 mb-5`,children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-xs uppercase tracking-widest text-white/70",children:"Membership Tier"}),u.jsxs("div",{className:"font-serif text-2xl font-bold flex items-center gap-2",children:[u.jsx(Mf,{size:24})," ",(a==null?void 0:a.tierName)||s]}),u.jsxs("div",{className:"text-sm text-white/85 mt-1",children:["Spent in last 12 months ",Ee(a==null?void 0:a.spend12m)," · ",(a==null?void 0:a.orderCount12m)||0," orders"]})]}),u.jsxs("div",{className:"text-right",children:[u.jsx("div",{className:"text-xs text-white/70",children:"Points Balance"}),u.jsxs("div",{className:"text-3xl font-bold",children:[((a==null?void 0:a.pointBalance)||0).toLocaleString(),u.jsx("span",{className:"text-base",children:"P"})]})]})]}),o&&!o.isTop&&u.jsxs("div",{className:"mt-4 text-xs text-white/85 bg-white/15 rounded-lg px-3 py-2",children:["Spend ",Ee(o.spendNeeded)," more or place ",o.ordersNeeded," more orders to reach ",u.jsx("b",{children:o.nextTierName}),"."]})]}),(a==null?void 0:a.benefit)&&u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5 mb-5",children:[u.jsxs("div",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[u.jsx(mk,{size:16,className:"text-bloom"})," My Tier Benefits"]}),u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 text-sm",children:[u.jsx(_h,{label:"Discount",value:`${a.benefit.discountRate}%`}),u.jsx(_h,{label:"Earn Rate",value:`${a.benefit.pointEarnRate}%`}),u.jsx(_h,{label:"Free Shipping",value:a.benefit.freeShipThreshold===0?"Always":a.benefit.freeShipThreshold?Ee(a.benefit.freeShipThreshold)+"+":"None"}),u.jsx(_h,{label:"Priority Slot",value:a.benefit.prioritySlot?"Included":"–"})]})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-6",children:[u.jsx(cb,{to:"/orders",icon:vk,label:"Order History"}),u.jsx(cb,{to:"/wishlist",icon:Rf,label:"Wishlist"}),u.jsx(cb,{to:"/subscription",icon:Qy,label:"Manage Subscription"})]}),u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[u.jsx(uk,{size:16,className:"text-bloom"})," Points Earned / Used History"]}),u.jsxs("div",{className:"divide-y divide-blush-100/60",children:[(i||[]).map(c=>u.jsxs("div",{className:"flex items-center justify-between py-2 text-sm",children:[u.jsxs("div",{children:[u.jsx("span",{className:"text-gray-700",children:c.reason||c.entryType}),c.orderNo&&u.jsx("span",{className:"text-xs text-gray-400 ml-2",children:c.orderNo}),u.jsx("div",{className:"text-[11px] text-gray-400",children:(c.createdAt||"").slice(0,10)})]}),u.jsxs("span",{className:c.points>=0?"text-leaf font-semibold":"text-blush-500 font-semibold",children:[c.points>=0?"+":"",c.points,"P"]})]},c.id)),!(i||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-6 text-center",children:"No points history yet."})]})]}),(r==null?void 0:r.username)&&u.jsx("div",{className:"text-center text-xs text-gray-400 mt-6",children:r.displayName||r.username})]})}function _h({label:e,value:t}){return u.jsxs("div",{className:"bg-petal rounded-xl p-3 text-center",children:[u.jsx("div",{className:"text-[11px] text-gray-500",children:e}),u.jsx("div",{className:"font-bold text-bloom2",children:t})]})}function cb({to:e,icon:t,label:n}){return u.jsxs(Le,{to:e,className:"bg-white rounded-2xl border border-blush-100/60 p-4 flex flex-col items-center gap-1.5 hover:border-bloom",children:[u.jsx(t,{size:22,className:"text-bloom"}),u.jsx("span",{className:"text-sm",children:n})]})}function jW(){const e=nn(),t=Kt(),{custToken:n}=bn(),{data:r}=se({queryKey:["my-orders"],queryFn:()=>BY(""),enabled:!!n});if(!n)return t("/account"),null;const a=r||[],i=async(s,o)=>{await Qk(s,o).catch(()=>{}),e.invalidateQueries({queryKey:["my-orders"]})};return u.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(vk,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"주문 내역"})]}),a.length?u.jsx("div",{className:"space-y-3",children:a.map(s=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-5",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("div",{className:"font-semibold text-sm",children:s.orderNo||`주문 #${s.id}`}),u.jsx(Ur,{status:s.status})]}),u.jsxs("div",{className:"text-xs text-gray-500 mb-3",children:[(s.createdAt||"").slice(0,16).replace("T"," ")," · ",s.fulfillmentType==="PICKUP"?"매장 픽업":"배송"," · ",s.scheduledDate," ",s.slotLabel]}),u.jsx("div",{className:"space-y-1.5",children:(s.items||[]).map(o=>u.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[u.jsx("div",{className:"w-9 h-9 bg-petal rounded-lg flex items-center justify-center",children:u.jsx(ft,{className:"text-bloom/40",size:16})}),u.jsxs("span",{className:"flex-1",children:[o.productName||`상품 #${o.productId}`," ",o.sizeCode&&`· ${o.sizeCode}`," ×",o.quantity]}),u.jsx("span",{className:"text-gray-600",children:Ee(o.price||o.unitPrice)})]},o.id))}),u.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-blush-100/60",children:[u.jsx("span",{className:"font-bold text-bloom2",children:Ee(s.payAmount??s.totalAmount)}),u.jsxs("div",{className:"flex gap-2",children:[s.status==="DELIVERED"&&u.jsx("button",{onClick:()=>i(s.id,"CONFIRMED"),className:"text-xs bg-bloom text-white px-3 py-1.5 rounded-full",children:"구매확정"}),["PENDING","PAID"].includes(s.status)&&u.jsx("button",{onClick:()=>i(s.id,"CANCELLED"),className:"text-xs border border-blush-100 text-blush-400 px-3 py-1.5 rounded-full",children:"주문취소"})]})]})]},s.id))}):u.jsxs("div",{className:"text-center text-gray-400 py-16",children:["주문 내역이 없습니다. ",u.jsx(Le,{to:"/category",className:"text-bloom",children:"쇼핑하기 →"})]})]})}function AW(){const{productId:e}=o$(),t=Number(e),n=Kt(),{custToken:r}=bn(),[a,i]=A.useState(5),[s,o]=A.useState(""),[l,c]=A.useState(""),[f,d]=A.useState(""),[h,p]=A.useState("");if(!r)return n("/account"),null;const m=async g=>{g.preventDefault(),p("");try{await ZY({productId:t,rating:a,title:s,content:l,imageUrl:f}),p("리뷰가 등록되었습니다."),setTimeout(()=>n(`/product/${t}`),800)}catch{p("등록에 실패했습니다. (구매 이력이 필요할 수 있습니다)")}};return u.jsxs("div",{className:"max-w-lg mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(OK,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"리뷰 작성"})]}),u.jsxs("form",{onSubmit:m,className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-sm font-medium mb-2",children:"별점"}),u.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(g=>u.jsx("button",{type:"button",onClick:()=>i(g),className:"text-amber-400",children:u.jsx(Wa,{size:28,fill:g<=a?"currentColor":"none"})},g))})]}),u.jsx("input",{value:s,onChange:g=>o(g.target.value),placeholder:"제목",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("textarea",{value:l,onChange:g=>c(g.target.value),rows:5,required:!0,placeholder:"상품은 어떠셨나요? 신선도, 배송, 디자인 등을 적어주세요.",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("input",{value:f,onChange:g=>d(g.target.value),placeholder:"사진 URL (선택)",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),h&&u.jsx("div",{className:"text-sm text-leaf",children:h}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{className:"flex-1 bg-bloom text-white font-semibold py-3 rounded-full hover:bg-bloom2",children:"등록"}),u.jsx("button",{type:"button",onClick:()=>n(-1),className:"px-6 border border-blush-100 rounded-full text-gray-600",children:"취소"})]})]})]})}function OW(){const[e,t]=A.useState("login"),[n,r]=A.useState(""),[a,i]=A.useState(""),[s,o]=A.useState(""),[l,c]=A.useState(""),[f,d]=A.useState(!1),{setCustToken:h}=bn(),p=Kt(),m=async g=>{var b,y;g.preventDefault(),c(""),d(!0);try{const x=(y=(b=(e==="login"?await Yk(n,a):await EY(n,a,s||n)).data)==null?void 0:b.data)==null?void 0:y.token;if(!x)throw new Error("no token");h(x),p("/home")}catch{c(e==="login"?"Login failed — check your username and password.":"Sign-up failed — that username may already be taken.")}finally{d(!1)}};return u.jsxs("div",{className:"relative min-h-screen bg-gradient-to-br from-blush-100 via-cream to-sage-100 flex items-center justify-center px-4 overflow-hidden",children:[u.jsx(Kd,{count:12}),u.jsxs(Nt.form,{onSubmit:m,initial:{opacity:0,y:22},animate:{opacity:1,y:0},transition:{duration:.7,ease:[.22,1,.36,1]},className:"relative z-10 w-full max-w-sm bg-white/90 backdrop-blur rounded-4xl shadow-bloom p-8 border border-blush-100",children:[u.jsxs(Le,{to:"/home",className:"flex flex-col items-center gap-1 mb-6",children:[u.jsx(ft,{className:"text-blush-500",size:32}),u.jsx("span",{className:"font-serif text-xl font-bold text-blush-900",children:"Montvale Florist"})]}),u.jsx("div",{className:"flex gap-2 mb-6 bg-blush-50 rounded-full p-1 text-sm",children:["login","register"].map(g=>u.jsx("button",{type:"button",onClick:()=>{t(g),c("")},className:`flex-1 py-2 rounded-full font-medium transition-colors ${e===g?"bg-blush-500 text-white shadow-petal":"text-blush-700"}`,children:g==="login"?"Sign In":"Create Account"},g))}),u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Username"}),u.jsx("input",{value:n,onChange:g=>r(g.target.value),required:!0,className:"w-full mb-3 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"}),e==="register"&&u.jsxs(u.Fragment,{children:[u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Name"}),u.jsx("input",{value:s,onChange:g=>o(g.target.value),className:"w-full mb-3 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"})]}),u.jsx("label",{className:"block text-xs text-blush-700 mb-1",children:"Password"}),u.jsx("input",{type:"password",value:a,onChange:g=>i(g.target.value),required:!0,className:"w-full mb-4 px-3 py-2.5 rounded-2xl bg-blush-50 border border-blush-100 text-sm outline-none focus:border-blush-400"}),l&&u.jsx("p",{className:"text-blush-500 text-xs mb-3",children:l}),u.jsx(Ua,{type:"submit",disabled:f,className:"w-full py-2.5 rounded-full bg-blush-500 text-white font-semibold hover:bg-blush-600 disabled:opacity-60",children:f?"Please wait…":e==="login"?"Sign In":"Create Account"}),u.jsxs("p",{className:"text-center text-[11px] text-[#a08a90] mt-4",children:["Store & owner staff → ",u.jsx("a",{href:"/admin/login",className:"text-blush-600",children:"Admin Console"})]}),u.jsx("p",{className:"text-center text-[11px] text-sage-600 mt-2",children:ke.tagline})]})]})}const EW=["DELIVERY","PRODUCT","PAYMENT","REFUND","OTHER"];function TW(){const e=nn(),t=Kt(),{custToken:n}=bn(),[r,a]=A.useState("DELIVERY"),[i,s]=A.useState(""),[o,l]=A.useState(""),[c,f]=A.useState(""),[d,h]=A.useState(""),[p,m]=A.useState("Birthday"),[g,b]=A.useState("Warm"),[y,v]=A.useState(""),[x,w]=A.useState([]),{data:S}=se({queryKey:["cs"],queryFn:eX,enabled:!!n}),j=async E=>{if(E.preventDefault(),h(""),!n){t("/account");return}try{const T=await tX({orderNo:i,category:r,subject:o,content:c});h(T!=null&&T.aiReply?`AI auto-reply: ${T.aiReply}`:"Your request has been submitted."),l(""),f(""),e.invalidateQueries({queryKey:["cs"]})}catch{h("Failed to submit your request.")}},O=async()=>{const E=await uX(p,g,y).catch(()=>null);w((E==null?void 0:E.messages)||[])};return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[u.jsx(jK,{className:"text-bloom",size:22}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-blush-900",children:"Customer Support (1:1)"})]}),u.jsxs("div",{className:"bg-petal rounded-2xl p-5 mb-6",children:[u.jsxs("div",{className:"flex items-center gap-2 text-bloom2 font-medium text-sm mb-3",children:[u.jsx(xr,{size:16})," AI Card Message Helper"]}),u.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[u.jsx("input",{value:p,onChange:E=>m(E.target.value),placeholder:"Occasion (e.g. Birthday)",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"}),u.jsx("input",{value:g,onChange:E=>b(E.target.value),placeholder:"Tone",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"}),u.jsx("input",{value:y,onChange:E=>v(E.target.value),placeholder:"Recipient",className:"px-3 py-2 rounded-lg border border-blush-100 text-sm bg-white outline-none"})]}),u.jsx("button",{onClick:O,className:"bg-bloom text-white text-sm font-semibold px-4 py-2 rounded-full",children:"Suggest Messages"}),!!x.length&&u.jsx("ul",{className:"mt-3 space-y-2",children:x.map((E,T)=>u.jsx("li",{className:"bg-white rounded-lg px-3 py-2 text-sm text-gray-700",children:E},T))})]}),u.jsxs("form",{onSubmit:j,className:"bg-white rounded-2xl border border-blush-100/60 p-5 space-y-3 mb-8",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx("select",{value:r,onChange:E=>a(E.target.value),className:"px-3 py-2 rounded-xl border border-blush-100 text-sm bg-white",children:EW.map(E=>u.jsx("option",{value:E,children:E},E))}),u.jsx("input",{value:i,onChange:E=>s(E.target.value),placeholder:"Order number (optional)",className:"px-3 py-2 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"})]}),u.jsx("input",{value:o,onChange:E=>l(E.target.value),required:!0,placeholder:"Subject",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),u.jsx("textarea",{value:c,onChange:E=>f(E.target.value),rows:4,required:!0,placeholder:"Tell us how we can help. Our AI will try to answer first.",className:"w-full px-3 py-2.5 rounded-xl border border-blush-100 text-sm outline-none focus:border-bloom"}),d&&u.jsx("div",{className:"text-sm text-leaf bg-leaf/10 rounded-lg px-3 py-2",children:d}),u.jsxs("button",{className:"flex items-center gap-1.5 bg-bloom text-white font-semibold px-6 py-2.5 rounded-full hover:bg-bloom2",children:[u.jsx(NK,{size:16})," Submit Request"]}),!n&&u.jsxs("p",{className:"text-xs text-gray-400",children:["Please log in to submit a request. ",u.jsx(Le,{to:"/account",className:"text-bloom",children:"Log In"})]})]}),u.jsx("h2",{className:"font-serif text-lg font-bold mb-3",children:"My Requests"}),u.jsxs("div",{className:"space-y-2",children:[(S||[]).map(E=>u.jsxs("div",{className:"bg-white rounded-2xl border border-blush-100/60 p-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"font-medium text-sm",children:E.subject}),u.jsx(Ur,{status:E.status})]}),u.jsx("p",{className:"text-sm text-gray-600 mt-1",children:E.content}),E.aiReply&&u.jsxs("div",{className:"mt-2 text-xs text-bloom2 bg-petal rounded-lg px-3 py-2",children:[u.jsx("b",{children:"AI Reply:"})," ",E.aiReply]}),E.itsmSrId&&u.jsxs("div",{className:"text-[11px] text-gray-400 mt-1",children:["ITSM SR: ",E.itsmSrId]})]},E.id)),!(S||[]).length&&u.jsx("div",{className:"text-gray-400 text-sm py-6 text-center",children:"No requests submitted yet."})]})]})}const o5="https://itsm.zioinfo.co.kr",ub=e=>e==null?void 0:e.replace(/https?:\/\/zioinfo\.co\.kr:8443/g,o5);function NW(){const[e,t]=A.useState(null),[n,r]=A.useState(!0),[a,i]=A.useState(""),[s,o]=A.useState(!1),l=()=>{r(!0),i(""),fetch(`${o5}/api/app/public-latest`).then(f=>f.json()).then(f=>t({...f,qr_url:ub(f.qr_url),landing_url:ub(f.landing_url),download_url:ub(f.download_url)})).catch(()=>i("Unable to connect to the app store. Please try again in a moment.")).finally(()=>r(!1))};A.useEffect(()=>{l()},[]);const c=async()=>{if(e!=null&&e.landing_url)try{await navigator.clipboard.writeText(e.landing_url),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return u.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-10",children:[u.jsxs("div",{className:"text-center mb-8",children:[u.jsxs("div",{className:"flex items-center gap-2 justify-center mb-2",children:[u.jsx(bl,{className:"text-bloom",size:26}),u.jsx("h1",{className:"font-serif text-2xl font-bold text-bloom2",children:"Order with the App"})]}),u.jsxs("p",{className:"text-sm text-gray-500",children:["Scan the QR code to open the ",u.jsx("span",{className:"text-bloom font-semibold",children:"GUARDiA Mall"})," customer app install page.",u.jsx("br",{}),"Enjoy same-day delivery alerts, easy reordering, and subscription management right in the app."]})]}),n&&u.jsx("div",{className:"text-center text-gray-400 py-10",children:"Loading…"}),a&&u.jsx("div",{className:"bg-petal border border-blush-100 rounded-2xl p-6 text-center text-blush-500 text-sm",children:a}),!n&&!a&&e&&!e.has_version&&u.jsxs("div",{className:"bg-white border border-blush-100/60 rounded-2xl p-10 text-center text-gray-400",children:[u.jsx(ft,{size:40,className:"mx-auto mb-3 text-bloom/30"}),"No app version has been published yet.",u.jsx("br",{}),u.jsx("span",{className:"text-xs",children:"App uploads and version management are handled in GUARDiA Manager."})]}),!n&&!a&&(e==null?void 0:e.has_version)&&u.jsxs("div",{className:"bg-white border border-blush-100/60 rounded-2xl p-6 grid md:grid-cols-[200px_1fr] gap-6 items-start shadow-sm",children:[u.jsx("div",{className:"bg-petal rounded-2xl p-3 flex items-center justify-center",children:e.qr_url?u.jsx("img",{src:e.qr_url,alt:"App install QR code",className:"w-44 h-44"}):u.jsx(bl,{size:64,className:"text-bloom/40"})}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[u.jsx("span",{className:"text-lg font-bold",children:e.app_name||"GUARDiA Mall"}),u.jsxs("span",{className:"px-2 py-0.5 rounded-md bg-bloom text-white text-xs font-semibold",children:["v",e.version]})]}),u.jsxs("div",{className:"text-xs text-gray-500 mb-4",children:[e.platform," ",e.file_size_mb?`· ${e.file_size_mb}MB`:"",e.download_count!=null&&` · ${e.download_count} downloads`]}),e.release_notes&&u.jsxs("div",{className:"mb-4",children:[u.jsx("div",{className:"text-[11px] font-semibold text-gray-400 uppercase tracking-wider mb-1",children:"What's New"}),u.jsx("div",{className:"text-sm text-gray-600 whitespace-pre-line bg-petal rounded-lg p-3 max-h-32 overflow-auto",children:e.release_notes})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.landing_url&&u.jsxs("a",{href:e.landing_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-4 py-2 rounded-full bg-bloom text-white text-sm font-semibold hover:bg-bloom2",children:[u.jsx(hk,{size:15})," Install Page"]}),e.download_url&&u.jsxs("a",{href:e.download_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-4 py-2 rounded-full border border-blush-100 text-bloom2 text-sm hover:bg-petal",children:[u.jsx(dk,{size:15})," Download APK"]}),u.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 px-4 py-2 rounded-full border border-blush-100 text-bloom2 text-sm hover:bg-petal",children:[s?u.jsx(lk,{size:15,className:"text-leaf"}):u.jsx(fk,{size:15}),s?"Copied":"Copy Link"]}),u.jsx("button",{onClick:l,className:"flex items-center gap-1.5 px-3 py-2 rounded-full border border-blush-100 text-gray-500 text-sm hover:bg-petal",children:u.jsx(nj,{size:15})})]})]})]})]})}function CW(){const{t:e}=ni(),[t,n]=A.useState("admin"),[r,a]=A.useState(""),[i,s]=A.useState(""),o=Kt();A.useEffect(()=>(document.documentElement.classList.add("admin-shell"),()=>document.documentElement.classList.remove("admin-shell")),[]);const l=async c=>{var f,d;c.preventDefault(),s("");try{const p=(d=(f=(await Yk(t,r)).data)==null?void 0:f.data)==null?void 0:d.token;if(!p)throw new Error("no token");localStorage.setItem("mall_admin_token",p);const m=await Xk().catch(()=>null);if(m!=null&&m.role&&localStorage.setItem("mall_role",m.role),m!=null&&m.username&&localStorage.setItem("mall_admin_user",m.username),(m==null?void 0:m.role)==="USER"){s(e("admin.login.errNoPriv")),localStorage.removeItem("mall_admin_token");return}o("/admin/dashboard")}catch{s(e("admin.login.errFailed"))}};return u.jsxs("div",{className:"admin-shell min-h-screen flex items-center justify-center bg-ink text-[#e6edf6]",children:[u.jsx("div",{className:"absolute top-5 right-5",children:u.jsx(ag,{variant:"admin"})}),u.jsxs("form",{onSubmit:l,className:"w-[360px] bg-panel border border-edge rounded-2xl p-8",children:[u.jsxs("div",{className:"flex items-center gap-2 justify-center mb-6",children:[u.jsx(ft,{className:"text-brand",size:28}),u.jsx("span",{className:"text-xl font-bold",children:e("admin.login.title")})]}),u.jsx("p",{className:"text-center text-sm text-slate-400 mb-6",children:e("admin.login.subtitle")}),u.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e("admin.login.username")}),u.jsx("input",{value:t,onChange:c=>n(c.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),u.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e("admin.login.password")}),u.jsx("input",{type:"password",value:r,onChange:c=>a(c.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),i&&u.jsx("p",{className:"text-rose-400 text-xs mb-3",children:i}),u.jsx("button",{className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90",children:e("admin.login.signIn")}),u.jsxs("p",{className:"text-center text-[11px] text-slate-500 mt-4",children:[e("admin.login.storefrontHere")," ",u.jsx("a",{href:"/",className:"text-brand",children:e("admin.login.here")})]})]})]})}const _W=[{to:"/admin/dashboard",key:"dashboard",icon:AK,roles:["ADMIN","MANAGER"]},{to:"/admin/stores",key:"stores",icon:Bd,roles:["ADMIN","MANAGER"]},{to:"/admin/products",key:"products",icon:ft,roles:["ADMIN","MANAGER"]},{to:"/admin/inventory",key:"inventory",icon:sk,roles:["ADMIN","MANAGER"]},{to:"/admin/orders",key:"orders",icon:ij,roles:["ADMIN","MANAGER"]},{to:"/admin/transfers",key:"transfers",icon:ik,roles:["ADMIN","MANAGER"]},{to:"/admin/members",key:"members",icon:jk,roles:["ADMIN","MANAGER"]},{to:"/admin/loyalty",key:"loyalty",icon:Mf,roles:["ADMIN","MANAGER"]},{to:"/admin/events",key:"events",icon:Df,roles:["ADMIN","MANAGER"]},{to:"/admin/subscriptions",key:"subscriptions",icon:Qy,roles:["ADMIN","MANAGER"]},{to:"/admin/schedule",key:"schedule",icon:ok,roles:["ADMIN","MANAGER"]},{to:"/admin/analytics",key:"analytics",icon:Jw,roles:["ADMIN","MANAGER"]}],PW=[{to:"/admin/users",key:"users",icon:Sk,roles:["ADMIN"]},{to:"/admin/audit",key:"audit",icon:bk,roles:["ADMIN","MANAGER"]},{to:"/admin/settings",key:"settings",icon:xk,roles:["ADMIN"]},{to:"/admin/app",key:"appInstall",icon:bl,roles:["ADMIN","MANAGER"]}],xT=({isActive:e})=>`flex items-center gap-3 px-5 py-2.5 text-sm transition-colors ${e?"bg-card text-brand border-r-2 border-brand":"text-slate-300 hover:bg-card/60"}`;function MW(){const{t:e}=ni(),t=localStorage.getItem("mall_admin_token"),[n,r]=A.useState(()=>localStorage.getItem("mall_role")||""),[a,i]=A.useState(()=>localStorage.getItem("mall_admin_user")||""),s=Kt();if(A.useEffect(()=>(document.documentElement.classList.add("admin-shell"),()=>document.documentElement.classList.remove("admin-shell")),[]),A.useEffect(()=>{t&&Xk().then(f=>{f!=null&&f.role&&(localStorage.setItem("mall_role",f.role),r(f.role)),f!=null&&f.username&&(localStorage.setItem("mall_admin_user",f.username),i(f.username))}).catch(()=>{})},[t]),!t)return u.jsx(em,{to:"/admin/login",replace:!0});if(n&&n==="USER")return u.jsx(em,{to:"/admin/login",replace:!0});const o=_W.filter(f=>!n||f.roles.includes(n)),l=PW.filter(f=>f.roles.includes(n)),c=()=>{localStorage.removeItem("mall_admin_token"),localStorage.removeItem("mall_role"),localStorage.removeItem("mall_admin_user"),s("/admin/login")};return u.jsxs("div",{className:"admin-shell flex h-screen bg-ink text-[#e6edf6]",children:[u.jsxs("aside",{className:"w-60 bg-panel border-r border-edge flex flex-col",children:[u.jsxs("div",{className:"h-16 flex items-center gap-2 px-5 border-b border-edge",children:[u.jsx(ft,{className:"text-brand",size:22}),u.jsxs("div",{children:[u.jsx("div",{className:"font-bold text-base leading-tight",children:"GUARDiA Mall"}),u.jsx("div",{className:"text-[11px] text-slate-400",children:e("admin.console")})]})]}),u.jsxs("nav",{className:"flex-1 py-2 overflow-auto",children:[o.map(({to:f,key:d,icon:h})=>u.jsxs(tx,{to:f,className:xT,children:[u.jsx(h,{size:18}),e(`admin.nav.${d}`)]},f)),l.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"px-5 pt-4 pb-1.5 text-[10px] font-semibold tracking-wider text-slate-500 uppercase border-t border-edge mt-3",children:e("admin.system")}),l.map(({to:f,key:d,icon:h})=>u.jsxs(tx,{to:f,className:xT,children:[u.jsx(h,{size:18}),e(`admin.nav.${d}`)]},f))]})]}),u.jsx("div",{className:"p-4 text-[11px] text-slate-500 border-t border-edge",children:e("admin.onPremiseTag")})]}),u.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[u.jsxs("header",{className:"h-16 bg-panel border-b border-edge flex items-center justify-between px-6",children:[u.jsx("div",{className:"text-sm text-slate-400 truncate",children:e("admin.header")}),u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(ag,{variant:"admin"}),u.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-slate-300",children:[u.jsx(bK,{size:18})," ",a||"admin"," ",u.jsx("span",{className:"text-[10px] text-brand",children:n})]}),u.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 text-sm text-slate-400 hover:text-brand",children:[u.jsx(gk,{size:16})," ",e("admin.signOut")]})]})]}),u.jsx("main",{className:"flex-1 overflow-auto p-6",children:u.jsx(f$,{})})]})]})}function l5(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t-1}var PZ=_Z,MZ=sg;function RZ(e,t){var n=this.__data__,r=MZ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var DZ=RZ,$Z=gZ,kZ=OZ,LZ=NZ,zZ=PZ,IZ=DZ;function Vc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Ns=function(t){return oo(t)&&t.indexOf("%")===t.length-1},K=function(t){return iee(t)&&!qc(t)},cee=function(t){return me(t)},$t=function(t){return K(t)||oo(t)},uee=0,jo=function(t){var n=++uee;return"".concat(t||"").concat(n)},pn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!K(t)&&!oo(t))return r;var i;if(Ns(t)){var s=t.indexOf("%");i=n*parseFloat(t.slice(0,s))/100}else i=+t;return qc(i)&&(i=r),a&&i>n&&(i=n),i},xi=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},fee=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Cx(e){"@babel/helpers - typeof";return Cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cx(e)}var MT={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Fa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},RT=null,hb=null,Ej=function e(t){if(t===RT&&Array.isArray(hb))return hb;var n=[];return A.Children.forEach(t,function(r){me(r)||(eee.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),hb=n,RT=t,n};function Wn(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Fa(a)}):r=[Fa(t)],Ej(e).forEach(function(a){var i=Xn(a,"type.displayName")||Xn(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function Ln(e,t){var n=Wn(e,t);return n&&n[0]}var DT=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!K(r)||r<=0||!K(a)||a<=0)},bee=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],xee=function(t){return t&&t.type&&oo(t.type)&&bee.indexOf(t.type)>=0},S5=function(t){return t&&Cx(t)==="object"&&"clipDot"in t},See=function(t,n,r,a){var i,s=(i=db==null?void 0:db[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!de(t)&&(a&&s.includes(n)||pee.includes(n))||r&&Oj.includes(n)},ie=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(A.isValidElement(t)&&(a=t.props),!Uc(a))return null;var i={};return Object.keys(a).forEach(function(s){var o;See((o=a)===null||o===void 0?void 0:o[s],s,n,r)&&(i[s]=a[s])}),i},_x=function e(t,n){if(t===n)return!0;var r=A.Children.count(t);if(r!==A.Children.count(n))return!1;if(r===0)return!0;if(r===1)return $T(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Eee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mx(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,s=e.style,o=e.title,l=e.desc,c=Oee(e,Aee),f=a||{width:n,height:r,x:0,y:0},d=ve("recharts-surface",i);return _.createElement("svg",Px({},ie(c,!0,"svg"),{className:d,width:n,height:r,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),_.createElement("title",null,o),_.createElement("desc",null,l),t)}var Tee=["children","className"];function Rx(){return Rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ae=_.forwardRef(function(e,t){var n=e.children,r=e.className,a=Nee(e,Tee),i=ve("recharts-layer",r);return _.createElement("g",Rx({className:i},ie(a,!0),{ref:t}),n)}),kr=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;ia?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r=r?e:Mee(e,t,n)}var Dee=Ree,$ee="\\ud800-\\udfff",kee="\\u0300-\\u036f",Lee="\\ufe20-\\ufe2f",zee="\\u20d0-\\u20ff",Iee=kee+Lee+zee,Bee="\\ufe0e\\ufe0f",Uee="\\u200d",Fee=RegExp("["+Uee+$ee+Iee+Bee+"]");function Vee(e){return Fee.test(e)}var w5=Vee;function Hee(e){return e.split("")}var qee=Hee,j5="\\ud800-\\udfff",Kee="\\u0300-\\u036f",Gee="\\ufe20-\\ufe2f",Yee="\\u20d0-\\u20ff",Xee=Kee+Gee+Yee,Wee="\\ufe0e\\ufe0f",Qee="["+j5+"]",Dx="["+Xee+"]",$x="\\ud83c[\\udffb-\\udfff]",Zee="(?:"+Dx+"|"+$x+")",A5="[^"+j5+"]",O5="(?:\\ud83c[\\udde6-\\uddff]){2}",E5="[\\ud800-\\udbff][\\udc00-\\udfff]",Jee="\\u200d",T5=Zee+"?",N5="["+Wee+"]?",ete="(?:"+Jee+"(?:"+[A5,O5,E5].join("|")+")"+N5+T5+")*",tte=N5+T5+ete,nte="(?:"+[A5+Dx+"?",Dx,O5,E5,Qee].join("|")+")",rte=RegExp($x+"(?="+$x+")|"+nte+tte,"g");function ate(e){return e.match(rte)||[]}var ite=ate,ste=qee,ote=w5,lte=ite;function cte(e){return ote(e)?lte(e):ste(e)}var ute=cte,fte=Dee,dte=w5,hte=ute,pte=m5;function mte(e){return function(t){t=pte(t);var n=dte(t)?hte(t):void 0,r=n?n[0]:t.charAt(0),a=n?fte(n,1).join(""):t.slice(1);return r[e]()+a}}var yte=mte,gte=yte,vte=gte("toUpperCase"),bte=vte;const xg=Ie(bte);function Qe(e){return function(){return e}}const C5=Math.cos,vm=Math.sin,Fr=Math.sqrt,bm=Math.PI,Sg=2*bm,kx=Math.PI,Lx=2*kx,xs=1e-6,xte=Lx-xs;function _5(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return _5;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;axs)if(!(Math.abs(d*l-c*f)>xs)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-s,m=a-o,g=l*l+c*c,b=p*p+m*m,y=Math.sqrt(g),v=Math.sqrt(h),x=i*Math.tan((kx-Math.acos((g+h-b)/(2*y*v)))/2),w=x/v,S=x/y;Math.abs(w-1)>xs&&this._append`L${t+w*f},${n+w*d}`,this._append`A${i},${i},0,0,${+(d*p>f*m)},${this._x1=t+S*l},${this._y1=n+S*c}`}}arc(t,n,r,a,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(a),l=r*Math.sin(a),c=t+o,f=n+l,d=1^s,h=s?a-i:i-a;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>xs||Math.abs(this._y1-f)>xs)&&this._append`L${c},${f}`,r&&(h<0&&(h=h%Lx+Lx),h>xte?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=f}`:h>xs&&this._append`A${r},${r},0,${+(h>=kx)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function Tj(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new wte(t)}function Nj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function P5(e){this._context=e}P5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function wg(e){return new P5(e)}function M5(e){return e[0]}function R5(e){return e[1]}function D5(e,t){var n=Qe(!0),r=null,a=wg,i=null,s=Tj(o);e=typeof e=="function"?e:e===void 0?M5:Qe(e),t=typeof t=="function"?t:t===void 0?R5:Qe(t);function o(l){var c,f=(l=Nj(l)).length,d,h=!1,p;for(r==null&&(i=a(p=s())),c=0;c<=f;++c)!(c=p;--m)o.point(x[m],w[m]);o.lineEnd(),o.areaEnd()}y&&(x[h]=+e(b,h,d),w[h]=+t(b,h,d),o.point(r?+r(b,h,d):x[h],n?+n(b,h,d):w[h]))}if(v)return o=null,v+""||null}function f(){return D5().defined(a).curve(s).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Qe(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Qe(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Qe(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:Qe(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Qe(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Qe(+d),c):n},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(n)},c.lineX1=function(){return f().x(r).y(t)},c.defined=function(d){return arguments.length?(a=typeof d=="function"?d:Qe(!!d),c):a},c.curve=function(d){return arguments.length?(s=d,i!=null&&(o=s(i)),c):s},c.context=function(d){return arguments.length?(d==null?i=o=null:o=s(i=d),c):i},c}class $5{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function jte(e){return new $5(e,!0)}function Ate(e){return new $5(e,!1)}const Cj={draw(e,t){const n=Fr(t/bm);e.moveTo(n,0),e.arc(0,0,n,0,Sg)}},Ote={draw(e,t){const n=Fr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},k5=Fr(1/3),Ete=k5*2,Tte={draw(e,t){const n=Fr(t/Ete),r=n*k5;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Nte={draw(e,t){const n=Fr(t),r=-n/2;e.rect(r,r,n,n)}},Cte=.8908130915292852,L5=vm(bm/10)/vm(7*bm/10),_te=vm(Sg/10)*L5,Pte=-C5(Sg/10)*L5,Mte={draw(e,t){const n=Fr(t*Cte),r=_te*n,a=Pte*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const s=Sg*i/5,o=C5(s),l=vm(s);e.lineTo(l*n,-o*n),e.lineTo(o*r-l*a,l*r+o*a)}e.closePath()}},pb=Fr(3),Rte={draw(e,t){const n=-Fr(t/(pb*3));e.moveTo(0,n*2),e.lineTo(-pb*n,-n),e.lineTo(pb*n,-n),e.closePath()}},nr=-.5,rr=Fr(3)/2,zx=1/Fr(12),Dte=(zx/2+1)*3,$te={draw(e,t){const n=Fr(t/Dte),r=n/2,a=n*zx,i=r,s=n*zx+n,o=-i,l=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(o,l),e.lineTo(nr*r-rr*a,rr*r+nr*a),e.lineTo(nr*i-rr*s,rr*i+nr*s),e.lineTo(nr*o-rr*l,rr*o+nr*l),e.lineTo(nr*r+rr*a,nr*a-rr*r),e.lineTo(nr*i+rr*s,nr*s-rr*i),e.lineTo(nr*o+rr*l,nr*l-rr*o),e.closePath()}};function kte(e,t){let n=null,r=Tj(a);e=typeof e=="function"?e:Qe(e||Cj),t=typeof t=="function"?t:Qe(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Qe(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Qe(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function xm(){}function Sm(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function z5(e){this._context=e}z5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Sm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lte(e){return new z5(e)}function I5(e){this._context=e}I5.prototype={areaStart:xm,areaEnd:xm,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zte(e){return new I5(e)}function B5(e){this._context=e}B5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ite(e){return new B5(e)}function U5(e){this._context=e}U5.prototype={areaStart:xm,areaEnd:xm,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Bte(e){return new U5(e)}function LT(e){return e<0?-1:1}function zT(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return(LT(i)+LT(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function IT(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function mb(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function wm(e){this._context=e}wm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mb(this,this._t0,IT(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,mb(this,IT(this,n=zT(this,e,t)),n);break;default:mb(this,this._t0,n=zT(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function F5(e){this._context=new V5(e)}(F5.prototype=Object.create(wm.prototype)).point=function(e,t){wm.prototype.point.call(this,t,e)};function V5(e){this._context=e}V5.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function Ute(e){return new wm(e)}function Fte(e){return new F5(e)}function H5(e){this._context=e}H5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=BT(e),a=BT(t),i=0,s=1;s=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Hte(e){return new jg(e,.5)}function qte(e){return new jg(e,0)}function Kte(e){return new jg(e,1)}function Jl(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,o=i.length;n=0;)n[t]=t;return n}function Gte(e,t){return e[t]}function Yte(e){const t=[];return t.key=e,t}function Xte(){var e=Qe([]),t=Ix,n=Jl,r=Gte;function a(i){var s=Array.from(e.apply(this,arguments),Yte),o,l=s.length,c=-1,f;for(const d of i)for(o=0,++c;o0){for(var n,r,a=0,i=e[0].length,s;a0){for(var n=0,r=e[t[0]],a,i=r.length;n0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ane(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var q5={symbolCircle:Cj,symbolCross:Ote,symbolDiamond:Tte,symbolSquare:Nte,symbolStar:Mte,symbolTriangle:Rte,symbolWye:$te},ine=Math.PI/180,sne=function(t){var n="symbol".concat(xg(t));return q5[n]||Cj},one=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*ine;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},lne=function(t,n){q5["symbol".concat(xg(t))]=n},_j=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,s=t.sizeType,o=s===void 0?"area":s,l=rne(t,Jte),c=FT(FT({},l),{},{type:r,size:i,sizeType:o}),f=function(){var b=sne(r),y=kte().type(b).size(one(i,o,r));return y()},d=c.className,h=c.cx,p=c.cy,m=ie(c,!0);return h===+h&&p===+p&&i===+i?_.createElement("path",Bx({},m,{className:ve("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(p,")"),d:f()})):null};_j.registerSymbol=lne;function ec(e){"@babel/helpers - typeof";return ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(e)}function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var v=p.inactive?c:p.color;return _.createElement("li",Ux({className:b,style:d,key:"legend-item-".concat(m)},lo(r.props,p,m)),_.createElement(Mx,{width:s,height:s,viewBox:f,style:h},r.renderIcon(p)),_.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},g?g(y,p,m):y))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,s=r.align;if(!a||!a.length)return null;var o={padding:0,margin:0,textAlign:i==="horizontal"?s:"left"};return _.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(A.PureComponent);kf(Pj,"displayName","Legend");kf(Pj,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var vne=og;function bne(){this.__data__=new vne,this.size=0}var xne=bne;function Sne(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var wne=Sne;function jne(e){return this.__data__.get(e)}var Ane=jne;function One(e){return this.__data__.has(e)}var Ene=One,Tne=og,Nne=vj,Cne=bj,_ne=200;function Pne(e,t){var n=this.__data__;if(n instanceof Tne){var r=n.__data__;if(!Nne||r.length<_ne-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Cne(r)}return n.set(e,t),this.size=n.size,this}var Mne=Pne,Rne=og,Dne=xne,$ne=wne,kne=Ane,Lne=Ene,zne=Mne;function Kc(e){var t=this.__data__=new Rne(e);this.size=t.size}Kc.prototype.clear=Dne;Kc.prototype.delete=$ne;Kc.prototype.get=kne;Kc.prototype.has=Lne;Kc.prototype.set=zne;var Y5=Kc,Ine="__lodash_hash_undefined__";function Bne(e){return this.__data__.set(e,Ine),this}var Une=Bne;function Fne(e){return this.__data__.has(e)}var Vne=Fne,Hne=bj,qne=Une,Kne=Vne;function Am(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Hne;++to))return!1;var c=i.get(e),f=i.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=n&Jne?new Xne:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=rae}var $j=aae,iae=ri,sae=$j,oae=ai,lae="[object Arguments]",cae="[object Array]",uae="[object Boolean]",fae="[object Date]",dae="[object Error]",hae="[object Function]",pae="[object Map]",mae="[object Number]",yae="[object Object]",gae="[object RegExp]",vae="[object Set]",bae="[object String]",xae="[object WeakMap]",Sae="[object ArrayBuffer]",wae="[object DataView]",jae="[object Float32Array]",Aae="[object Float64Array]",Oae="[object Int8Array]",Eae="[object Int16Array]",Tae="[object Int32Array]",Nae="[object Uint8Array]",Cae="[object Uint8ClampedArray]",_ae="[object Uint16Array]",Pae="[object Uint32Array]",tt={};tt[jae]=tt[Aae]=tt[Oae]=tt[Eae]=tt[Tae]=tt[Nae]=tt[Cae]=tt[_ae]=tt[Pae]=!0;tt[lae]=tt[cae]=tt[Sae]=tt[uae]=tt[wae]=tt[fae]=tt[dae]=tt[hae]=tt[pae]=tt[mae]=tt[yae]=tt[gae]=tt[vae]=tt[bae]=tt[xae]=!1;function Mae(e){return oae(e)&&sae(e.length)&&!!tt[iae(e)]}var Rae=Mae;function Dae(e){return function(t){return e(t)}}var n4=Dae,Em={exports:{}};Em.exports;(function(e,t){var n=c5,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i&&n.process,o=function(){try{var l=a&&a.require&&a.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(Em,Em.exports);var $ae=Em.exports,kae=Rae,Lae=n4,XT=$ae,WT=XT&&XT.isTypedArray,zae=WT?Lae(WT):kae,r4=zae,Iae=Fre,Bae=Rj,Uae=Mn,Fae=t4,Vae=Dj,Hae=r4,qae=Object.prototype,Kae=qae.hasOwnProperty;function Gae(e,t){var n=Uae(e),r=!n&&Bae(e),a=!n&&!r&&Fae(e),i=!n&&!r&&!a&&Hae(e),s=n||r||a||i,o=s?Iae(e.length,String):[],l=o.length;for(var c in e)(t||Kae.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vae(c,l)))&&o.push(c);return o}var Yae=Gae,Xae=Object.prototype;function Wae(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Xae;return e===n}var Qae=Wae;function Zae(e,t){return function(n){return e(t(n))}}var a4=Zae,Jae=a4,eie=Jae(Object.keys,Object),tie=eie,nie=Qae,rie=tie,aie=Object.prototype,iie=aie.hasOwnProperty;function sie(e){if(!nie(e))return rie(e);var t=[];for(var n in Object(e))iie.call(e,n)&&n!="constructor"&&t.push(n);return t}var oie=sie,lie=yj,cie=$j;function uie(e){return e!=null&&cie(e.length)&&!lie(e)}var Yd=uie,fie=Yae,die=oie,hie=Yd;function pie(e){return hie(e)?fie(e):die(e)}var Ag=pie,mie=_re,yie=Bre,gie=Ag;function vie(e){return mie(e,gie,yie)}var bie=vie,QT=bie,xie=1,Sie=Object.prototype,wie=Sie.hasOwnProperty;function jie(e,t,n,r,a,i){var s=n&xie,o=QT(e),l=o.length,c=QT(t),f=c.length;if(l!=f&&!s)return!1;for(var d=l;d--;){var h=o[d];if(!(s?h in t:wie.call(t,h)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var b=s;++d-1}var Soe=xoe;function woe(e,t,n){for(var r=-1,a=e==null?0:e.length;++r=Loe){var c=t?null:$oe(e);if(c)return koe(c);s=!1,a=Doe,l=new Poe}else l=t?[]:o;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Joe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ele(e){return e.value}function tle(e,t){if(_.isValidElement(e))return _.cloneElement(e,t);if(typeof e=="function")return _.createElement(e,t);t.ref;var n=Zoe(t,Hoe);return _.createElement(Pj,n)}var hN=1,Jr=function(e){function t(){var n;qoe(this,t);for(var r=arguments.length,a=new Array(r),i=0;ihN||Math.abs(a.height-this.lastBoundingBox.height)>hN)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Sa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,s=a.align,o=a.verticalAlign,l=a.margin,c=a.chartWidth,f=a.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((c||0)-p.width)/2}}else d=s==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var m=this.getBBoxSnapshot();h={top:((f||0)-m.height)/2}}else h=o==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Sa(Sa({},d),h)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,s=a.width,o=a.height,l=a.wrapperStyle,c=a.payloadUniqBy,f=a.payload,d=Sa(Sa({position:"absolute",width:s||"auto",height:o||"auto"},this.getDefaultPosition(l)),l);return _.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},tle(i,Sa(Sa({},this.props),{},{payload:f4(f,c,ele)})))}}],[{key:"getWithHeight",value:function(r,a){var i=Sa(Sa({},this.defaultProps),r.props),s=i.layout;return s==="vertical"&&K(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||a}:null}}])}(A.PureComponent);Og(Jr,"displayName","Legend");Og(Jr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var pN=Gd,nle=Rj,rle=Mn,mN=pN?pN.isConcatSpreadable:void 0;function ale(e){return rle(e)||nle(e)||!!(mN&&e&&e[mN])}var ile=ale,sle=J5,ole=ile;function p4(e,t,n,r,a){var i=-1,s=e.length;for(n||(n=ole),a||(a=[]);++i0&&n(o)?t>1?p4(o,t-1,n,r,a):sle(a,o):r||(a[a.length]=o)}return a}var m4=p4;function lle(e){return function(t,n,r){for(var a=-1,i=Object(t),s=r(t),o=s.length;o--;){var l=s[e?o:++a];if(n(i[l],l,i)===!1)break}return t}}var cle=lle,ule=cle,fle=ule(),dle=fle,hle=dle,ple=Ag;function mle(e,t){return e&&hle(e,t,ple)}var y4=mle,yle=Yd;function gle(e,t){return function(n,r){if(n==null)return n;if(!yle(n))return e(n,r);for(var a=n.length,i=t?a:-1,s=Object(n);(t?i--:++it||i&&s&&l&&!o&&!c||r&&s&&l||!n&&l||!a)return 1;if(!r&&!i&&!c&&e=o)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var Ple=_le,bb=Sj,Mle=wj,Rle=ha,Dle=g4,$le=Ele,kle=n4,Lle=Ple,zle=Yc,Ile=Mn;function Ble(e,t,n){t.length?t=bb(t,function(i){return Ile(i)?function(s){return Mle(s,i.length===1?i[0]:i)}:i}):t=[zle];var r=-1;t=bb(t,kle(Rle));var a=Dle(e,function(i,s,o){var l=bb(t,function(c){return c(i)});return{criteria:l,index:++r,value:i}});return $le(a,function(i,s){return Lle(i,s,n)})}var Ule=Ble;function Fle(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Vle=Fle,Hle=Vle,gN=Math.max;function qle(e,t,n){return t=gN(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=gN(r.length-t,0),s=Array(i);++a0){if(++t>=tce)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ice=ace,sce=ece,oce=ice,lce=oce(sce),cce=lce,uce=Yc,fce=Kle,dce=cce;function hce(e,t){return dce(fce(e,t,uce),e+"")}var pce=hce,mce=gj,yce=Yd,gce=Dj,vce=rs;function bce(e,t,n){if(!vce(n))return!1;var r=typeof t;return(r=="number"?yce(n)&&gce(t,n.length):r=="string"&&t in n)?mce(n[t],e):!1}var Eg=bce,xce=m4,Sce=Ule,wce=pce,bN=Eg,jce=wce(function(e,t){if(e==null)return[];var n=t.length;return n>1&&bN(e,t[0],t[1])?t=[]:n>2&&bN(t[0],t[1],t[2])&&(t=[t[0]]),Sce(e,xce(t,1),[])}),Ace=jce;const zj=Ie(Ace);function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function Xx(){return Xx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(hu,"-left"),K(n)&&t&&K(t.x)&&n=t.y),"".concat(hu,"-top"),K(r)&&t&&K(t.y)&&rg?Math.max(f,l[r]):Math.max(d,l[r])}function Ice(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Bce(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipBox,o=e.useTranslate3d,l=e.viewBox,c,f,d;return s.height>0&&s.width>0&&n?(f=wN({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),d=wN({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),c=Ice({translateX:f,translateY:d,useTranslate3d:o})):c=Lce,{cssProperties:c,cssClasses:zce({translateX:f,translateY:d,coordinate:n})}}function nc(e){"@babel/helpers - typeof";return nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nc(e)}function jN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function AN(e){for(var t=1;tON||Math.abs(r.height-this.state.lastBoundingBox.height)>ON)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,o=a.animationDuration,l=a.animationEasing,c=a.children,f=a.coordinate,d=a.hasPayload,h=a.isAnimationActive,p=a.offset,m=a.position,g=a.reverseDirection,b=a.useTranslate3d,y=a.viewBox,v=a.wrapperStyle,x=Bce({allowEscapeViewBox:s,coordinate:f,offsetTopLeft:p,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:y}),w=x.cssClasses,S=x.cssProperties,j=AN(AN({transition:h&&i?"transform ".concat(o,"ms ").concat(l):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},v);return _.createElement("div",{tabIndex:-1,className:w,style:j,ref:function(E){r.wrapperNode=E}},c)}}])}(A.PureComponent),Wce=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},as={isSsr:Wce()};function rc(e){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}function EN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function TN(e){for(var t=1;t0;return _.createElement(Xce,{allowEscapeViewBox:s,animationDuration:o,animationEasing:l,isAnimationActive:h,active:i,coordinate:f,hasPayload:j,offset:p,position:b,reverseDirection:y,useTranslate3d:v,viewBox:x,wrapperStyle:w},sue(c,TN(TN({},this.props),{},{payload:S})))}}])}(A.PureComponent);Ij(Bn,"displayName","Tooltip");Ij(Bn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!as.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var oue=da,lue=function(){return oue.Date.now()},cue=lue,uue=/\s/;function fue(e){for(var t=e.length;t--&&uue.test(e.charAt(t)););return t}var due=fue,hue=due,pue=/^\s+/;function mue(e){return e&&e.slice(0,hue(e)+1).replace(pue,"")}var yue=mue,gue=yue,NN=rs,vue=Bc,CN=NaN,bue=/^[-+]0x[0-9a-f]+$/i,xue=/^0b[01]+$/i,Sue=/^0o[0-7]+$/i,wue=parseInt;function jue(e){if(typeof e=="number")return e;if(vue(e))return CN;if(NN(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=NN(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gue(e);var n=xue.test(e);return n||Sue.test(e)?wue(e.slice(2),n?2:8):bue.test(e)?CN:+e}var j4=jue,Aue=rs,Sb=cue,_N=j4,Oue="Expected a function",Eue=Math.max,Tue=Math.min;function Nue(e,t,n){var r,a,i,s,o,l,c=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Oue);t=_N(t)||0,Aue(n)&&(f=!!n.leading,d="maxWait"in n,i=d?Eue(_N(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(j){var O=r,E=a;return r=a=void 0,c=j,s=e.apply(E,O),s}function m(j){return c=j,o=setTimeout(y,t),f?p(j):s}function g(j){var O=j-l,E=j-c,T=t-O;return d?Tue(T,i-E):T}function b(j){var O=j-l,E=j-c;return l===void 0||O>=t||O<0||d&&E>=i}function y(){var j=Sb();if(b(j))return v(j);o=setTimeout(y,g(j))}function v(j){return o=void 0,h&&r?p(j):(r=a=void 0,s)}function x(){o!==void 0&&clearTimeout(o),c=0,r=l=a=o=void 0}function w(){return o===void 0?s:v(Sb())}function S(){var j=Sb(),O=b(j);if(r=arguments,a=this,l=j,O){if(o===void 0)return m(l);if(d)return clearTimeout(o),o=setTimeout(y,t),p(l)}return o===void 0&&(o=setTimeout(y,t)),s}return S.cancel=x,S.flush=w,S}var Cue=Nue,_ue=Cue,Pue=rs,Mue="Expected a function";function Rue(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(Mue);return Pue(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),_ue(e,t,{leading:r,maxWait:t,trailing:a})}var Due=Rue;const A4=Ie(Due);function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function PN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Dh(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(L=A4(L,g,{trailing:!0,leading:!1}));var D=new ResizeObserver(L),$=S.current.getBoundingClientRect(),P=$.width,k=$.height;return M(P,k),D.observe(S.current),function(){D.disconnect()}},[M,g]);var C=A.useMemo(function(){var L=T.containerWidth,D=T.containerHeight;if(L<0||D<0)return null;kr(Ns(s)||Ns(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,s,l),kr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var $=Ns(s)?L:s,P=Ns(l)?D:l;n&&n>0&&($?P=$/n:P&&($=P*n),h&&P>h&&(P=h)),kr($>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,$,P,s,l,f,d,n);var k=!Array.isArray(p)&&Fa(p.type).endsWith("Chart");return _.Children.map(p,function(I){return _.isValidElement(I)?A.cloneElement(I,Dh({width:$,height:P},k?{style:Dh({height:"100%",width:"100%",maxHeight:P,maxWidth:$},I.props.style)}:{})):I})},[n,p,l,h,d,f,T,s]);return _.createElement("div",{id:b?"".concat(b):void 0,className:ve("recharts-responsive-container",y),style:Dh(Dh({},w),{},{width:s,height:l,minWidth:f,minHeight:d,maxHeight:h}),ref:S},C)}),Tg=function(t){return null};Tg.displayName="Cell";function Bf(e){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(e)}function RN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Jx(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||as.isSsr)return{width:0,height:0};var r=Yue(n),a=JSON.stringify({text:t,copyStyle:r});if(Ro.widthCache[a])return Ro.widthCache[a];try{var i=document.getElementById(DN);i||(i=document.createElement("span"),i.setAttribute("id",DN),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var s=Jx(Jx({},Gue),r);Object.assign(i.style,s),i.textContent="".concat(t);var o=i.getBoundingClientRect(),l={width:o.width,height:o.height};return Ro.widthCache[a]=l,++Ro.cacheCount>Kue&&(Ro.cacheCount=0,Ro.widthCache={}),l}catch{return{width:0,height:0}}},Xue=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Uf(e){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uf(e)}function _m(e,t){return Jue(e)||Zue(e,t)||Que(e,t)||Wue()}function Wue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Que(e,t){if(e){if(typeof e=="string")return $N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $N(e,t)}}function $N(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function UN(e,t){return gfe(e)||yfe(e,t)||mfe(e,t)||pfe()}function pfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mfe(e,t){if(e){if(typeof e=="string")return FN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FN(e,t)}}function FN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(P,k){var I=k.word,F=k.width,H=P[P.length-1];if(H&&(a==null||i||H.width+F+rk.width?P:k})};if(!f)return p;for(var g="…",b=function($){var P=d.slice(0,$),k=N4({breakAll:c,style:l,children:P+g}).wordsWithComputedWidth,I=h(k),F=I.length>s||m(I).width>Number(a);return[F,I]},y=0,v=d.length-1,x=0,w;y<=v&&x<=d.length-1;){var S=Math.floor((y+v)/2),j=S-1,O=b(j),E=UN(O,2),T=E[0],N=E[1],M=b(S),C=UN(M,1),L=C[0];if(!T&&!L&&(y=S+1),T&&L&&(v=S-1),!T&&L){w=N;break}x++}return w||p},VN=function(t){var n=me(t)?[]:t.toString().split(T4);return[{words:n}]},bfe=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,s=t.breakAll,o=t.maxLines;if((n||r)&&!as.isSsr){var l,c,f=N4({breakAll:s,children:a,style:i});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;l=d,c=h}else return VN(a);return vfe({breakAll:s,children:a,maxLines:o,style:i},l,c,n,r)}return VN(a)},HN="#808080",co=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,s=t.lineHeight,o=s===void 0?"1em":s,l=t.capHeight,c=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,g=m===void 0?"end":m,b=t.fill,y=b===void 0?HN:b,v=BN(t,ffe),x=A.useMemo(function(){return bfe({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:d,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,d,v.style,v.width]),w=v.dx,S=v.dy,j=v.angle,O=v.className,E=v.breakAll,T=BN(v,dfe);if(!$t(r)||!$t(i))return null;var N=r+(K(w)?w:0),M=i+(K(S)?S:0),C;switch(g){case"start":C=wb("calc(".concat(c,")"));break;case"middle":C=wb("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(c," / 2))"));break;default:C=wb("calc(".concat(x.length-1," * -").concat(o,")"));break}var L=[];if(d){var D=x[0].width,$=v.width;L.push("scale(".concat((K($)?$/D:1)/D,")"))}return j&&L.push("rotate(".concat(j,", ").concat(N,", ").concat(M,")")),L.length&&(T.transform=L.join(" ")),_.createElement("text",e1({},ie(T,!0),{x:N,y:M,className:ve("recharts-text",O),textAnchor:p,fill:y.includes("url")?HN:y}),x.map(function(P,k){var I=P.words.join(E?"":" ");return _.createElement("tspan",{x:N,dy:k===0?C:o,key:"".concat(I,"-").concat(k)},I)}))};function Ki(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function xfe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Bj(e){let t,n,r;e.length!==2?(t=Ki,n=(o,l)=>Ki(e(o),l),r=(o,l)=>e(o)-l):(t=e===Ki||e===xfe?e:Sfe,n=e,r=e);function a(o,l,c=0,f=o.length){if(c>>1;n(o[d],l)<0?c=d+1:f=d}while(c>>1;n(o[d],l)<=0?c=d+1:f=d}while(cc&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:a,center:s,right:i}}function Sfe(){return 0}function C4(e){return e===null?NaN:+e}function*wfe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const jfe=Bj(Ki),Xd=jfe.right;Bj(C4).center;class qN extends Map{constructor(t,n=Efe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(KN(this,t))}has(t){return super.has(KN(this,t))}set(t,n){return super.set(Afe(this,t),n)}delete(t){return super.delete(Ofe(this,t))}}function KN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Afe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Ofe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Efe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Tfe(e=Ki){if(e===Ki)return _4;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function _4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Nfe=Math.sqrt(50),Cfe=Math.sqrt(10),_fe=Math.sqrt(2);function Pm(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),s=i>=Nfe?10:i>=Cfe?5:i>=_fe?2:1;let o,l,c;return a<0?(c=Math.pow(10,-a)/s,o=Math.round(e*c),l=Math.round(t*c),o/ct&&--l,c=-c):(c=Math.pow(10,a)*s,o=Math.round(e/c),l=Math.round(t/c),o*ct&&--l),l0))return[];if(e===t)return[e];const r=t=a))return[];const o=i-a+1,l=new Array(o);if(r)if(s<0)for(let c=0;c=r)&&(n=r);return n}function YN(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function P4(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?_4:Tfe(a);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+h)),m=Math.min(r,Math.floor(t+(l-c)*d/l+h));P4(e,t,p,m,a)}const i=e[t];let s=n,o=r;for(pu(e,n,t),a(e[r],i)>0&&pu(e,n,r);s0;)--o}a(e[n],i)===0?pu(e,n,o):(++o,pu(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function pu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Pfe(e,t,n){if(e=Float64Array.from(wfe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return YN(e);if(t>=1)return GN(e);var r,a=(r-1)*t,i=Math.floor(a),s=GN(P4(e,i).subarray(0,i+1)),o=YN(e.subarray(i+1));return s+(o-s)*(a-i)}}function Mfe(e,t,n=C4){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return s+(o-s)*(a-i)}}function Rfe(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Lh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Lh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$fe.exec(e))?new Tn(t[1],t[2],t[3],1):(t=kfe.exec(e))?new Tn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Lfe.exec(e))?Lh(t[1],t[2],t[3],t[4]):(t=zfe.exec(e))?Lh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ife.exec(e))?tC(t[1],t[2]/100,t[3]/100,1):(t=Bfe.exec(e))?tC(t[1],t[2]/100,t[3]/100,t[4]):XN.hasOwnProperty(e)?ZN(XN[e]):e==="transparent"?new Tn(NaN,NaN,NaN,0):null}function ZN(e){return new Tn(e>>16&255,e>>8&255,e&255,1)}function Lh(e,t,n,r){return r<=0&&(e=t=n=NaN),new Tn(e,t,n,r)}function Vfe(e){return e instanceof Wd||(e=qf(e)),e?(e=e.rgb(),new Tn(e.r,e.g,e.b,e.opacity)):new Tn}function i1(e,t,n,r){return arguments.length===1?Vfe(e):new Tn(e,t,n,r??1)}function Tn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Fj(Tn,i1,R4(Wd,{brighter(e){return e=e==null?Mm:Math.pow(Mm,e),new Tn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Vf:Math.pow(Vf,e),new Tn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Tn(Xs(this.r),Xs(this.g),Xs(this.b),Rm(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JN,formatHex:JN,formatHex8:Hfe,formatRgb:eC,toString:eC}));function JN(){return`#${Cs(this.r)}${Cs(this.g)}${Cs(this.b)}`}function Hfe(){return`#${Cs(this.r)}${Cs(this.g)}${Cs(this.b)}${Cs((isNaN(this.opacity)?1:this.opacity)*255)}`}function eC(){const e=Rm(this.opacity);return`${e===1?"rgb(":"rgba("}${Xs(this.r)}, ${Xs(this.g)}, ${Xs(this.b)}${e===1?")":`, ${e})`}`}function Rm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cs(e){return e=Xs(e),(e<16?"0":"")+e.toString(16)}function tC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Dr(e,t,n,r)}function D4(e){if(e instanceof Dr)return new Dr(e.h,e.s,e.l,e.opacity);if(e instanceof Wd||(e=qf(e)),!e)return new Dr;if(e instanceof Dr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,l=(i+a)/2;return o?(t===i?s=(n-r)/o+(n0&&l<1?0:s,new Dr(s,o,l,e.opacity)}function qfe(e,t,n,r){return arguments.length===1?D4(e):new Dr(e,t,n,r??1)}function Dr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fj(Dr,qfe,R4(Wd,{brighter(e){return e=e==null?Mm:Math.pow(Mm,e),new Dr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Vf:Math.pow(Vf,e),new Dr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Tn(jb(e>=240?e-240:e+120,a,r),jb(e,a,r),jb(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Dr(nC(this.h),zh(this.s),zh(this.l),Rm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Rm(this.opacity);return`${e===1?"hsl(":"hsla("}${nC(this.h)}, ${zh(this.s)*100}%, ${zh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function nC(e){return e=(e||0)%360,e<0?e+360:e}function zh(e){return Math.max(0,Math.min(1,e||0))}function jb(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Vj=e=>()=>e;function Kfe(e,t){return function(n){return e+n*t}}function Gfe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Yfe(e){return(e=+e)==1?$4:function(t,n){return n-t?Gfe(t,n,e):Vj(isNaN(t)?n:t)}}function $4(e,t){var n=t-e;return n?Kfe(e,n):Vj(isNaN(e)?t:e)}const rC=function e(t){var n=Yfe(t);function r(a,i){var s=n((a=i1(a)).r,(i=i1(i)).r),o=n(a.g,i.g),l=n(a.b,i.b),c=$4(a.opacity,i.opacity);return function(f){return a.r=s(f),a.g=o(f),a.b=l(f),a.opacity=c(f),a+""}}return r.gamma=e,r}(1);function Xfe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;an&&(i=t.slice(n,i),o[s]?o[s]+=i:o[++s]=i),(r=r[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,l.push({i:s,x:Dm(r,a)})),n=Ab.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function sde(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a2?ode:sde,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?i:(l||(l=o(e.map(r),t,n)))(r(s(h)))}return d.invert=function(h){return s(a((c||(c=o(t,e.map(r),Dm)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,$m),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Hj,f()},d.clamp=function(h){return arguments.length?(s=h?!0:mn,f()):s!==mn},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(i=h,d):i},function(h,p){return r=h,a=p,f()}}function qj(){return Ng()(mn,mn)}function lde(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function km(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ac(e){return e=km(Math.abs(e)),e?e[1]:NaN}function cde(e,t){return function(n,r){for(var a=n.length,i=[],s=0,o=e[0],l=0;a>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),i.push(n.substring(a-=o,a+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function ude(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var fde=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kf(e){if(!(t=fde.exec(e)))throw new Error("invalid format: "+e);var t;return new Kj({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Kf.prototype=Kj.prototype;function Kj(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Kj.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function dde(e){e:for(var t=e.length,n=1,r=-1,a;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var Lm;function hde(e,t){var n=km(e,t);if(!n)return Lm=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(Lm=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+km(e,Math.max(0,t+i-1))[0]}function iC(e,t){var n=km(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const sC={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:lde,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>iC(e*100,t),r:iC,s:hde,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function oC(e){return e}var lC=Array.prototype.map,cC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pde(e){var t=e.grouping===void 0||e.thousands===void 0?oC:cde(lC.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?oC:ude(lC.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d,h){d=Kf(d);var p=d.fill,m=d.align,g=d.sign,b=d.symbol,y=d.zero,v=d.width,x=d.comma,w=d.precision,S=d.trim,j=d.type;j==="n"?(x=!0,j="g"):sC[j]||(w===void 0&&(w=12),S=!0,j="g"),(y||p==="0"&&m==="=")&&(y=!0,p="0",m="=");var O=(h&&h.prefix!==void 0?h.prefix:"")+(b==="$"?n:b==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),E=(b==="$"?r:/[%p]/.test(j)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),T=sC[j],N=/[defgprs%]/.test(j);w=w===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function M(C){var L=O,D=E,$,P,k;if(j==="c")D=T(C)+D,C="";else{C=+C;var I=C<0||1/C<0;if(C=isNaN(C)?l:T(Math.abs(C),w),S&&(C=dde(C)),I&&+C==0&&g!=="+"&&(I=!1),L=(I?g==="("?g:o:g==="-"||g==="("?"":g)+L,D=(j==="s"&&!isNaN(C)&&Lm!==void 0?cC[8+Lm/3]:"")+D+(I&&g==="("?")":""),N){for($=-1,P=C.length;++$k||k>57){D=(k===46?a+C.slice($+1):C.slice($))+D,C=C.slice(0,$);break}}}x&&!y&&(C=t(C,1/0));var F=L.length+C.length+D.length,H=F>1)+L+C+D+H.slice(F);break;default:C=H+L+C+D;break}return i(C)}return M.toString=function(){return d+""},M}function f(d,h){var p=Math.max(-8,Math.min(8,Math.floor(ac(h)/3)))*3,m=Math.pow(10,-p),g=c((d=Kf(d),d.type="f",d),{suffix:cC[8+p/3]});return function(b){return g(m*b)}}return{format:c,formatPrefix:f}}var Ih,Gj,k4;mde({thousands:",",grouping:[3],currency:["$",""]});function mde(e){return Ih=pde(e),Gj=Ih.format,k4=Ih.formatPrefix,Ih}function yde(e){return Math.max(0,-ac(Math.abs(e)))}function gde(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ac(t)/3)))*3-ac(Math.abs(e)))}function vde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ac(t)-ac(e))+1}function L4(e,t,n,r){var a=r1(e,t,n),i;switch(r=Kf(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=gde(a,s))&&(r.precision=i),k4(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=vde(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=yde(a))&&(r.precision=i-(r.type==="%")*2);break}}return Gj(r)}function is(e){var t=e.domain;return e.ticks=function(n){var r=t();return t1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return L4(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],o=r[i],l,c,f=10;for(o0;){if(c=n1(s,o,n),c===l)return r[a]=s,r[i]=o,t(r);if(c>0)s=Math.floor(s/c)*c,o=Math.ceil(o/c)*c;else if(c<0)s=Math.ceil(s*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function zm(){var e=qj();return e.copy=function(){return Qd(e,zm())},Or.apply(e,arguments),is(e)}function z4(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,$m),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return z4(e).unknown(t)},e=arguments.length?Array.from(e,$m):[0,1],is(n)}function I4(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return iMath.pow(e,t)}function jde(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function dC(e){return(t,n)=>-e(-t,n)}function Yj(e){const t=e(uC,fC),n=t.domain;let r=10,a,i;function s(){return a=jde(r),i=wde(r),n()[0]<0?(a=dC(a),i=dC(i),e(bde,xde)):e(uC,fC),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const l=n();let c=l[0],f=l[l.length-1];const d=f0){for(;h<=p;++h)for(m=1;mf)break;y.push(g)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(g=h>0?m/i(-h):m*i(h),!(gf)break;y.push(g)}y.length*2{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Kf(l)).precision==null&&(l.trim=!0),l=Gj(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return f=>{let d=f/i(Math.round(a(f)));return d*rn(I4(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function B4(){const e=Yj(Ng()).domain([1,10]);return e.copy=()=>Qd(e,B4()).base(e.base()),Or.apply(e,arguments),e}function hC(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function pC(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Xj(e){var t=1,n=e(hC(t),pC(t));return n.constant=function(r){return arguments.length?e(hC(t=+r),pC(t)):t},is(n)}function U4(){var e=Xj(Ng());return e.copy=function(){return Qd(e,U4()).constant(e.constant())},Or.apply(e,arguments)}function mC(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ade(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ode(e){return e<0?-e*e:e*e}function Wj(e){var t=e(mn,mn),n=1;function r(){return n===1?e(mn,mn):n===.5?e(Ade,Ode):e(mC(n),mC(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},is(t)}function Qj(){var e=Wj(Ng());return e.copy=function(){return Qd(e,Qj()).exponent(e.exponent())},Or.apply(e,arguments),e}function Ede(){return Qj.apply(null,arguments).exponent(.5)}function yC(e){return Math.sign(e)*e*e}function Tde(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function F4(){var e=qj(),t=[0,1],n=!1,r;function a(i){var s=Tde(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(yC(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,$m)).map(yC)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return F4(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Or.apply(a,arguments),is(a)}function V4(){var e=[],t=[],n=[],r;function a(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s0?n[o-1]:e[0],o=n?[r[n-1],t]:[r[c-1],r[c]]},s.unknown=function(l){return arguments.length&&(i=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return H4().domain([e,t]).range(a).unknown(i)},Or.apply(is(s),arguments)}function q4(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Xd(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return q4().domain(e).range(t).unknown(n)},Or.apply(a,arguments)}const Ob=new Date,Eb=new Date;function Lt(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const l=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i0))return l;let c;do l.push(c=new Date(+i)),t(i,o),e(i);while(cLt(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(Ob.setTime(+i),Eb.setTime(+s),e(Ob),e(Eb),Math.floor(n(Ob,Eb))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Im=Lt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Im.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Lt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Im);Im.range;const Ma=1e3,mr=Ma*60,Ra=mr*60,Qa=Ra*24,Zj=Qa*7,gC=Qa*30,Tb=Qa*365,_s=Lt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ma)},(e,t)=>(t-e)/Ma,e=>e.getUTCSeconds());_s.range;const Jj=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma)},(e,t)=>{e.setTime(+e+t*mr)},(e,t)=>(t-e)/mr,e=>e.getMinutes());Jj.range;const eA=Lt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*mr)},(e,t)=>(t-e)/mr,e=>e.getUTCMinutes());eA.range;const tA=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma-e.getMinutes()*mr)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getHours());tA.range;const nA=Lt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getUTCHours());nA.range;const Zd=Lt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*mr)/Qa,e=>e.getDate()-1);Zd.range;const Cg=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>e.getUTCDate()-1);Cg.range;const K4=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>Math.floor(e/Qa));K4.range;function Ao(e){return Lt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*mr)/Zj)}const _g=Ao(0),Bm=Ao(1),Nde=Ao(2),Cde=Ao(3),ic=Ao(4),_de=Ao(5),Pde=Ao(6);_g.range;Bm.range;Nde.range;Cde.range;ic.range;_de.range;Pde.range;function Oo(e){return Lt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Zj)}const Pg=Oo(0),Um=Oo(1),Mde=Oo(2),Rde=Oo(3),sc=Oo(4),Dde=Oo(5),$de=Oo(6);Pg.range;Um.range;Mde.range;Rde.range;sc.range;Dde.range;$de.range;const rA=Lt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());rA.range;const aA=Lt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());aA.range;const Za=Lt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Za.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Za.range;const Ja=Lt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ja.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ja.range;function G4(e,t,n,r,a,i){const s=[[_s,1,Ma],[_s,5,5*Ma],[_s,15,15*Ma],[_s,30,30*Ma],[i,1,mr],[i,5,5*mr],[i,15,15*mr],[i,30,30*mr],[a,1,Ra],[a,3,3*Ra],[a,6,6*Ra],[a,12,12*Ra],[r,1,Qa],[r,2,2*Qa],[n,1,Zj],[t,1,gC],[t,3,3*gC],[e,1,Tb]];function o(c,f,d){const h=fb).right(s,h);if(p===s.length)return e.every(r1(c/Tb,f/Tb,d));if(p===0)return Im.every(Math.max(r1(c,f,d),1));const[m,g]=s[h/s[p-1][2]53)return null;"w"in V||(V.w=1),"Z"in V?(ge=Cb(mu(V.y,0,1)),Xe=ge.getUTCDay(),ge=Xe>4||Xe===0?Um.ceil(ge):Um(ge),ge=Cg.offset(ge,(V.V-1)*7),V.y=ge.getUTCFullYear(),V.m=ge.getUTCMonth(),V.d=ge.getUTCDate()+(V.w+6)%7):(ge=Nb(mu(V.y,0,1)),Xe=ge.getDay(),ge=Xe>4||Xe===0?Bm.ceil(ge):Bm(ge),ge=Zd.offset(ge,(V.V-1)*7),V.y=ge.getFullYear(),V.m=ge.getMonth(),V.d=ge.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),Xe="Z"in V?Cb(mu(V.y,0,1)).getUTCDay():Nb(mu(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(Xe+5)%7:V.w+V.U*7-(Xe+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,Cb(V)):Nb(V)}}function E(G,oe,X,V){for(var _e=0,ge=oe.length,Xe=X.length,ot,dt;_e=Xe)return-1;if(ot=oe.charCodeAt(_e++),ot===37){if(ot=oe.charAt(_e++),dt=S[ot in vC?oe.charAt(_e++):ot],!dt||(V=dt(G,X,V))<0)return-1}else if(ot!=X.charCodeAt(V++))return-1}return V}function T(G,oe,X){var V=c.exec(oe.slice(X));return V?(G.p=f.get(V[0].toLowerCase()),X+V[0].length):-1}function N(G,oe,X){var V=p.exec(oe.slice(X));return V?(G.w=m.get(V[0].toLowerCase()),X+V[0].length):-1}function M(G,oe,X){var V=d.exec(oe.slice(X));return V?(G.w=h.get(V[0].toLowerCase()),X+V[0].length):-1}function C(G,oe,X){var V=y.exec(oe.slice(X));return V?(G.m=v.get(V[0].toLowerCase()),X+V[0].length):-1}function L(G,oe,X){var V=g.exec(oe.slice(X));return V?(G.m=b.get(V[0].toLowerCase()),X+V[0].length):-1}function D(G,oe,X){return E(G,t,oe,X)}function $(G,oe,X){return E(G,n,oe,X)}function P(G,oe,X){return E(G,r,oe,X)}function k(G){return s[G.getDay()]}function I(G){return i[G.getDay()]}function F(G){return l[G.getMonth()]}function H(G){return o[G.getMonth()]}function Y(G){return a[+(G.getHours()>=12)]}function q(G){return 1+~~(G.getMonth()/3)}function te(G){return s[G.getUTCDay()]}function Z(G){return i[G.getUTCDay()]}function ye(G){return l[G.getUTCMonth()]}function J(G){return o[G.getUTCMonth()]}function st(G){return a[+(G.getUTCHours()>=12)]}function Ve(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var oe=j(G+="",x);return oe.toString=function(){return G},oe},parse:function(G){var oe=O(G+="",!1);return oe.toString=function(){return G},oe},utcFormat:function(G){var oe=j(G+="",w);return oe.toString=function(){return G},oe},utcParse:function(G){var oe=O(G+="",!0);return oe.toString=function(){return G},oe}}}var vC={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,Ude=/^%/,Fde=/[\\^$*+?|[\]().{}]/g;function Pe(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i[t.toLowerCase(),n]))}function Hde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function qde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Kde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Gde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Yde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function bC(e,t,n){var r=Gt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function xC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xde(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Wde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Qde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function SC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zde(e,t,n){var r=Gt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function wC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Jde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ehe(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function the(e,t,n){var r=Gt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nhe(e,t,n){var r=Gt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rhe(e,t,n){var r=Ude.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ahe(e,t,n){var r=Gt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ihe(e,t,n){var r=Gt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function jC(e,t){return Pe(e.getDate(),t,2)}function she(e,t){return Pe(e.getHours(),t,2)}function ohe(e,t){return Pe(e.getHours()%12||12,t,2)}function lhe(e,t){return Pe(1+Zd.count(Za(e),e),t,3)}function Y4(e,t){return Pe(e.getMilliseconds(),t,3)}function che(e,t){return Y4(e,t)+"000"}function uhe(e,t){return Pe(e.getMonth()+1,t,2)}function fhe(e,t){return Pe(e.getMinutes(),t,2)}function dhe(e,t){return Pe(e.getSeconds(),t,2)}function hhe(e){var t=e.getDay();return t===0?7:t}function phe(e,t){return Pe(_g.count(Za(e)-1,e),t,2)}function X4(e){var t=e.getDay();return t>=4||t===0?ic(e):ic.ceil(e)}function mhe(e,t){return e=X4(e),Pe(ic.count(Za(e),e)+(Za(e).getDay()===4),t,2)}function yhe(e){return e.getDay()}function ghe(e,t){return Pe(Bm.count(Za(e)-1,e),t,2)}function vhe(e,t){return Pe(e.getFullYear()%100,t,2)}function bhe(e,t){return e=X4(e),Pe(e.getFullYear()%100,t,2)}function xhe(e,t){return Pe(e.getFullYear()%1e4,t,4)}function She(e,t){var n=e.getDay();return e=n>=4||n===0?ic(e):ic.ceil(e),Pe(e.getFullYear()%1e4,t,4)}function whe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Pe(t/60|0,"0",2)+Pe(t%60,"0",2)}function AC(e,t){return Pe(e.getUTCDate(),t,2)}function jhe(e,t){return Pe(e.getUTCHours(),t,2)}function Ahe(e,t){return Pe(e.getUTCHours()%12||12,t,2)}function Ohe(e,t){return Pe(1+Cg.count(Ja(e),e),t,3)}function W4(e,t){return Pe(e.getUTCMilliseconds(),t,3)}function Ehe(e,t){return W4(e,t)+"000"}function The(e,t){return Pe(e.getUTCMonth()+1,t,2)}function Nhe(e,t){return Pe(e.getUTCMinutes(),t,2)}function Che(e,t){return Pe(e.getUTCSeconds(),t,2)}function _he(e){var t=e.getUTCDay();return t===0?7:t}function Phe(e,t){return Pe(Pg.count(Ja(e)-1,e),t,2)}function Q4(e){var t=e.getUTCDay();return t>=4||t===0?sc(e):sc.ceil(e)}function Mhe(e,t){return e=Q4(e),Pe(sc.count(Ja(e),e)+(Ja(e).getUTCDay()===4),t,2)}function Rhe(e){return e.getUTCDay()}function Dhe(e,t){return Pe(Um.count(Ja(e)-1,e),t,2)}function $he(e,t){return Pe(e.getUTCFullYear()%100,t,2)}function khe(e,t){return e=Q4(e),Pe(e.getUTCFullYear()%100,t,2)}function Lhe(e,t){return Pe(e.getUTCFullYear()%1e4,t,4)}function zhe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?sc(e):sc.ceil(e),Pe(e.getUTCFullYear()%1e4,t,4)}function Ihe(){return"+0000"}function OC(){return"%"}function EC(e){return+e}function TC(e){return Math.floor(+e/1e3)}var Do,Z4,J4;Bhe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Bhe(e){return Do=Bde(e),Z4=Do.format,Do.parse,J4=Do.utcFormat,Do.utcParse,Do}function Uhe(e){return new Date(e)}function Fhe(e){return e instanceof Date?+e:+new Date(+e)}function iA(e,t,n,r,a,i,s,o,l,c){var f=qj(),d=f.invert,h=f.domain,p=c(".%L"),m=c(":%S"),g=c("%I:%M"),b=c("%I %p"),y=c("%a %d"),v=c("%b %d"),x=c("%B"),w=c("%Y");function S(j){return(l(j)t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Pfe(e,i/r))},n.copy=function(){return rL(t).domain(e)},ii.apply(n,arguments)}function Rg(){var e=0,t=.5,n=1,r=1,a,i,s,o,l,c=mn,f,d=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+f(g))-i)*(r*gt}var oL=Xhe,Whe=Dg,Qhe=oL,Zhe=Yc;function Jhe(e){return e&&e.length?Whe(e,Zhe,Qhe):void 0}var epe=Jhe;const Di=Ie(epe);function tpe(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*nt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ne.dividedBy=ne.div=function(e){return Va(this,new this.constructor(e))};ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,n=t.constructor;return Ge(Va(t,new n(e),0,1),n.precision)};ne.equals=ne.eq=function(e){return!this.cmp(e)};ne.exponent=function(){return _t(this)};ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0};ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0};ne.isInteger=ne.isint=function(){return this.e>this.d.length-2};ne.isNegative=ne.isneg=function(){return this.s<0};ne.isPositive=ne.ispos=function(){return this.s>0};ne.isZero=function(){return this.s===0};ne.lessThan=ne.lt=function(e){return this.cmp(e)<0};ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1};ne.logarithm=ne.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Vn))throw Error(Sr+"NaN");if(n.s<1)throw Error(Sr+(n.s?"NaN":"-Infinity"));return n.eq(Vn)?new r(0):(ct=!1,t=Va(Gf(n,i),Gf(e,i),i),ct=!0,Ge(t,a))};ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dL(t,e):uL(t,(e.s=-e.s,e))};ne.modulo=ne.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(Sr+"NaN");return n.s?(ct=!1,t=Va(n,e,0,1).times(e),ct=!0,n.minus(t)):Ge(new r(n),a)};ne.naturalExponential=ne.exp=function(){return fL(this)};ne.naturalLogarithm=ne.ln=function(){return Gf(this)};ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?uL(t,e):dL(t,(e.s=-e.s,e))};ne.precision=ne.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ws+e);if(t=_t(a)+1,r=a.d.length-1,n=r*nt+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ne.squareRoot=ne.sqrt=function(){var e,t,n,r,a,i,s,o=this,l=o.constructor;if(o.s<1){if(!o.s)return new l(0);throw Error(Sr+"NaN")}for(e=_t(o),ct=!1,a=Math.sqrt(+o),a==0||a==1/0?(t=ea(o.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Qc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(a.toString()),n=l.precision,a=s=n+3;;)if(i=r,r=i.plus(Va(o,i,s+2)).times(.5),ea(i.d).slice(0,s)===(t=ea(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Ge(i,n+1,0),i.times(i).eq(o)){r=i;break}}else if(t!="9999")break;s+=4}return ct=!0,Ge(r,n)};ne.times=ne.mul=function(e){var t,n,r,a,i,s,o,l,c,f=this,d=f.constructor,h=f.d,p=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=h.length,c=p.length,l=0;){for(t=0,a=l+r;a>r;)o=i[a]+p[r]*h[a-r-1]+t,i[a--]=o%Ut|0,t=o/Ut|0;i[a]=(i[a]+t)%Ut|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,ct?Ge(e,d.precision):e};ne.toDecimalPlaces=ne.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ca(e,0,Wc),t===void 0?t=r.rounding:ca(t,0,8),Ge(n,e+_t(n)+1,t))};ne.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=fo(r,!0):(ca(e,0,Wc),t===void 0?t=a.rounding:ca(t,0,8),r=Ge(new a(r),e+1,t),n=fo(r,!0,e+1)),n};ne.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?fo(a):(ca(e,0,Wc),t===void 0?t=i.rounding:ca(t,0,8),r=Ge(new i(a),e+_t(a)+1,t),n=fo(r.abs(),!1,e+_t(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return Ge(new t(e),_t(e)+1,t.rounding)};ne.toNumber=function(){return+this};ne.toPower=ne.pow=function(e){var t,n,r,a,i,s,o=this,l=o.constructor,c=12,f=+(e=new l(e));if(!e.s)return new l(Vn);if(o=new l(o),!o.s){if(e.s<1)throw Error(Sr+"Infinity");return o}if(o.eq(Vn))return o;if(r=l.precision,e.eq(Vn))return Ge(o,r);if(t=e.e,n=e.d.length-1,s=t>=n,i=o.s,s){if((n=f<0?-f:f)<=cL){for(a=new l(Vn),t=Math.ceil(r/nt+4),ct=!1;n%2&&(a=a.times(o),_C(a.d,t)),n=Qc(n/2),n!==0;)o=o.times(o),_C(o.d,t);return ct=!0,e.s<0?new l(Vn).div(a):Ge(a,r)}}else if(i<0)throw Error(Sr+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,ct=!1,a=e.times(Gf(o,r+c)),ct=!0,a=fL(a),a.s=i,a};ne.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=_t(a),r=fo(a,n<=i.toExpNeg||n>=i.toExpPos)):(ca(e,1,Wc),t===void 0?t=i.rounding:ca(t,0,8),a=Ge(new i(a),e,t),n=_t(a),r=fo(a,e<=n||n<=i.toExpNeg,e)),r};ne.toSignificantDigits=ne.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ca(e,1,Wc),t===void 0?t=r.rounding:ca(t,0,8)),Ge(new r(n),e,t)};ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=_t(e),n=e.constructor;return fo(e,t<=n.toExpNeg||t>=n.toExpPos)};function uL(e,t){var n,r,a,i,s,o,l,c,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),ct?Ge(t,d):t;if(l=e.d,c=t.d,s=e.e,a=t.e,l=l.slice(),i=s-a,i){for(i<0?(r=l,i=-i,o=c.length):(r=c,a=s,o=l.length),s=Math.ceil(d/nt),o=s>o?s+1:o+1,i>o&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(o=l.length,i=c.length,o-i<0&&(i=o,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/Ut|0,l[i]%=Ut;for(n&&(l.unshift(n),++a),o=l.length;l[--o]==0;)l.pop();return t.d=l,t.e=a,ct?Ge(t,d):t}function ca(e,t,n){if(e!==~~e||en)throw Error(Ws+e)}function ea(e){var t,n,r,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;ts?1:-1;else for(o=l=0;oa[o]?1:-1;break}return l}function n(r,a,i){for(var s=0;i--;)r[i]-=s,s=r[i]1;)r.shift()}return function(r,a,i,s){var o,l,c,f,d,h,p,m,g,b,y,v,x,w,S,j,O,E,T=r.constructor,N=r.s==a.s?1:-1,M=r.d,C=a.d;if(!r.s)return new T(r);if(!a.s)throw Error(Sr+"Division by zero");for(l=r.e-a.e,O=C.length,S=M.length,p=new T(N),m=p.d=[],c=0;C[c]==(M[c]||0);)++c;if(C[c]>(M[c]||0)&&--l,i==null?v=i=T.precision:s?v=i+(_t(r)-_t(a))+1:v=i,v<0)return new T(0);if(v=v/nt+2|0,c=0,O==1)for(f=0,C=C[0],v++;(c1&&(C=e(C,f),M=e(M,f),O=C.length,S=M.length),w=O,g=M.slice(0,O),b=g.length;b=Ut/2&&++j;do f=0,o=t(C,g,O,b),o<0?(y=g[0],O!=b&&(y=y*Ut+(g[1]||0)),f=y/j|0,f>1?(f>=Ut&&(f=Ut-1),d=e(C,f),h=d.length,b=g.length,o=t(d,g,h,b),o==1&&(f--,n(d,O16)throw Error(lA+_t(e));if(!e.s)return new f(Vn);for(ct=!1,o=d,s=new f(.03125);e.abs().gte(.1);)e=e.times(s),c+=5;for(r=Math.log(ws(2,c))/Math.LN10*2+5|0,o+=r,n=a=i=new f(Vn),f.precision=o;;){if(a=Ge(a.times(e),o),n=n.times(++l),s=i.plus(Va(a,n,o)),ea(s.d).slice(0,o)===ea(i.d).slice(0,o)){for(;c--;)i=Ge(i.times(i),o);return f.precision=d,t==null?(ct=!0,Ge(i,d)):i}i=s}}function _t(e){for(var t=e.e*nt,n=e.d[0];n>=10;n/=10)t++;return t}function _b(e,t,n){if(t>e.LN10.sd())throw ct=!0,n&&(e.precision=n),Error(Sr+"LN10 precision limit exceeded");return Ge(new e(e.LN10),t)}function mi(e){for(var t="";e--;)t+="0";return t}function Gf(e,t){var n,r,a,i,s,o,l,c,f,d=1,h=10,p=e,m=p.d,g=p.constructor,b=g.precision;if(p.s<1)throw Error(Sr+(p.s?"NaN":"-Infinity"));if(p.eq(Vn))return new g(0);if(t==null?(ct=!1,c=b):c=t,p.eq(10))return t==null&&(ct=!0),_b(g,c);if(c+=h,g.precision=c,n=ea(m),r=n.charAt(0),i=_t(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ea(p.d),r=n.charAt(0),d++;i=_t(p),r>1?(p=new g("0."+n),i++):p=new g(r+"."+n.slice(1))}else return l=_b(g,c+2,b).times(i+""),p=Gf(new g(r+"."+n.slice(1)),c-h).plus(l),g.precision=b,t==null?(ct=!0,Ge(p,b)):p;for(o=s=p=Va(p.minus(Vn),p.plus(Vn),c),f=Ge(p.times(p),c),a=3;;){if(s=Ge(s.times(f),c),l=o.plus(Va(s,new g(a),c)),ea(l.d).slice(0,c)===ea(o.d).slice(0,c))return o=o.times(2),i!==0&&(o=o.plus(_b(g,c+2,b).times(i+""))),o=Va(o,new g(d),c),g.precision=b,t==null?(ct=!0,Ge(o,b)):o;o=l,a+=2}}function CC(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=Qc(n/nt),e.d=[],r=(n+1)%nt,n<0&&(r+=nt),rFm||e.e<-Fm))throw Error(lA+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ge(e,t,n){var r,a,i,s,o,l,c,f,d=e.d;for(s=1,i=d[0];i>=10;i/=10)s++;if(r=t-s,r<0)r+=nt,a=t,c=d[f=0];else{if(f=Math.ceil((r+1)/nt),i=d.length,f>=i)return e;for(c=i=d[f],s=1;i>=10;i/=10)s++;r%=nt,a=r-nt+s}if(n!==void 0&&(i=ws(10,s-a-1),o=c/i%10|0,l=t<0||d[f+1]!==void 0||c%i,l=n<4?(o||l)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||l||n==6&&(r>0?a>0?c/ws(10,s-a):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=_t(e),d.length=1,t=t-i-1,d[0]=ws(10,(nt-t%nt)%nt),e.e=Qc(-t/nt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,i=1,f--):(d.length=f+1,i=ws(10,nt-r),d[f]=a>0?(c/ws(10,s-a)%ws(10,a)|0)*i:0),l)for(;;)if(f==0){(d[0]+=i)==Ut&&(d[0]=1,++e.e);break}else{if(d[f]+=i,d[f]!=Ut)break;d[f--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(ct&&(e.e>Fm||e.e<-Fm))throw Error(lA+_t(e));return e}function dL(e,t){var n,r,a,i,s,o,l,c,f,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ct?Ge(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),s=c-r,s){for(f=s<0,f?(n=l,s=-s,o=d.length):(n=d,r=c,o=l.length),a=Math.max(Math.ceil(p/nt),o)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,o=d.length,f=a0;--a)l[o++]=0;for(a=d.length;a>s;){if(l[--a]0?i=i.charAt(0)+"."+i.slice(1)+mi(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+mi(-a-1)+i,n&&(r=n-s)>0&&(i+=mi(r))):a>=s?(i+=mi(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+mi(r))):((r=a+1)
k||k>57){D=(k===46?a+C.slice($+1):C.slice($))+D,C=C.slice(0,$);break}}}x&&!y&&(C=t(C,1/0));var F=L.length+C.length+D.length,H=F>1)+L+C+D+H.slice(F);break;default:C=H+L+C+D;break}return i(C)}return M.toString=function(){return d+""},M}function f(d,h){var p=Math.max(-8,Math.min(8,Math.floor(ac(h)/3)))*3,m=Math.pow(10,-p),g=c((d=Kf(d),d.type="f",d),{suffix:cC[8+p/3]});return function(b){return g(m*b)}}return{format:c,formatPrefix:f}}var Ih,Gj,k4;mde({thousands:",",grouping:[3],currency:["$",""]});function mde(e){return Ih=pde(e),Gj=Ih.format,k4=Ih.formatPrefix,Ih}function yde(e){return Math.max(0,-ac(Math.abs(e)))}function gde(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ac(t)/3)))*3-ac(Math.abs(e)))}function vde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ac(t)-ac(e))+1}function L4(e,t,n,r){var a=r1(e,t,n),i;switch(r=Kf(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=gde(a,s))&&(r.precision=i),k4(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=vde(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=yde(a))&&(r.precision=i-(r.type==="%")*2);break}}return Gj(r)}function is(e){var t=e.domain;return e.ticks=function(n){var r=t();return t1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return L4(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],o=r[i],l,c,f=10;for(o0;){if(c=n1(s,o,n),c===l)return r[a]=s,r[i]=o,t(r);if(c>0)s=Math.floor(s/c)*c,o=Math.ceil(o/c)*c;else if(c<0)s=Math.ceil(s*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function zm(){var e=qj();return e.copy=function(){return Qd(e,zm())},Or.apply(e,arguments),is(e)}function z4(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,$m),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return z4(e).unknown(t)},e=arguments.length?Array.from(e,$m):[0,1],is(n)}function I4(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return iMath.pow(e,t)}function jde(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function dC(e){return(t,n)=>-e(-t,n)}function Yj(e){const t=e(uC,fC),n=t.domain;let r=10,a,i;function s(){return a=jde(r),i=wde(r),n()[0]<0?(a=dC(a),i=dC(i),e(bde,xde)):e(uC,fC),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const l=n();let c=l[0],f=l[l.length-1];const d=f0){for(;h<=p;++h)for(m=1;mf)break;y.push(g)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(g=h>0?m/i(-h):m*i(h),!(gf)break;y.push(g)}y.length*2{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Kf(l)).precision==null&&(l.trim=!0),l=Gj(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return f=>{let d=f/i(Math.round(a(f)));return d*rn(I4(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function B4(){const e=Yj(Ng()).domain([1,10]);return e.copy=()=>Qd(e,B4()).base(e.base()),Or.apply(e,arguments),e}function hC(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function pC(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Xj(e){var t=1,n=e(hC(t),pC(t));return n.constant=function(r){return arguments.length?e(hC(t=+r),pC(t)):t},is(n)}function U4(){var e=Xj(Ng());return e.copy=function(){return Qd(e,U4()).constant(e.constant())},Or.apply(e,arguments)}function mC(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ade(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ode(e){return e<0?-e*e:e*e}function Wj(e){var t=e(mn,mn),n=1;function r(){return n===1?e(mn,mn):n===.5?e(Ade,Ode):e(mC(n),mC(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},is(t)}function Qj(){var e=Wj(Ng());return e.copy=function(){return Qd(e,Qj()).exponent(e.exponent())},Or.apply(e,arguments),e}function Ede(){return Qj.apply(null,arguments).exponent(.5)}function yC(e){return Math.sign(e)*e*e}function Tde(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function F4(){var e=qj(),t=[0,1],n=!1,r;function a(i){var s=Tde(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(yC(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,$m)).map(yC)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return F4(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Or.apply(a,arguments),is(a)}function V4(){var e=[],t=[],n=[],r;function a(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s0?n[o-1]:e[0],o=n?[r[n-1],t]:[r[c-1],r[c]]},s.unknown=function(l){return arguments.length&&(i=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return H4().domain([e,t]).range(a).unknown(i)},Or.apply(is(s),arguments)}function q4(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Xd(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return q4().domain(e).range(t).unknown(n)},Or.apply(a,arguments)}const Ob=new Date,Eb=new Date;function Lt(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const l=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i0))return l;let c;do l.push(c=new Date(+i)),t(i,o),e(i);while(cLt(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(Ob.setTime(+i),Eb.setTime(+s),e(Ob),e(Eb),Math.floor(n(Ob,Eb))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Im=Lt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Im.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Lt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Im);Im.range;const Ma=1e3,mr=Ma*60,Ra=mr*60,Qa=Ra*24,Zj=Qa*7,gC=Qa*30,Tb=Qa*365,_s=Lt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ma)},(e,t)=>(t-e)/Ma,e=>e.getUTCSeconds());_s.range;const Jj=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma)},(e,t)=>{e.setTime(+e+t*mr)},(e,t)=>(t-e)/mr,e=>e.getMinutes());Jj.range;const eA=Lt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*mr)},(e,t)=>(t-e)/mr,e=>e.getUTCMinutes());eA.range;const tA=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ma-e.getMinutes()*mr)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getHours());tA.range;const nA=Lt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getUTCHours());nA.range;const Zd=Lt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*mr)/Qa,e=>e.getDate()-1);Zd.range;const Cg=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>e.getUTCDate()-1);Cg.range;const K4=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>Math.floor(e/Qa));K4.range;function Ao(e){return Lt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*mr)/Zj)}const _g=Ao(0),Bm=Ao(1),Nde=Ao(2),Cde=Ao(3),ic=Ao(4),_de=Ao(5),Pde=Ao(6);_g.range;Bm.range;Nde.range;Cde.range;ic.range;_de.range;Pde.range;function Oo(e){return Lt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Zj)}const Pg=Oo(0),Um=Oo(1),Mde=Oo(2),Rde=Oo(3),sc=Oo(4),Dde=Oo(5),$de=Oo(6);Pg.range;Um.range;Mde.range;Rde.range;sc.range;Dde.range;$de.range;const rA=Lt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());rA.range;const aA=Lt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());aA.range;const Za=Lt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Za.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Za.range;const Ja=Lt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ja.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ja.range;function G4(e,t,n,r,a,i){const s=[[_s,1,Ma],[_s,5,5*Ma],[_s,15,15*Ma],[_s,30,30*Ma],[i,1,mr],[i,5,5*mr],[i,15,15*mr],[i,30,30*mr],[a,1,Ra],[a,3,3*Ra],[a,6,6*Ra],[a,12,12*Ra],[r,1,Qa],[r,2,2*Qa],[n,1,Zj],[t,1,gC],[t,3,3*gC],[e,1,Tb]];function o(c,f,d){const h=fb).right(s,h);if(p===s.length)return e.every(r1(c/Tb,f/Tb,d));if(p===0)return Im.every(Math.max(r1(c,f,d),1));const[m,g]=s[h/s[p-1][2]53)return null;"w"in V||(V.w=1),"Z"in V?(ge=Cb(mu(V.y,0,1)),Xe=ge.getUTCDay(),ge=Xe>4||Xe===0?Um.ceil(ge):Um(ge),ge=Cg.offset(ge,(V.V-1)*7),V.y=ge.getUTCFullYear(),V.m=ge.getUTCMonth(),V.d=ge.getUTCDate()+(V.w+6)%7):(ge=Nb(mu(V.y,0,1)),Xe=ge.getDay(),ge=Xe>4||Xe===0?Bm.ceil(ge):Bm(ge),ge=Zd.offset(ge,(V.V-1)*7),V.y=ge.getFullYear(),V.m=ge.getMonth(),V.d=ge.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),Xe="Z"in V?Cb(mu(V.y,0,1)).getUTCDay():Nb(mu(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(Xe+5)%7:V.w+V.U*7-(Xe+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,Cb(V)):Nb(V)}}function E(G,oe,X,V){for(var _e=0,ge=oe.length,Xe=X.length,ot,dt;_e=Xe)return-1;if(ot=oe.charCodeAt(_e++),ot===37){if(ot=oe.charAt(_e++),dt=S[ot in vC?oe.charAt(_e++):ot],!dt||(V=dt(G,X,V))<0)return-1}else if(ot!=X.charCodeAt(V++))return-1}return V}function T(G,oe,X){var V=c.exec(oe.slice(X));return V?(G.p=f.get(V[0].toLowerCase()),X+V[0].length):-1}function N(G,oe,X){var V=p.exec(oe.slice(X));return V?(G.w=m.get(V[0].toLowerCase()),X+V[0].length):-1}function M(G,oe,X){var V=d.exec(oe.slice(X));return V?(G.w=h.get(V[0].toLowerCase()),X+V[0].length):-1}function C(G,oe,X){var V=y.exec(oe.slice(X));return V?(G.m=v.get(V[0].toLowerCase()),X+V[0].length):-1}function L(G,oe,X){var V=g.exec(oe.slice(X));return V?(G.m=b.get(V[0].toLowerCase()),X+V[0].length):-1}function D(G,oe,X){return E(G,t,oe,X)}function $(G,oe,X){return E(G,n,oe,X)}function P(G,oe,X){return E(G,r,oe,X)}function k(G){return s[G.getDay()]}function I(G){return i[G.getDay()]}function F(G){return l[G.getMonth()]}function H(G){return o[G.getMonth()]}function Y(G){return a[+(G.getHours()>=12)]}function q(G){return 1+~~(G.getMonth()/3)}function te(G){return s[G.getUTCDay()]}function Z(G){return i[G.getUTCDay()]}function ye(G){return l[G.getUTCMonth()]}function J(G){return o[G.getUTCMonth()]}function st(G){return a[+(G.getUTCHours()>=12)]}function Ve(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var oe=j(G+="",x);return oe.toString=function(){return G},oe},parse:function(G){var oe=O(G+="",!1);return oe.toString=function(){return G},oe},utcFormat:function(G){var oe=j(G+="",w);return oe.toString=function(){return G},oe},utcParse:function(G){var oe=O(G+="",!0);return oe.toString=function(){return G},oe}}}var vC={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,Ude=/^%/,Fde=/[\\^$*+?|[\]().{}]/g;function Pe(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i[t.toLowerCase(),n]))}function Hde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function qde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Kde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Gde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Yde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function bC(e,t,n){var r=Gt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function xC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xde(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Wde(e,t,n){var r=Gt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Qde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function SC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zde(e,t,n){var r=Gt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function wC(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Jde(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ehe(e,t,n){var r=Gt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function the(e,t,n){var r=Gt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nhe(e,t,n){var r=Gt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rhe(e,t,n){var r=Ude.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ahe(e,t,n){var r=Gt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ihe(e,t,n){var r=Gt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function jC(e,t){return Pe(e.getDate(),t,2)}function she(e,t){return Pe(e.getHours(),t,2)}function ohe(e,t){return Pe(e.getHours()%12||12,t,2)}function lhe(e,t){return Pe(1+Zd.count(Za(e),e),t,3)}function Y4(e,t){return Pe(e.getMilliseconds(),t,3)}function che(e,t){return Y4(e,t)+"000"}function uhe(e,t){return Pe(e.getMonth()+1,t,2)}function fhe(e,t){return Pe(e.getMinutes(),t,2)}function dhe(e,t){return Pe(e.getSeconds(),t,2)}function hhe(e){var t=e.getDay();return t===0?7:t}function phe(e,t){return Pe(_g.count(Za(e)-1,e),t,2)}function X4(e){var t=e.getDay();return t>=4||t===0?ic(e):ic.ceil(e)}function mhe(e,t){return e=X4(e),Pe(ic.count(Za(e),e)+(Za(e).getDay()===4),t,2)}function yhe(e){return e.getDay()}function ghe(e,t){return Pe(Bm.count(Za(e)-1,e),t,2)}function vhe(e,t){return Pe(e.getFullYear()%100,t,2)}function bhe(e,t){return e=X4(e),Pe(e.getFullYear()%100,t,2)}function xhe(e,t){return Pe(e.getFullYear()%1e4,t,4)}function She(e,t){var n=e.getDay();return e=n>=4||n===0?ic(e):ic.ceil(e),Pe(e.getFullYear()%1e4,t,4)}function whe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Pe(t/60|0,"0",2)+Pe(t%60,"0",2)}function AC(e,t){return Pe(e.getUTCDate(),t,2)}function jhe(e,t){return Pe(e.getUTCHours(),t,2)}function Ahe(e,t){return Pe(e.getUTCHours()%12||12,t,2)}function Ohe(e,t){return Pe(1+Cg.count(Ja(e),e),t,3)}function W4(e,t){return Pe(e.getUTCMilliseconds(),t,3)}function Ehe(e,t){return W4(e,t)+"000"}function The(e,t){return Pe(e.getUTCMonth()+1,t,2)}function Nhe(e,t){return Pe(e.getUTCMinutes(),t,2)}function Che(e,t){return Pe(e.getUTCSeconds(),t,2)}function _he(e){var t=e.getUTCDay();return t===0?7:t}function Phe(e,t){return Pe(Pg.count(Ja(e)-1,e),t,2)}function Q4(e){var t=e.getUTCDay();return t>=4||t===0?sc(e):sc.ceil(e)}function Mhe(e,t){return e=Q4(e),Pe(sc.count(Ja(e),e)+(Ja(e).getUTCDay()===4),t,2)}function Rhe(e){return e.getUTCDay()}function Dhe(e,t){return Pe(Um.count(Ja(e)-1,e),t,2)}function $he(e,t){return Pe(e.getUTCFullYear()%100,t,2)}function khe(e,t){return e=Q4(e),Pe(e.getUTCFullYear()%100,t,2)}function Lhe(e,t){return Pe(e.getUTCFullYear()%1e4,t,4)}function zhe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?sc(e):sc.ceil(e),Pe(e.getUTCFullYear()%1e4,t,4)}function Ihe(){return"+0000"}function OC(){return"%"}function EC(e){return+e}function TC(e){return Math.floor(+e/1e3)}var Do,Z4,J4;Bhe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Bhe(e){return Do=Bde(e),Z4=Do.format,Do.parse,J4=Do.utcFormat,Do.utcParse,Do}function Uhe(e){return new Date(e)}function Fhe(e){return e instanceof Date?+e:+new Date(+e)}function iA(e,t,n,r,a,i,s,o,l,c){var f=qj(),d=f.invert,h=f.domain,p=c(".%L"),m=c(":%S"),g=c("%I:%M"),b=c("%I %p"),y=c("%a %d"),v=c("%b %d"),x=c("%B"),w=c("%Y");function S(j){return(l(j)t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Pfe(e,i/r))},n.copy=function(){return rL(t).domain(e)},ii.apply(n,arguments)}function Rg(){var e=0,t=.5,n=1,r=1,a,i,s,o,l,c=mn,f,d=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+f(g))-i)*(r*gt}var oL=Xhe,Whe=Dg,Qhe=oL,Zhe=Yc;function Jhe(e){return e&&e.length?Whe(e,Zhe,Qhe):void 0}var epe=Jhe;const Di=Ie(epe);function tpe(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*nt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ne.dividedBy=ne.div=function(e){return Va(this,new this.constructor(e))};ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,n=t.constructor;return Ge(Va(t,new n(e),0,1),n.precision)};ne.equals=ne.eq=function(e){return!this.cmp(e)};ne.exponent=function(){return _t(this)};ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0};ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0};ne.isInteger=ne.isint=function(){return this.e>this.d.length-2};ne.isNegative=ne.isneg=function(){return this.s<0};ne.isPositive=ne.ispos=function(){return this.s>0};ne.isZero=function(){return this.s===0};ne.lessThan=ne.lt=function(e){return this.cmp(e)<0};ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1};ne.logarithm=ne.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Vn))throw Error(Sr+"NaN");if(n.s<1)throw Error(Sr+(n.s?"NaN":"-Infinity"));return n.eq(Vn)?new r(0):(ct=!1,t=Va(Gf(n,i),Gf(e,i),i),ct=!0,Ge(t,a))};ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dL(t,e):uL(t,(e.s=-e.s,e))};ne.modulo=ne.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(Sr+"NaN");return n.s?(ct=!1,t=Va(n,e,0,1).times(e),ct=!0,n.minus(t)):Ge(new r(n),a)};ne.naturalExponential=ne.exp=function(){return fL(this)};ne.naturalLogarithm=ne.ln=function(){return Gf(this)};ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?uL(t,e):dL(t,(e.s=-e.s,e))};ne.precision=ne.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ws+e);if(t=_t(a)+1,r=a.d.length-1,n=r*nt+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ne.squareRoot=ne.sqrt=function(){var e,t,n,r,a,i,s,o=this,l=o.constructor;if(o.s<1){if(!o.s)return new l(0);throw Error(Sr+"NaN")}for(e=_t(o),ct=!1,a=Math.sqrt(+o),a==0||a==1/0?(t=ea(o.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Qc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(a.toString()),n=l.precision,a=s=n+3;;)if(i=r,r=i.plus(Va(o,i,s+2)).times(.5),ea(i.d).slice(0,s)===(t=ea(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Ge(i,n+1,0),i.times(i).eq(o)){r=i;break}}else if(t!="9999")break;s+=4}return ct=!0,Ge(r,n)};ne.times=ne.mul=function(e){var t,n,r,a,i,s,o,l,c,f=this,d=f.constructor,h=f.d,p=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=h.length,c=p.length,l=0;){for(t=0,a=l+r;a>r;)o=i[a]+p[r]*h[a-r-1]+t,i[a--]=o%Ut|0,t=o/Ut|0;i[a]=(i[a]+t)%Ut|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,ct?Ge(e,d.precision):e};ne.toDecimalPlaces=ne.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ca(e,0,Wc),t===void 0?t=r.rounding:ca(t,0,8),Ge(n,e+_t(n)+1,t))};ne.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=fo(r,!0):(ca(e,0,Wc),t===void 0?t=a.rounding:ca(t,0,8),r=Ge(new a(r),e+1,t),n=fo(r,!0,e+1)),n};ne.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?fo(a):(ca(e,0,Wc),t===void 0?t=i.rounding:ca(t,0,8),r=Ge(new i(a),e+_t(a)+1,t),n=fo(r.abs(),!1,e+_t(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return Ge(new t(e),_t(e)+1,t.rounding)};ne.toNumber=function(){return+this};ne.toPower=ne.pow=function(e){var t,n,r,a,i,s,o=this,l=o.constructor,c=12,f=+(e=new l(e));if(!e.s)return new l(Vn);if(o=new l(o),!o.s){if(e.s<1)throw Error(Sr+"Infinity");return o}if(o.eq(Vn))return o;if(r=l.precision,e.eq(Vn))return Ge(o,r);if(t=e.e,n=e.d.length-1,s=t>=n,i=o.s,s){if((n=f<0?-f:f)<=cL){for(a=new l(Vn),t=Math.ceil(r/nt+4),ct=!1;n%2&&(a=a.times(o),_C(a.d,t)),n=Qc(n/2),n!==0;)o=o.times(o),_C(o.d,t);return ct=!0,e.s<0?new l(Vn).div(a):Ge(a,r)}}else if(i<0)throw Error(Sr+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,ct=!1,a=e.times(Gf(o,r+c)),ct=!0,a=fL(a),a.s=i,a};ne.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=_t(a),r=fo(a,n<=i.toExpNeg||n>=i.toExpPos)):(ca(e,1,Wc),t===void 0?t=i.rounding:ca(t,0,8),a=Ge(new i(a),e,t),n=_t(a),r=fo(a,e<=n||n<=i.toExpNeg,e)),r};ne.toSignificantDigits=ne.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ca(e,1,Wc),t===void 0?t=r.rounding:ca(t,0,8)),Ge(new r(n),e,t)};ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=_t(e),n=e.constructor;return fo(e,t<=n.toExpNeg||t>=n.toExpPos)};function uL(e,t){var n,r,a,i,s,o,l,c,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),ct?Ge(t,d):t;if(l=e.d,c=t.d,s=e.e,a=t.e,l=l.slice(),i=s-a,i){for(i<0?(r=l,i=-i,o=c.length):(r=c,a=s,o=l.length),s=Math.ceil(d/nt),o=s>o?s+1:o+1,i>o&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(o=l.length,i=c.length,o-i<0&&(i=o,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/Ut|0,l[i]%=Ut;for(n&&(l.unshift(n),++a),o=l.length;l[--o]==0;)l.pop();return t.d=l,t.e=a,ct?Ge(t,d):t}function ca(e,t,n){if(e!==~~e||en)throw Error(Ws+e)}function ea(e){var t,n,r,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;ts?1:-1;else for(o=l=0;oa[o]?1:-1;break}return l}function n(r,a,i){for(var s=0;i--;)r[i]-=s,s=r[i]1;)r.shift()}return function(r,a,i,s){var o,l,c,f,d,h,p,m,g,b,y,v,x,w,S,j,O,E,T=r.constructor,N=r.s==a.s?1:-1,M=r.d,C=a.d;if(!r.s)return new T(r);if(!a.s)throw Error(Sr+"Division by zero");for(l=r.e-a.e,O=C.length,S=M.length,p=new T(N),m=p.d=[],c=0;C[c]==(M[c]||0);)++c;if(C[c]>(M[c]||0)&&--l,i==null?v=i=T.precision:s?v=i+(_t(r)-_t(a))+1:v=i,v<0)return new T(0);if(v=v/nt+2|0,c=0,O==1)for(f=0,C=C[0],v++;(c1&&(C=e(C,f),M=e(M,f),O=C.length,S=M.length),w=O,g=M.slice(0,O),b=g.length;b=Ut/2&&++j;do f=0,o=t(C,g,O,b),o<0?(y=g[0],O!=b&&(y=y*Ut+(g[1]||0)),f=y/j|0,f>1?(f>=Ut&&(f=Ut-1),d=e(C,f),h=d.length,b=g.length,o=t(d,g,h,b),o==1&&(f--,n(d,O16)throw Error(lA+_t(e));if(!e.s)return new f(Vn);for(ct=!1,o=d,s=new f(.03125);e.abs().gte(.1);)e=e.times(s),c+=5;for(r=Math.log(ws(2,c))/Math.LN10*2+5|0,o+=r,n=a=i=new f(Vn),f.precision=o;;){if(a=Ge(a.times(e),o),n=n.times(++l),s=i.plus(Va(a,n,o)),ea(s.d).slice(0,o)===ea(i.d).slice(0,o)){for(;c--;)i=Ge(i.times(i),o);return f.precision=d,t==null?(ct=!0,Ge(i,d)):i}i=s}}function _t(e){for(var t=e.e*nt,n=e.d[0];n>=10;n/=10)t++;return t}function _b(e,t,n){if(t>e.LN10.sd())throw ct=!0,n&&(e.precision=n),Error(Sr+"LN10 precision limit exceeded");return Ge(new e(e.LN10),t)}function mi(e){for(var t="";e--;)t+="0";return t}function Gf(e,t){var n,r,a,i,s,o,l,c,f,d=1,h=10,p=e,m=p.d,g=p.constructor,b=g.precision;if(p.s<1)throw Error(Sr+(p.s?"NaN":"-Infinity"));if(p.eq(Vn))return new g(0);if(t==null?(ct=!1,c=b):c=t,p.eq(10))return t==null&&(ct=!0),_b(g,c);if(c+=h,g.precision=c,n=ea(m),r=n.charAt(0),i=_t(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ea(p.d),r=n.charAt(0),d++;i=_t(p),r>1?(p=new g("0."+n),i++):p=new g(r+"."+n.slice(1))}else return l=_b(g,c+2,b).times(i+""),p=Gf(new g(r+"."+n.slice(1)),c-h).plus(l),g.precision=b,t==null?(ct=!0,Ge(p,b)):p;for(o=s=p=Va(p.minus(Vn),p.plus(Vn),c),f=Ge(p.times(p),c),a=3;;){if(s=Ge(s.times(f),c),l=o.plus(Va(s,new g(a),c)),ea(l.d).slice(0,c)===ea(o.d).slice(0,c))return o=o.times(2),i!==0&&(o=o.plus(_b(g,c+2,b).times(i+""))),o=Va(o,new g(d),c),g.precision=b,t==null?(ct=!0,Ge(o,b)):o;o=l,a+=2}}function CC(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=Qc(n/nt),e.d=[],r=(n+1)%nt,n<0&&(r+=nt),rFm||e.e<-Fm))throw Error(lA+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ge(e,t,n){var r,a,i,s,o,l,c,f,d=e.d;for(s=1,i=d[0];i>=10;i/=10)s++;if(r=t-s,r<0)r+=nt,a=t,c=d[f=0];else{if(f=Math.ceil((r+1)/nt),i=d.length,f>=i)return e;for(c=i=d[f],s=1;i>=10;i/=10)s++;r%=nt,a=r-nt+s}if(n!==void 0&&(i=ws(10,s-a-1),o=c/i%10|0,l=t<0||d[f+1]!==void 0||c%i,l=n<4?(o||l)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||l||n==6&&(r>0?a>0?c/ws(10,s-a):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=_t(e),d.length=1,t=t-i-1,d[0]=ws(10,(nt-t%nt)%nt),e.e=Qc(-t/nt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,i=1,f--):(d.length=f+1,i=ws(10,nt-r),d[f]=a>0?(c/ws(10,s-a)%ws(10,a)|0)*i:0),l)for(;;)if(f==0){(d[0]+=i)==Ut&&(d[0]=1,++e.e);break}else{if(d[f]+=i,d[f]!=Ut)break;d[f--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(ct&&(e.e>Fm||e.e<-Fm))throw Error(lA+_t(e));return e}function dL(e,t){var n,r,a,i,s,o,l,c,f,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ct?Ge(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),s=c-r,s){for(f=s<0,f?(n=l,s=-s,o=d.length):(n=d,r=c,o=l.length),a=Math.max(Math.ceil(p/nt),o)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,o=d.length,f=a0;--a)l[o++]=0;for(a=d.length;a>s;){if(l[--a]0?i=i.charAt(0)+"."+i.slice(1)+mi(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+mi(-a-1)+i,n&&(r=n-s)>0&&(i+=mi(r))):a>=s?(i+=mi(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+mi(r))):((r=a+1)