2026-09-11 15:22:14 +08:00
|
|
|
import { channelValidationMessage } from "./validationMessages";
|
2026-08-07 16:53:31 +08:00
|
|
|
import { useCallback, useEffect, useRef, useState, type ReactNode } from "react";
|
2026-07-13 13:11:46 +08:00
|
|
|
import QRCode from "qrcode";
|
2026-09-11 15:22:14 +08:00
|
|
|
import { Check, Loader2, RotateCcw } from "lucide-react";
|
2026-07-13 13:11:46 +08:00
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
|
|
|
|
|
|
import { Button } from "@/components/ui/button";
|
2026-07-22 22:35:39 +08:00
|
|
|
import { usePageVisibility } from "@/hooks/usePageVisibility";
|
2026-07-13 13:11:46 +08:00
|
|
|
import {
|
|
|
|
|
cancelChannelConnect,
|
|
|
|
|
pollChannelConnect,
|
|
|
|
|
startChannelConnect,
|
|
|
|
|
} from "@/lib/api";
|
|
|
|
|
import type {
|
|
|
|
|
ChannelConnectPayload,
|
|
|
|
|
NanobotFeaturesPayload,
|
|
|
|
|
} from "@/lib/types";
|
2026-08-10 15:43:54 +08:00
|
|
|
import { useClient } from "@/providers/ClientProvider";
|
2026-07-13 13:11:46 +08:00
|
|
|
|
|
|
|
|
export type ChannelQrConnectLabels = {
|
2026-09-26 14:53:40 +08:00
|
|
|
qrAlt?: string;
|
2026-07-13 13:11:46 +08:00
|
|
|
scanTitle: string;
|
|
|
|
|
scanDescription: string;
|
|
|
|
|
waiting: string;
|
|
|
|
|
connected: string;
|
|
|
|
|
stopped: string;
|
|
|
|
|
connecting: string;
|
|
|
|
|
scanAgain: string;
|
|
|
|
|
connect: string;
|
|
|
|
|
};
|
|
|
|
|
|
2026-08-07 16:53:31 +08:00
|
|
|
export type ChannelQrConnectPendingContext = {
|
|
|
|
|
connect: ChannelConnectPayload;
|
|
|
|
|
busy: boolean;
|
|
|
|
|
poll: (
|
|
|
|
|
params?: Readonly<Record<string, string>>,
|
|
|
|
|
) => Promise<ChannelConnectPayload | null>;
|
|
|
|
|
};
|
|
|
|
|
|
2026-07-13 13:11:46 +08:00
|
|
|
export function ChannelQrConnectFlow({
|
|
|
|
|
channelName,
|
2026-09-11 15:22:14 +08:00
|
|
|
startParams = {},
|
2026-07-13 13:11:46 +08:00
|
|
|
idleLabel,
|
|
|
|
|
connectRequestId,
|
2026-07-19 23:30:49 +08:00
|
|
|
forceOnRepeat = false,
|
2026-09-19 01:03:04 +08:00
|
|
|
connected = false,
|
2026-09-11 15:22:14 +08:00
|
|
|
autoStart = false,
|
|
|
|
|
minimalPending = false,
|
2026-09-26 14:53:40 +08:00
|
|
|
showQrCode = true,
|
2026-07-13 13:11:46 +08:00
|
|
|
labels,
|
|
|
|
|
onFeaturesUpdate,
|
2026-08-07 16:53:31 +08:00
|
|
|
pausePolling,
|
|
|
|
|
renderPending,
|
|
|
|
|
resolveMessage,
|
|
|
|
|
suppressSucceeded = false,
|
2026-09-19 00:08:37 +08:00
|
|
|
onActiveChange,
|
2026-09-19 01:03:04 +08:00
|
|
|
renderActions,
|
2026-07-13 13:11:46 +08:00
|
|
|
}: {
|
|
|
|
|
token: string;
|
2026-07-19 23:30:49 +08:00
|
|
|
channelName: string;
|
2026-09-11 15:22:14 +08:00
|
|
|
startParams?: Readonly<Record<string, string | boolean>>;
|
2026-07-13 13:11:46 +08:00
|
|
|
idleLabel?: string;
|
|
|
|
|
connectRequestId?: number;
|
2026-07-19 23:30:49 +08:00
|
|
|
forceOnRepeat?: boolean;
|
2026-09-19 01:03:04 +08:00
|
|
|
connected?: boolean;
|
2026-09-11 15:22:14 +08:00
|
|
|
autoStart?: boolean;
|
|
|
|
|
minimalPending?: boolean;
|
2026-09-26 14:53:40 +08:00
|
|
|
/** Browser-based authorization can reuse the flow without generating or showing a QR code. */
|
|
|
|
|
showQrCode?: boolean;
|
2026-07-13 13:11:46 +08:00
|
|
|
labels: ChannelQrConnectLabels;
|
|
|
|
|
onFeaturesUpdate: (payload: NanobotFeaturesPayload) => void;
|
2026-08-07 16:53:31 +08:00
|
|
|
pausePolling?: (payload: ChannelConnectPayload) => boolean;
|
|
|
|
|
renderPending?: (context: ChannelQrConnectPendingContext) => ReactNode;
|
|
|
|
|
resolveMessage?: (payload: ChannelConnectPayload) => string | undefined;
|
|
|
|
|
suppressSucceeded?: boolean;
|
2026-09-19 00:08:37 +08:00
|
|
|
onActiveChange?: (active: boolean) => void;
|
2026-09-19 01:03:04 +08:00
|
|
|
renderActions?: (connectButton: ReactNode) => ReactNode;
|
2026-07-13 13:11:46 +08:00
|
|
|
}) {
|
2026-08-10 15:43:54 +08:00
|
|
|
const { client } = useClient();
|
2026-07-22 22:35:39 +08:00
|
|
|
const pageVisible = usePageVisibility();
|
2026-07-13 13:11:46 +08:00
|
|
|
const { t } = useTranslation();
|
|
|
|
|
const tx = (key: string, fallback: string) => t(key, { defaultValue: fallback });
|
|
|
|
|
const [connect, setConnect] = useState<ChannelConnectPayload | null>(null);
|
|
|
|
|
const [qrDataUrl, setQrDataUrl] = useState("");
|
|
|
|
|
const [busy, setBusy] = useState(false);
|
|
|
|
|
const [error, setError] = useState<string | null>(null);
|
2026-09-11 15:22:14 +08:00
|
|
|
const handledRequestId = useRef(0);
|
|
|
|
|
const autoStarted = useRef(false);
|
2026-07-13 13:11:46 +08:00
|
|
|
const pollInFlight = useRef(false);
|
|
|
|
|
|
|
|
|
|
const pending = connect?.status === "pending";
|
2026-09-19 01:03:04 +08:00
|
|
|
const succeeded = !pending && (connected || connect?.status === "succeeded");
|
2026-07-13 13:11:46 +08:00
|
|
|
const canStart = !pending && !busy;
|
2026-09-19 00:08:37 +08:00
|
|
|
useEffect(() => {
|
|
|
|
|
onActiveChange?.(pending || busy);
|
|
|
|
|
}, [pending, busy, onActiveChange]);
|
2026-08-07 16:53:31 +08:00
|
|
|
const pollingPaused = Boolean(connect && pausePolling?.(connect));
|
|
|
|
|
const displayMessage = connect
|
2026-09-11 15:22:14 +08:00
|
|
|
? resolveMessage?.(connect) ?? (connect.message ? channelValidationMessage(connect.message, t) : undefined)
|
2026-08-07 16:53:31 +08:00
|
|
|
: undefined;
|
2026-07-13 13:11:46 +08:00
|
|
|
|
|
|
|
|
useEffect(() => {
|
2026-09-26 14:53:40 +08:00
|
|
|
if (!showQrCode || !connect?.qr_url) {
|
2026-07-13 13:11:46 +08:00
|
|
|
setQrDataUrl("");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let cancelled = false;
|
|
|
|
|
void QRCode.toDataURL(connect.qr_url, {
|
|
|
|
|
width: 184,
|
|
|
|
|
margin: 1,
|
|
|
|
|
color: { dark: "#111827", light: "#ffffff" },
|
|
|
|
|
})
|
|
|
|
|
.then((url) => {
|
|
|
|
|
if (!cancelled) setQrDataUrl(url);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
if (!cancelled) setQrDataUrl("");
|
|
|
|
|
});
|
|
|
|
|
return () => {
|
|
|
|
|
cancelled = true;
|
|
|
|
|
};
|
2026-09-26 14:53:40 +08:00
|
|
|
}, [connect?.qr_url, showQrCode]);
|
2026-07-13 13:11:46 +08:00
|
|
|
|
|
|
|
|
useEffect(() => {
|
2026-08-07 16:53:31 +08:00
|
|
|
if (
|
|
|
|
|
!connect?.session_id
|
|
|
|
|
|| connect.status !== "pending"
|
|
|
|
|
|| pollingPaused
|
|
|
|
|
|| !pageVisible
|
|
|
|
|
) return;
|
2026-07-13 13:11:46 +08:00
|
|
|
let cancelled = false;
|
2026-08-07 16:53:31 +08:00
|
|
|
const sessionId = connect.session_id;
|
2026-07-13 13:11:46 +08:00
|
|
|
const poll = async () => {
|
|
|
|
|
if (pollInFlight.current) return;
|
|
|
|
|
pollInFlight.current = true;
|
|
|
|
|
try {
|
2026-07-30 10:25:22 +08:00
|
|
|
const payload = await pollChannelConnect(
|
2026-08-10 15:43:54 +08:00
|
|
|
client,
|
2026-07-30 10:25:22 +08:00
|
|
|
channelName,
|
2026-08-07 16:53:31 +08:00
|
|
|
sessionId,
|
2026-07-30 10:25:22 +08:00
|
|
|
);
|
2026-07-13 13:11:46 +08:00
|
|
|
if (cancelled) return;
|
|
|
|
|
setConnect((current) => ({
|
|
|
|
|
...(current ?? payload),
|
|
|
|
|
...payload,
|
|
|
|
|
qr_url: payload.qr_url ?? current?.qr_url,
|
|
|
|
|
}));
|
|
|
|
|
if (payload.nanobot_features) {
|
|
|
|
|
onFeaturesUpdate(payload.nanobot_features);
|
|
|
|
|
}
|
|
|
|
|
if (payload.status !== "pending") {
|
|
|
|
|
setError(null);
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
if (!cancelled) setError((err as Error).message);
|
|
|
|
|
} finally {
|
|
|
|
|
pollInFlight.current = false;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const initial = window.setTimeout(() => void poll(), 900);
|
|
|
|
|
const interval = window.setInterval(
|
|
|
|
|
() => void poll(),
|
|
|
|
|
Math.max(2500, connect.interval_ms ?? 5000),
|
|
|
|
|
);
|
|
|
|
|
return () => {
|
|
|
|
|
cancelled = true;
|
|
|
|
|
window.clearTimeout(initial);
|
|
|
|
|
window.clearInterval(interval);
|
|
|
|
|
};
|
2026-07-30 10:25:22 +08:00
|
|
|
}, [
|
|
|
|
|
channelName,
|
2026-08-10 15:43:54 +08:00
|
|
|
client,
|
2026-07-30 10:25:22 +08:00
|
|
|
connect?.interval_ms,
|
|
|
|
|
connect?.session_id,
|
|
|
|
|
connect?.status,
|
|
|
|
|
onFeaturesUpdate,
|
|
|
|
|
pageVisible,
|
2026-08-07 16:53:31 +08:00
|
|
|
pollingPaused,
|
2026-07-30 10:25:22 +08:00
|
|
|
]);
|
2026-07-13 13:11:46 +08:00
|
|
|
|
|
|
|
|
const start = useCallback(async (force = false) => {
|
|
|
|
|
setBusy(true);
|
|
|
|
|
setError(null);
|
|
|
|
|
try {
|
2026-08-10 15:43:54 +08:00
|
|
|
const payload = await startChannelConnect(client, channelName, {
|
2026-09-11 15:22:14 +08:00
|
|
|
...startParams,
|
|
|
|
|
...(force ? { force: true } : {}),
|
2026-07-13 13:11:46 +08:00
|
|
|
});
|
|
|
|
|
setConnect(payload);
|
2026-09-19 01:14:23 +08:00
|
|
|
if (payload.nanobot_features) {
|
|
|
|
|
onFeaturesUpdate(payload.nanobot_features);
|
|
|
|
|
}
|
2026-07-13 13:11:46 +08:00
|
|
|
} catch (err) {
|
|
|
|
|
setError((err as Error).message);
|
|
|
|
|
} finally {
|
|
|
|
|
setBusy(false);
|
|
|
|
|
}
|
2026-09-19 01:14:23 +08:00
|
|
|
}, [channelName, client, startParams, onFeaturesUpdate]);
|
2026-07-13 13:11:46 +08:00
|
|
|
|
|
|
|
|
useEffect(() => {
|
2026-09-11 15:22:14 +08:00
|
|
|
const requested = Boolean(connectRequestId && connectRequestId !== handledRequestId.current);
|
|
|
|
|
if (!requested && !(autoStart && !autoStarted.current)) return;
|
|
|
|
|
handledRequestId.current = connectRequestId ?? 0;
|
|
|
|
|
autoStarted.current = true;
|
2026-07-13 13:11:46 +08:00
|
|
|
void start();
|
2026-09-11 15:22:14 +08:00
|
|
|
}, [autoStart, connectRequestId, start]);
|
2026-07-13 13:11:46 +08:00
|
|
|
|
|
|
|
|
const cancel = async () => {
|
|
|
|
|
if (!connect?.session_id) {
|
|
|
|
|
setConnect(null);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
setBusy(true);
|
|
|
|
|
try {
|
2026-07-30 10:25:22 +08:00
|
|
|
const payload = await cancelChannelConnect(
|
2026-08-10 15:43:54 +08:00
|
|
|
client,
|
2026-07-30 10:25:22 +08:00
|
|
|
channelName,
|
|
|
|
|
connect.session_id,
|
|
|
|
|
);
|
2026-07-13 13:11:46 +08:00
|
|
|
setConnect(payload);
|
|
|
|
|
} catch (err) {
|
|
|
|
|
setError((err as Error).message);
|
|
|
|
|
} finally {
|
|
|
|
|
setBusy(false);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2026-08-07 16:53:31 +08:00
|
|
|
const submitPoll = async (
|
|
|
|
|
params: Readonly<Record<string, string>> = {},
|
|
|
|
|
): Promise<ChannelConnectPayload | null> => {
|
|
|
|
|
if (!connect?.session_id) return null;
|
|
|
|
|
setBusy(true);
|
|
|
|
|
setError(null);
|
|
|
|
|
try {
|
|
|
|
|
const payload = await pollChannelConnect(
|
2026-08-10 15:43:54 +08:00
|
|
|
client,
|
2026-08-07 16:53:31 +08:00
|
|
|
channelName,
|
|
|
|
|
connect.session_id,
|
|
|
|
|
params,
|
|
|
|
|
);
|
|
|
|
|
setConnect((current) => ({
|
|
|
|
|
...(current ?? payload),
|
|
|
|
|
...payload,
|
|
|
|
|
qr_url: payload.qr_url ?? current?.qr_url,
|
|
|
|
|
}));
|
|
|
|
|
if (payload.nanobot_features) {
|
|
|
|
|
onFeaturesUpdate(payload.nanobot_features);
|
|
|
|
|
}
|
|
|
|
|
if (payload.status !== "pending") {
|
|
|
|
|
setError(null);
|
|
|
|
|
}
|
|
|
|
|
return payload;
|
|
|
|
|
} catch (err) {
|
|
|
|
|
setError((err as Error).message);
|
|
|
|
|
return null;
|
|
|
|
|
} finally {
|
|
|
|
|
setBusy(false);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2026-09-19 01:03:04 +08:00
|
|
|
const renderActionRow = renderActions ?? ((connectButton: ReactNode) => (
|
|
|
|
|
<div className="flex flex-wrap justify-end gap-2">{connectButton}</div>
|
|
|
|
|
));
|
|
|
|
|
|
2026-07-13 13:11:46 +08:00
|
|
|
return (
|
|
|
|
|
<div className="mt-3 space-y-3">
|
2026-09-11 15:22:14 +08:00
|
|
|
{autoStart && busy && !connect ? (
|
|
|
|
|
<div role="status" className="grid min-h-[228px] place-items-center">
|
|
|
|
|
<Loader2 className="h-5 w-5 animate-spin text-muted-foreground" aria-hidden />
|
|
|
|
|
<span className="sr-only">{labels.connecting}</span>
|
|
|
|
|
</div>
|
|
|
|
|
) : null}
|
2026-09-26 14:53:40 +08:00
|
|
|
{pending && minimalPending && showQrCode ? (
|
2026-09-11 15:22:14 +08:00
|
|
|
<div className="flex min-h-[228px] flex-col items-center justify-center gap-4 py-4">
|
|
|
|
|
<div className="grid h-[196px] w-[196px] place-items-center rounded-control bg-background shadow-[inset_0_0_0_1px_oklch(0_0_0/0.1)] dark:shadow-[inset_0_0_0_1px_oklch(1_0_0/0.1)]">
|
|
|
|
|
{qrDataUrl ? (
|
|
|
|
|
<img
|
|
|
|
|
src={qrDataUrl}
|
2026-09-26 14:53:40 +08:00
|
|
|
alt={labels.qrAlt ?? labels.scanTitle}
|
2026-09-11 15:22:14 +08:00
|
|
|
className="h-[184px] w-[184px]"
|
|
|
|
|
/>
|
|
|
|
|
) : (
|
|
|
|
|
<Loader2 className="h-5 w-5 animate-spin text-muted-foreground" aria-hidden />
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
{renderPending?.({ connect, busy, poll: submitPoll })}
|
|
|
|
|
</div>
|
|
|
|
|
) : pending ? (
|
2026-09-26 14:53:40 +08:00
|
|
|
<div className={`grid gap-4 rounded-control border border-border/70 p-4 ${showQrCode ? "sm:grid-cols-[auto_minmax(0,1fr)]" : ""}`}>
|
|
|
|
|
{showQrCode ? <div className="grid h-[196px] w-[196px] place-items-center rounded-control border border-border/60 bg-background">
|
2026-07-13 13:11:46 +08:00
|
|
|
{qrDataUrl ? (
|
|
|
|
|
<img
|
|
|
|
|
src={qrDataUrl}
|
2026-09-26 14:53:40 +08:00
|
|
|
alt={labels.qrAlt ?? labels.scanTitle}
|
2026-07-13 13:11:46 +08:00
|
|
|
className="h-[184px] w-[184px]"
|
|
|
|
|
/>
|
|
|
|
|
) : (
|
|
|
|
|
<Loader2 className="h-5 w-5 animate-spin text-muted-foreground" aria-hidden />
|
|
|
|
|
)}
|
2026-09-26 14:53:40 +08:00
|
|
|
</div> : null}
|
2026-07-13 13:11:46 +08:00
|
|
|
<div className="flex min-w-0 flex-col justify-center">
|
|
|
|
|
<div className="text-[13px] font-semibold text-foreground">
|
|
|
|
|
{labels.scanTitle}
|
|
|
|
|
</div>
|
|
|
|
|
<p className="mt-1 text-[12.5px] leading-5 text-muted-foreground">
|
2026-09-26 14:53:40 +08:00
|
|
|
{!showQrCode || qrDataUrl ? labels.scanDescription : null}
|
2026-07-13 13:11:46 +08:00
|
|
|
</p>
|
2026-08-07 16:53:31 +08:00
|
|
|
{renderPending?.({ connect, busy, poll: submitPoll }) ?? (
|
|
|
|
|
<div className="mt-3 flex items-center gap-2 text-[12px] text-muted-foreground">
|
|
|
|
|
<Loader2 className="h-3.5 w-3.5 animate-spin" aria-hidden />
|
2026-09-26 14:53:40 +08:00
|
|
|
{!showQrCode || qrDataUrl ? labels.waiting : labels.connecting}
|
2026-08-07 16:53:31 +08:00
|
|
|
</div>
|
|
|
|
|
)}
|
2026-07-13 13:11:46 +08:00
|
|
|
<div className="mt-4 flex flex-wrap justify-end gap-2">
|
|
|
|
|
<Button
|
|
|
|
|
type="button"
|
|
|
|
|
size="sm"
|
|
|
|
|
variant="outline"
|
|
|
|
|
className="h-8 rounded-full px-3 text-[12px] font-semibold"
|
|
|
|
|
onClick={() => void cancel()}
|
|
|
|
|
disabled={busy}
|
|
|
|
|
>
|
|
|
|
|
{tx("settings.actions.cancel", "Cancel")}
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
) : null}
|
|
|
|
|
|
2026-08-07 16:53:31 +08:00
|
|
|
{succeeded && !suppressSucceeded ? (
|
2026-08-14 07:07:09 +09:00
|
|
|
<div className="flex items-center gap-2 rounded-control border border-emerald-500/20 px-3 py-2 text-[12px] font-medium text-emerald-700 dark:text-emerald-200">
|
2026-07-13 13:11:46 +08:00
|
|
|
<Check className="h-3.5 w-3.5" aria-hidden />
|
2026-08-07 16:53:31 +08:00
|
|
|
{displayMessage ?? labels.connected}
|
2026-07-13 13:11:46 +08:00
|
|
|
</div>
|
|
|
|
|
) : null}
|
|
|
|
|
|
2026-09-19 01:03:04 +08:00
|
|
|
{connect && ["expired", "failed", "cancelled"].includes(connect.status)
|
|
|
|
|
&& !(connected && connect.status === "cancelled") ? (
|
2026-08-14 07:07:09 +09:00
|
|
|
<div className="rounded-control border border-border/60 px-3 py-2 text-[12px] leading-5 text-muted-foreground">
|
2026-08-07 16:53:31 +08:00
|
|
|
{displayMessage || labels.stopped}
|
2026-07-13 13:11:46 +08:00
|
|
|
</div>
|
|
|
|
|
) : null}
|
|
|
|
|
|
|
|
|
|
{error ? (
|
2026-08-14 07:07:09 +09:00
|
|
|
<div className="rounded-control border border-destructive/20 px-3 py-2 text-[12px] leading-5 text-destructive">
|
2026-07-13 13:11:46 +08:00
|
|
|
{error}
|
|
|
|
|
</div>
|
|
|
|
|
) : null}
|
|
|
|
|
|
2026-09-19 01:03:04 +08:00
|
|
|
{!pending && !(autoStart && busy && !connect) ? renderActionRow(
|
2026-07-13 13:11:46 +08:00
|
|
|
<Button
|
|
|
|
|
type="button"
|
|
|
|
|
size="sm"
|
|
|
|
|
variant="outline"
|
2026-09-10 11:10:51 +08:00
|
|
|
className="h-8 rounded-full border-border/65 bg-background/80 px-3 text-[12px] font-semibold settings-hover"
|
2026-07-19 23:30:49 +08:00
|
|
|
onClick={() => void start(forceOnRepeat && succeeded)}
|
2026-07-13 13:11:46 +08:00
|
|
|
disabled={!canStart}
|
|
|
|
|
>
|
|
|
|
|
{busy ? (
|
|
|
|
|
<Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" aria-hidden />
|
|
|
|
|
) : succeeded ? (
|
|
|
|
|
<RotateCcw className="mr-1.5 h-3.5 w-3.5" aria-hidden />
|
2026-09-11 15:22:14 +08:00
|
|
|
) : null}
|
2026-07-13 13:11:46 +08:00
|
|
|
{pending
|
|
|
|
|
? labels.connecting
|
|
|
|
|
: succeeded
|
|
|
|
|
? labels.scanAgain
|
|
|
|
|
: idleLabel ?? labels.connect}
|
|
|
|
|
</Button>
|
2026-09-19 01:03:04 +08:00
|
|
|
) : null}
|
2026-07-13 13:11:46 +08:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|