@abpjs/ui 0.2.0-next.4 → 0.2.0-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1560,7 +1560,7 @@ function useTokenVar() {
1560
1560
  }
1561
1561
 
1562
1562
  // src/version.ts
1563
- var ABP_UI_VERSION = true ? "0.2.0-next.4" : "0.0.0-dev";
1563
+ var ABP_UI_VERSION = true ? "0.2.0-next.6" : "0.0.0-dev";
1564
1564
 
1565
1565
  // src/provider/time-zone.tsx
1566
1566
  import { createContext, useContext } from "react";
@@ -2236,6 +2236,8 @@ function errorText(e) {
2236
2236
  return e instanceof Error ? e.message : String(e);
2237
2237
  }
2238
2238
  var isStepUp = (e) => e instanceof AbpApiError && e.status === 403 && e.code === STEP_UP_REQUIRED;
2239
+ var STRONG_FACTOR_REQUIRED = "strong_factor_required";
2240
+ var needsStepUp = (e) => e instanceof AbpApiError && e.status === 403 && (e.code === STEP_UP_REQUIRED || e.code === STRONG_FACTOR_REQUIRED);
2239
2241
 
2240
2242
  // src/host/HostContext.tsx
2241
2243
  import { jsx as jsx11 } from "react/jsx-runtime";
@@ -2372,7 +2374,7 @@ function HostSlot({ name, context }) {
2372
2374
 
2373
2375
  // src/host/StepUpDialog.tsx
2374
2376
  import { useEffect as useEffect4, useRef as useRef5, useState as useState6 } from "react";
2375
- import { Dialog as Dialog2, HStack, Input, Portal as Portal4, Stack as Stack2, Text } from "@chakra-ui/react";
2377
+ import { chakra as chakra5, Dialog as Dialog2, Grid, HStack, Input, Portal as Portal4, Stack as Stack2, Text } from "@chakra-ui/react";
2376
2378
 
2377
2379
  // src/components/Field.tsx
2378
2380
  import { forwardRef as forwardRef2 } from "react";
@@ -2591,9 +2593,14 @@ var pending = null;
2591
2593
  function setStepUpHandler(next) {
2592
2594
  handler = next;
2593
2595
  }
2594
- function requestStepUp() {
2596
+ function stepUpNeedOf(code, data) {
2597
+ const level = code === "strong_factor_required" || data?.level === "strong" ? "strong" : "password";
2598
+ const methods = Array.isArray(data?.methods) ? data.methods.filter((m4) => typeof m4 === "string") : [];
2599
+ return { code, level, category: typeof data?.category === "string" ? data.category : null, methods, appCodeAlone: data?.appCodeAlone === true };
2600
+ }
2601
+ function requestStepUp(need = { code: "step_up_required", level: "password", category: null, methods: [], appCodeAlone: false }) {
2595
2602
  if (!handler) return Promise.resolve(false);
2596
- pending ??= handler().finally(() => {
2603
+ pending ??= handler(need).finally(() => {
2597
2604
  pending = null;
2598
2605
  });
2599
2606
  return pending;
@@ -2623,7 +2630,39 @@ var ar_default = {
2623
2630
  unreachable: "\u0644\u0627 \u064A\u0648\u062C\u062F \u0639\u0646\u0648\u0627\u0646 \u0644\u0625\u0631\u0633\u0627\u0644 \u0647\u0630\u0627 \u0627\u0644\u0631\u0645\u0632 \u0625\u0644\u064A\u0647. \u062C\u0631\u0651\u0628 \u0637\u0631\u064A\u0642\u0629 \u0623\u062E\u0631\u0649.",
2624
2631
  notSent: "\u062A\u0639\u0630\u0651\u0631 \u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0631\u0645\u0632. \u062C\u0631\u0651\u0628 \u0637\u0631\u064A\u0642\u0629 \u0623\u062E\u0631\u0649\u060C \u0623\u0648 \u0623\u0639\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0644\u0627\u062D\u0642\u064B\u0627.",
2625
2632
  notAllowed: "\u0644\u0627 \u064A\u0631\u0633\u0644 \u0647\u0630\u0627 \u0627\u0644\u0645\u0648\u0642\u0639 \u0627\u0644\u0631\u0645\u0648\u0632 \u0628\u0647\u0630\u0647 \u0627\u0644\u0637\u0631\u064A\u0642\u0629.",
2626
- email: "\u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A"
2633
+ email: "\u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",
2634
+ strongWhy: "\u064A\u062A\u0637\u0644\u0628 \u0647\u0630\u0627 \u0627\u0644\u0625\u062C\u0631\u0627\u0621 \u0623\u0643\u062B\u0631 \u0645\u0646 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631: \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631\u060C \u0623\u0648 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631 \u0645\u0639 \u0631\u0645\u0632 \u0645\u0646 \u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0645\u0635\u0627\u062F\u0642\u0629.",
2635
+ usePasskey: "\u0627\u0633\u062A\u062E\u062F\u0645 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631",
2636
+ usePasswordAndApp: "\u0627\u0633\u062A\u062E\u062F\u0645 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631 \u0648\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0645\u0635\u0627\u062F\u0642\u0629 \u0628\u062F\u0644\u064B\u0627 \u0645\u0646 \u0630\u0644\u0643",
2637
+ useAnotherWay: "\u0627\u0633\u062A\u062E\u062F\u0645 \u0637\u0631\u064A\u0642\u0629 \u0623\u062E\u0631\u0649",
2638
+ passkeyPrompt: "\u0627\u062A\u0628\u0639 \u0645\u0627 \u064A\u0637\u0644\u0628\u0647 \u062C\u0647\u0627\u0632\u0643 \u0644\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631.",
2639
+ passkeyCancelled: "\u0644\u0645 \u064A\u064F\u0633\u062A\u062E\u062F\u0645 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631. \u062D\u0627\u0648\u0644 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649\u060C \u0623\u0648 \u0627\u0633\u062A\u062E\u062F\u0645 \u0637\u0631\u064A\u0642\u0629 \u0623\u062E\u0631\u0649.",
2640
+ passkeyUnsupported: "\u0644\u0627 \u064A\u0645\u0643\u0646 \u0644\u0647\u0630\u0627 \u0627\u0644\u0645\u062A\u0635\u0641\u062D \u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0645\u0641\u0627\u062A\u064A\u062D \u0627\u0644\u0645\u0631\u0648\u0631 \u0647\u0646\u0627.",
2641
+ setupTitle: "\u0623\u0639\u062F\u0651 \u0645\u0641\u062A\u0627\u062D \u0645\u0631\u0648\u0631 \u0623\u0648 \u062A\u0637\u0628\u064A\u0642 \u0645\u0635\u0627\u062F\u0642\u0629",
2642
+ setupWhy: "\u064A\u062A\u0637\u0644\u0628 \u0647\u0630\u0627 \u0627\u0644\u0625\u062C\u0631\u0627\u0621 \u0645\u0641\u062A\u0627\u062D \u0645\u0631\u0648\u0631 \u0623\u0648 \u062A\u0637\u0628\u064A\u0642 \u0645\u0635\u0627\u062F\u0642\u0629\u060C \u0648\u0644\u064A\u0633 \u0644\u062F\u064A\u0643 \u0623\u064A\u064C\u0651 \u0645\u0646\u0647\u0645\u0627 \u0628\u0639\u062F. \u0623\u0639\u062F\u0651 \u0623\u062D\u062F\u0647\u0645\u0627 \u0627\u0644\u0622\u0646\u060C \u062B\u0645 \u0623\u0643\u0651\u062F \u0647\u0648\u064A\u062A\u0643 \u0628\u0647.",
2643
+ setupPasswordWhy: "\u0623\u0648\u0644\u064B\u0627\u060C \u0623\u062F\u062E\u0644 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631.",
2644
+ setupPasskey: "\u0623\u0639\u062F\u0651 \u0645\u0641\u062A\u0627\u062D \u0645\u0631\u0648\u0631",
2645
+ setupApp: "\u0623\u0639\u062F\u0651 \u062A\u0637\u0628\u064A\u0642 \u0645\u0635\u0627\u062F\u0642\u0629",
2646
+ passkeyName: "\u0627\u0633\u0645 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631",
2647
+ passkeyNameDefault: "\u0645\u0641\u062A\u0627\u062D \u0645\u0631\u0648\u0631",
2648
+ passkeyCreate: "\u0623\u0646\u0634\u0626 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631",
2649
+ appScan: "\u0627\u0645\u0633\u062D \u0647\u0630\u0627 \u0627\u0644\u0631\u0645\u0632 \u0628\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0645\u0635\u0627\u062F\u0642\u0629\u060C \u062B\u0645 \u0623\u062F\u062E\u0644 \u0627\u0644\u0631\u0645\u0632 \u0627\u0644\u0630\u064A \u064A\u0638\u0647\u0631 \u0641\u064A\u0647.",
2650
+ appQrAlt: "\u0631\u0645\u0632 QR \u0644\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0645\u0635\u0627\u062F\u0642\u0629",
2651
+ appCantScan: "\u062A\u0639\u0630\u0651\u0631 \u0627\u0644\u0645\u0633\u062D\u061F \u0623\u062F\u062E\u0644 \u0647\u0630\u0627 \u0627\u0644\u0645\u0641\u062A\u0627\u062D \u0641\u064A \u0627\u0644\u062A\u0637\u0628\u064A\u0642:",
2652
+ appCode: "\u0627\u0644\u0631\u0645\u0632 \u0645\u0646 \u0627\u0644\u062A\u0637\u0628\u064A\u0642",
2653
+ appConfirm: "\u062A\u0623\u0643\u064A\u062F \u0627\u0644\u0631\u0645\u0632",
2654
+ appWrongCode: "\u0627\u0644\u0631\u0645\u0632 \u063A\u064A\u0631 \u0635\u062D\u064A\u062D. \u062A\u062D\u0642\u0642 \u0645\u0646 \u0627\u0644\u0648\u0642\u062A \u0641\u064A \u0647\u0627\u062A\u0641\u0643\u060C \u0648\u0623\u062F\u062E\u0644 \u0627\u0644\u0631\u0645\u0632 \u0627\u0644\u0630\u064A \u064A\u0638\u0647\u0631 \u0627\u0644\u0622\u0646.",
2655
+ recoveryTitle: "\u0627\u062D\u0641\u0638 \u0631\u0645\u0648\u0632 \u0627\u0644\u0627\u0633\u062A\u0631\u062F\u0627\u062F",
2656
+ recoveryHint: "\u0643\u0644 \u0631\u0645\u0632 \u064A\u064F\u062F\u062E\u0644\u0643 \u0645\u0631\u0629 \u0648\u0627\u062D\u062F\u0629 \u0625\u0630\u0627 \u0641\u0642\u062F\u062A \u062C\u0647\u0627\u0632\u0643. \u0644\u0646 \u062A\u0638\u0647\u0631 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.",
2657
+ recoveryCopy: "\u0646\u0633\u062E",
2658
+ recoveryCopied: "\u0646\u064F\u0633\u062E\u062A",
2659
+ recoverySaved: "\u062D\u0641\u0638\u062A\u0647\u0627",
2660
+ continue: "\u0645\u062A\u0627\u0628\u0639\u0629",
2661
+ back: "\u0631\u062C\u0648\u0639",
2662
+ strongWhyApp: "\u064A\u062A\u0637\u0644\u0628 \u0647\u0630\u0627 \u0627\u0644\u0625\u062C\u0631\u0627\u0621 \u0623\u0643\u062B\u0631 \u0645\u0646 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631: \u0623\u062F\u062E\u0644\u0647\u0627 \u0645\u0639 \u0631\u0645\u0632 \u0645\u0646 \u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0645\u0635\u0627\u062F\u0642\u0629.",
2663
+ appCodeWhy: "\u0623\u062F\u062E\u0644 \u0631\u0645\u0632\u064B\u0627 \u0645\u0646 \u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0645\u0635\u0627\u062F\u0642\u0629.",
2664
+ useAppCode: "\u0627\u0633\u062A\u062E\u062F\u0645 \u0631\u0645\u0632\u064B\u0627 \u0645\u0646 \u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0645\u0635\u0627\u062F\u0642\u0629 \u0628\u062F\u0644\u064B\u0627 \u0645\u0646 \u0630\u0644\u0643",
2665
+ usePassword: "\u0627\u0633\u062A\u062E\u062F\u0645 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631 \u0628\u062F\u0644\u064B\u0627 \u0645\u0646 \u0630\u0644\u0643"
2627
2666
  };
2628
2667
 
2629
2668
  // src/host/step-up-texts/en.json
@@ -2650,11 +2689,123 @@ var en_default = {
2650
2689
  unreachable: "There's no address to send that code to. Try another way.",
2651
2690
  notSent: "The code couldn't be sent. Try another way, or again later.",
2652
2691
  notAllowed: "This site doesn't send codes that way.",
2653
- email: "email"
2692
+ email: "email",
2693
+ strongWhy: "This action needs more than your password: your passkey, or your password and a code from your authenticator app.",
2694
+ usePasskey: "Use a passkey",
2695
+ usePasswordAndApp: "Use your password and authenticator app instead",
2696
+ useAnotherWay: "Use another way",
2697
+ passkeyPrompt: "Follow your device's prompt to use your passkey.",
2698
+ passkeyCancelled: "The passkey wasn't used. Try again, or use another way.",
2699
+ passkeyUnsupported: "This browser can't use passkeys here.",
2700
+ setupTitle: "Set up a passkey or authenticator",
2701
+ setupWhy: "This action needs a passkey or an authenticator app, and you don't have one yet. Set one up now; you'll then confirm with it.",
2702
+ setupPasswordWhy: "First, enter your password.",
2703
+ setupPasskey: "Set up a passkey",
2704
+ setupApp: "Set up an authenticator app",
2705
+ passkeyName: "Name for this passkey",
2706
+ passkeyNameDefault: "Passkey",
2707
+ passkeyCreate: "Create the passkey",
2708
+ appScan: "Scan this with your authenticator app, then enter the code it shows.",
2709
+ appQrAlt: "QR code for your authenticator app",
2710
+ appCantScan: "Can't scan it? Enter this key in the app:",
2711
+ appCode: "Code from the app",
2712
+ appConfirm: "Confirm the code",
2713
+ appWrongCode: "That code is incorrect. Check the time on your phone, and enter the code it shows now.",
2714
+ recoveryTitle: "Save your recovery codes",
2715
+ recoveryHint: "Each one signs you in once if you lose your device. They won't be shown again.",
2716
+ recoveryCopy: "Copy",
2717
+ recoveryCopied: "Copied",
2718
+ recoverySaved: "I've saved them",
2719
+ continue: "Continue",
2720
+ back: "Back",
2721
+ strongWhyApp: "This action needs more than your password: enter it with a code from your authenticator app.",
2722
+ appCodeWhy: "Enter a code from your authenticator app.",
2723
+ useAppCode: "Use a code from your authenticator app instead",
2724
+ usePassword: "Use your password instead"
2654
2725
  };
2655
2726
 
2727
+ // src/host/webauthn.ts
2728
+ function passkeysSupported() {
2729
+ return typeof window !== "undefined" && window.isSecureContext && typeof window.PublicKeyCredential === "function" && !!navigator.credentials;
2730
+ }
2731
+ function fromBase64Url(text) {
2732
+ const base64 = text.replace(/-/g, "+").replace(/_/g, "/").padEnd(Math.ceil(text.length / 4) * 4, "=");
2733
+ const bytes = Uint8Array.from(atob(base64), (c2) => c2.charCodeAt(0));
2734
+ return bytes.buffer;
2735
+ }
2736
+ function toBase64Url(buffer) {
2737
+ if (!buffer) return void 0;
2738
+ let text = "";
2739
+ for (const b of new Uint8Array(buffer)) text += String.fromCharCode(b);
2740
+ return btoa(text).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
2741
+ }
2742
+ var withIds = (list) => Array.isArray(list) ? list.map((c2) => ({ ...c2, id: fromBase64Url(c2.id) })) : void 0;
2743
+ function creationOptions(json) {
2744
+ const pkc = PublicKeyCredential;
2745
+ if (pkc.parseCreationOptionsFromJSON) return pkc.parseCreationOptionsFromJSON(json);
2746
+ const user = json.user;
2747
+ return {
2748
+ ...json,
2749
+ challenge: fromBase64Url(json.challenge),
2750
+ user: { ...user, id: fromBase64Url(user.id) },
2751
+ excludeCredentials: withIds(json.excludeCredentials)
2752
+ };
2753
+ }
2754
+ function requestOptions(json) {
2755
+ const pkc = PublicKeyCredential;
2756
+ if (pkc.parseRequestOptionsFromJSON) return pkc.parseRequestOptionsFromJSON(json);
2757
+ return {
2758
+ ...json,
2759
+ challenge: fromBase64Url(json.challenge),
2760
+ allowCredentials: withIds(json.allowCredentials)
2761
+ };
2762
+ }
2763
+ function credentialJson(credential) {
2764
+ const own = credential;
2765
+ if (typeof own.toJSON === "function") return own.toJSON();
2766
+ const r = credential.response;
2767
+ const response = { clientDataJSON: toBase64Url(r.clientDataJSON) };
2768
+ if (r.attestationObject) {
2769
+ response.attestationObject = toBase64Url(r.attestationObject);
2770
+ response.transports = r.getTransports?.() ?? [];
2771
+ response.authenticatorData = toBase64Url(r.getAuthenticatorData?.());
2772
+ response.publicKey = toBase64Url(r.getPublicKey?.() ?? void 0);
2773
+ response.publicKeyAlgorithm = r.getPublicKeyAlgorithm?.();
2774
+ } else {
2775
+ response.authenticatorData = toBase64Url(r.authenticatorData);
2776
+ response.signature = toBase64Url(r.signature);
2777
+ response.userHandle = toBase64Url(r.userHandle ?? void 0);
2778
+ }
2779
+ return {
2780
+ id: credential.id,
2781
+ rawId: toBase64Url(credential.rawId),
2782
+ type: credential.type,
2783
+ authenticatorAttachment: credential.authenticatorAttachment ?? void 0,
2784
+ clientExtensionResults: credential.getClientExtensionResults(),
2785
+ response
2786
+ };
2787
+ }
2788
+ async function createPasskey(options, signal) {
2789
+ try {
2790
+ const credential = await navigator.credentials.create({ publicKey: creationOptions(options), signal });
2791
+ return credential ? credentialJson(credential) : null;
2792
+ } catch (e) {
2793
+ if (e instanceof DOMException && (e.name === "NotAllowedError" || e.name === "AbortError")) return null;
2794
+ throw e;
2795
+ }
2796
+ }
2797
+ async function getPasskey(options, signal) {
2798
+ try {
2799
+ const credential = await navigator.credentials.get({ publicKey: requestOptions(options), signal });
2800
+ return credential ? credentialJson(credential) : null;
2801
+ } catch (e) {
2802
+ if (e instanceof DOMException && (e.name === "NotAllowedError" || e.name === "AbortError")) return null;
2803
+ throw e;
2804
+ }
2805
+ }
2806
+
2656
2807
  // src/host/StepUpDialog.tsx
2657
- import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
2808
+ import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
2658
2809
  var useStepUpTexts = createAreaTexts("stepUp", { en: en_default, ar: ar_default });
2659
2810
  function looksLikeCode(value, recovery) {
2660
2811
  return recovery ? value.replace(/[^A-Za-z0-9]/g, "").length === 10 : value.replace(/\D/g, "").length === 6 && !/[^\d\s]/.test(value);
@@ -2665,6 +2816,8 @@ function StepUpDialog() {
2665
2816
  const host = useHost();
2666
2817
  const base = (host.paths.guard ?? "").replace(/\/$/, "");
2667
2818
  const [open, setOpen] = useState6(false);
2819
+ const [need, setNeed] = useState6(null);
2820
+ const [stage, setStage] = useState6("confirm");
2668
2821
  const [password, setPassword] = useState6("");
2669
2822
  const [ways, setWays] = useState6(null);
2670
2823
  const [method, setMethod] = useState6("app");
@@ -2673,17 +2826,32 @@ function StepUpDialog() {
2673
2826
  const [sending, setSending] = useState6(false);
2674
2827
  const [error, setError] = useState6(null);
2675
2828
  const [busy, setBusy] = useState6(false);
2829
+ const [passkeyName, setPasskeyName] = useState6("");
2830
+ const [enrolment, setEnrolment] = useState6(null);
2831
+ const [recoveryCodes, setRecoveryCodes] = useState6([]);
2832
+ const [copied, setCopied] = useState6(false);
2676
2833
  const settle = useRef5(null);
2834
+ const canPasskey = passkeysSupported();
2835
+ const strong = need?.level === "strong";
2836
+ const settingUp = need?.code === "strong_factor_required";
2837
+ const call = (path, init = {}) => host.request(`${base}${path}`, { ...init, stepUp: false });
2677
2838
  useEffect4(() => {
2678
2839
  setStepUpHandler(
2679
- () => new Promise((resolve) => {
2840
+ (asked) => new Promise((resolve) => {
2680
2841
  settle.current = resolve;
2842
+ setNeed(asked);
2681
2843
  setPassword("");
2682
2844
  setWays(null);
2683
- setMethod("app");
2684
2845
  setCode("");
2685
2846
  setSent({});
2686
2847
  setError(null);
2848
+ setEnrolment(null);
2849
+ setRecoveryCodes([]);
2850
+ setCopied(false);
2851
+ const passkeyFirst = asked.code !== "strong_factor_required" && asked.level === "strong" && asked.methods.includes("passkey") && passkeysSupported();
2852
+ const codeFirst = asked.code !== "strong_factor_required" && asked.level === "strong" && asked.appCodeAlone && asked.methods.includes("app");
2853
+ setStage(passkeyFirst ? "passkey" : codeFirst ? "code" : "confirm");
2854
+ setMethod("app");
2687
2855
  setOpen(true);
2688
2856
  })
2689
2857
  );
@@ -2697,7 +2865,7 @@ function StepUpDialog() {
2697
2865
  settle.current = null;
2698
2866
  }
2699
2867
  async function askForCode() {
2700
- const mine = await host.request(`${base}/me/second-factors`).catch(() => null);
2868
+ const mine = await call("/me/second-factors").catch(() => null);
2701
2869
  const found = { hasApp: mine?.factors.some((f) => f.kind === "app") ?? true, senders: mine?.senders ?? [] };
2702
2870
  setWays(found);
2703
2871
  setMethod(found.hasApp ? "app" : found.senders[0]?.method ?? "app");
@@ -2706,7 +2874,7 @@ function StepUpDialog() {
2706
2874
  setSending(true);
2707
2875
  setError(null);
2708
2876
  try {
2709
- const answer = await host.request(`${base}/me/second-factors/send`, { method: "POST", body: { method } });
2877
+ const answer = await call("/me/second-factors/send", { method: "POST", body: { method } });
2710
2878
  setSent({ ...sent, [method]: answer.to });
2711
2879
  setCode("");
2712
2880
  } catch (e) {
@@ -2720,24 +2888,33 @@ function StepUpDialog() {
2720
2888
  setCode("");
2721
2889
  setError(null);
2722
2890
  }
2891
+ function ended(e) {
2892
+ if (e instanceof AbpApiError && e.status === 401) {
2893
+ close(false);
2894
+ return true;
2895
+ }
2896
+ return false;
2897
+ }
2723
2898
  async function confirm(e) {
2724
2899
  e.preventDefault();
2725
2900
  setBusy(true);
2726
2901
  setError(null);
2727
2902
  try {
2728
- await host.request(`${base}/session/step-up`, { method: "POST", body: ways ? { password, method, code } : { password } });
2729
- close(true);
2730
- } catch (e2) {
2731
- if (e2 instanceof AbpApiError && e2.status === 401) {
2732
- close(false);
2903
+ const withCode = strong && !settingUp ? { password, method: "app", code } : ways ? { password, method, code } : { password };
2904
+ await call("/session/step-up", { method: "POST", body: withCode });
2905
+ if (settingUp) {
2906
+ setStage("setup");
2733
2907
  return;
2734
2908
  }
2735
- if (e2 instanceof AbpApiError && e2.code === "second_factor_required") {
2909
+ close(true);
2910
+ } catch (e2) {
2911
+ if (ended(e2)) return;
2912
+ if (e2 instanceof AbpApiError && e2.code === "second_factor_required" && !(strong && !settingUp)) {
2736
2913
  await askForCode();
2737
2914
  return;
2738
2915
  }
2739
2916
  setError(e2 instanceof AbpApiError && e2.message ? e2.message : t("failed"));
2740
- if (ways && !(e2 instanceof AbpApiError && e2.code === "step_up_failed")) {
2917
+ if ((ways || strong && !settingUp) && !(e2 instanceof AbpApiError && e2.code === "step_up_failed")) {
2741
2918
  setCode("");
2742
2919
  return;
2743
2920
  }
@@ -2746,39 +2923,188 @@ function StepUpDialog() {
2746
2923
  setBusy(false);
2747
2924
  }
2748
2925
  }
2926
+ async function confirmCode(e) {
2927
+ e.preventDefault();
2928
+ setBusy(true);
2929
+ setError(null);
2930
+ try {
2931
+ await call("/session/step-up", { method: "POST", body: { method: "app", code: code.replace(/\D/g, "") } });
2932
+ close(true);
2933
+ } catch (e2) {
2934
+ if (ended(e2)) return;
2935
+ setError(e2 instanceof AbpApiError && e2.message ? e2.message : t("failed"));
2936
+ setCode("");
2937
+ } finally {
2938
+ setBusy(false);
2939
+ }
2940
+ }
2941
+ const codeAlone = !!need?.appCodeAlone && !!need.methods.includes("app") && !settingUp;
2942
+ const toStage = (next) => {
2943
+ setStage(next);
2944
+ setCode("");
2945
+ setError(null);
2946
+ };
2947
+ async function withPasskey() {
2948
+ setBusy(true);
2949
+ setError(null);
2950
+ try {
2951
+ const options = await call("/session/step-up/options", { method: "POST" });
2952
+ const credential = await getPasskey(options);
2953
+ if (!credential) {
2954
+ setError(t("passkeyCancelled"));
2955
+ return;
2956
+ }
2957
+ await call("/session/step-up", { method: "POST", body: { method: "passkey", credential } });
2958
+ close(true);
2959
+ } catch (e) {
2960
+ if (ended(e)) return;
2961
+ if (e instanceof AbpApiError && e.code === "no_passkey") setStage("confirm");
2962
+ setError(e instanceof AbpApiError && e.message ? e.message : t("failed"));
2963
+ } finally {
2964
+ setBusy(false);
2965
+ }
2966
+ }
2967
+ function setUp(codes) {
2968
+ if (codes && codes.length) {
2969
+ setRecoveryCodes(codes);
2970
+ setStage("recovery");
2971
+ } else close(true);
2972
+ }
2973
+ async function addPasskey(e) {
2974
+ e.preventDefault();
2975
+ setBusy(true);
2976
+ setError(null);
2977
+ try {
2978
+ const options = await call("/me/passkeys/options", { method: "POST" });
2979
+ const credential = await createPasskey(options);
2980
+ if (!credential) {
2981
+ setError(t("passkeyCancelled"));
2982
+ return;
2983
+ }
2984
+ const added = await call("/me/passkeys", { method: "POST", body: { name: passkeyName.trim() || t("passkeyNameDefault"), credential } });
2985
+ setUp(added.recoveryCodes);
2986
+ } catch (e2) {
2987
+ if (ended(e2)) return;
2988
+ setError(e2 instanceof AbpApiError && e2.message ? e2.message : t("failed"));
2989
+ } finally {
2990
+ setBusy(false);
2991
+ }
2992
+ }
2993
+ async function startApp() {
2994
+ setStage("setupApp");
2995
+ setCode("");
2996
+ setError(null);
2997
+ try {
2998
+ setEnrolment(await call("/me/second-factors/app", { method: "POST" }));
2999
+ } catch (e) {
3000
+ if (ended(e)) return;
3001
+ setError(e instanceof AbpApiError && e.message ? e.message : t("failed"));
3002
+ }
3003
+ }
3004
+ async function confirmApp(e) {
3005
+ e.preventDefault();
3006
+ setBusy(true);
3007
+ setError(null);
3008
+ try {
3009
+ const enrolled = await call("/me/second-factors/app/confirm", { method: "POST", body: { code: code.replace(/\D/g, "") } });
3010
+ setUp(enrolled.recoveryCodes);
3011
+ } catch (e2) {
3012
+ if (ended(e2)) return;
3013
+ setError(e2 instanceof AbpApiError && e2.code === "second_factor_failed" ? t("appWrongCode") : e2 instanceof AbpApiError && e2.message ? e2.message : t("failed"));
3014
+ setCode("");
3015
+ } finally {
3016
+ setBusy(false);
3017
+ }
3018
+ }
3019
+ async function copyCodes() {
3020
+ try {
3021
+ await navigator.clipboard.writeText(recoveryCodes.join("\n"));
3022
+ setCopied(true);
3023
+ } catch {
3024
+ setCopied(false);
3025
+ }
3026
+ }
2749
3027
  const sender = ways?.senders.find((s) => s.method === method);
2750
3028
  const recovery = method === "recovery";
2751
3029
  const sentTo = sent[method];
2752
3030
  const nameOf = (s) => s.method === "email" ? t("email") : s.name;
2753
- return /* @__PURE__ */ jsx15(Dialog2.Root, { open, onOpenChange: (e) => !e.open && close(false), placement: "center", role: "alertdialog", children: /* @__PURE__ */ jsxs7(Portal4, { children: [
2754
- /* @__PURE__ */ jsx15(Dialog2.Backdrop, {}),
2755
- /* @__PURE__ */ jsx15(Dialog2.Positioner, { children: /* @__PURE__ */ jsx15(Dialog2.Content, { "data-testid": "step-up", children: /* @__PURE__ */ jsxs7("form", { onSubmit: (e) => void confirm(e), children: [
2756
- /* @__PURE__ */ jsx15(Dialog2.Header, { children: /* @__PURE__ */ jsx15(Dialog2.Title, { children: t("title") }) }),
3031
+ const title = stage === "recovery" ? t("recoveryTitle") : settingUp ? t("setupTitle") : t("title");
3032
+ const mayDismiss = stage !== "recovery";
3033
+ const codeInput = (label, helper) => /* @__PURE__ */ jsx15(Field, { label, helperText: helper, required: true, children: /* @__PURE__ */ jsx15(
3034
+ Input,
3035
+ {
3036
+ value: code,
3037
+ onChange: (e) => setCode(e.target.value),
3038
+ autoFocus: true,
3039
+ autoComplete: "one-time-code",
3040
+ inputMode: recovery ? "text" : "numeric",
3041
+ maxLength: recovery ? 16 : 7,
3042
+ dir: "ltr",
3043
+ textAlign: "start",
3044
+ fontFamily: "mono",
3045
+ letterSpacing: recovery ? void 0 : "0.2em",
3046
+ width: recovery ? "48" : "32",
3047
+ "data-testid": "second-factor-code"
3048
+ },
3049
+ method
3050
+ ) });
3051
+ const passwordField = (focus) => /* @__PURE__ */ jsx15(Field, { label: t("password"), children: /* @__PURE__ */ jsx15(Input, { type: "password", autoComplete: "current-password", autoFocus: focus, value: password, onChange: (e) => setPassword(e.target.value) }) });
3052
+ const footer = (submit, disabled = false, onBack) => /* @__PURE__ */ jsx15(Dialog2.Footer, { children: /* @__PURE__ */ jsxs7(HStack, { children: [
3053
+ onBack ? /* @__PURE__ */ jsx15(Button, { variant: "secondary", onClick: onBack, disabled: busy, children: t("back") }) : /* @__PURE__ */ jsx15(Button, { variant: "secondary", onClick: () => close(false), disabled: busy, children: t("cancel") }),
3054
+ submit && /* @__PURE__ */ jsx15(Button, { type: "submit", loading: busy, disabled, children: submit })
3055
+ ] }) });
3056
+ let body;
3057
+ if (stage === "passkey") {
3058
+ body = /* @__PURE__ */ jsxs7(Fragment2, { children: [
3059
+ /* @__PURE__ */ jsx15(Dialog2.Body, { children: /* @__PURE__ */ jsxs7(Stack2, { gap: "field", align: "start", children: [
3060
+ /* @__PURE__ */ jsx15(Text, { color: "fg.muted", children: t("strongWhy") }),
3061
+ /* @__PURE__ */ jsx15(Button, { variant: "primary", onClick: () => void withPasskey(), loading: busy, "data-testid": "use-passkey", children: t("usePasskey") }),
3062
+ busy && /* @__PURE__ */ jsx15(Text, { textStyle: "sm", color: "fg.muted", children: t("passkeyPrompt") }),
3063
+ /* @__PURE__ */ jsx15(InlineAlert, { tone: "danger", children: error }),
3064
+ need?.methods.includes("app") && /* @__PURE__ */ jsx15(Button, { variant: "link", size: "sm", onClick: () => toStage(codeAlone ? "code" : "confirm"), "data-testid": "use-password-and-app", children: codeAlone ? t("useAppCode") : t("usePasswordAndApp") })
3065
+ ] }) }),
3066
+ footer(null)
3067
+ ] });
3068
+ } else if (stage === "code") {
3069
+ body = /* @__PURE__ */ jsxs7("form", { onSubmit: (e) => void confirmCode(e), children: [
2757
3070
  /* @__PURE__ */ jsx15(Dialog2.Body, { children: /* @__PURE__ */ jsxs7(Stack2, { gap: "field", children: [
2758
- /* @__PURE__ */ jsx15(Text, { color: "fg.muted", children: ways ? t("codeWhy") : t("why") }),
2759
- /* @__PURE__ */ jsx15(Field, { label: t("password"), children: /* @__PURE__ */ jsx15(Input, { type: "password", autoComplete: "current-password", autoFocus: !ways, value: password, onChange: (e) => setPassword(e.target.value) }) }),
3071
+ /* @__PURE__ */ jsx15(Text, { color: "fg.muted", children: t("appCodeWhy") }),
3072
+ codeInput(t("code")),
3073
+ /* @__PURE__ */ jsx15(InlineAlert, { tone: "danger", children: error }),
3074
+ /* @__PURE__ */ jsxs7(Stack2, { gap: "0.5", align: "start", children: [
3075
+ need?.methods.includes("passkey") && canPasskey && /* @__PURE__ */ jsx15(Button, { variant: "link", size: "sm", onClick: () => toStage("passkey"), children: t("usePasskey") }),
3076
+ !strong && /* @__PURE__ */ jsx15(Button, { variant: "link", size: "sm", onClick: () => toStage("confirm"), "data-testid": "use-password", children: t("usePassword") })
3077
+ ] })
3078
+ ] }) }),
3079
+ footer(t("confirm"), !looksLikeCode(code, false))
3080
+ ] });
3081
+ } else if (stage === "confirm" && strong && !settingUp) {
3082
+ body = /* @__PURE__ */ jsxs7("form", { onSubmit: (e) => void confirm(e), children: [
3083
+ /* @__PURE__ */ jsx15(Dialog2.Body, { children: /* @__PURE__ */ jsxs7(Stack2, { gap: "field", children: [
3084
+ /* @__PURE__ */ jsx15(Text, { color: "fg.muted", children: need?.methods.includes("passkey") ? t("strongWhy") : t("strongWhyApp") }),
3085
+ passwordField(true),
3086
+ codeInput(t("code")),
3087
+ /* @__PURE__ */ jsx15(InlineAlert, { tone: "danger", children: error }),
3088
+ need?.methods.includes("passkey") && canPasskey && /* @__PURE__ */ jsx15(Button, { variant: "link", size: "sm", alignSelf: "start", onClick: () => {
3089
+ setStage("passkey");
3090
+ setError(null);
3091
+ }, children: t("usePasskey") })
3092
+ ] }) }),
3093
+ footer(t("confirm"), !password || !looksLikeCode(code, false))
3094
+ ] });
3095
+ } else if (stage === "confirm") {
3096
+ body = /* @__PURE__ */ jsxs7("form", { onSubmit: (e) => void confirm(e), children: [
3097
+ /* @__PURE__ */ jsx15(Dialog2.Body, { children: /* @__PURE__ */ jsxs7(Stack2, { gap: "field", children: [
3098
+ settingUp ? /* @__PURE__ */ jsxs7(Stack2, { gap: "2", children: [
3099
+ /* @__PURE__ */ jsx15(Text, { color: "fg.muted", children: t("setupWhy") }),
3100
+ /* @__PURE__ */ jsx15(Text, { color: "fg.muted", children: t("setupPasswordWhy") })
3101
+ ] }) : /* @__PURE__ */ jsx15(Text, { color: "fg.muted", children: ways ? t("codeWhy") : t("why") }),
3102
+ passwordField(!ways),
2760
3103
  ways && /* @__PURE__ */ jsxs7(Stack2, { gap: "field", children: [
2761
3104
  sender && !sentTo ? /* @__PURE__ */ jsxs7(Stack2, { gap: "2", align: "start", children: [
2762
3105
  /* @__PURE__ */ jsx15(Text, { children: t("sendTo", { to: sender.to }) }),
2763
3106
  /* @__PURE__ */ jsx15(Button, { onClick: () => void sendCode(), loading: sending, loadingText: t("sending"), "data-testid": "send-code", children: t("send") })
2764
- ] }) : /* @__PURE__ */ jsx15(Field, { label: recovery ? t("recoveryCode") : sender ? t("sentCode") : t("code"), helperText: sentTo ? t("sent", { to: sentTo }) : void 0, required: true, children: /* @__PURE__ */ jsx15(
2765
- Input,
2766
- {
2767
- value: code,
2768
- onChange: (e) => setCode(e.target.value),
2769
- autoFocus: true,
2770
- autoComplete: "one-time-code",
2771
- inputMode: recovery ? "text" : "numeric",
2772
- maxLength: recovery ? 16 : 7,
2773
- dir: "ltr",
2774
- textAlign: "start",
2775
- fontFamily: "mono",
2776
- letterSpacing: recovery ? void 0 : "0.2em",
2777
- width: recovery ? "48" : "32",
2778
- "data-testid": "second-factor-code"
2779
- },
2780
- method
2781
- ) }),
3107
+ ] }) : codeInput(recovery ? t("recoveryCode") : sender ? t("sentCode") : t("code"), sentTo ? t("sent", { to: sentTo }) : void 0),
2782
3108
  /* @__PURE__ */ jsxs7(Stack2, { gap: "0.5", align: "start", children: [
2783
3109
  sentTo && /* @__PURE__ */ jsx15(Button, { variant: "link", size: "sm", onClick: () => void sendCode(), disabled: sending, children: t("resend") }),
2784
3110
  ways.hasApp && method !== "app" && /* @__PURE__ */ jsx15(Button, { variant: "link", size: "sm", onClick: () => switchTo("app"), children: t("useApp") }),
@@ -2786,14 +3112,83 @@ function StepUpDialog() {
2786
3112
  ways.hasApp && !recovery && /* @__PURE__ */ jsx15(Button, { variant: "link", size: "sm", onClick: () => switchTo("recovery"), children: t("useRecovery") })
2787
3113
  ] })
2788
3114
  ] }),
3115
+ /* @__PURE__ */ jsx15(InlineAlert, { tone: "danger", children: error }),
3116
+ codeAlone && !ways && /* @__PURE__ */ jsx15(Button, { variant: "link", size: "sm", alignSelf: "start", onClick: () => toStage("code"), "data-testid": "use-app-code", children: t("useAppCode") })
3117
+ ] }) }),
3118
+ footer(settingUp ? t("continue") : t("confirm"), !password || !!ways && !looksLikeCode(code, recovery))
3119
+ ] });
3120
+ } else if (stage === "setup") {
3121
+ body = /* @__PURE__ */ jsxs7(Fragment2, { children: [
3122
+ /* @__PURE__ */ jsx15(Dialog2.Body, { children: /* @__PURE__ */ jsxs7(Stack2, { gap: "field", align: "start", children: [
3123
+ /* @__PURE__ */ jsx15(Text, { color: "fg.muted", children: t("setupWhy") }),
3124
+ canPasskey ? /* @__PURE__ */ jsx15(Button, { variant: "primary", onClick: () => {
3125
+ setPasskeyName(t("passkeyNameDefault"));
3126
+ setError(null);
3127
+ setStage("setupPasskey");
3128
+ }, "data-testid": "setup-passkey", children: t("setupPasskey") }) : /* @__PURE__ */ jsx15(Text, { textStyle: "sm", color: "fg.muted", children: t("passkeyUnsupported") }),
3129
+ /* @__PURE__ */ jsx15(Button, { variant: canPasskey ? "secondary" : "primary", onClick: () => void startApp(), "data-testid": "setup-app", children: t("setupApp") })
3130
+ ] }) }),
3131
+ footer(null)
3132
+ ] });
3133
+ } else if (stage === "setupPasskey") {
3134
+ body = /* @__PURE__ */ jsxs7("form", { onSubmit: (e) => void addPasskey(e), children: [
3135
+ /* @__PURE__ */ jsx15(Dialog2.Body, { children: /* @__PURE__ */ jsxs7(Stack2, { gap: "field", children: [
3136
+ /* @__PURE__ */ jsx15(Field, { label: t("passkeyName"), children: /* @__PURE__ */ jsx15(Input, { value: passkeyName, maxLength: 64, autoFocus: true, onChange: (e) => setPasskeyName(e.target.value), "data-testid": "passkey-name" }) }),
3137
+ busy && /* @__PURE__ */ jsx15(Text, { textStyle: "sm", color: "fg.muted", children: t("passkeyPrompt") }),
2789
3138
  /* @__PURE__ */ jsx15(InlineAlert, { tone: "danger", children: error })
2790
3139
  ] }) }),
3140
+ footer(t("passkeyCreate"), false, () => {
3141
+ setStage("setup");
3142
+ setError(null);
3143
+ })
3144
+ ] });
3145
+ } else if (stage === "setupApp") {
3146
+ body = /* @__PURE__ */ jsxs7("form", { onSubmit: (e) => void confirmApp(e), children: [
3147
+ /* @__PURE__ */ jsx15(Dialog2.Body, { children: /* @__PURE__ */ jsxs7(Stack2, { gap: "field", children: [
3148
+ /* @__PURE__ */ jsx15(Text, { color: "fg.muted", children: t("appScan") }),
3149
+ /* @__PURE__ */ jsx15(chakra5.div, { bg: "white", p: "2", rounded: "l2", borderWidth: "1px", w: "fit-content", children: enrolment ? /* @__PURE__ */ jsx15(chakra5.img, { src: enrolment.qr, alt: t("appQrAlt"), width: "44", height: "44", "data-testid": "app-setup-qr" }) : /* @__PURE__ */ jsx15(chakra5.div, { width: "44", height: "44" }) }),
3150
+ /* @__PURE__ */ jsxs7(Stack2, { gap: "1", children: [
3151
+ /* @__PURE__ */ jsx15(Text, { textStyle: "sm", color: "fg.muted", children: t("appCantScan") }),
3152
+ /* @__PURE__ */ jsx15(chakra5.code, { dir: "ltr", textAlign: "start", fontFamily: "mono", fontSize: "sm", bg: "bg.muted", p: "2", rounded: "l2", wordBreak: "break-all", "data-testid": "app-setup-secret", children: enrolment ? enrolment.secret.replace(/(.{4})/g, "$1 ").trim() : " " })
3153
+ ] }),
3154
+ codeInput(t("appCode")),
3155
+ /* @__PURE__ */ jsx15(InlineAlert, { tone: "danger", children: error })
3156
+ ] }) }),
3157
+ footer(t("appConfirm"), !enrolment || !looksLikeCode(code, false), () => {
3158
+ setStage("setup");
3159
+ setError(null);
3160
+ })
3161
+ ] });
3162
+ } else {
3163
+ body = /* @__PURE__ */ jsxs7(Fragment2, { children: [
3164
+ /* @__PURE__ */ jsx15(Dialog2.Body, { children: /* @__PURE__ */ jsxs7(Stack2, { gap: "field", "data-testid": "recovery-codes", children: [
3165
+ /* @__PURE__ */ jsx15(InlineAlert, { tone: "warning", children: t("recoveryHint") }),
3166
+ /* @__PURE__ */ jsx15(Grid, { templateColumns: "repeat(2, max-content)", columnGap: "6", rowGap: "1.5", dir: "ltr", bg: "bg.muted", p: "3", rounded: "l2", w: "fit-content", children: recoveryCodes.map((c2) => /* @__PURE__ */ jsx15(chakra5.code, { fontFamily: "mono", fontSize: "sm", children: c2 }, c2)) })
3167
+ ] }) }),
2791
3168
  /* @__PURE__ */ jsx15(Dialog2.Footer, { children: /* @__PURE__ */ jsxs7(HStack, { children: [
2792
- /* @__PURE__ */ jsx15(Button, { variant: "secondary", onClick: () => close(false), disabled: busy, children: t("cancel") }),
2793
- /* @__PURE__ */ jsx15(Button, { type: "submit", loading: busy, disabled: !password || !!ways && !looksLikeCode(code, recovery), children: t("confirm") })
3169
+ /* @__PURE__ */ jsx15(Button, { variant: "secondary", onClick: () => void copyCodes(), children: copied ? t("recoveryCopied") : t("recoveryCopy") }),
3170
+ /* @__PURE__ */ jsx15(Button, { onClick: () => close(true), "data-testid": "recovery-codes-saved", children: t("recoverySaved") })
2794
3171
  ] }) })
2795
- ] }) }) })
2796
- ] }) });
3172
+ ] });
3173
+ }
3174
+ return /* @__PURE__ */ jsx15(
3175
+ Dialog2.Root,
3176
+ {
3177
+ open,
3178
+ onOpenChange: (e) => !e.open && mayDismiss && close(false),
3179
+ closeOnInteractOutside: mayDismiss,
3180
+ closeOnEscape: mayDismiss,
3181
+ placement: "center",
3182
+ role: "alertdialog",
3183
+ children: /* @__PURE__ */ jsxs7(Portal4, { children: [
3184
+ /* @__PURE__ */ jsx15(Dialog2.Backdrop, {}),
3185
+ /* @__PURE__ */ jsx15(Dialog2.Positioner, { children: /* @__PURE__ */ jsxs7(Dialog2.Content, { "data-testid": "step-up", "data-stage": stage, children: [
3186
+ /* @__PURE__ */ jsx15(Dialog2.Header, { children: /* @__PURE__ */ jsx15(Dialog2.Title, { children: title }) }),
3187
+ body
3188
+ ] }) })
3189
+ ] })
3190
+ }
3191
+ );
2797
3192
  }
2798
3193
 
2799
3194
  // src/provider/link.tsx
@@ -2980,7 +3375,7 @@ function useFormatters() {
2980
3375
  // src/motion/components.tsx
2981
3376
  import { Children, cloneElement, isValidElement, useEffect as useEffect6, useLayoutEffect as useLayoutEffect2, useRef as useRef8 } from "react";
2982
3377
  import { AnimatePresence as AnimatePresence2, m as m2 } from "motion/react";
2983
- import { chakra as chakra5 } from "@chakra-ui/react";
3378
+ import { chakra as chakra6 } from "@chakra-ui/react";
2984
3379
 
2985
3380
  // src/motion/flip-math.ts
2986
3381
  function flipTransform(prev, next, scale) {
@@ -3100,10 +3495,10 @@ function useSlideItems(container, token, options = {}) {
3100
3495
  }
3101
3496
 
3102
3497
  // src/motion/components.tsx
3103
- import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
3104
- var MotionDiv = chakra5(m2.div, {}, { forwardProps: ["transition"] });
3105
- var MotionSpan2 = chakra5(m2.span, {}, { forwardProps: ["transition"] });
3106
- var MotionLi = chakra5(m2.li, {}, { forwardProps: ["transition"] });
3498
+ import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
3499
+ var MotionDiv = chakra6(m2.div, {}, { forwardProps: ["transition"] });
3500
+ var MotionSpan2 = chakra6(m2.span, {}, { forwardProps: ["transition"] });
3501
+ var MotionLi = chakra6(m2.li, {}, { forwardProps: ["transition"] });
3107
3502
  var OUT = `cubic-bezier(${curves.out.join(", ")})`;
3108
3503
  var easeOut = cubicBezier(...curves.out);
3109
3504
  var SETTLED = { ...SHOWN, transitionEnd: { transform: "none" } };
@@ -3118,7 +3513,7 @@ function FadeIn({ from = "fade", delay = 0, children, ...rest }) {
3118
3513
  }
3119
3514
  function Reveal({ from = "rise", itemAs = "div", children, ...rest }) {
3120
3515
  let index = 0;
3121
- return /* @__PURE__ */ jsx19(chakra5.div, { ...rest, children: Children.map(
3516
+ return /* @__PURE__ */ jsx19(chakra6.div, { ...rest, children: Children.map(
3122
3517
  children,
3123
3518
  (child) => isValidElement(child) || child != null && child !== false ? /* @__PURE__ */ jsx19(RevealItem, { as: itemAs, index: index++, from, children: child }) : null
3124
3519
  ) });
@@ -3149,8 +3544,8 @@ function PresenceList({ children }) {
3149
3544
  parent.current = marker.current?.parentElement ?? null;
3150
3545
  });
3151
3546
  useSlideItems(parent, keys);
3152
- return /* @__PURE__ */ jsxs10(Fragment2, { children: [
3153
- /* @__PURE__ */ jsx19(chakra5.span, { ref: marker, display: "none", "aria-hidden": "true" }),
3547
+ return /* @__PURE__ */ jsxs10(Fragment3, { children: [
3548
+ /* @__PURE__ */ jsx19(chakra6.span, { ref: marker, display: "none", "aria-hidden": "true" }),
3154
3549
  /* @__PURE__ */ jsx19(AnimatePresence2, { initial: false, mode: "popLayout", children: Children.map(
3155
3550
  children,
3156
3551
  (child) => isValidElement(child) ? cloneElement(child, { "data-slide": String(child.key) }) : child
@@ -3175,10 +3570,10 @@ function PresenceItem({ from = "rise", as = "div", children, ...rest }) {
3175
3570
  function SlideList({ token, children, ...rest }) {
3176
3571
  const ref = useRef8(null);
3177
3572
  useSlideItems(ref, token);
3178
- return /* @__PURE__ */ jsx19(chakra5.div, { ref, ...rest, children });
3573
+ return /* @__PURE__ */ jsx19(chakra6.div, { ref, ...rest, children });
3179
3574
  }
3180
3575
  function SlideItem({ slideId, children, ...rest }) {
3181
- return /* @__PURE__ */ jsx19(chakra5.div, { "data-slide": slideId, ...rest, children });
3576
+ return /* @__PURE__ */ jsx19(chakra6.div, { "data-slide": slideId, ...rest, children });
3182
3577
  }
3183
3578
  function Collapse({ open, children, ...rest }) {
3184
3579
  return /* @__PURE__ */ jsx19(AnimatePresence2, { initial: false, children: open && /* @__PURE__ */ jsx19(
@@ -3239,7 +3634,7 @@ function Counter({ value, format, fromZero = true, ...rest }) {
3239
3634
  frame = requestAnimationFrame(step);
3240
3635
  return () => cancelAnimationFrame(frame);
3241
3636
  }, [value, reduce, locale]);
3242
- return /* @__PURE__ */ jsx19(chakra5.span, { ref, fontVariantNumeric: "tabular-nums", ...rest, children: write(reduce || !fromZero ? value : shown.current) });
3637
+ return /* @__PURE__ */ jsx19(chakra6.span, { ref, fontVariantNumeric: "tabular-nums", ...rest, children: write(reduce || !fromZero ? value : shown.current) });
3243
3638
  }
3244
3639
  var lastMarks = /* @__PURE__ */ new Map();
3245
3640
  function Indicator({ group, css }) {
@@ -3254,11 +3649,11 @@ function Indicator({ group, css }) {
3254
3649
  if (before && !reduce) slide(element, before, now, { scale: true });
3255
3650
  lastMarks.set(group, now);
3256
3651
  });
3257
- return /* @__PURE__ */ jsx19(chakra5.span, { ref, "aria-hidden": "true", css });
3652
+ return /* @__PURE__ */ jsx19(chakra6.span, { ref, "aria-hidden": "true", css });
3258
3653
  }
3259
3654
  function Pressable({ lift = false, css, ...rest }) {
3260
3655
  return /* @__PURE__ */ jsx19(
3261
- chakra5.div,
3656
+ chakra6.div,
3262
3657
  {
3263
3658
  css: {
3264
3659
  transitionProperty: "transform, box-shadow",
@@ -3284,7 +3679,7 @@ function ArriveOnChange({ token, children, ...rest }) {
3284
3679
  }
3285
3680
  ref.current?.animate?.([{ opacity: 0.55 }, { opacity: 1 }], { duration: durations2.quick * 1e3, easing: OUT });
3286
3681
  }, [token]);
3287
- return /* @__PURE__ */ jsx19(chakra5.div, { ref, ...rest, children });
3682
+ return /* @__PURE__ */ jsx19(chakra6.div, { ref, ...rest, children });
3288
3683
  }
3289
3684
  function Nudge({ on, children }) {
3290
3685
  const { reduce } = useMotionSetting();
@@ -3299,17 +3694,17 @@ function Nudge({ on, children }) {
3299
3694
  { duration: durations2.burst * 1e3, easing: OUT }
3300
3695
  );
3301
3696
  }, [on, reduce]);
3302
- return /* @__PURE__ */ jsx19(chakra5.span, { ref, display: "inline-flex", transformOrigin: "top center", children });
3697
+ return /* @__PURE__ */ jsx19(chakra6.span, { ref, display: "inline-flex", transformOrigin: "top center", children });
3303
3698
  }
3304
3699
 
3305
3700
  // src/components/AppShell.tsx
3306
- import { Fragment as Fragment3, useCallback as useCallback8, useState as useState8 } from "react";
3307
- import { chakra as chakra7, Drawer, Portal as Portal6, SkipNavContent, SkipNavLink, useSlotRecipe } from "@chakra-ui/react";
3701
+ import { Fragment as Fragment4, useCallback as useCallback8, useState as useState8 } from "react";
3702
+ import { chakra as chakra8, Drawer, Portal as Portal6, SkipNavContent, SkipNavLink, useSlotRecipe } from "@chakra-ui/react";
3308
3703
  import { ChevronDown, Menu as MenuIcon, PanelLeftClose, PanelLeftOpen, X } from "lucide-react";
3309
3704
 
3310
3705
  // src/components/DirectionalIcon.tsx
3311
- import { chakra as chakra6 } from "@chakra-ui/react";
3312
- var DirectionalIcon = chakra6("span", {
3706
+ import { chakra as chakra7 } from "@chakra-ui/react";
3707
+ var DirectionalIcon = chakra7("span", {
3313
3708
  base: {
3314
3709
  display: "inline-flex",
3315
3710
  alignItems: "center",
@@ -3331,7 +3726,7 @@ var Tooltip = forwardRef4(function Tooltip2({ content, children, disabled, inact
3331
3726
  });
3332
3727
 
3333
3728
  // src/components/AppShell.tsx
3334
- import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
3729
+ import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
3335
3730
  var MAIN_ID = "abp-main";
3336
3731
  function AppShell({
3337
3732
  brand,
@@ -3363,39 +3758,39 @@ function AppShell({
3363
3758
  onCollapsedChange?.(next);
3364
3759
  }, [collapsed, onCollapsedChange]);
3365
3760
  const mark2 = brand.mark ?? (typeof brand.name === "string" ? brand.name.slice(0, 1) : null);
3366
- const brandInner = /* @__PURE__ */ jsxs12(Fragment4, { children: [
3367
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.brandMark, "aria-hidden": "true", children: mark2 }),
3368
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.brandText, children: /* @__PURE__ */ jsx21(chakra7.span, { css: styles.brandName, children: brand.name }) })
3761
+ const brandInner = /* @__PURE__ */ jsxs12(Fragment5, { children: [
3762
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.brandMark, "aria-hidden": "true", children: mark2 }),
3763
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.brandText, children: /* @__PURE__ */ jsx21(chakra8.span, { css: styles.brandName, children: brand.name }) })
3369
3764
  ] });
3370
- return /* @__PURE__ */ jsxs12(chakra7.div, { css: styles.root, children: [
3765
+ return /* @__PURE__ */ jsxs12(chakra8.div, { css: styles.root, children: [
3371
3766
  /* @__PURE__ */ jsx21(SkipNavLink, { id: MAIN_ID, children: labels.skipToContent }),
3372
- /* @__PURE__ */ jsxs12(chakra7.header, { css: styles.topbar, children: [
3373
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.mobileToggle, children: /* @__PURE__ */ jsx21(IconButton, { size: "sm", "aria-label": labels.openNavigation, onClick: () => setMobileOpen(true), children: /* @__PURE__ */ jsx21(MenuIcon, {}) }) }),
3374
- brand.href ? /* @__PURE__ */ jsx21(chakra7.span, { asChild: true, css: styles.brand, children: /* @__PURE__ */ jsx21(Link, { href: brand.href, children: brandInner }) }) : /* @__PURE__ */ jsx21(chakra7.span, { css: styles.brand, children: brandInner }),
3375
- topbarStart != null && /* @__PURE__ */ jsx21(chakra7.div, { css: styles.topbarStart, children: topbarStart }),
3376
- /* @__PURE__ */ jsxs12(chakra7.nav, { css: styles.topNav, "aria-label": labels.navigation, children: [
3767
+ /* @__PURE__ */ jsxs12(chakra8.header, { css: styles.topbar, children: [
3768
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.mobileToggle, children: /* @__PURE__ */ jsx21(IconButton, { size: "sm", "aria-label": labels.openNavigation, onClick: () => setMobileOpen(true), children: /* @__PURE__ */ jsx21(MenuIcon, {}) }) }),
3769
+ brand.href ? /* @__PURE__ */ jsx21(chakra8.span, { asChild: true, css: styles.brand, children: /* @__PURE__ */ jsx21(Link, { href: brand.href, children: brandInner }) }) : /* @__PURE__ */ jsx21(chakra8.span, { css: styles.brand, children: brandInner }),
3770
+ topbarStart != null && /* @__PURE__ */ jsx21(chakra8.div, { css: styles.topbarStart, children: topbarStart }),
3771
+ /* @__PURE__ */ jsxs12(chakra8.nav, { css: styles.topNav, "aria-label": labels.navigation, children: [
3377
3772
  topNav.map((item) => /* @__PURE__ */ jsx21(TopNavItem, { item, styles }, item.id)),
3378
3773
  topNavEnd
3379
3774
  ] }),
3380
- /* @__PURE__ */ jsx21(chakra7.div, { css: styles.topbarEnd, children: topbarEnd })
3775
+ /* @__PURE__ */ jsx21(chakra8.div, { css: styles.topbarEnd, children: topbarEnd })
3381
3776
  ] }),
3382
- /* @__PURE__ */ jsxs12(chakra7.div, { css: styles.body, children: [
3383
- hasSidebar && /* @__PURE__ */ jsxs12(chakra7.aside, { css: styles.sidebar, "aria-label": sidebar.place?.name ?? labels.navigation, "data-collapsed": collapsed || void 0, children: [
3777
+ /* @__PURE__ */ jsxs12(chakra8.div, { css: styles.body, children: [
3778
+ hasSidebar && /* @__PURE__ */ jsxs12(chakra8.aside, { css: styles.sidebar, "aria-label": sidebar.place?.name ?? labels.navigation, "data-collapsed": collapsed || void 0, children: [
3384
3779
  /* @__PURE__ */ jsx21(FadeIn, { from: "start", display: "flex", flexDirection: "column", minH: "0", flex: "1", children: /* @__PURE__ */ jsx21(SidebarContents, { styles, sidebar, navFooter, collapsed }) }, sidebar.id),
3385
- /* @__PURE__ */ jsxs12(chakra7.div, { css: styles.sidebarFooter, children: [
3780
+ /* @__PURE__ */ jsxs12(chakra8.div, { css: styles.sidebarFooter, children: [
3386
3781
  /* @__PURE__ */ jsx21(IconButton, { size: "sm", "aria-label": collapsed ? labels.expandSidebar : labels.collapseSidebar, "aria-expanded": !collapsed, onClick: toggle, children: /* @__PURE__ */ jsx21(Swap, { swapKey: collapsed ? "open" : "close", from: "fade", children: /* @__PURE__ */ jsx21(DirectionalIcon, { children: collapsed ? /* @__PURE__ */ jsx21(PanelLeftOpen, {}) : /* @__PURE__ */ jsx21(PanelLeftClose, {}) }) }) }),
3387
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.sidebarFooterText, "aria-hidden": collapsed || void 0, children: sidebarFooter })
3782
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.sidebarFooterText, "aria-hidden": collapsed || void 0, children: sidebarFooter })
3388
3783
  ] })
3389
3784
  ] }),
3390
- /* @__PURE__ */ jsxs12(chakra7.div, { css: styles.main, children: [
3785
+ /* @__PURE__ */ jsxs12(chakra8.div, { css: styles.main, children: [
3391
3786
  /* @__PURE__ */ jsx21(SkipNavContent, { id: MAIN_ID }),
3392
- /* @__PURE__ */ jsx21(chakra7.main, { css: styles.content, children: /* @__PURE__ */ jsx21(ArriveOnChange, { token: pageKey ?? "", css: styles.contentInner, children }) })
3787
+ /* @__PURE__ */ jsx21(chakra8.main, { css: styles.content, children: /* @__PURE__ */ jsx21(ArriveOnChange, { token: pageKey ?? "", css: styles.contentInner, children }) })
3393
3788
  ] })
3394
3789
  ] }),
3395
3790
  /* @__PURE__ */ jsx21(Drawer.Root, { open: mobileOpen, onOpenChange: (e) => setMobileOpen(e.open), placement: "start", size: "xs", children: /* @__PURE__ */ jsxs12(Portal6, { children: [
3396
3791
  /* @__PURE__ */ jsx21(Drawer.Backdrop, {}),
3397
3792
  /* @__PURE__ */ jsx21(Drawer.Positioner, { children: /* @__PURE__ */ jsx21(Drawer.Content, { "aria-label": labels.navigation, children: /* @__PURE__ */ jsxs12(
3398
- chakra7.div,
3793
+ chakra8.div,
3399
3794
  {
3400
3795
  css: mobileStyles.sidebar,
3401
3796
  "data-mobile": "",
@@ -3403,8 +3798,8 @@ function AppShell({
3403
3798
  if (e.target.closest("a")) setMobileOpen(false);
3404
3799
  },
3405
3800
  children: [
3406
- /* @__PURE__ */ jsxs12(chakra7.div, { css: mobileStyles.drawerHeader, children: [
3407
- /* @__PURE__ */ jsx21(chakra7.span, { css: mobileStyles.brand, children: brandInner }),
3801
+ /* @__PURE__ */ jsxs12(chakra8.div, { css: mobileStyles.drawerHeader, children: [
3802
+ /* @__PURE__ */ jsx21(chakra8.span, { css: mobileStyles.brand, children: brandInner }),
3408
3803
  /* @__PURE__ */ jsx21(Drawer.CloseTrigger, { asChild: true, position: "static", children: /* @__PURE__ */ jsx21(IconButton, { size: "sm", "aria-label": labels.close, children: /* @__PURE__ */ jsx21(X, {}) }) })
3409
3804
  ] }),
3410
3805
  /* @__PURE__ */ jsx21(
@@ -3432,9 +3827,9 @@ function AppShell({
3432
3827
  }
3433
3828
  function TopNavItem({ item, styles }) {
3434
3829
  const Link = useLinkComponent();
3435
- return /* @__PURE__ */ jsx21(chakra7.a, { asChild: true, css: styles.topNavItem, children: /* @__PURE__ */ jsxs12(Link, { href: item.href, "aria-current": item.current ? "page" : void 0, children: [
3830
+ return /* @__PURE__ */ jsx21(chakra8.a, { asChild: true, css: styles.topNavItem, children: /* @__PURE__ */ jsxs12(Link, { href: item.href, "aria-current": item.current ? "page" : void 0, children: [
3436
3831
  item.current && /* @__PURE__ */ jsx21(Indicator, { group: "abp-top-nav", css: styles.topNavIndicator }),
3437
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.topNavLabel, children: item.label })
3832
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.topNavLabel, children: item.label })
3438
3833
  ] }) });
3439
3834
  }
3440
3835
  function SidebarContents({
@@ -3450,39 +3845,39 @@ function SidebarContents({
3450
3845
  const loading = !!sidebar.loading;
3451
3846
  const arrive = useArriving(loading) ? arriveCss : void 0;
3452
3847
  const placeMark = place ? place.mark ?? place.name.slice(0, 1).toUpperCase() : null;
3453
- const placeInner = place && /* @__PURE__ */ jsxs12(Fragment4, { children: [
3454
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.placeMark, "aria-hidden": "true", children: placeMark }),
3455
- /* @__PURE__ */ jsxs12(chakra7.span, { css: styles.placeText, children: [
3456
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.placeName, children: place.name }),
3457
- place.detail != null && /* @__PURE__ */ jsx21(chakra7.span, { css: styles.placeDetail, children: place.detail })
3848
+ const placeInner = place && /* @__PURE__ */ jsxs12(Fragment5, { children: [
3849
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.placeMark, "aria-hidden": "true", children: placeMark }),
3850
+ /* @__PURE__ */ jsxs12(chakra8.span, { css: styles.placeText, children: [
3851
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.placeName, children: place.name }),
3852
+ place.detail != null && /* @__PURE__ */ jsx21(chakra8.span, { css: styles.placeDetail, children: place.detail })
3458
3853
  ] })
3459
3854
  ] });
3460
3855
  const headerCss = placeAfter === void 0 ? styles.placeHeader : { ...styles.placeHeader, px: "0" };
3461
- const placeBlock = /* @__PURE__ */ jsxs12(Fragment4, { children: [
3462
- place ? /* @__PURE__ */ jsx21(chakra7.div, { css: [headerCss, arrive], children: place.href ? /* @__PURE__ */ jsx21(chakra7.span, { asChild: true, css: styles.place, children: /* @__PURE__ */ jsx21(Link, { href: place.href, children: placeInner }) }) : /* @__PURE__ */ jsx21(chakra7.span, { css: styles.place, children: placeInner }) }) : loading && // The place's card, its name and key coming: the same elements, so it's as tall as the real one.
3463
- /* @__PURE__ */ jsx21(chakra7.div, { css: headerCss, "aria-hidden": "true", children: /* @__PURE__ */ jsxs12(chakra7.span, { css: styles.place, pointerEvents: "none", children: [
3464
- /* @__PURE__ */ jsx21(chakra7.span, { css: [styles.placeMark, ghostCss], children: "\xA0" }),
3465
- /* @__PURE__ */ jsxs12(chakra7.span, { css: styles.placeText, children: [
3466
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.placeName, children: /* @__PURE__ */ jsx21(TextBone, { width: 14 }) }),
3467
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.placeDetail, children: /* @__PURE__ */ jsx21(TextBone, { width: 4 }) })
3856
+ const placeBlock = /* @__PURE__ */ jsxs12(Fragment5, { children: [
3857
+ place ? /* @__PURE__ */ jsx21(chakra8.div, { css: [headerCss, arrive], children: place.href ? /* @__PURE__ */ jsx21(chakra8.span, { asChild: true, css: styles.place, children: /* @__PURE__ */ jsx21(Link, { href: place.href, children: placeInner }) }) : /* @__PURE__ */ jsx21(chakra8.span, { css: styles.place, children: placeInner }) }) : loading && // The place's card, its name and key coming: the same elements, so it's as tall as the real one.
3858
+ /* @__PURE__ */ jsx21(chakra8.div, { css: headerCss, "aria-hidden": "true", children: /* @__PURE__ */ jsxs12(chakra8.span, { css: styles.place, pointerEvents: "none", children: [
3859
+ /* @__PURE__ */ jsx21(chakra8.span, { css: [styles.placeMark, ghostCss], children: "\xA0" }),
3860
+ /* @__PURE__ */ jsxs12(chakra8.span, { css: styles.placeText, children: [
3861
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.placeName, children: /* @__PURE__ */ jsx21(TextBone, { width: 14 }) }),
3862
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.placeDetail, children: /* @__PURE__ */ jsx21(TextBone, { width: 4 }) })
3468
3863
  ] })
3469
3864
  ] }) }),
3470
3865
  sidebar.top != null && // Folded away in the rail (and out of reach of the keyboard there).
3471
- /* @__PURE__ */ jsx21(chakra7.div, { css: styles.fold, inert: collapsed || void 0, children: /* @__PURE__ */ jsx21(chakra7.div, { css: styles.foldInner, children: /* @__PURE__ */ jsx21(chakra7.div, { css: styles.sidebarTop, children: sidebar.top }) }) })
3866
+ /* @__PURE__ */ jsx21(chakra8.div, { css: styles.fold, inert: collapsed || void 0, children: /* @__PURE__ */ jsx21(chakra8.div, { css: styles.foldInner, children: /* @__PURE__ */ jsx21(chakra8.div, { css: styles.sidebarTop, children: sidebar.top }) }) })
3472
3867
  ] });
3473
- return /* @__PURE__ */ jsxs12(Fragment4, { children: [
3868
+ return /* @__PURE__ */ jsxs12(Fragment5, { children: [
3474
3869
  placeAfter === void 0 && placeBlock,
3475
- /* @__PURE__ */ jsxs12(chakra7.nav, { css: [styles.nav, arrive], "aria-label": place?.name ?? labels.navigation, children: [
3476
- sidebar.sections.filter((section) => section.items.length > 0).map((section) => /* @__PURE__ */ jsxs12(Fragment3, { children: [
3870
+ /* @__PURE__ */ jsxs12(chakra8.nav, { css: [styles.nav, arrive], "aria-label": place?.name ?? labels.navigation, children: [
3871
+ sidebar.sections.filter((section) => section.items.length > 0).map((section) => /* @__PURE__ */ jsxs12(Fragment4, { children: [
3477
3872
  /* @__PURE__ */ jsx21(NavSection, { section, styles, collapsed, group: sidebar.id }),
3478
3873
  section.id === placeAfter && placeBlock
3479
3874
  ] }, section.id)),
3480
3875
  loading && // The place's pages, coming: rows of the nav's own items, the same in the rail and out of it (ADR 0061).
3481
- /* @__PURE__ */ jsx21(Loading, { when: true, children: /* @__PURE__ */ jsx21(chakra7.div, { css: styles.navSection, "aria-hidden": "true", children: /* @__PURE__ */ jsx21(chakra7.div, { css: styles.navSectionItems, children: Array.from({ length: sidebar.skeletonItems ?? 5 }, (_, n) => /* @__PURE__ */ jsxs12(chakra7.span, { css: styles.navItem, pointerEvents: "none", children: [
3482
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.navItemIcon, children: /* @__PURE__ */ jsx21(Bone, { width: "4", height: "4" }) }),
3483
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.navItemLabel, children: /* @__PURE__ */ jsx21(TextBone, { width: boneWidth(n, 6, 12) }) })
3876
+ /* @__PURE__ */ jsx21(Loading, { when: true, children: /* @__PURE__ */ jsx21(chakra8.div, { css: styles.navSection, "aria-hidden": "true", children: /* @__PURE__ */ jsx21(chakra8.div, { css: styles.navSectionItems, children: Array.from({ length: sidebar.skeletonItems ?? 5 }, (_, n) => /* @__PURE__ */ jsxs12(chakra8.span, { css: styles.navItem, pointerEvents: "none", children: [
3877
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.navItemIcon, children: /* @__PURE__ */ jsx21(Bone, { width: "4", height: "4" }) }),
3878
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.navItemLabel, children: /* @__PURE__ */ jsx21(TextBone, { width: boneWidth(n, 6, 12) }) })
3484
3879
  ] }, n)) }) }) }),
3485
- navFooter != null && /* @__PURE__ */ jsx21(chakra7.div, { css: styles.fold, inert: collapsed || void 0, children: /* @__PURE__ */ jsx21(chakra7.div, { css: styles.foldInner, children: navFooter }) })
3880
+ navFooter != null && /* @__PURE__ */ jsx21(chakra8.div, { css: styles.fold, inert: collapsed || void 0, children: /* @__PURE__ */ jsx21(chakra8.div, { css: styles.foldInner, children: navFooter }) })
3486
3881
  ] })
3487
3882
  ] });
3488
3883
  }
@@ -3491,32 +3886,32 @@ function NavSection({ section, styles, collapsed, group }) {
3491
3886
  const [open, setOpen] = useState8(holdsCurrent || !section.collapsible);
3492
3887
  const shown = !section.collapsible || collapsed || open || holdsCurrent;
3493
3888
  const items = section.items.map((item) => /* @__PURE__ */ jsx21(NavItem, { item, styles, collapsed, group }, item.id));
3494
- return /* @__PURE__ */ jsxs12(chakra7.div, { css: styles.navSection, role: "group", "aria-label": section.title, children: [
3495
- section.title && /* @__PURE__ */ jsx21(chakra7.div, { css: styles.fold, inert: collapsed || void 0, children: /* @__PURE__ */ jsx21(chakra7.div, { css: styles.foldInner, children: section.collapsible ? /* @__PURE__ */ jsxs12(chakra7.button, { type: "button", css: styles.navSectionToggle, "aria-expanded": shown, onClick: () => setOpen(!shown), children: [
3496
- /* @__PURE__ */ jsx21(chakra7.span, { children: section.title }),
3497
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.navSectionChevron, "data-open": shown || void 0, "aria-hidden": "true", children: /* @__PURE__ */ jsx21(ChevronDown, {}) })
3498
- ] }) : /* @__PURE__ */ jsx21(chakra7.div, { css: styles.navSectionTitle, "aria-hidden": "true", children: section.title }) }) }),
3499
- section.collapsible ? /* @__PURE__ */ jsx21(Collapse, { open: shown, children: /* @__PURE__ */ jsx21(chakra7.div, { css: styles.navSectionItems, children: items }) }) : /* @__PURE__ */ jsx21(chakra7.div, { css: styles.navSectionItems, children: items })
3889
+ return /* @__PURE__ */ jsxs12(chakra8.div, { css: styles.navSection, role: "group", "aria-label": section.title, children: [
3890
+ section.title && /* @__PURE__ */ jsx21(chakra8.div, { css: styles.fold, inert: collapsed || void 0, children: /* @__PURE__ */ jsx21(chakra8.div, { css: styles.foldInner, children: section.collapsible ? /* @__PURE__ */ jsxs12(chakra8.button, { type: "button", css: styles.navSectionToggle, "aria-expanded": shown, onClick: () => setOpen(!shown), children: [
3891
+ /* @__PURE__ */ jsx21(chakra8.span, { children: section.title }),
3892
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.navSectionChevron, "data-open": shown || void 0, "aria-hidden": "true", children: /* @__PURE__ */ jsx21(ChevronDown, {}) })
3893
+ ] }) : /* @__PURE__ */ jsx21(chakra8.div, { css: styles.navSectionTitle, "aria-hidden": "true", children: section.title }) }) }),
3894
+ section.collapsible ? /* @__PURE__ */ jsx21(Collapse, { open: shown, children: /* @__PURE__ */ jsx21(chakra8.div, { css: styles.navSectionItems, children: items }) }) : /* @__PURE__ */ jsx21(chakra8.div, { css: styles.navSectionItems, children: items })
3500
3895
  ] });
3501
3896
  }
3502
3897
  function NavItem({ item, styles, collapsed, group, nested }) {
3503
3898
  const Link = useLinkComponent();
3504
3899
  const { isRtl } = useAbpLocale();
3505
- const link = /* @__PURE__ */ jsx21(chakra7.a, { asChild: true, css: styles.navItem, children: /* @__PURE__ */ jsxs12(Link, { href: item.href, "aria-current": item.current ? "page" : void 0, "data-nested": nested || void 0, children: [
3900
+ const link = /* @__PURE__ */ jsx21(chakra8.a, { asChild: true, css: styles.navItem, children: /* @__PURE__ */ jsxs12(Link, { href: item.href, "aria-current": item.current ? "page" : void 0, "data-nested": nested || void 0, children: [
3506
3901
  item.current && /* @__PURE__ */ jsx21(Indicator, { group: `abp-side-${group}`, css: styles.navItemIndicator }),
3507
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.navItemIcon, "aria-hidden": "true", children: item.icon ?? /* @__PURE__ */ jsx21(chakra7.span, { textStyle: "label", children: item.label.slice(0, 1) }) }),
3508
- /* @__PURE__ */ jsx21(chakra7.span, { css: styles.navItemLabel, children: item.label })
3902
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.navItemIcon, "aria-hidden": "true", children: item.icon ?? /* @__PURE__ */ jsx21(chakra8.span, { textStyle: "label", children: item.label.slice(0, 1) }) }),
3903
+ /* @__PURE__ */ jsx21(chakra8.span, { css: styles.navItemLabel, children: item.label })
3509
3904
  ] }) });
3510
3905
  const own = /* @__PURE__ */ jsx21(Tooltip, { content: item.label, inactive: !collapsed, positioning: { placement: isRtl ? "left" : "right" }, children: link });
3511
3906
  if (!item.children?.length) return own;
3512
- return /* @__PURE__ */ jsxs12(Fragment4, { children: [
3907
+ return /* @__PURE__ */ jsxs12(Fragment5, { children: [
3513
3908
  own,
3514
- /* @__PURE__ */ jsx21(chakra7.div, { css: styles.fold, inert: collapsed || void 0, children: /* @__PURE__ */ jsx21(chakra7.div, { css: styles.foldInner, children: /* @__PURE__ */ jsx21(chakra7.div, { css: styles.navChildren, role: "group", "aria-label": item.label, children: item.children.map((child) => /* @__PURE__ */ jsx21(NavItem, { item: child, styles, collapsed, group, nested: true }, child.id)) }) }) })
3909
+ /* @__PURE__ */ jsx21(chakra8.div, { css: styles.fold, inert: collapsed || void 0, children: /* @__PURE__ */ jsx21(chakra8.div, { css: styles.foldInner, children: /* @__PURE__ */ jsx21(chakra8.div, { css: styles.navChildren, role: "group", "aria-label": item.label, children: item.children.map((child) => /* @__PURE__ */ jsx21(NavItem, { item: child, styles, collapsed, group, nested: true }, child.id)) }) }) })
3515
3910
  ] });
3516
3911
  }
3517
3912
 
3518
3913
  // src/components/Pagination.tsx
3519
- import { chakra as chakra8, HStack as HStack2 } from "@chakra-ui/react";
3914
+ import { chakra as chakra9, HStack as HStack2 } from "@chakra-ui/react";
3520
3915
  import { ChevronLeft, ChevronRight } from "lucide-react";
3521
3916
 
3522
3917
  // src/components/pageList.ts
@@ -3558,13 +3953,13 @@ var button = {
3558
3953
  function Pagination({ page, pages, onPage, label, previous, next, pageLabel, disabled }) {
3559
3954
  if (pages <= 1) return null;
3560
3955
  const go = (n) => onPage(Math.min(pages, Math.max(1, n)));
3561
- return /* @__PURE__ */ jsx22(chakra8.nav, { "aria-label": label, children: /* @__PURE__ */ jsxs13(HStack2, { gap: "1", justify: "center", wrap: "wrap", children: [
3562
- /* @__PURE__ */ jsx22(chakra8.button, { type: "button", css: button, "aria-label": previous, title: previous, disabled: disabled || page <= 1, onClick: () => go(page - 1), children: /* @__PURE__ */ jsx22(DirectionalIcon, { children: /* @__PURE__ */ jsx22(ChevronLeft, {}) }) }),
3956
+ return /* @__PURE__ */ jsx22(chakra9.nav, { "aria-label": label, children: /* @__PURE__ */ jsxs13(HStack2, { gap: "1", justify: "center", wrap: "wrap", children: [
3957
+ /* @__PURE__ */ jsx22(chakra9.button, { type: "button", css: button, "aria-label": previous, title: previous, disabled: disabled || page <= 1, onClick: () => go(page - 1), children: /* @__PURE__ */ jsx22(DirectionalIcon, { children: /* @__PURE__ */ jsx22(ChevronLeft, {}) }) }),
3563
3958
  pageList(page, pages).map(
3564
- (n, i) => n === "gap" ? /* @__PURE__ */ jsx22(chakra8.span, { minW: "5", textAlign: "center", color: "fg.muted", "aria-hidden": "true", children: "\u2026" }, `gap-${i}`) : (
3959
+ (n, i) => n === "gap" ? /* @__PURE__ */ jsx22(chakra9.span, { minW: "5", textAlign: "center", color: "fg.muted", "aria-hidden": "true", children: "\u2026" }, `gap-${i}`) : (
3565
3960
  // Page buttons stay enabled while a page loads (a second click just asks again); the arrows wait.
3566
3961
  /* @__PURE__ */ jsx22(
3567
- chakra8.button,
3962
+ chakra9.button,
3568
3963
  {
3569
3964
  type: "button",
3570
3965
  css: button,
@@ -3577,29 +3972,29 @@ function Pagination({ page, pages, onPage, label, previous, next, pageLabel, dis
3577
3972
  )
3578
3973
  )
3579
3974
  ),
3580
- /* @__PURE__ */ jsx22(chakra8.button, { type: "button", css: button, "aria-label": next, title: next, disabled: disabled || page >= pages, onClick: () => go(page + 1), children: /* @__PURE__ */ jsx22(DirectionalIcon, { children: /* @__PURE__ */ jsx22(ChevronRight, {}) }) })
3975
+ /* @__PURE__ */ jsx22(chakra9.button, { type: "button", css: button, "aria-label": next, title: next, disabled: disabled || page >= pages, onClick: () => go(page + 1), children: /* @__PURE__ */ jsx22(DirectionalIcon, { children: /* @__PURE__ */ jsx22(ChevronRight, {}) }) })
3581
3976
  ] }) });
3582
3977
  }
3583
3978
 
3584
3979
  // src/components/CommandPalette.tsx
3585
- import { Fragment as Fragment5, useEffect as useEffect7, useId, useMemo as useMemo5, useRef as useRef9, useState as useState9 } from "react";
3586
- import { chakra as chakra9, Dialog as Dialog3, HStack as HStack3, Portal as Portal7, Spinner as Spinner2, Stack as Stack3, Text as Text2 } from "@chakra-ui/react";
3980
+ import { Fragment as Fragment6, useEffect as useEffect7, useId, useMemo as useMemo5, useRef as useRef9, useState as useState9 } from "react";
3981
+ import { chakra as chakra10, Dialog as Dialog3, HStack as HStack3, Portal as Portal7, Spinner as Spinner2, Stack as Stack3, Text as Text2 } from "@chakra-ui/react";
3587
3982
  import { CornerDownLeft, Search } from "lucide-react";
3588
- import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
3983
+ import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
3589
3984
  function HighlightText({ text, query }) {
3590
3985
  const q = query.trim().toLowerCase();
3591
- if (!q) return /* @__PURE__ */ jsx23(Fragment6, { children: text });
3986
+ if (!q) return /* @__PURE__ */ jsx23(Fragment7, { children: text });
3592
3987
  const lower = text.toLowerCase();
3593
3988
  const parts = [];
3594
3989
  let at = 0;
3595
3990
  for (let i = lower.indexOf(q); i >= 0; i = lower.indexOf(q, at)) {
3596
3991
  if (i > at) parts.push(text.slice(at, i));
3597
- parts.push(/* @__PURE__ */ jsx23(chakra9.strong, { fontWeight: "bold", children: text.slice(i, i + q.length) }, i));
3992
+ parts.push(/* @__PURE__ */ jsx23(chakra10.strong, { fontWeight: "bold", children: text.slice(i, i + q.length) }, i));
3598
3993
  at = i + q.length;
3599
3994
  }
3600
- if (parts.length === 0) return /* @__PURE__ */ jsx23(Fragment6, { children: text });
3995
+ if (parts.length === 0) return /* @__PURE__ */ jsx23(Fragment7, { children: text });
3601
3996
  parts.push(text.slice(at));
3602
- return /* @__PURE__ */ jsx23(Fragment6, { children: parts.map((p, i) => /* @__PURE__ */ jsx23(Fragment5, { children: p }, i)) });
3997
+ return /* @__PURE__ */ jsx23(Fragment7, { children: parts.map((p, i) => /* @__PURE__ */ jsx23(Fragment6, { children: p }, i)) });
3603
3998
  }
3604
3999
  function CommandPalette({ open, onOpenChange, search, labels }) {
3605
4000
  const listId = useId();
@@ -3658,7 +4053,7 @@ function CommandPalette({ open, onOpenChange, search, labels }) {
3658
4053
  /* @__PURE__ */ jsxs14(HStack3, { gap: "2.5", px: "4", borderBottomWidth: "1px", borderColor: "border.muted", color: "fg.muted", _icon: { boxSize: "4.5", flexShrink: 0 }, children: [
3659
4054
  /* @__PURE__ */ jsx23(Search, { "aria-hidden": true }),
3660
4055
  /* @__PURE__ */ jsx23(
3661
- chakra9.input,
4056
+ chakra10.input,
3662
4057
  {
3663
4058
  autoFocus: true,
3664
4059
  flex: "1",
@@ -3728,7 +4123,7 @@ function CommandPalette({ open, onOpenChange, search, labels }) {
3728
4123
  // src/components/AvatarStack.tsx
3729
4124
  import { Avatar, Box, HStack as HStack4, Popover, Portal as Portal8, Stack as Stack4, Text as Text3 } from "@chakra-ui/react";
3730
4125
  import { Check } from "lucide-react";
3731
- import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
4126
+ import { Fragment as Fragment8, jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
3732
4127
  var PALETTES = ["blue", "teal", "purple", "orange", "pink", "cyan", "green", "red"];
3733
4128
  function avatarPalette(id) {
3734
4129
  let hash = 0;
@@ -3767,7 +4162,7 @@ function AvatarStack({ "aria-label": ariaLabel, people, max = 3, moreLabel, more
3767
4162
  const picked = (p) => selected.includes(p.id);
3768
4163
  const restPicked = rest.some(picked);
3769
4164
  return /* @__PURE__ */ jsxs15(HStack4, { gap: "1", role: "group", "aria-label": ariaLabel, children: [
3770
- shown.map((p) => /* @__PURE__ */ jsx24(Tooltip, { content: p.detail ? /* @__PURE__ */ jsxs15(Fragment7, { children: [
4165
+ shown.map((p) => /* @__PURE__ */ jsx24(Tooltip, { content: p.detail ? /* @__PURE__ */ jsxs15(Fragment8, { children: [
3771
4166
  p.name,
3772
4167
  " \xB7 ",
3773
4168
  p.detail
@@ -3824,7 +4219,7 @@ function AvatarStack({ "aria-label": ariaLabel, people, max = 3, moreLabel, more
3824
4219
  /* @__PURE__ */ jsx24(Portal8, { children: /* @__PURE__ */ jsx24(Popover.Positioner, { children: /* @__PURE__ */ jsx24(Popover.Content, { w: "64", maxW: "calc(100vw - 32px)", children: /* @__PURE__ */ jsx24(Popover.Body, { children: /* @__PURE__ */ jsxs15(Stack4, { gap: "3", children: [
3825
4220
  /* @__PURE__ */ jsx24(Popover.Title, { textStyle: "label", children: moreTitle }),
3826
4221
  /* @__PURE__ */ jsx24(Stack4, { as: "ul", gap: onToggle ? "0.5" : "2", maxH: "64", overflowY: "auto", listStyleType: "none", mx: onToggle ? "-2" : void 0, children: rest.map((p) => {
3827
- const row = /* @__PURE__ */ jsxs15(Fragment7, { children: [
4222
+ const row = /* @__PURE__ */ jsxs15(Fragment8, { children: [
3828
4223
  /* @__PURE__ */ jsx24(PersonAvatar, { person: p, selected: onToggle && picked(p), inButton: !!onToggle }),
3829
4224
  /* @__PURE__ */ jsxs15(Stack4, { gap: "0", minW: "0", flex: "1", textAlign: "start", children: [
3830
4225
  /* @__PURE__ */ jsx24(Text3, { textStyle: "body", truncate: true, children: p.name }),
@@ -3857,12 +4252,12 @@ function AvatarStack({ "aria-label": ariaLabel, people, max = 3, moreLabel, more
3857
4252
  }
3858
4253
 
3859
4254
  // src/components/DataTable.tsx
3860
- import { Fragment as Fragment8, useMemo as useMemo6, useRef as useRef10, useState as useState10 } from "react";
3861
- import { chakra as chakra13, Menu, Portal as Portal9, Table, useSlotRecipe as useSlotRecipe3 } from "@chakra-ui/react";
4255
+ import { Fragment as Fragment9, useMemo as useMemo6, useRef as useRef10, useState as useState10 } from "react";
4256
+ import { chakra as chakra14, Menu, Portal as Portal9, Table, useSlotRecipe as useSlotRecipe3 } from "@chakra-ui/react";
3862
4257
  import { ArrowDown, ArrowUp, ChevronDown as ChevronDown2, ChevronRight as ChevronRight2, ChevronsUpDown, GripVertical } from "lucide-react";
3863
4258
 
3864
4259
  // src/components/EmptyState.tsx
3865
- import { chakra as chakra10, EmptyState as ChakraEmptyState, HStack as HStack5, Text as Text4, VStack } from "@chakra-ui/react";
4260
+ import { chakra as chakra11, EmptyState as ChakraEmptyState, HStack as HStack5, Text as Text4, VStack } from "@chakra-ui/react";
3866
4261
  import { Inbox } from "lucide-react";
3867
4262
  import { m as m3 } from "motion/react";
3868
4263
  import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
@@ -3871,7 +4266,7 @@ var TONE = {
3871
4266
  accent: { border: "accent.muted", bg: "accent.subtle", fg: "accent.fg" },
3872
4267
  danger: { border: "red.muted", bg: "red.subtle", fg: "fg.error" }
3873
4268
  };
3874
- var MotionSpan3 = chakra10(m3.span, {}, { forwardProps: ["transition"] });
4269
+ var MotionSpan3 = chakra11(m3.span, {}, { forwardProps: ["transition"] });
3875
4270
  function Drawing({ children, size, tone }) {
3876
4271
  return /* @__PURE__ */ jsx25(
3877
4272
  MotionSpan3,
@@ -3921,7 +4316,7 @@ function EmptyState({ title, description, icon, action, secondaryAction, kind, s
3921
4316
 
3922
4317
  // src/components/RecordKey.tsx
3923
4318
  import { forwardRef as forwardRef5, ViewTransition } from "react";
3924
- import { chakra as chakra11, useRecipe } from "@chakra-ui/react";
4319
+ import { chakra as chakra12, useRecipe } from "@chakra-ui/react";
3925
4320
  import { jsx as jsx26 } from "react/jsx-runtime";
3926
4321
  var glideName = (key) => `abp-key-${key.toUpperCase().replace(/[^A-Z0-9_-]/g, "_")}`;
3927
4322
  var RecordKey = forwardRef5(function RecordKey2({ value, children, href, variant = "plain", size = "sm", glide = false, loading: own, css, ...rest }, ref) {
@@ -3930,16 +4325,16 @@ var RecordKey = forwardRef5(function RecordKey2({ value, children, href, variant
3930
4325
  const Link = useLinkComponent();
3931
4326
  const content = children ?? value;
3932
4327
  if (useLoading(own)) {
3933
- return /* @__PURE__ */ jsx26(chakra11.span, { ref, dir: "ltr", "aria-hidden": "true", css: [styles, ghostCss, css], ...rest, children: content ?? "XXXX-000" });
4328
+ return /* @__PURE__ */ jsx26(chakra12.span, { ref, dir: "ltr", "aria-hidden": "true", css: [styles, ghostCss, css], ...rest, children: content ?? "XXXX-000" });
3934
4329
  }
3935
- const key = href ? /* @__PURE__ */ jsx26(chakra11.span, { asChild: true, css: [styles, css], ...rest, children: /* @__PURE__ */ jsx26(Link, { href, dir: "ltr", ref, children: content }) }) : /* @__PURE__ */ jsx26(chakra11.span, { ref, dir: "ltr", css: [styles, css], ...rest, children: content });
4330
+ const key = href ? /* @__PURE__ */ jsx26(chakra12.span, { asChild: true, css: [styles, css], ...rest, children: /* @__PURE__ */ jsx26(Link, { href, dir: "ltr", ref, children: content }) }) : /* @__PURE__ */ jsx26(chakra12.span, { ref, dir: "ltr", css: [styles, css], ...rest, children: content });
3936
4331
  if (!glide || !value || typeof ViewTransition === "undefined") return key;
3937
4332
  return /* @__PURE__ */ jsx26(ViewTransition, { name: glideName(value), share: "morph", default: "none", children: key });
3938
4333
  });
3939
4334
 
3940
4335
  // src/components/StatusPill.tsx
3941
4336
  import { forwardRef as forwardRef6 } from "react";
3942
- import { chakra as chakra12, useSlotRecipe as useSlotRecipe2 } from "@chakra-ui/react";
4337
+ import { chakra as chakra13, useSlotRecipe as useSlotRecipe2 } from "@chakra-ui/react";
3943
4338
  import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
3944
4339
  var StatusPill = forwardRef6(function StatusPill2({ tone = "neutral", category, variant = "subtle", size = "sm", dot = true, loading: own, skeletonWidth = 8, children, css, ...rest }, ref) {
3945
4340
  const recipe = useSlotRecipe2({ key: "abpStatusPill" });
@@ -3947,9 +4342,9 @@ var StatusPill = forwardRef6(function StatusPill2({ tone = "neutral", category,
3947
4342
  const loading = useLoading(own);
3948
4343
  const arriving = useArriving(loading);
3949
4344
  const unknown = children == null || children === "";
3950
- return /* @__PURE__ */ jsxs17(chakra12.span, { ref, css: [styles.root, loading ? ghostCss : arriving ? arriveCss : void 0, css], "aria-hidden": loading || void 0, ...rest, children: [
3951
- dot && /* @__PURE__ */ jsx27(chakra12.span, { css: styles.indicator, "aria-hidden": "true" }),
3952
- loading && unknown ? /* @__PURE__ */ jsx27(chakra12.span, { display: "inline-block", width: `${skeletonWidth}ch`, children: "\xA0" }) : children
4345
+ return /* @__PURE__ */ jsxs17(chakra13.span, { ref, css: [styles.root, loading ? ghostCss : arriving ? arriveCss : void 0, css], "aria-hidden": loading || void 0, ...rest, children: [
4346
+ dot && /* @__PURE__ */ jsx27(chakra13.span, { css: styles.indicator, "aria-hidden": "true" }),
4347
+ loading && unknown ? /* @__PURE__ */ jsx27(chakra13.span, { display: "inline-block", width: `${skeletonWidth}ch`, children: "\xA0" }) : children
3953
4348
  ] });
3954
4349
  });
3955
4350
 
@@ -4267,7 +4662,7 @@ function DataTable({
4267
4662
  const sub = renderSubRow?.(row);
4268
4663
  const own2 = renderRow?.(row, index);
4269
4664
  const selected = selection ? selection.selectedId === id : void 0;
4270
- return /* @__PURE__ */ jsxs18(Fragment8, { children: [
4665
+ return /* @__PURE__ */ jsxs18(Fragment9, { children: [
4271
4666
  /* @__PURE__ */ jsx28(
4272
4667
  Table.Row,
4273
4668
  {
@@ -4327,7 +4722,7 @@ function DataTable({
4327
4722
  }),
4328
4723
  children: c2.cell(row, index)
4329
4724
  }
4330
- ) : ci === 0 && grouping?.move ? /* @__PURE__ */ jsxs18(chakra13.div, { display: "flex", alignItems: "center", gap: "1", children: [
4725
+ ) : ci === 0 && grouping?.move ? /* @__PURE__ */ jsxs18(chakra14.div, { display: "flex", alignItems: "center", gap: "1", children: [
4331
4726
  /* @__PURE__ */ jsx28(
4332
4727
  RowGrip,
4333
4728
  {
@@ -4363,9 +4758,9 @@ function DataTable({
4363
4758
  body = groups.map((g, gi) => {
4364
4759
  const parent = parents?.of(g.key);
4365
4760
  const parentFolded = parent != null && grouping.folded.has(parentFoldKey(parent));
4366
- const parentRow = parents && parent != null && (gi === 0 || parents.of(groups[gi - 1].key) !== parent) ? /* @__PURE__ */ jsx28(Table.Row, { css: styles.groupRow, "data-group-parent": parent, "data-folded": parentFolded ? "" : void 0, children: /* @__PURE__ */ jsx28(Table.Cell, { colSpan: colCount, css: styles.groupCell, children: /* @__PURE__ */ jsxs18(chakra13.div, { css: styles.groupHeader, children: [
4761
+ const parentRow = parents && parent != null && (gi === 0 || parents.of(groups[gi - 1].key) !== parent) ? /* @__PURE__ */ jsx28(Table.Row, { css: styles.groupRow, "data-group-parent": parent, "data-folded": parentFolded ? "" : void 0, children: /* @__PURE__ */ jsx28(Table.Cell, { colSpan: colCount, css: styles.groupCell, children: /* @__PURE__ */ jsxs18(chakra14.div, { css: styles.groupHeader, children: [
4367
4762
  /* @__PURE__ */ jsx28(
4368
- chakra13.button,
4763
+ chakra14.button,
4369
4764
  {
4370
4765
  type: "button",
4371
4766
  css: styles.groupToggle,
@@ -4377,12 +4772,12 @@ function DataTable({
4377
4772
  ),
4378
4773
  parents.header(parent, groups.filter((x) => parents.of(x.key) === parent))
4379
4774
  ] }) }) }) : null;
4380
- if (parentFolded) return /* @__PURE__ */ jsx28(Fragment8, { children: parentRow }, `group-${g.key}`);
4775
+ if (parentFolded) return /* @__PURE__ */ jsx28(Fragment9, { children: parentRow }, `group-${g.key}`);
4381
4776
  const folded = grouping.folded.has(g.key);
4382
4777
  const footer = folded ? null : grouping.footer?.(g.key, g.rows);
4383
4778
  const start = at;
4384
4779
  if (!folded) at += g.rows.length;
4385
- return /* @__PURE__ */ jsxs18(Fragment8, { children: [
4780
+ return /* @__PURE__ */ jsxs18(Fragment9, { children: [
4386
4781
  parentRow,
4387
4782
  /* @__PURE__ */ jsx28(
4388
4783
  Table.Row,
@@ -4409,9 +4804,9 @@ function DataTable({
4409
4804
  if (row) grouping.move.onMove(row, g.key);
4410
4805
  }
4411
4806
  } : {},
4412
- children: /* @__PURE__ */ jsx28(Table.Cell, { colSpan: colCount, css: styles.groupCell, children: /* @__PURE__ */ jsxs18(chakra13.div, { css: styles.groupHeader, ps: parents ? "6" : void 0, children: [
4807
+ children: /* @__PURE__ */ jsx28(Table.Cell, { colSpan: colCount, css: styles.groupCell, children: /* @__PURE__ */ jsxs18(chakra14.div, { css: styles.groupHeader, ps: parents ? "6" : void 0, children: [
4413
4808
  /* @__PURE__ */ jsx28(
4414
- chakra13.button,
4809
+ chakra14.button,
4415
4810
  {
4416
4811
  type: "button",
4417
4812
  css: styles.groupToggle,
@@ -4431,7 +4826,7 @@ function DataTable({
4431
4826
  });
4432
4827
  }
4433
4828
  }
4434
- return /* @__PURE__ */ jsx28(chakra13.div, { css: styles.root, "aria-busy": loading || void 0, children: /* @__PURE__ */ jsx28(chakra13.div, { css: [styles.scrollArea, maxHeight ? { maxH: maxHeight } : void 0], children: /* @__PURE__ */ jsxs18(
4829
+ return /* @__PURE__ */ jsx28(chakra14.div, { css: styles.root, "aria-busy": loading || void 0, children: /* @__PURE__ */ jsx28(chakra14.div, { css: [styles.scrollArea, maxHeight ? { maxH: maxHeight } : void 0], children: /* @__PURE__ */ jsxs18(
4435
4830
  Table.Root,
4436
4831
  {
4437
4832
  size,
@@ -4450,7 +4845,7 @@ function DataTable({
4450
4845
  w: c2.width,
4451
4846
  "aria-sort": sortable ? active === "asc" ? "ascending" : active === "desc" ? "descending" : "none" : void 0,
4452
4847
  children: sortable ? /* @__PURE__ */ jsxs18(
4453
- chakra13.button,
4848
+ chakra14.button,
4454
4849
  {
4455
4850
  type: "button",
4456
4851
  css: styles.sortTrigger,
@@ -4459,7 +4854,7 @@ function DataTable({
4459
4854
  title: active === "asc" ? labels.sortDescending : labels.sortAscending,
4460
4855
  children: [
4461
4856
  c2.header,
4462
- /* @__PURE__ */ jsx28(chakra13.span, { css: styles.sortIcon, "aria-hidden": "true", children: active === "asc" ? /* @__PURE__ */ jsx28(ArrowUp, {}) : active === "desc" ? /* @__PURE__ */ jsx28(ArrowDown, {}) : /* @__PURE__ */ jsx28(ChevronsUpDown, {}) })
4857
+ /* @__PURE__ */ jsx28(chakra14.span, { css: styles.sortIcon, "aria-hidden": "true", children: active === "asc" ? /* @__PURE__ */ jsx28(ArrowUp, {}) : active === "desc" ? /* @__PURE__ */ jsx28(ArrowDown, {}) : /* @__PURE__ */ jsx28(ChevronsUpDown, {}) })
4463
4858
  ]
4464
4859
  }
4465
4860
  ) : c2.header
@@ -4491,7 +4886,7 @@ function RowGrip({ move, row, dragging, group, prev, next, onDragStart, onDragEn
4491
4886
  },
4492
4887
  children: [
4493
4888
  /* @__PURE__ */ jsx28(Menu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx28(
4494
- chakra13.button,
4889
+ chakra14.button,
4495
4890
  {
4496
4891
  type: "button",
4497
4892
  draggable: true,
@@ -4543,7 +4938,7 @@ function RowGrip({ move, row, dragging, group, prev, next, onDragStart, onDragEn
4543
4938
  }
4544
4939
  function TreeCell({ node, folded, label, contextLabel, onFold, children }) {
4545
4940
  return /* @__PURE__ */ jsxs18(
4546
- chakra13.div,
4941
+ chakra14.div,
4547
4942
  {
4548
4943
  display: "flex",
4549
4944
  alignItems: "center",
@@ -4554,7 +4949,7 @@ function TreeCell({ node, folded, label, contextLabel, onFold, children }) {
4554
4949
  "data-context": node.context ? "" : void 0,
4555
4950
  children: [
4556
4951
  node.hasChildren ? /* @__PURE__ */ jsx28(
4557
- chakra13.button,
4952
+ chakra14.button,
4558
4953
  {
4559
4954
  type: "button",
4560
4955
  "aria-expanded": !folded,
@@ -4576,8 +4971,8 @@ function TreeCell({ node, folded, label, contextLabel, onFold, children }) {
4576
4971
  css: { "& svg": { width: "3.5", height: "3.5", transition: "transform 0.15s" } },
4577
4972
  children: folded ? /* @__PURE__ */ jsx28(DirectionalIcon, { children: /* @__PURE__ */ jsx28(ChevronRight2, {}) }) : /* @__PURE__ */ jsx28(ChevronDown2, {})
4578
4973
  }
4579
- ) : /* @__PURE__ */ jsx28(chakra13.span, { boxSize: "6", flexShrink: "0", "aria-hidden": true }),
4580
- node.context && /* @__PURE__ */ jsx28(chakra13.span, { srOnly: true, children: contextLabel }),
4974
+ ) : /* @__PURE__ */ jsx28(chakra14.span, { boxSize: "6", flexShrink: "0", "aria-hidden": true }),
4975
+ node.context && /* @__PURE__ */ jsx28(chakra14.span, { srOnly: true, children: contextLabel }),
4581
4976
  children
4582
4977
  ]
4583
4978
  }
@@ -4586,7 +4981,7 @@ function TreeCell({ node, folded, label, contextLabel, onFold, children }) {
4586
4981
 
4587
4982
  // src/components/CalendarGrid.tsx
4588
4983
  import { useEffect as useEffect8, useMemo as useMemo7, useRef as useRef11, useState as useState11 } from "react";
4589
- import { Box as Box2, chakra as chakra14, Grid, Stack as Stack5, Text as Text5 } from "@chakra-ui/react";
4984
+ import { Box as Box2, chakra as chakra15, Grid as Grid2, Stack as Stack5, Text as Text5 } from "@chakra-ui/react";
4590
4985
  import { DndContext, DragOverlay, PointerSensor, useDraggable, useDroppable, useSensor, useSensors } from "@dnd-kit/core";
4591
4986
  import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
4592
4987
  var addDays = (day, n) => {
@@ -4658,8 +5053,8 @@ function CalendarGrid({
4658
5053
  onDragCancel: () => setActive(null),
4659
5054
  children: [
4660
5055
  /* @__PURE__ */ jsxs19(Box2, { ref: root, role: "grid", "aria-label": ariaLabel, borderWidth: "1px", borderColor: "border", rounded: "l3", overflow: "hidden", children: [
4661
- /* @__PURE__ */ jsx29(Grid, { role: "row", templateColumns: "repeat(7, minmax(0, 1fr))", bg: "bg.muted", borderBottomWidth: "1px", borderColor: "border", children: weekdays.map((w, i) => /* @__PURE__ */ jsx29(Text5, { role: "columnheader", textStyle: "caption", fontWeight: "medium", color: "fg.muted", px: "2", py: "1.5", truncate: true, children: w }, i)) }),
4662
- Array.from({ length: Math.ceil(days.length / 7) }, (_, week) => /* @__PURE__ */ jsx29(Grid, { role: "row", templateColumns: "repeat(7, minmax(0, 1fr))", borderBottomWidth: week < days.length / 7 - 1 ? "1px" : 0, borderColor: "border", children: days.slice(week * 7, week * 7 + 7).map((day, i) => {
5056
+ /* @__PURE__ */ jsx29(Grid2, { role: "row", templateColumns: "repeat(7, minmax(0, 1fr))", bg: "bg.muted", borderBottomWidth: "1px", borderColor: "border", children: weekdays.map((w, i) => /* @__PURE__ */ jsx29(Text5, { role: "columnheader", textStyle: "caption", fontWeight: "medium", color: "fg.muted", px: "2", py: "1.5", truncate: true, children: w }, i)) }),
5057
+ Array.from({ length: Math.ceil(days.length / 7) }, (_, week) => /* @__PURE__ */ jsx29(Grid2, { role: "row", templateColumns: "repeat(7, minmax(0, 1fr))", borderBottomWidth: week < days.length / 7 - 1 ? "1px" : 0, borderColor: "border", children: days.slice(week * 7, week * 7 + 7).map((day, i) => {
4663
5058
  const list = byDay.get(day) ?? [];
4664
5059
  const shown = tall ? list : list.slice(0, maxPerDay);
4665
5060
  return /* @__PURE__ */ jsxs19(
@@ -4677,7 +5072,7 @@ function CalendarGrid({
4677
5072
  loading && Array.from({ length: (week * 7 + i) % 4 === 1 ? 2 : (week * 7 + i) % 3 === 0 ? 1 : 0 }, (_2, n) => /* @__PURE__ */ jsx29(Bone, { height: "5", width: n === 0 ? "full" : "3/4", "aria-hidden": "true" }, n)),
4678
5073
  !loading && shown.map(({ item, continued }) => /* @__PURE__ */ jsx29(Chip, { item, continued, onKeyDown: (e) => key(item, e), children: (dragging) => renderItem(item, { dragging, continued }) }, `${item.id}:${day}`)),
4679
5074
  list.length > shown.length && more && (onMore ? /* @__PURE__ */ jsx29(
4680
- chakra14.button,
5075
+ chakra15.button,
4681
5076
  {
4682
5077
  type: "button",
4683
5078
  alignSelf: "start",
@@ -4860,9 +5255,9 @@ function Chart({ kind, stacked, data, x, series, "aria-label": ariaLabel, height
4860
5255
 
4861
5256
  // src/components/DashboardGrid.tsx
4862
5257
  import { useRef as useRef12, useState as useState12 } from "react";
4863
- import { Box as Box4, chakra as chakra15 } from "@chakra-ui/react";
5258
+ import { Box as Box4, chakra as chakra16 } from "@chakra-ui/react";
4864
5259
  import { GripVertical as GripVertical2, MoveDiagonal2 } from "lucide-react";
4865
- import { Fragment as Fragment9, jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
5260
+ import { Fragment as Fragment10, jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
4866
5261
  var GAP = 16;
4867
5262
  var PLACEHOLDER_TILES = [
4868
5263
  { id: "skeleton-1", x: 0, y: 0, w: 6, h: 3 },
@@ -4984,7 +5379,7 @@ function DashboardGrid({
4984
5379
  _focusVisible: { outline: "2px solid", outlineColor: "colorPalette.focusRing", outlineOffset: "1px" }
4985
5380
  };
4986
5381
  return /* @__PURE__ */ jsxs21(Box4, { children: [
4987
- editing && /* @__PURE__ */ jsx31(chakra15.p, { id: instructionsId, srOnly: true, children: labels.instructions }),
5382
+ editing && /* @__PURE__ */ jsx31(chakra16.p, { id: instructionsId, srOnly: true, children: labels.instructions }),
4988
5383
  /* @__PURE__ */ jsxs21(
4989
5384
  Box4,
4990
5385
  {
@@ -5030,9 +5425,9 @@ function DashboardGrid({
5030
5425
  transition: moving ? void 0 : "all 120ms ease",
5031
5426
  children: [
5032
5427
  renderItem(shown),
5033
- editing && /* @__PURE__ */ jsxs21(Fragment9, { children: [
5428
+ editing && /* @__PURE__ */ jsxs21(Fragment10, { children: [
5034
5429
  /* @__PURE__ */ jsx31(
5035
- chakra15.button,
5430
+ chakra16.button,
5036
5431
  {
5037
5432
  type: "button",
5038
5433
  position: "absolute",
@@ -5049,7 +5444,7 @@ function DashboardGrid({
5049
5444
  }
5050
5445
  ),
5051
5446
  /* @__PURE__ */ jsx31(
5052
- chakra15.button,
5447
+ chakra16.button,
5053
5448
  {
5054
5449
  type: "button",
5055
5450
  position: "absolute",
@@ -5092,10 +5487,10 @@ function CategoryProgress({ todo, inProgress, done, size = "md", loading: own, "
5092
5487
  }
5093
5488
 
5094
5489
  // src/components/AttentionChip.tsx
5095
- import { chakra as chakra17 } from "@chakra-ui/react";
5490
+ import { chakra as chakra18 } from "@chakra-ui/react";
5096
5491
 
5097
5492
  // src/components/CountBadge.tsx
5098
- import { chakra as chakra16 } from "@chakra-ui/react";
5493
+ import { chakra as chakra17 } from "@chakra-ui/react";
5099
5494
  import { jsx as jsx33 } from "react/jsx-runtime";
5100
5495
  var TONES2 = {
5101
5496
  neutral: { bg: "bg.emphasized", color: "fg" },
@@ -5107,7 +5502,7 @@ function CountBadge({ value, tone = "neutral", size = "sm", loading: own, ...res
5107
5502
  const fmt = useFormatters();
5108
5503
  const loading = useLoading(own);
5109
5504
  return /* @__PURE__ */ jsx33(
5110
- chakra16.span,
5505
+ chakra17.span,
5111
5506
  {
5112
5507
  display: "inline-flex",
5113
5508
  alignItems: "center",
@@ -5135,7 +5530,7 @@ import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
5135
5530
  function AttentionChip({ count, children, tone = "neutral", pressed, onClick, disabled, loading: own }) {
5136
5531
  const loading = useLoading(own);
5137
5532
  return /* @__PURE__ */ jsxs22(
5138
- chakra17.button,
5533
+ chakra18.button,
5139
5534
  {
5140
5535
  type: "button",
5141
5536
  display: "inline-flex",
@@ -5168,13 +5563,13 @@ function AttentionChip({ count, children, tone = "neutral", pressed, onClick, di
5168
5563
  }
5169
5564
 
5170
5565
  // src/components/IconTile.tsx
5171
- import { chakra as chakra18 } from "@chakra-ui/react";
5566
+ import { chakra as chakra19 } from "@chakra-ui/react";
5172
5567
  import { jsx as jsx35 } from "react/jsx-runtime";
5173
5568
  var SIZES = { sm: { box: "6", icon: "3.5" }, md: { box: "8", icon: "4" }, lg: { box: "10", icon: "5" } };
5174
5569
  function IconTile({ children, size = "md", active = false, palette: palette3 }) {
5175
5570
  const s = SIZES[size];
5176
5571
  return /* @__PURE__ */ jsx35(
5177
- chakra18.span,
5572
+ chakra19.span,
5178
5573
  {
5179
5574
  display: "inline-flex",
5180
5575
  alignItems: "center",
@@ -5196,12 +5591,12 @@ function IconTile({ children, size = "md", active = false, palette: palette3 })
5196
5591
  }
5197
5592
 
5198
5593
  // src/components/PersonChip.tsx
5199
- import { Avatar as Avatar2, chakra as chakra19 } from "@chakra-ui/react";
5594
+ import { Avatar as Avatar2, chakra as chakra20 } from "@chakra-ui/react";
5200
5595
  import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
5201
5596
  var SIZES2 = { xs: "5", sm: "6", md: "8" };
5202
5597
  function PersonChip({ id, name, picture, compact = false, size = "sm", loading: own }) {
5203
5598
  if (useLoading(own)) {
5204
- return /* @__PURE__ */ jsxs23(chakra19.span, { display: "inline-flex", alignItems: "center", gap: "2", "aria-hidden": true, children: [
5599
+ return /* @__PURE__ */ jsxs23(chakra20.span, { display: "inline-flex", alignItems: "center", gap: "2", "aria-hidden": true, children: [
5205
5600
  /* @__PURE__ */ jsx36(Bone, { circle: true, height: SIZES2[size] }),
5206
5601
  !compact && /* @__PURE__ */ jsx36(TextBone, { width: 12 })
5207
5602
  ] });
@@ -5225,14 +5620,14 @@ function PersonChip({ id, name, picture, compact = false, size = "sm", loading:
5225
5620
  }
5226
5621
  );
5227
5622
  if (compact) return avatar;
5228
- return /* @__PURE__ */ jsxs23(chakra19.span, { display: "inline-flex", alignItems: "center", gap: "2", minW: "0", maxW: "full", children: [
5623
+ return /* @__PURE__ */ jsxs23(chakra20.span, { display: "inline-flex", alignItems: "center", gap: "2", minW: "0", maxW: "full", children: [
5229
5624
  avatar,
5230
- /* @__PURE__ */ jsx36(chakra19.span, { truncate: true, children: name })
5625
+ /* @__PURE__ */ jsx36(chakra20.span, { truncate: true, children: name })
5231
5626
  ] });
5232
5627
  }
5233
5628
 
5234
5629
  // src/components/PriorityMark.tsx
5235
- import { chakra as chakra20 } from "@chakra-ui/react";
5630
+ import { chakra as chakra21 } from "@chakra-ui/react";
5236
5631
 
5237
5632
  // src/components/priority-level.ts
5238
5633
  function priorityLevel(rank, of) {
@@ -5249,7 +5644,7 @@ function PriorityMark({ rank, of, children, title, loading }) {
5249
5644
  if (useLoading(loading)) return /* @__PURE__ */ jsx37(TextBone, { width: 7 });
5250
5645
  const { bars, palette: palette3 } = priorityLevel(rank, of);
5251
5646
  return /* @__PURE__ */ jsxs24(
5252
- chakra20.span,
5647
+ chakra21.span,
5253
5648
  {
5254
5649
  display: "inline-flex",
5255
5650
  alignItems: "center",
@@ -5260,8 +5655,8 @@ function PriorityMark({ rank, of, children, title, loading }) {
5260
5655
  "aria-label": children == null ? title : void 0,
5261
5656
  whiteSpace: "nowrap",
5262
5657
  children: [
5263
- /* @__PURE__ */ jsx37(chakra20.svg, { viewBox: "0 0 12 12", w: "3", h: "3", flexShrink: 0, "aria-hidden": "true", children: [0, 1, 2, 3].map((i) => /* @__PURE__ */ jsx37(
5264
- chakra20.rect,
5658
+ /* @__PURE__ */ jsx37(chakra21.svg, { viewBox: "0 0 12 12", w: "3", h: "3", flexShrink: 0, "aria-hidden": "true", children: [0, 1, 2, 3].map((i) => /* @__PURE__ */ jsx37(
5659
+ chakra21.rect,
5265
5660
  {
5266
5661
  x: i * 3 + 0.5,
5267
5662
  y: 9 - i * 3,
@@ -5272,7 +5667,7 @@ function PriorityMark({ rank, of, children, title, loading }) {
5272
5667
  },
5273
5668
  i
5274
5669
  )) }),
5275
- children != null && /* @__PURE__ */ jsx37(chakra20.span, { color: palette3 === "blue" || palette3 === "gray" ? "fg.muted" : "colorPalette.fg", fontWeight: "medium", children })
5670
+ children != null && /* @__PURE__ */ jsx37(chakra21.span, { color: palette3 === "blue" || palette3 === "gray" ? "fg.muted" : "colorPalette.fg", fontWeight: "medium", children })
5276
5671
  ]
5277
5672
  }
5278
5673
  );
@@ -5306,6 +5701,7 @@ async function readEvents(res, onEvent) {
5306
5701
  }
5307
5702
  function createHostEvents(options = {}) {
5308
5703
  const doFetch = options.fetch ?? ((input, init) => fetch(input, init));
5704
+ const stepUp = options.stepUp ?? requestStepUp;
5309
5705
  return async function events(path, onEvent, { lastEventId = null, signal } = {}) {
5310
5706
  const open = () => {
5311
5707
  const headers = { Accept: "text/event-stream", ...options.headers?.() };
@@ -5313,12 +5709,11 @@ function createHostEvents(options = {}) {
5313
5709
  return doFetch(path, { method: "GET", headers, credentials: "same-origin", cache: "no-store", signal });
5314
5710
  };
5315
5711
  let res = await open();
5316
- if (!res.ok) {
5712
+ for (let asked = 0; !res.ok; asked++) {
5317
5713
  const error = await readAbpError(res.clone());
5318
5714
  if (res.status === 401) options.onUnauthorized?.();
5319
- if (isStepUp(error) && options.stepUp && await options.stepUp()) res = await open();
5715
+ if (asked < 3 && needsStepUp(error) && await stepUp(stepUpNeedOf(error.code, error.data))) res = await open();
5320
5716
  else throw error;
5321
- if (!res.ok) throw await readAbpError(res);
5322
5717
  }
5323
5718
  let last = lastEventId;
5324
5719
  await readEvents(res, (name, data, id) => {
@@ -5363,12 +5758,11 @@ function createHostRequest(options = {}) {
5363
5758
  }
5364
5759
  return async function request(path, init = {}) {
5365
5760
  let res = await send(path, init);
5366
- if (!res.ok) {
5761
+ for (let asked = 0; !res.ok; asked++) {
5367
5762
  const error = await readAbpError(res.clone());
5368
5763
  if (res.status === 401) options.onUnauthorized?.();
5369
- if (isStepUp(error) && await stepUp()) res = await send(path, init);
5764
+ if (asked < 3 && init.stepUp !== false && needsStepUp(error) && await stepUp(stepUpNeedOf(error.code, error.data))) res = await send(path, init);
5370
5765
  else throw error;
5371
- if (!res.ok) throw await readAbpError(res);
5372
5766
  }
5373
5767
  if (init.as === "file") return { blob: await res.blob(), name: fileNameOf(res.headers.get("Content-Disposition")) };
5374
5768
  if (res.status === 204) return void 0;
@@ -5395,7 +5789,7 @@ function useSlotSaves() {
5395
5789
 
5396
5790
  // src/components/FormDialog.tsx
5397
5791
  import { useRef as useRef14, useState as useState13 } from "react";
5398
- import { chakra as chakra21, CloseButton as CloseButton2, Dialog as Dialog4, Portal as Portal10, Stack as Stack6 } from "@chakra-ui/react";
5792
+ import { chakra as chakra22, CloseButton as CloseButton2, Dialog as Dialog4, Portal as Portal10, Stack as Stack6 } from "@chakra-ui/react";
5399
5793
  import { jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
5400
5794
  var isControl = (el) => el instanceof HTMLInputElement || el instanceof HTMLSelectElement || el instanceof HTMLTextAreaElement;
5401
5795
  function invalidControls(form) {
@@ -5457,8 +5851,8 @@ function FormDialog({ open, onOpenChange, title, description, submitLabel, onSub
5457
5851
  /* @__PURE__ */ jsx38(Dialog4.Header, { children: /* @__PURE__ */ jsx38(Dialog4.Title, { children: title }) }),
5458
5852
  /* @__PURE__ */ jsx38(Dialog4.Body, { children: /* @__PURE__ */ jsxs25(Stack6, { gap: "field", children: [
5459
5853
  description != null && /* @__PURE__ */ jsx38(Dialog4.Description, { children: description }),
5460
- problems.length > 0 && /* @__PURE__ */ jsx38(chakra21.div, { ref: summary, tabIndex: -1, outline: "none", "data-form-problems": "", children: /* @__PURE__ */ jsx38(InlineAlert, { tone: "danger", title: formatMessage(locale, labels.formFix, { count: problems.length }), children: /* @__PURE__ */ jsx38(chakra21.ul, { ps: "4", listStyleType: "disc", children: problems.map((p, i) => /* @__PURE__ */ jsx38("li", { children: /* @__PURE__ */ jsx38(
5461
- chakra21.button,
5854
+ problems.length > 0 && /* @__PURE__ */ jsx38(chakra22.div, { ref: summary, tabIndex: -1, outline: "none", "data-form-problems": "", children: /* @__PURE__ */ jsx38(InlineAlert, { tone: "danger", title: formatMessage(locale, labels.formFix, { count: problems.length }), children: /* @__PURE__ */ jsx38(chakra22.ul, { ps: "4", listStyleType: "disc", children: problems.map((p, i) => /* @__PURE__ */ jsx38("li", { children: /* @__PURE__ */ jsx38(
5855
+ chakra22.button,
5462
5856
  {
5463
5857
  type: "button",
5464
5858
  textDecoration: "underline",
@@ -5606,7 +6000,7 @@ function SegmentedControl({
5606
6000
 
5607
6001
  // src/components/KanbanBoard.tsx
5608
6002
  import { useEffect as useEffect9, useLayoutEffect as useLayoutEffect3, useMemo as useMemo8, useRef as useRef15, useState as useState15 } from "react";
5609
- import { Box as Box6, chakra as chakra22, HStack as HStack7, Stack as Stack7, Text as Text8 } from "@chakra-ui/react";
6003
+ import { Box as Box6, chakra as chakra23, HStack as HStack7, Stack as Stack7, Text as Text8 } from "@chakra-ui/react";
5610
6004
  import { Check as Check2, ChevronsLeft, ChevronsRight, GripVertical as GripVertical3 } from "lucide-react";
5611
6005
  import {
5612
6006
  DndContext as DndContext2,
@@ -5642,7 +6036,7 @@ function between(cell, from, to) {
5642
6036
  }
5643
6037
 
5644
6038
  // src/components/KanbanBoard.tsx
5645
- import { Fragment as Fragment10, jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
6039
+ import { Fragment as Fragment11, jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
5646
6040
  var SKELETON_CARDS = [3, 2, 4, 1, 2];
5647
6041
  function PlaceholderCard({ index }) {
5648
6042
  return /* @__PURE__ */ jsxs27(Box6, { bg: "bg.panel", borderWidth: "1px", borderColor: "border", rounded: "l2", p: "2.5", children: [
@@ -5988,7 +6382,7 @@ function KanbanBoard({
5988
6382
  );
5989
6383
  }
5990
6384
  function LaneRow({ lane, showTitle, span, children }) {
5991
- return /* @__PURE__ */ jsxs27(Fragment10, { children: [
6385
+ return /* @__PURE__ */ jsxs27(Fragment11, { children: [
5992
6386
  showTitle && /* @__PURE__ */ jsxs27(HStack7, { gridColumn: `1 / span ${span}`, gap: "2", pt: "2", borderTopWidth: "1px", borderColor: "border.muted", "data-lane": lane.id, children: [
5993
6387
  /* @__PURE__ */ jsx42(Text8, { textStyle: "label", children: lane.title }),
5994
6388
  lane.meta && /* @__PURE__ */ jsx42(Text8, { textStyle: "caption", color: "fg.muted", children: lane.meta })
@@ -6106,7 +6500,7 @@ function Mark() {
6106
6500
  });
6107
6501
  }, []);
6108
6502
  return /* @__PURE__ */ jsx42(
6109
- chakra22.span,
6503
+ chakra23.span,
6110
6504
  {
6111
6505
  ref,
6112
6506
  position: "absolute",
@@ -6128,7 +6522,7 @@ function Mark() {
6128
6522
  }
6129
6523
  function Count({ children }) {
6130
6524
  return /* @__PURE__ */ jsx42(
6131
- chakra22.span,
6525
+ chakra23.span,
6132
6526
  {
6133
6527
  position: "absolute",
6134
6528
  top: "-3.5",
@@ -6151,7 +6545,7 @@ function Count({ children }) {
6151
6545
  }
6152
6546
  function FoldButton({ folded, label, onClick }) {
6153
6547
  return /* @__PURE__ */ jsx42(
6154
- chakra22.button,
6548
+ chakra23.button,
6155
6549
  {
6156
6550
  type: "button",
6157
6551
  display: "inline-flex",
@@ -6202,7 +6596,7 @@ function useFolded(key) {
6202
6596
  }
6203
6597
  function ColumnGrip({ label, moving, onDragStart, onDragEnd, onStep }) {
6204
6598
  return /* @__PURE__ */ jsx42(
6205
- chakra22.button,
6599
+ chakra23.button,
6206
6600
  {
6207
6601
  type: "button",
6208
6602
  draggable: true,
@@ -6252,8 +6646,8 @@ function LoadingState({ lines = 3, label }) {
6252
6646
  }
6253
6647
 
6254
6648
  // src/components/PageHeader.tsx
6255
- import { Fragment as Fragment11 } from "react";
6256
- import { Breadcrumb, chakra as chakra23, Menu as Menu2, Portal as Portal11, useSlotRecipe as useSlotRecipe4 } from "@chakra-ui/react";
6649
+ import { Fragment as Fragment12 } from "react";
6650
+ import { Breadcrumb, chakra as chakra24, Menu as Menu2, Portal as Portal11, useSlotRecipe as useSlotRecipe4 } from "@chakra-ui/react";
6257
6651
  import { ChevronRight as ChevronRight3 } from "lucide-react";
6258
6652
  import { jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
6259
6653
  var textOf = (label) => typeof label === "string" || typeof label === "number" ? String(label) : void 0;
@@ -6264,19 +6658,19 @@ function PageHeader({ title, description, breadcrumbs, meta, count, adornments,
6264
6658
  usePageTitle(documentTitle !== void 0 ? documentTitle : text ? [text, where] : null);
6265
6659
  const styles = recipe({});
6266
6660
  const loading = useLoading(own);
6267
- return /* @__PURE__ */ jsxs29(chakra23.div, { css: styles.root, children: [
6661
+ return /* @__PURE__ */ jsxs29(chakra24.div, { css: styles.root, children: [
6268
6662
  breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx44(Breadcrumbs, { items: breadcrumbs }),
6269
- /* @__PURE__ */ jsxs29(chakra23.div, { css: styles.row, children: [
6270
- /* @__PURE__ */ jsxs29(chakra23.div, { css: styles.titleGroup, children: [
6271
- count != null || adornments != null ? /* @__PURE__ */ jsxs29(chakra23.div, { display: "flex", alignItems: "center", gap: "2.5", flexWrap: "wrap", minW: "0", children: [
6272
- /* @__PURE__ */ jsx44(chakra23.h1, { css: styles.title, children: loading && title == null ? /* @__PURE__ */ jsx44(TextBone, { width: titleWidth }) : title }),
6663
+ /* @__PURE__ */ jsxs29(chakra24.div, { css: styles.row, children: [
6664
+ /* @__PURE__ */ jsxs29(chakra24.div, { css: styles.titleGroup, children: [
6665
+ count != null || adornments != null ? /* @__PURE__ */ jsxs29(chakra24.div, { display: "flex", alignItems: "center", gap: "2.5", flexWrap: "wrap", minW: "0", children: [
6666
+ /* @__PURE__ */ jsx44(chakra24.h1, { css: styles.title, children: loading && title == null ? /* @__PURE__ */ jsx44(TextBone, { width: titleWidth }) : title }),
6273
6667
  count != null && /* @__PURE__ */ jsx44(CountBadge, { value: count, size: "md" }),
6274
6668
  adornments
6275
- ] }) : /* @__PURE__ */ jsx44(chakra23.h1, { css: styles.title, children: loading && title == null ? /* @__PURE__ */ jsx44(TextBone, { width: titleWidth }) : title }),
6276
- meta != null && /* @__PURE__ */ jsx44(chakra23.div, { css: styles.meta, children: meta }),
6277
- description != null && /* @__PURE__ */ jsx44(chakra23.p, { css: styles.description, children: description })
6669
+ ] }) : /* @__PURE__ */ jsx44(chakra24.h1, { css: styles.title, children: loading && title == null ? /* @__PURE__ */ jsx44(TextBone, { width: titleWidth }) : title }),
6670
+ meta != null && /* @__PURE__ */ jsx44(chakra24.div, { css: styles.meta, children: meta }),
6671
+ description != null && /* @__PURE__ */ jsx44(chakra24.p, { css: styles.description, children: description })
6278
6672
  ] }),
6279
- actions != null && /* @__PURE__ */ jsx44(chakra23.div, { css: styles.actions, children: actions })
6673
+ actions != null && /* @__PURE__ */ jsx44(chakra24.div, { css: styles.actions, children: actions })
6280
6674
  ] })
6281
6675
  ] });
6282
6676
  }
@@ -6286,11 +6680,11 @@ function Breadcrumbs({ items, loading: own }) {
6286
6680
  const label = (item, i) => loading && item.label == null ? /* @__PURE__ */ jsx44(TextBone, { width: 8 + i % 3 * 3 }) : item.label;
6287
6681
  const Link = useLinkComponent();
6288
6682
  const { shown, hidden } = foldBreadcrumbs(items);
6289
- return /* @__PURE__ */ jsx44(Breadcrumb.Root, { "aria-label": labels.breadcrumb, children: /* @__PURE__ */ jsx44(Breadcrumb.List, { children: shown.map((entry, n) => /* @__PURE__ */ jsxs29(Fragment11, { children: [
6683
+ return /* @__PURE__ */ jsx44(Breadcrumb.Root, { "aria-label": labels.breadcrumb, children: /* @__PURE__ */ jsx44(Breadcrumb.List, { children: shown.map((entry, n) => /* @__PURE__ */ jsxs29(Fragment12, { children: [
6290
6684
  n > 0 && /* @__PURE__ */ jsx44(Breadcrumb.Separator, { children: /* @__PURE__ */ jsx44(ChevronRight3, {}) }),
6291
6685
  entry == null ? /* @__PURE__ */ jsx44(Breadcrumb.Item, { children: /* @__PURE__ */ jsxs29(Menu2.Root, { positioning: { placement: "bottom-start" }, children: [
6292
6686
  /* @__PURE__ */ jsx44(Menu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx44(
6293
- chakra23.button,
6687
+ chakra24.button,
6294
6688
  {
6295
6689
  type: "button",
6296
6690
  px: "1",
@@ -6311,7 +6705,7 @@ function Breadcrumbs({ items, loading: own }) {
6311
6705
 
6312
6706
  // src/components/Panel.tsx
6313
6707
  import { createContext as createContext11, forwardRef as forwardRef8, useContext as useContext11 } from "react";
6314
- import { chakra as chakra24, useSlotRecipe as useSlotRecipe5 } from "@chakra-ui/react";
6708
+ import { chakra as chakra25, useSlotRecipe as useSlotRecipe5 } from "@chakra-ui/react";
6315
6709
  import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
6316
6710
  var ToneContext = createContext11("card");
6317
6711
  function PanelTone({ tone, children }) {
@@ -6322,21 +6716,21 @@ var Panel = forwardRef8(function Panel2({ title, description, actions, footer, f
6322
6716
  const inherited = useContext11(ToneContext);
6323
6717
  const styles = recipe({ flush, tone: tone ?? inherited });
6324
6718
  const hasHeader = title != null || actions != null || description != null;
6325
- return /* @__PURE__ */ jsxs30(chakra24.section, { ref, css: [styles.root, css], ...rest, children: [
6326
- hasHeader && /* @__PURE__ */ jsxs30(chakra24.header, { css: styles.header, children: [
6327
- /* @__PURE__ */ jsxs30(chakra24.div, { css: styles.titleGroup, children: [
6328
- title != null && /* @__PURE__ */ jsx45(chakra24.h2, { as: headingAs, css: styles.title, children: title }),
6329
- description != null && /* @__PURE__ */ jsx45(chakra24.p, { css: styles.description, children: description })
6719
+ return /* @__PURE__ */ jsxs30(chakra25.section, { ref, css: [styles.root, css], ...rest, children: [
6720
+ hasHeader && /* @__PURE__ */ jsxs30(chakra25.header, { css: styles.header, children: [
6721
+ /* @__PURE__ */ jsxs30(chakra25.div, { css: styles.titleGroup, children: [
6722
+ title != null && /* @__PURE__ */ jsx45(chakra25.h2, { as: headingAs, css: styles.title, children: title }),
6723
+ description != null && /* @__PURE__ */ jsx45(chakra25.p, { css: styles.description, children: description })
6330
6724
  ] }),
6331
- actions != null && /* @__PURE__ */ jsx45(chakra24.div, { css: styles.actions, children: actions })
6725
+ actions != null && /* @__PURE__ */ jsx45(chakra25.div, { css: styles.actions, children: actions })
6332
6726
  ] }),
6333
- /* @__PURE__ */ jsx45(chakra24.div, { css: styles.body, children: loading === void 0 ? children : /* @__PURE__ */ jsx45(Loading, { when: loading, children }) }),
6334
- footer != null && /* @__PURE__ */ jsx45(chakra24.footer, { css: styles.footer, children: footer })
6727
+ /* @__PURE__ */ jsx45(chakra25.div, { css: styles.body, children: loading === void 0 ? children : /* @__PURE__ */ jsx45(Loading, { when: loading, children }) }),
6728
+ footer != null && /* @__PURE__ */ jsx45(chakra25.footer, { css: styles.footer, children: footer })
6335
6729
  ] });
6336
6730
  });
6337
6731
 
6338
6732
  // src/components/PathChips.tsx
6339
- import { chakra as chakra25, useSlotRecipe as useSlotRecipe6 } from "@chakra-ui/react";
6733
+ import { chakra as chakra26, useSlotRecipe as useSlotRecipe6 } from "@chakra-ui/react";
6340
6734
  import { ChevronRight as ChevronRight4 } from "lucide-react";
6341
6735
  import { jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
6342
6736
  function PathChips({ path, highlightLast = true, loading: own, skeletonCount = 3, css, ...rest }) {
@@ -6345,33 +6739,33 @@ function PathChips({ path, highlightLast = true, loading: own, skeletonCount = 3
6345
6739
  const styles = recipe({});
6346
6740
  const loading = useLoading(own) && path.length === 0;
6347
6741
  const segments = loading ? Array.from({ length: skeletonCount }, (_, i) => "\xA0".repeat(boneWidth(i, 6, 12))) : path;
6348
- return /* @__PURE__ */ jsx46(chakra25.ol, { "aria-label": rest["aria-label"] ?? labels.path, "aria-hidden": loading || void 0, css: [styles.root, css], ...rest, children: segments.map((segment, i) => /* @__PURE__ */ jsxs31(chakra25.li, { css: styles.item, children: [
6349
- i > 0 && /* @__PURE__ */ jsx46(chakra25.span, { css: styles.separator, "aria-hidden": "true", children: /* @__PURE__ */ jsx46(ChevronRight4, {}) }),
6350
- /* @__PURE__ */ jsx46(chakra25.span, { css: loading ? [styles.chip, ghostCss] : styles.chip, "aria-current": !loading && highlightLast && i === path.length - 1 ? true : void 0, children: segment })
6742
+ return /* @__PURE__ */ jsx46(chakra26.ol, { "aria-label": rest["aria-label"] ?? labels.path, "aria-hidden": loading || void 0, css: [styles.root, css], ...rest, children: segments.map((segment, i) => /* @__PURE__ */ jsxs31(chakra26.li, { css: styles.item, children: [
6743
+ i > 0 && /* @__PURE__ */ jsx46(chakra26.span, { css: styles.separator, "aria-hidden": "true", children: /* @__PURE__ */ jsx46(ChevronRight4, {}) }),
6744
+ /* @__PURE__ */ jsx46(chakra26.span, { css: loading ? [styles.chip, ghostCss] : styles.chip, "aria-current": !loading && highlightLast && i === path.length - 1 ? true : void 0, children: segment })
6351
6745
  ] }, `${i}:${segment}`)) });
6352
6746
  }
6353
6747
 
6354
6748
  // src/components/PropertyList.tsx
6355
- import { chakra as chakra26, DataList } from "@chakra-ui/react";
6749
+ import { chakra as chakra27, DataList } from "@chakra-ui/react";
6356
6750
  import { jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
6357
6751
  function PropertyList({ items, size = "md", loading: own }) {
6358
6752
  const loading = useLoading(own);
6359
6753
  const arriving = useArriving(loading);
6360
6754
  return /* @__PURE__ */ jsx47(DataList.Root, { orientation: "horizontal", size, children: items.map((item, i) => /* @__PURE__ */ jsxs32(DataList.Item, { children: [
6361
6755
  /* @__PURE__ */ jsx47(DataList.ItemLabel, { children: item.label }),
6362
- /* @__PURE__ */ jsx47(DataList.ItemValue, { children: loading && item.value == null ? /* @__PURE__ */ jsx47(TextBone, { width: item.skeletonWidth ?? boneWidth(i, 8, 16) }) : arriving ? /* @__PURE__ */ jsx47(chakra26.span, { css: arriveCss, children: item.value }) : item.value })
6756
+ /* @__PURE__ */ jsx47(DataList.ItemValue, { children: loading && item.value == null ? /* @__PURE__ */ jsx47(TextBone, { width: item.skeletonWidth ?? boneWidth(i, 8, 16) }) : arriving ? /* @__PURE__ */ jsx47(chakra27.span, { css: arriveCss, children: item.value }) : item.value })
6363
6757
  ] }, item.id ?? i)) });
6364
6758
  }
6365
6759
 
6366
6760
  // src/components/QueryableList.tsx
6367
6761
  import { useEffect as useEffect11, useId as useId3, useMemo as useMemo10, useRef as useRef17, useState as useState17 } from "react";
6368
6762
  import { createPortal } from "react-dom";
6369
- import { Box as Box8, chakra as chakra28, HStack as HStack10, Input as Input4, Menu as Menu3, Portal as Portal14, Stack as Stack10, Text as Text11 } from "@chakra-ui/react";
6763
+ import { Box as Box8, chakra as chakra29, HStack as HStack10, Input as Input4, Menu as Menu3, Portal as Portal14, Stack as Stack10, Text as Text11 } from "@chakra-ui/react";
6370
6764
  import { ArrowDownWideNarrow, ArrowUpNarrowWide, ChevronDown as ChevronDown3, Download, Filter, Plus as Plus2, Rows3, Save, Trash2 as Trash22, X as X2 } from "lucide-react";
6371
6765
 
6372
6766
  // src/components/query/ColumnsPopover.tsx
6373
6767
  import { useMemo as useMemo9 } from "react";
6374
- import { chakra as chakra27, HStack as HStack8, Popover as Popover2, Portal as Portal12, Stack as Stack8, Switch as Switch2, Text as Text9 } from "@chakra-ui/react";
6768
+ import { chakra as chakra28, HStack as HStack8, Popover as Popover2, Portal as Portal12, Stack as Stack8, Switch as Switch2, Text as Text9 } from "@chakra-ui/react";
6375
6769
  import {
6376
6770
  closestCenter,
6377
6771
  DndContext as DndContext3,
@@ -6411,7 +6805,7 @@ function ColumnsPopover({ fields, columns, onChange }) {
6411
6805
  /* @__PURE__ */ jsx48(Button, { size: "xs", variant: "ghost", disabled: hidden.length === 0, onClick: () => onChange([...columns, ...hidden.map((f) => f.id)]), children: labels.showAllColumns })
6412
6806
  ] }),
6413
6807
  /* @__PURE__ */ jsx48(Text9, { textStyle: "caption", color: "fg.muted", px: "3.5", pb: "2", children: labels.columnsHint }),
6414
- /* @__PURE__ */ jsxs33(chakra27.div, { maxH: "80", overflowY: "auto", pb: "2", children: [
6808
+ /* @__PURE__ */ jsxs33(chakra28.div, { maxH: "80", overflowY: "auto", pb: "2", children: [
6415
6809
  /* @__PURE__ */ jsx48(DndContext3, { sensors, collisionDetection: closestCenter, onDragEnd, children: /* @__PURE__ */ jsx48(SortableContext2, { items: shown, strategy: verticalListSortingStrategy2, children: /* @__PURE__ */ jsx48(Stack8, { gap: "0", role: "list", "aria-label": labels.visibleColumns, children: shown.map((id) => /* @__PURE__ */ jsx48(
6416
6810
  ColumnRow,
6417
6811
  {
@@ -6450,7 +6844,7 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
6450
6844
  _hover: { bg: "bg.subtle" },
6451
6845
  children: [
6452
6846
  checked ? /* @__PURE__ */ jsx48(
6453
- chakra27.button,
6847
+ chakra28.button,
6454
6848
  {
6455
6849
  type: "button",
6456
6850
  display: "inline-flex",
@@ -6464,7 +6858,7 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
6464
6858
  ...listeners2,
6465
6859
  children: /* @__PURE__ */ jsx48(GripVertical4, { size: 16 })
6466
6860
  }
6467
- ) : /* @__PURE__ */ jsx48(chakra27.span, { w: "4", flexShrink: 0 }),
6861
+ ) : /* @__PURE__ */ jsx48(chakra28.span, { w: "4", flexShrink: 0 }),
6468
6862
  /* @__PURE__ */ jsx48(Text9, { as: "span", flex: "1", textStyle: "sm", truncate: true, color: checked ? "fg" : "fg.muted", children: label }),
6469
6863
  /* @__PURE__ */ jsxs33(Switch2.Root, { size: "sm", colorPalette: "accent", checked, disabled, onCheckedChange, "aria-label": label, children: [
6470
6864
  /* @__PURE__ */ jsx48(Switch2.HiddenInput, {}),
@@ -6479,7 +6873,7 @@ function ColumnRow({ id, label, checked, disabled, onCheckedChange }) {
6479
6873
  import { useEffect as useEffect10, useId as useId2, useRef as useRef16, useState as useState16 } from "react";
6480
6874
  import { CloseButton as CloseButton3, Dialog as Dialog5, HStack as HStack9, Input as Input3, Portal as Portal13, Stack as Stack9, Text as Text10 } from "@chakra-ui/react";
6481
6875
  import { Plus, Trash2 } from "lucide-react";
6482
- import { Fragment as Fragment12, jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
6876
+ import { Fragment as Fragment13, jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
6483
6877
  function fill2(template, values) {
6484
6878
  return template.replace(/\{(\w+)\}/g, (_, k) => String(values[k] ?? `{${k}}`));
6485
6879
  }
@@ -6545,7 +6939,7 @@ function FilterBuilderDialog({ fields, initial, suggest, renderValueEditor, coun
6545
6939
  /* @__PURE__ */ jsx49(Dialog5.Body, { children: /* @__PURE__ */ jsxs34(Stack9, { gap: "3", children: [
6546
6940
  /* @__PURE__ */ jsxs34(Text10, { textStyle: "sm", color: "fg.muted", children: [
6547
6941
  labels.matchAll,
6548
- repeats && /* @__PURE__ */ jsxs34(Fragment12, { children: [
6942
+ repeats && /* @__PURE__ */ jsxs34(Fragment13, { children: [
6549
6943
  " ",
6550
6944
  labels.sameFieldAny
6551
6945
  ] })
@@ -6576,7 +6970,7 @@ function FilterBuilderDialog({ fields, initial, suggest, renderValueEditor, coun
6576
6970
  /* @__PURE__ */ jsx49(Dialog5.Footer, { children: /* @__PURE__ */ jsxs34(HStack9, { justify: "space-between", w: "full", wrap: "wrap", gap: "2", children: [
6577
6971
  /* @__PURE__ */ jsxs34(Text10, { textStyle: "sm", color: "fg.muted", "aria-live": "polite", "data-filter-count": "", children: [
6578
6972
  count != null && fill2(total != null ? labels.matchCount : labels.matchCountOnly, { count, total: total ?? "" }),
6579
- incomplete > 0 && /* @__PURE__ */ jsxs34(Fragment12, { children: [
6973
+ incomplete > 0 && /* @__PURE__ */ jsxs34(Fragment13, { children: [
6580
6974
  " \xB7 ",
6581
6975
  labels.incompleteSkipped
6582
6976
  ] })
@@ -6646,7 +7040,7 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
6646
7040
  }
6647
7041
  ),
6648
7042
  own,
6649
- !NO_VALUE_OPS.has(op) && own == null && /* @__PURE__ */ jsxs34(Fragment12, { children: [
7043
+ !NO_VALUE_OPS.has(op) && own == null && /* @__PURE__ */ jsxs34(Fragment13, { children: [
6650
7044
  /* @__PURE__ */ jsx49(
6651
7045
  Input3,
6652
7046
  {
@@ -6670,7 +7064,7 @@ function ConditionRow({ draft, fields, suggest, renderValueEditor, warn, onChang
6670
7064
  }
6671
7065
 
6672
7066
  // src/components/QueryableList.tsx
6673
- import { Fragment as Fragment13, jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
7067
+ import { Fragment as Fragment14, jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
6674
7068
  var PAIR = "";
6675
7069
  var pairKey = (first, second) => `${first}${PAIR}${second}`;
6676
7070
  var condition = (field, value) => value == null ? { field, op: "isEmpty" } : { field, op: "eq", value };
@@ -6814,11 +7208,11 @@ function QueryableList({
6814
7208
  const sortable = (fields ?? []).filter((f) => f.sortable);
6815
7209
  const groupLabel = groupField ? thenField ? `${label(groupField)} \xB7 ${label(thenField)}` : label(groupField) : null;
6816
7210
  return /* @__PURE__ */ jsxs35(Stack10, { gap: "3", children: [
6817
- /* @__PURE__ */ jsxs35(chakra28.div, { layerStyle: "panel", borderRadius: "l3", "data-query-toolbar": "", children: [
7211
+ /* @__PURE__ */ jsxs35(chakra29.div, { layerStyle: "panel", borderRadius: "l3", "data-query-toolbar": "", children: [
6818
7212
  /* @__PURE__ */ jsxs35(HStack10, { gap: "2", wrap: "wrap", justify: "space-between", px: "2.5", py: "2", borderBottomWidth: "1px", borderColor: "border.muted", children: [
6819
7213
  /* @__PURE__ */ jsxs35(HStack10, { gap: "2", wrap: "wrap", minW: "0", children: [
6820
7214
  leading,
6821
- leading != null && views && onSelectView && /* @__PURE__ */ jsx50(chakra28.span, { w: "1px", h: "6", bg: "border", mx: "1", "aria-hidden": true }),
7215
+ leading != null && views && onSelectView && /* @__PURE__ */ jsx50(chakra29.span, { w: "1px", h: "6", bg: "border", mx: "1", "aria-hidden": true }),
6822
7216
  views && onSelectView && /* @__PURE__ */ jsxs35(HStack10, { gap: "2", children: [
6823
7217
  /* @__PURE__ */ jsx50(Text11, { as: "span", textStyle: "xs", fontWeight: "semibold", color: "fg.muted", whiteSpace: "nowrap", hideBelow: "2xl", children: labels.savedView }),
6824
7218
  /* @__PURE__ */ jsx50(
@@ -6873,7 +7267,7 @@ function QueryableList({
6873
7267
  ]
6874
7268
  }
6875
7269
  ),
6876
- groupField && groupable.length > 1 && /* @__PURE__ */ jsxs35(Fragment13, { children: [
7270
+ groupField && groupable.length > 1 && /* @__PURE__ */ jsxs35(Fragment14, { children: [
6877
7271
  /* @__PURE__ */ jsx50(Menu3.Separator, {}),
6878
7272
  /* @__PURE__ */ jsxs35(
6879
7273
  Menu3.RadioItemGroup,
@@ -6967,7 +7361,7 @@ function QueryableList({
6967
7361
  ] }),
6968
7362
  mode === "basic" && conditions !== null && chips.length > 0 && /* @__PURE__ */ jsxs35(HStack10, { gap: "2", wrap: "wrap", px: "2.5", py: "2", borderTopWidth: "1px", borderColor: "border.muted", "data-filter-chips": "", children: [
6969
7363
  chips.map(({ c: c2, i }) => /* @__PURE__ */ jsxs35(
6970
- chakra28.span,
7364
+ chakra29.span,
6971
7365
  {
6972
7366
  display: "inline-flex",
6973
7367
  alignItems: "center",
@@ -7006,7 +7400,7 @@ function QueryableList({
7006
7400
  }
7007
7401
  }
7008
7402
  ),
7009
- toolbarFooter != null && /* @__PURE__ */ jsx50(chakra28.div, { borderTopWidth: "1px", borderColor: "border.muted", "data-toolbar-footer": "", children: toolbarFooter })
7403
+ toolbarFooter != null && /* @__PURE__ */ jsx50(chakra29.div, { borderTopWidth: "1px", borderColor: "border.muted", "data-toolbar-footer": "", children: toolbarFooter })
7010
7404
  ] }),
7011
7405
  mode === "basic" && error && !(loadFailed != null && error.failed && !result) && /* @__PURE__ */ jsx50(InlineAlert, { tone: "danger", children: error.message }),
7012
7406
  exported && /* @__PURE__ */ jsx50(InlineAlert, { tone: exported.tone, title: exported.tone === "danger" ? labels.exportFailed : void 0, children: /* @__PURE__ */ jsxs35(HStack10, { justify: "space-between", gap: "2", align: "start", children: [
@@ -7019,8 +7413,8 @@ function QueryableList({
7019
7413
  flush: true,
7020
7414
  footer: (
7021
7415
  // Expand and collapse at the start, the pages in the middle (the canvas's v12, UI round 9 step 67), the range at the end.
7022
- /* @__PURE__ */ jsxs35(chakra28.div, { display: "grid", w: "full", gridTemplateColumns: { base: "1fr", md: "1fr auto 1fr" }, alignItems: "center", gap: "3", children: [
7023
- /* @__PURE__ */ jsx50(HStack10, { gap: "3", children: grouped && /* @__PURE__ */ jsxs35(Fragment13, { children: [
7416
+ /* @__PURE__ */ jsxs35(chakra29.div, { display: "grid", w: "full", gridTemplateColumns: { base: "1fr", md: "1fr auto 1fr" }, alignItems: "center", gap: "3", children: [
7417
+ /* @__PURE__ */ jsx50(HStack10, { gap: "3", children: grouped && /* @__PURE__ */ jsxs35(Fragment14, { children: [
7024
7418
  /* @__PURE__ */ jsx50(Button, { size: "xs", variant: "ghost", color: "fg.accent", disabled: folded.size === 0, onClick: () => setFolded(/* @__PURE__ */ new Set()), children: labels.expandAll }),
7025
7419
  /* @__PURE__ */ jsx50(Button, { size: "xs", variant: "ghost", color: "fg.accent", disabled: groupKeys.every((k) => folded.has(k)), onClick: () => setFolded(new Set(groupKeys)), children: labels.collapseAll })
7026
7420
  ] }) }),
@@ -7087,7 +7481,7 @@ function QueryableList({
7087
7481
  const value = thenField ? info?.then?.value ?? null : info?.value ?? null;
7088
7482
  const period = thenField ? query.groupBy?.then?.period : query.groupBy?.period;
7089
7483
  return /* @__PURE__ */ jsxs35(HStack10, { gap: "2.5", flex: "1", minW: "0", children: [
7090
- /* @__PURE__ */ jsx50(chakra28.span, { display: "inline-flex", alignItems: "center", fontWeight: "medium", textStyle: "sm", minW: "0", children: raw == null || period || value == null ? groupName(value, label2, period) : renderCell(field, raw, first) }),
7484
+ /* @__PURE__ */ jsx50(chakra29.span, { display: "inline-flex", alignItems: "center", fontWeight: "medium", textStyle: "sm", minW: "0", children: raw == null || period || value == null ? groupName(value, label2, period) : renderCell(field, raw, first) }),
7091
7485
  /* @__PURE__ */ jsx50(CountBadge, { value: info?.count ?? rows.length }),
7092
7486
  !thenField && renderGroupAside?.({ field: groupField, value: info?.value ?? null, label: info?.label ?? "" }),
7093
7487
  conditions !== null && !period && /* @__PURE__ */ jsxs35(
@@ -7109,7 +7503,7 @@ function QueryableList({
7109
7503
  ]),
7110
7504
  children: [
7111
7505
  /* @__PURE__ */ jsx50(Filter, {}),
7112
- /* @__PURE__ */ jsx50(chakra28.span, { hideBelow: "md", children: labels.filterToGroup })
7506
+ /* @__PURE__ */ jsx50(chakra29.span, { hideBelow: "md", children: labels.filterToGroup })
7113
7507
  ]
7114
7508
  }
7115
7509
  )
@@ -7129,7 +7523,7 @@ function QueryableList({
7129
7523
  const raw = first?.values[groupField];
7130
7524
  const count = (result?.groups ?? []).filter((g) => groupKey(g.value) === parent).reduce((n, g) => n + g.count, 0);
7131
7525
  return /* @__PURE__ */ jsxs35(HStack10, { gap: "2.5", flex: "1", minW: "0", children: [
7132
- /* @__PURE__ */ jsx50(chakra28.span, { display: "inline-flex", alignItems: "center", fontWeight: "bold", textStyle: "sm", minW: "0", children: raw == null || query.groupBy?.period || info?.value == null ? groupName(info?.value, info?.label, query.groupBy?.period) : renderCell(groupField, raw, first) }),
7526
+ /* @__PURE__ */ jsx50(chakra29.span, { display: "inline-flex", alignItems: "center", fontWeight: "bold", textStyle: "sm", minW: "0", children: raw == null || query.groupBy?.period || info?.value == null ? groupName(info?.value, info?.label, query.groupBy?.period) : renderCell(groupField, raw, first) }),
7133
7527
  /* @__PURE__ */ jsx50(CountBadge, { value: count }),
7134
7528
  renderGroupAside?.({ field: groupField, value: info?.value ?? null, label: info?.label ?? "" })
7135
7529
  ] });
@@ -7174,7 +7568,7 @@ function QuickSearch({ initial, placeholder: placeholder2, onRun }) {
7174
7568
  timer.current = setTimeout(() => next.trim() !== initial.trim() && onRun(next), 400);
7175
7569
  }
7176
7570
  return /* @__PURE__ */ jsx50(
7177
- chakra28.form,
7571
+ chakra29.form,
7178
7572
  {
7179
7573
  role: "search",
7180
7574
  flex: "1",
@@ -7391,9 +7785,9 @@ function RqlBox({
7391
7785
  ),
7392
7786
  error && /* @__PURE__ */ jsxs35(InlineAlert, { tone: "danger", size: "sm", children: [
7393
7787
  error.message,
7394
- hasSpan && /* @__PURE__ */ jsxs35(chakra28.code, { display: "block", mt: "1", fontFamily: "mono", whiteSpace: "pre-wrap", children: [
7788
+ hasSpan && /* @__PURE__ */ jsxs35(chakra29.code, { display: "block", mt: "1", fontFamily: "mono", whiteSpace: "pre-wrap", children: [
7395
7789
  text.slice(0, error.start),
7396
- /* @__PURE__ */ jsx50(chakra28.mark, { bg: "red.subtle", color: "fg", textDecoration: "underline wavy", textDecorationColor: "fg.error", children: text.slice(error.start, error.end) || " " }),
7790
+ /* @__PURE__ */ jsx50(chakra29.mark, { bg: "red.subtle", color: "fg", textDecoration: "underline wavy", textDecorationColor: "fg.error", children: text.slice(error.start, error.end) || " " }),
7397
7791
  text.slice(error.end)
7398
7792
  ] })
7399
7793
  ] })
@@ -7473,13 +7867,13 @@ function DropHint({ show, children }) {
7473
7867
 
7474
7868
  // src/components/UploadList.tsx
7475
7869
  import { useLayoutEffect as useLayoutEffect5, useRef as useRef19 } from "react";
7476
- import { Box as Box10, chakra as chakra29, HStack as HStack12, Stack as Stack11, Text as Text13 } from "@chakra-ui/react";
7870
+ import { Box as Box10, chakra as chakra30, HStack as HStack12, Stack as Stack11, Text as Text13 } from "@chakra-ui/react";
7477
7871
  import { Check as Check3, File as FileIcon, RotateCcw, TriangleAlert, X as X3 } from "lucide-react";
7478
7872
  import { jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
7479
7873
  var OUT4 = `cubic-bezier(${curves.out.join(", ")})`;
7480
7874
  function UploadList({ rows, summary, fraction, announce, labels, onCancel, onRetry, onDismiss }) {
7481
7875
  return /* @__PURE__ */ jsxs37(Stack11, { gap: "2", "data-testid": "upload-list", children: [
7482
- /* @__PURE__ */ jsx52(chakra29.span, { srOnly: true, "aria-live": "polite", children: announce }),
7876
+ /* @__PURE__ */ jsx52(chakra30.span, { srOnly: true, "aria-live": "polite", children: announce }),
7483
7877
  rows.length > 0 && summary != null && /* @__PURE__ */ jsxs37(Stack11, { gap: "1", children: [
7484
7878
  /* @__PURE__ */ jsx52(Text13, { textStyle: "caption", color: "fg.muted", children: summary }),
7485
7879
  fraction != null && /* @__PURE__ */ jsx52(Bar2, { fraction, tone: "accent", label: typeof summary === "string" ? summary : void 0 })
@@ -7509,7 +7903,7 @@ function Row({ row, labels, onCancel, onRetry, onDismiss }) {
7509
7903
  ] });
7510
7904
  }
7511
7905
  function Preview({ src }) {
7512
- return /* @__PURE__ */ jsx52(Box10, { boxSize: "8", flexShrink: 0, rounded: "l1", overflow: "hidden", bg: "bg.muted", color: "fg.subtle", display: "grid", placeItems: "center", _icon: { boxSize: "4" }, children: src ? /* @__PURE__ */ jsx52(chakra29.img, { src, alt: "", boxSize: "full", objectFit: "cover" }) : /* @__PURE__ */ jsx52(FileIcon, {}) });
7906
+ return /* @__PURE__ */ jsx52(Box10, { boxSize: "8", flexShrink: 0, rounded: "l1", overflow: "hidden", bg: "bg.muted", color: "fg.subtle", display: "grid", placeItems: "center", _icon: { boxSize: "4" }, children: src ? /* @__PURE__ */ jsx52(chakra30.img, { src, alt: "", boxSize: "full", objectFit: "cover" }) : /* @__PURE__ */ jsx52(FileIcon, {}) });
7513
7907
  }
7514
7908
  function Bar2({ fraction, tone, label, quiet: quiet2 }) {
7515
7909
  const { reduce } = useMotionSetting();
@@ -7541,7 +7935,7 @@ function Done() {
7541
7935
  { duration: 260, easing: OUT4 }
7542
7936
  );
7543
7937
  }, []);
7544
- return /* @__PURE__ */ jsx52(chakra29.span, { ref, display: "inline-grid", placeItems: "center", boxSize: "4", rounded: "full", bg: "fg.success", color: "bg", _icon: { boxSize: "3" }, children: /* @__PURE__ */ jsx52(Check3, { strokeWidth: 3 }) });
7938
+ return /* @__PURE__ */ jsx52(chakra30.span, { ref, display: "inline-grid", placeItems: "center", boxSize: "4", rounded: "full", bg: "fg.success", color: "bg", _icon: { boxSize: "3" }, children: /* @__PURE__ */ jsx52(Check3, { strokeWidth: 3 }) });
7545
7939
  }
7546
7940
 
7547
7941
  // src/files/drop.ts
@@ -7938,7 +8332,7 @@ function SortableItem({ id, children }) {
7938
8332
  }
7939
8333
 
7940
8334
  // src/components/TimelineChart.tsx
7941
- import { Fragment as Fragment14, useEffect as useEffect13, useLayoutEffect as useLayoutEffect6, useRef as useRef21, useState as useState20 } from "react";
8335
+ import { Fragment as Fragment15, useEffect as useEffect13, useLayoutEffect as useLayoutEffect6, useRef as useRef21, useState as useState20 } from "react";
7942
8336
  import { Box as Box12, HStack as HStack13, Popover as Popover3, Portal as Portal16, Stack as Stack13, Text as Text15 } from "@chakra-ui/react";
7943
8337
  import { Flag, Trash2 as Trash23 } from "lucide-react";
7944
8338
  import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
@@ -8539,7 +8933,7 @@ function TimelineChart({
8539
8933
  const thin = tone === "rollup" && !single;
8540
8934
  const diamond = single ? { w: `${DIAMOND}px`, h: `${DIAMOND}px`, top: `${i * rowHeight + rowHeight / 2 - DIAMOND / 2}px`, transform: "rotate(45deg)", rounded: "l1" } : null;
8541
8935
  const canLink = !!onLink && item.linkable !== false && !drag;
8542
- return /* @__PURE__ */ jsxs39(Fragment14, { children: [
8936
+ return /* @__PURE__ */ jsxs39(Fragment15, { children: [
8543
8937
  /* @__PURE__ */ jsxs39(
8544
8938
  Box12,
8545
8939
  {
@@ -8783,7 +9177,7 @@ function TimelineChart({
8783
9177
 
8784
9178
  // src/components/TimelineCards.tsx
8785
9179
  import { useEffect as useEffect14, useMemo as useMemo12, useRef as useRef22, useState as useState21 } from "react";
8786
- import { Box as Box13, chakra as chakra30, Grid as Grid2, Stack as Stack14, Text as Text16 } from "@chakra-ui/react";
9180
+ import { Box as Box13, chakra as chakra31, Grid as Grid3, Stack as Stack14, Text as Text16 } from "@chakra-ui/react";
8787
9181
 
8788
9182
  // src/components/timeline-cards-math.ts
8789
9183
  var DAY3 = 864e5;
@@ -8850,7 +9244,7 @@ function TimelineCards(props) {
8850
9244
  }
8851
9245
  };
8852
9246
  return /* @__PURE__ */ jsxs40(
8853
- chakra30.div,
9247
+ chakra31.div,
8854
9248
  {
8855
9249
  role: "region",
8856
9250
  "aria-label": props["aria-label"],
@@ -8868,7 +9262,7 @@ function TimelineCards(props) {
8868
9262
  }
8869
9263
  function Card({ item, p, range, cutStart, cutEnd, style }) {
8870
9264
  const card = /* @__PURE__ */ jsxs40(
8871
- chakra30.button,
9265
+ chakra31.button,
8872
9266
  {
8873
9267
  type: "button",
8874
9268
  "data-timeline-card": item.id,
@@ -8919,12 +9313,12 @@ function Lanes(p) {
8919
9313
  const gridW = days.length * colW;
8920
9314
  const placeholders = useLoading(p.loading) && items.length === 0;
8921
9315
  const height = (placeholders ? 4 : Math.max(lanes, 1)) * LANE + 16;
8922
- return /* @__PURE__ */ jsx55(chakra30.div, { overflowX: "auto", ref: box, children: /* @__PURE__ */ jsxs40(chakra30.div, { position: "relative", minW: "full", w: `${gridW}px`, children: [
8923
- /* @__PURE__ */ jsx55(chakra30.div, { display: "flex", borderBottomWidth: "1px", borderColor: "border", bg: "bg.subtle", position: "sticky", top: "0", zIndex: "1", children: days.map((d) => {
9316
+ return /* @__PURE__ */ jsx55(chakra31.div, { overflowX: "auto", ref: box, children: /* @__PURE__ */ jsxs40(chakra31.div, { position: "relative", minW: "full", w: `${gridW}px`, children: [
9317
+ /* @__PURE__ */ jsx55(chakra31.div, { display: "flex", borderBottomWidth: "1px", borderColor: "border", bg: "bg.subtle", position: "sticky", top: "0", zIndex: "1", children: days.map((d) => {
8924
9318
  const isToday = d === today;
8925
9319
  const weekStart = new Date(dayNumber(d) * 864e5).getUTCDay() === 0;
8926
9320
  return /* @__PURE__ */ jsxs40(
8927
- chakra30.div,
9321
+ chakra31.div,
8928
9322
  {
8929
9323
  w: `${colW}px`,
8930
9324
  flexShrink: 0,
@@ -8960,9 +9354,9 @@ function Lanes(p) {
8960
9354
  d
8961
9355
  );
8962
9356
  }) }),
8963
- /* @__PURE__ */ jsx55(chakra30.div, { position: "absolute", insetInlineStart: "0", top: "0", bottom: "0", display: "flex", pointerEvents: "none", "aria-hidden": true, children: days.map((d) => /* @__PURE__ */ jsx55(chakra30.div, { w: `${colW}px`, flexShrink: 0, borderInlineEndWidth: "1px", borderStyle: "dashed", borderColor: "border.muted" }, d)) }),
9357
+ /* @__PURE__ */ jsx55(chakra31.div, { position: "absolute", insetInlineStart: "0", top: "0", bottom: "0", display: "flex", pointerEvents: "none", "aria-hidden": true, children: days.map((d) => /* @__PURE__ */ jsx55(chakra31.div, { w: `${colW}px`, flexShrink: 0, borderInlineEndWidth: "1px", borderStyle: "dashed", borderColor: "border.muted" }, d)) }),
8964
9358
  todayIdx >= 0 && /* @__PURE__ */ jsx55(
8965
- chakra30.div,
9359
+ chakra31.div,
8966
9360
  {
8967
9361
  position: "absolute",
8968
9362
  top: "0",
@@ -8976,7 +9370,7 @@ function Lanes(p) {
8976
9370
  zIndex: "1"
8977
9371
  }
8978
9372
  ),
8979
- placeholders ? /* @__PURE__ */ jsx55(chakra30.div, { position: "relative", h: `${height}px`, "aria-hidden": true, children: [0, 1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsx55(
9373
+ placeholders ? /* @__PURE__ */ jsx55(chakra31.div, { position: "relative", h: `${height}px`, "aria-hidden": true, children: [0, 1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsx55(
8980
9374
  Bone,
8981
9375
  {
8982
9376
  position: "absolute",
@@ -8987,10 +9381,10 @@ function Lanes(p) {
8987
9381
  borderRadius: "l2"
8988
9382
  },
8989
9383
  i
8990
- )) }) : cards.length === 0 && p.empty ? /* @__PURE__ */ jsx55(chakra30.div, { position: "relative", py: "6", children: p.empty }) : /* @__PURE__ */ jsx55(chakra30.div, { position: "relative", h: `${height}px`, role: "list", children: cards.map((c2) => {
9384
+ )) }) : cards.length === 0 && p.empty ? /* @__PURE__ */ jsx55(chakra31.div, { position: "relative", py: "6", children: p.empty }) : /* @__PURE__ */ jsx55(chakra31.div, { position: "relative", h: `${height}px`, role: "list", children: cards.map((c2) => {
8991
9385
  const item = byId.get(c2.id);
8992
9386
  return /* @__PURE__ */ jsx55(
8993
- chakra30.div,
9387
+ chakra31.div,
8994
9388
  {
8995
9389
  role: "listitem",
8996
9390
  position: "absolute",
@@ -9014,8 +9408,8 @@ function DayGrid(p) {
9014
9408
  const x = dayNumber(day);
9015
9409
  return s <= x && x <= d;
9016
9410
  });
9017
- if (due.length === 0 && p.empty) return /* @__PURE__ */ jsx55(chakra30.div, { py: "6", children: p.empty });
9018
- return /* @__PURE__ */ jsx55(Grid2, { role: "list", templateColumns: "repeat(auto-fill, minmax(16rem, 1fr))", gap: "2", p: "3", children: due.map((i) => /* @__PURE__ */ jsx55(chakra30.div, { role: "listitem", display: "flex", children: /* @__PURE__ */ jsx55(Card, { item: i, p, range: Boolean(i.start && i.start < i.due), style: { w: "full" } }) }, i.id)) });
9411
+ if (due.length === 0 && p.empty) return /* @__PURE__ */ jsx55(chakra31.div, { py: "6", children: p.empty });
9412
+ return /* @__PURE__ */ jsx55(Grid3, { role: "list", templateColumns: "repeat(auto-fill, minmax(16rem, 1fr))", gap: "2", p: "3", children: due.map((i) => /* @__PURE__ */ jsx55(chakra31.div, { role: "listitem", display: "flex", children: /* @__PURE__ */ jsx55(Card, { item: i, p, range: Boolean(i.start && i.start < i.due), style: { w: "full" } }) }, i.id)) });
9019
9413
  }
9020
9414
  export {
9021
9415
  ABP_UI_VERSION,
@@ -9084,6 +9478,7 @@ export {
9084
9478
  RevealItem,
9085
9479
  SHOWN,
9086
9480
  STEP_UP_REQUIRED,
9481
+ STRONG_FACTOR_REQUIRED,
9087
9482
  SearchInput,
9088
9483
  SegmentedControl,
9089
9484
  SelectField,
@@ -9141,6 +9536,7 @@ export {
9141
9536
  isStepUp,
9142
9537
  looksLikeCode,
9143
9538
  durations2 as motionDurations,
9539
+ needsStepUp,
9144
9540
  notify,
9145
9541
  pageList,
9146
9542
  partsOf,
@@ -9158,6 +9554,7 @@ export {
9158
9554
  shineCss,
9159
9555
  springs,
9160
9556
  staggerDelay,
9557
+ stepUpNeedOf,
9161
9558
  targetOf,
9162
9559
  toStart,
9163
9560
  toaster,