{"release_id":"01a2309f-d47d-0000-29bc-a17a97e31fa5","chunk_id":"01a2309f-d5e4-7bd0-bf7a-e86f796a803d","file":"JZsNMofk.mjs","mappings":"mVAMO,MAAMA,EAAgB,gBAGtB,SAASC,EAAgBC,EAAkC,CACjE,OAAOA,EACJ,EAAE,2CAA4C,CAAE,KAAMA,CAAA,CAAU,EAChE,EAAE,+CAA+C,CACrD,CAGO,SAASC,EAAgBC,EAAiE,CAChG,MAAMC,EAAMD,EAAE,UAAYA,EAAE,OAC5B,OAAOC,EAAM,uBAAuB,mBAAmBA,CAAG,CAAC,GAAK,qBACjE,CAIO,SAASC,EAAcC,EAAgBC,EAAwB,CACrE,OACCD,IAAW,KACX,CAAC,CAACC,GACF,OAAOA,GAAS,UACfA,EAA6B,QAAUR,CAE1C","names":["BLOCKED_BY_ME","blockedByMeText","nickname","manageBlockHref","o","key","isBlockedByMe","status","body"],"sources":["../../../../../../src/lib/block-refusal.ts"],"sourcesContent":["import { t } from '$lib/i18n';\n\n// Block everything (fleet tasks/2026-11-29-block-everything): an action on someone I blocked is\n// refused with 403 { error: 'blocked_by_me' }. The only refusal that names the block; one blocked\n// by the other side reads like a missing target, with each surface's own \"not available\" copy.\n\nexport const BLOCKED_BY_ME = 'blocked_by_me';\n\n/** \"You blocked @nick. Unblock to do this.\" (or \"this account\" when the name isn't known) */\nexport function blockedByMeText(nickname?: string | null): string {\n\treturn nickname\n\t\t? t('You blocked @{name}. Unblock to do this.', { name: nickname })\n\t\t: t('You blocked this account. Unblock to do this.');\n}\n\n/** The block's page in Settings: by nickname, else by id, else the list. */\nexport function manageBlockHref(o: { nickname?: string | null; userId?: string | null }): string {\n\tconst key = o.nickname || o.userId;\n\treturn key ? `/p/settings/blocked/${encodeURIComponent(key)}` : '/p/settings/blocked';\n}\n\n/** Whether a failed response is the blocked-by-me refusal (reads the body once; pass it in when\n *  the caller already parsed it). */\nexport function isBlockedByMe(status: number, body: unknown): boolean {\n\treturn (\n\t\tstatus === 403 &&\n\t\t!!body &&\n\t\ttypeof body === 'object' &&\n\t\t(body as { error?: unknown }).error === BLOCKED_BY_ME\n\t);\n}\n"],"version":3}