@bison-lab/payload-core 5.0.0 → 5.2.0

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.
@@ -1,4 +1,4 @@
1
- import { Block, Config, Endpoint, Field, GlobalConfig, Payload } from "payload";
1
+ import { Block, CollectionConfig, Config, Endpoint, Field, GlobalConfig, Payload } from "payload";
2
2
 
3
3
  //#region src/translate/errors.d.ts
4
4
  /**
@@ -263,6 +263,47 @@ declare function resolveApiKey(input: {
263
263
  production?: boolean;
264
264
  }): ResolvedKey;
265
265
  //#endregion
266
+ //#region src/translate/usage.d.ts
267
+ /**
268
+ * What translation cost and why it last failed. Usage is one row per month
269
+ * in a hidden collection (kept, so previous months stay viewable); the
270
+ * failure lives on the unversioned `translation-state` Global and clears on
271
+ * the next success.
272
+ */
273
+ declare const TRANSLATION_USAGE_SLUG = "translation-usage";
274
+ /** A failure an Admin can act on, shown in the admin-wide banner until the next success. */
275
+ type RecordedFailure = Exclude<TranslationFailureKind, "unreachable" | "other"> | "cap-reached";
276
+ /** How many 429s in a row make "rate limited" worth a banner. A single one is routine. */
277
+ declare const RATE_LIMIT_STREAK = 3;
278
+ interface UsageMonth {
279
+ /** Bumped on every write, for compare-and-set increments. */
280
+ rev?: number;
281
+ month: string;
282
+ strings: number;
283
+ inputTokens: number;
284
+ outputTokens: number;
285
+ /** Estimated USD. */
286
+ cost: number;
287
+ }
288
+ /** `2026-11`, in UTC. */
289
+ declare function monthKey(date?: Date): string;
290
+ type UsagePayload = Pick<Payload, "find" | "create" | "update" | "db">;
291
+ /** This month's usage, zeros when nothing ran. */
292
+ declare function usageThisMonth(payload: UsagePayload, now?: Date): Promise<UsageMonth>;
293
+ /** The last `months` months that have usage, newest first. */
294
+ declare function usageHistory(payload: Pick<Payload, "find">, months?: number): Promise<UsageMonth[]>;
295
+ /**
296
+ * Adds one successful call to its month. Calls finish concurrently (editor
297
+ * saves beside a running job), so the add is a compare-and-set on the
298
+ * row's `rev`: a write that lost the race reads again and retries, and no
299
+ * call's tokens or cost are lost to the cap.
300
+ */
301
+ declare function recordUsage(payload: UsagePayload, event: Extract<TranslatorCallEvent, {
302
+ ok: true;
303
+ }>, now?: Date): Promise<void>;
304
+ /** What an Admin should do about each failure, in the banner's words. */
305
+ declare const FAILURE_ADVICE: Record<RecordedFailure, string>;
306
+ //#endregion
266
307
  //#region src/translate/settings.d.ts
267
308
  /** Settings → Translation: the switch, model, instructions and the key's public record. Versioned. */
268
309
  declare const TRANSLATION_SETTINGS_SLUG = "translation-settings";
@@ -274,6 +315,10 @@ declare const TRANSLATION_SETTINGS_SLUG = "translation-settings";
274
315
  declare const TRANSLATION_STATE_SLUG = "translation-state";
275
316
  /** The Roles grant that opens Settings → Translation. Developer and Admin always hold it. */
276
317
  declare const TRANSLATION_GRANT = "translation";
318
+ /** The admin-wide month-to-date line and failure banner, for `translation` holders only. */
319
+ declare const TRANSLATION_STATUS_BAR = "@bison-lab/payload-core/admin#TranslationStatusBar";
320
+ /** Usage, jobs and the bulk buttons on Settings → Translation. */
321
+ declare const TRANSLATION_ACTIVITY_PANEL = "@bison-lab/payload-core/admin#TranslationActivityPanel";
277
322
  /** The admin component for the key panel on Settings → Translation. */
278
323
  declare const TRANSLATION_KEY_PANEL = "@bison-lab/payload-core/admin#TranslationKeyPanel";
279
324
  /** The model choice on the screen. */
@@ -285,6 +330,8 @@ interface TranslationSettingsDoc {
285
330
  enabled?: boolean | null;
286
331
  /** Ticked target languages. */
287
332
  languages?: string[] | null;
333
+ /** USD per calendar month; blank is no cap. */
334
+ monthlyCap?: number | null;
288
335
  /** Set by the server once someone has saved the ticks; until then the defaults apply. */
289
336
  languagesChosen?: boolean | null;
290
337
  model?: TranslationModelChoice | null;
@@ -311,6 +358,11 @@ interface TranslationStateDoc {
311
358
  keyCipher?: string | null;
312
359
  keyStatus?: KeyStatus | null;
313
360
  keyCheckedAt?: string | null;
361
+ /** The last failure an Admin should act on; cleared by the next success. */
362
+ failure?: RecordedFailure | null;
363
+ failureAt?: string | null;
364
+ /** 429s in a row. */
365
+ rateLimitStreak?: number | null;
314
366
  }
315
367
  /** Settings → Translation, resolved for a translation run. */
316
368
  interface ResolvedTranslationSettings {
@@ -322,6 +374,8 @@ interface ResolvedTranslationSettings {
322
374
  saved: boolean;
323
375
  /** The ticked target languages, the only ones translated into. */
324
376
  languages: string[];
377
+ /** USD per calendar month, or `null` for no cap. */
378
+ monthlyCap: number | null;
325
379
  doc: TranslationSettingsDoc;
326
380
  state: TranslationStateDoc;
327
381
  }
@@ -368,6 +422,18 @@ interface TranslationStatus {
368
422
  } | null;
369
423
  /** Why the stored key is not in use, when it is not. */
370
424
  note?: string;
425
+ /** This month's strings and estimated cost, and the months before it. */
426
+ usage: {
427
+ month: UsageMonth;
428
+ history: UsageMonth[];
429
+ cap: number | null;
430
+ };
431
+ /** The recorded failure and what to do about it, or `null`. */
432
+ failure: {
433
+ kind: string;
434
+ at: string | null;
435
+ advice: string;
436
+ } | null;
371
437
  }
372
438
  /** A test seam: replaces the Anthropic client the key check uses. */
373
439
  interface TranslationEndpointOptions {
@@ -430,5 +496,5 @@ declare function applyTranslation(config: Config, options?: TranslationOptions):
430
496
  /** `applyTranslation` as a plugin, for a site that does not use `adminNav()`. */
431
497
  declare function translation(options?: TranslationOptions): (config: Config) => Config;
432
498
  //#endregion
433
- export { ModelPrice as A, AutoTranslateOptions as B, encryptApiKey as C, DEFAULT_TRANSLATE_MODEL as D, AnthropicTranslatorOptions as E, estimateCost as F, TranslateLocaleResult as G, BisonTranslationKind as H, modelPrice as I, TranslatedEntity as J, TranslateRequest as K, parseJsonArray as L, TranslatorCallEvent as M, anthropicTranslator as N, ECONOMY_TRANSLATE_MODEL as O, containsWord as P, translationSystemPrompt as R, decryptApiKey as S, AnthropicMessagesClient as T, BisonTranslationMarker as U, BISON_TRANSLATION_CONTEXT as V, Doc as W, TranslationFailureKind as X, Translator as Y, classifyAnthropicError as Z, readTranslationSettings as _, translation as a, KeySource as b, KeyStatus as c, TRANSLATION_KEY_PANEL as d, TRANSLATION_SETTINGS_SLUG as f, invalidateTranslationSettings as g, TranslationSettingsDoc as h, hasLocalizedFields as i, TRANSLATE_MODEL_PRICES as j, KeyCheck as k, ResolvedTranslationSettings as l, TranslationModelChoice as m, TranslationOptions as n, TranslationStatus as o, TRANSLATION_STATE_SLUG as p, TranslateSite as q, applyTranslation as r, translationSettingsEndpoints as s, TranslationEntityHint as t, TRANSLATION_GRANT as u, resolveModel as v, resolveApiKey as w, ResolvedKey as x, siteFromInstructions as y, verifyAnthropicKey as z };
434
- //# sourceMappingURL=capability-CqdYCzG1.d.mts.map
499
+ export { BisonTranslationKind as $, usageThisMonth as A, KeyCheck as B, RATE_LIMIT_STREAK as C, monthKey as D, UsageMonth as E, resolveApiKey as F, containsWord as G, TRANSLATE_MODEL_PRICES as H, AnthropicMessagesClient as I, parseJsonArray as J, estimateCost as K, AnthropicTranslatorOptions as L, ResolvedKey as M, decryptApiKey as N, recordUsage as O, encryptApiKey as P, BISON_TRANSLATION_CONTEXT as Q, DEFAULT_TRANSLATE_MODEL as R, FAILURE_ADVICE as S, TRANSLATION_USAGE_SLUG as T, TranslatorCallEvent as U, ModelPrice as V, anthropicTranslator as W, verifyAnthropicKey as X, translationSystemPrompt as Y, AutoTranslateOptions as Z, TranslationSettingsDoc as _, translation as a, TranslatedEntity as at, resolveModel as b, KeyStatus as c, classifyAnthropicError as ct, TRANSLATION_GRANT as d, BisonTranslationMarker as et, TRANSLATION_KEY_PANEL as f, TranslationModelChoice as g, TRANSLATION_STATUS_BAR as h, hasLocalizedFields as i, TranslateSite as it, KeySource as j, usageHistory as k, ResolvedTranslationSettings as l, TRANSLATION_STATE_SLUG as m, TranslationOptions as n, TranslateLocaleResult as nt, TranslationStatus as o, Translator as ot, TRANSLATION_SETTINGS_SLUG as p, modelPrice as q, applyTranslation as r, TranslateRequest as rt, translationSettingsEndpoints as s, TranslationFailureKind as st, TranslationEntityHint as t, Doc as tt, TRANSLATION_ACTIVITY_PANEL as u, invalidateTranslationSettings as v, RecordedFailure as w, siteFromInstructions as x, readTranslationSettings as y, ECONOMY_TRANSLATE_MODEL as z };
500
+ //# sourceMappingURL=capability-Dotbq58Q.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capability-Dotbq58Q.d.mts","names":[],"sources":["../src/translate/errors.ts","../src/translate/types.ts","../src/translate/anthropic.ts","../src/translate/key.ts","../src/translate/usage.ts","../src/translate/settings.ts","../src/translate/settings-endpoints.ts","../src/translate/capability.ts"],"mappings":";;;;;;AAWA;;;;;AAWA;;;KAXY,sBAAA;;iBAWI,sBAAA,CAAuB,KAAA,YAAiB,sBAAA;;;;KCrB5C,GAAA,GAAM,MAAA;;KAGN,oBAAA;;;;;ADkBZ;;;;;;;;ACrBA;UAkBiB,sBAAA;EACf,MAAA;EACA,IAAA,EAAM,oBAAA;AAAA;AAjBR;AAAA,cAqBa,yBAAA;;;;AANb;;UAaiB,aAAA;EAXW;EAa1B,IAAA;EAbA;EAeA,KAAA;EAf0B;EAiB1B,KAAA;EAbW;EAeX,YAAA;;;;AARF;;EAcE,SAAA,GAAY,MAAA;AAAA;;UAIG,gBAAA;EACf,IAAA;EACA,EAAA;EANA;EAQA,OAAA;EARkB;EAUlB,IAAA,GAAO,aAAA;AAAA;;;;;;;;;;KAYG,UAAA,KAAe,OAAA,YAAmB,OAAA,EAAS,gBAAA,KAAqB,OAAA;EAC1E,UAAA;AAAA;;KAIU,gBAAA;EAGN,IAAA,UARiD;EAUjD,OAAA,IAAW,GAAA,EAAK,GAAA;AAAA;AAAA,UAGL,oBAAA;EAZL;;AAIZ;;;EAcE,OAAA;EAXI;EAaJ,WAAA,GAAc,gBAAA;EAXM;EAapB,OAAA,GAAU,gBAAA;EAba;;AAGzB;;EAeE,UAAA,GAAa,UAAA;EAPC;;;;;EAad,SAAA,IAAa,OAAA,EAAS,OAAA;EAEF;EAApB,IAAA,GAAO,aAAA;AAAA;;UAOQ,qBAAA;EACf,MAAA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oBiB,0BAAA;EACf,YAAA,GAAe,uBAAA;AAAA;;ALdjB;;;;;;;;;;iBK8FgB,4BAAA,CAA6B,OAAA,GAAS,0BAAA,GAAkC,QAAA;;;ANnHxF;;;;;AAAA,UOyBiB,qBAAA;EACf,OAAA,IAAW,GAAA,EAAK,GAAA;AAAA;;UAID,kBAAA;;EAEf,IAAA,GAAO,aAAA;;EAEP,SAAA,IAAa,OAAA,EAAS,OAAA;EN5CT;EM8Cb,UAAA,GAAa,UAAA;EN9CG;EMgDhB,KAAA,GAAQ,MAAA,SAAe,qBAAA;EN7Cb;EM+CV,SAAA,GAAY,0BAAA;AAAA;;iBAaE,kBAAA,CAAmB,MAAA,WAAiB,KAAA,IAAS,MAAA,YAAiB,KAAA;AN7C9E;;;;;;;;;AAMA;;;;;AAOA;;AAbA,iBM6HgB,gBAAA,CAAiB,MAAA,EAAQ,MAAA,EAAQ,OAAA,GAAS,kBAAA,GAA0B,MAAA;;iBAuGpE,WAAA,CAAY,OAAA,GAAS,kBAAA,IAC3B,MAAA,EAAQ,MAAA,KAAS,MAAA"}
package/dist/index.d.mts CHANGED
@@ -3,7 +3,7 @@ import { a as SeoImageSize, i as SeoImageDoc, n as titleTemplate, o as SeoImageV
3
3
  import { C as rewriteColorUsages, S as findColorUsages, _ as ThemeIdentityFallback, a as THEME_APPEARANCE_SLUG, b as ColorUsagesList, c as THEME_SLUG, d as ThemeDoc, g as ResolvedThemeIdentity, h as ThemeUploadDoc, i as SystemColorKey, l as THEME_TYPOGRAPHY_SLUG, m as ThemeLibraryColorDoc, n as EditableTheme, o as THEME_COLORS_SLUG, r as SYSTEM_COLOR_KEYS, s as THEME_IDENTITY_SLUG, t as CreateThemeOptions, u as ThemeColorDoc, v as resolveThemeIdentity, x as ColorUsagesOption, y as ColorUsage } from "./types-DLBlHZUd.mjs";
4
4
  import { _ as deleteLibraryColor, a as PageEditorSystemKey, c as pageEditorTokens, d as LookFieldOptions, f as colorTokenField, g as rewriteColorTokens, h as findColorTokens, i as PAGE_EDITOR_SYSTEM_KEYS, l as themeLibraryFromDoc, m as ColorTokenHit, n as ColorSwatch, o as pageEditorLooks, p as lookField, r as LookOption, s as pageEditorSwatches, t as THEME_PREVIEW_BREAKPOINTS, u as LookFieldMode, v as rewriteColorToken, y as themeColorKeys } from "./preview-1vwxBgm5.mjs";
5
5
  import { n as facetField, t as FacetEntry } from "./facet-field-2K22iuWA.mjs";
6
- import { a as translation, d as TRANSLATION_KEY_PANEL, f as TRANSLATION_SETTINGS_SLUG, n as TranslationOptions, u as TRANSLATION_GRANT } from "./capability-CqdYCzG1.mjs";
6
+ import { a as translation, d as TRANSLATION_GRANT, f as TRANSLATION_KEY_PANEL, h as TRANSLATION_STATUS_BAR, n as TranslationOptions, p as TRANSLATION_SETTINGS_SLUG, u as TRANSLATION_ACTIVITY_PANEL } from "./capability-Dotbq58Q.mjs";
7
7
  import { C as NAVIGATION_FOOTER_SLUG, D as NavigationFooter, E as NavigationDoc, O as NavigationHeader, S as NAVIGATION_FOOTER_DB_NAME, T as NavigationBar, _ as validateExternalHref, a as FOOTER_MAX_LINK_COLUMNS, b as NAVIGATION_DB_NAME, c as FooterColumnWidth, d as normalizeFooterDesktop, f as validateFooterColumns, g as isValidExternalHref, h as headerCtaEnabled, i as FOOTER_MAX_COLUMNS, l as FooterSocial, m as EXTERNAL_HREF_MESSAGE, n as FOOTER_COLUMNS_FIELD, o as FOOTER_SOCIALS, p as validateFooterSocialUrl, r as FOOTER_COLUMN_WIDTHS, s as FOOTER_TWELFTHS, t as getNavigation, u as footerDesktopTracks, v as validateHeaderCta, w as NAVIGATION_SLUG, x as NAVIGATION_FEATURE, y as CreateNavigationOptions } from "./published-QDNmDi02.mjs";
8
8
  import { ThemeConfig } from "@bison-lab/tokens";
9
9
  import * as payload$1 from "payload";
@@ -1354,5 +1354,5 @@ declare function roleDescription(role: string, matrix?: readonly RoleRow[]): str
1354
1354
  */
1355
1355
  declare function resetRolesMatrix(current: unknown): RoleRow[];
1356
1356
  //#endregion
1357
- export { ADMIN_NAV, ADMIN_NAV_ENTITY_FIELD, ADMIN_NAV_ITEM_ROW_LABEL, ADMIN_NAV_ROW_LABEL, ADMIN_NAV_SLUG, type AdminNavConfig, type AdminNavDoc, type AdminNavGroup, type AdminNavItem, type AdminNavVisibleEntities, BLOCK_DRAWER_CSS, BLOCK_DRAWER_STYLES, BLOCK_LIBRARY_CATEGORIES, BLOCK_LIBRARY_FIELD, BLOCK_LIBRARY_SLUG, BLOCK_THUMBNAIL_PATH, BRAND_ASSETS_MIME_TYPES, BRAND_ASSETS_SLUG, type BlockDrawerEntry, type BlockLibraryCategoryId, type BlockLibraryDoc, type BlockLibraryDraftHolder, type BlockLibraryEntry, type BlockLibraryHolder, type BlockLibraryKind, type BlockLibraryPayload, type BlockLibraryReader, type BlockLibraryRow, type BlockLibraryUsage, type BlockUsageOptions, CAPABILITIES, CAPABILITY_FEATURES, type Capability, type ColorSwatch, type ColorTokenHit, type ColorUsage, type ColorUsagesList, type ColorUsagesOption, type CreateBlockLibraryOptions, type CreateBrandAssetsOptions, type CreateFeaturesOptions, type CreateFormSubmissionsOptions, type CreateNavigationOptions, type CreateQuestionsOptions, type CreateRolesOptions, type CreateTaxonomyOptions, type CreateThemeOptions, DEFAULT_ROLE_GRANTS, DEFAULT_ROLE_MATRIX, DEFAULT_SECTION_CONTROLS, DESCRIPTION_LENGTH, DEVELOPER_DESCRIPTION, DOCUMENT_CREATE_NEW, DOCUMENT_TITLE_ACTIONS, DUPLICATE_ROLE_NAME_MESSAGE, DUPLICATE_ROLE_SLUG_MESSAGE, EXISTING_PARENT_MESSAGE, EXTERNAL_HREF_MESSAGE, type EditableTheme, FEATURES_MATRIX_FIELD, FEATURES_SLUG, FEATURE_GROUPS, FEATURE_GROUP_LABELS, FOOTER_COLUMNS_FIELD, FOOTER_COLUMN_WIDTHS, FOOTER_MAX_COLUMNS, FOOTER_MAX_LINK_COLUMNS, FOOTER_SOCIALS, FOOTER_TWELFTHS, FORM_SUBMISSIONS_SLUG, type FacetEntry, type FeatureExtra, type FeatureGroupId, type FeatureRow, type FeaturesDoc, type FooterColumnWidth, type FooterSocial, HERO_SECTION_CONTROLS, INVALID_ROLE_NAME_MESSAGE, LAST_ADMIN_DELETE_MESSAGE, LAST_ADMIN_DEMOTE_MESSAGE, LAST_USERS_TICK_MESSAGE, LAYOUT_DESCRIPTION, LAYOUT_REQUIRED_LABEL, LAYOUT_REQUIRED_MESSAGE, LIST_ALIGN, LOOK_FIELD, type ListAlign, type ListAlignColumn, type LookFieldMode, type LookFieldOptions, type LookOption, MEDIA_ALT_AUTOFILL, MEDIA_IN_USE_PATH, MEDIA_LIST, MISSING_PACKAGE_FEATURES_MESSAGE, MISSING_SEED_ROLES_MESSAGE, type MaybeUser, type MediaId, type MediaInUseOption, type MediaOptions, NAVIGATION_DB_NAME, NAVIGATION_FEATURE, NAVIGATION_FOOTER_DB_NAME, NAVIGATION_FOOTER_SLUG, NAVIGATION_SLUG, NEW_FOLDER_PARENT, NO_SECTION_CONTROLS, type NavigationBar, type NavigationDoc, type NavigationFooter, type NavigationHeader, type OrganizeByEntry, type OrganizeByLook, PACKAGE_BLOCK_SLUGS, PACKAGE_FEATURES, PACKAGE_FEATURE_SLUGS, PAGE_EDITOR_SYSTEM_KEYS, PAGE_SLUG_CELL, PAGE_TITLE_CELL, type PackageFeature, type PackageFeatureSlug, type PageEditorSystemKey, type PagesOptions, QUESTIONS_FEATURE, QUESTIONS_LIST, QUESTIONS_SLUG, REDIRECTS_SLUG, REQUIRED_PAGE_CELL, REQUIRED_PAGE_DELETE_MESSAGE, REQUIRED_PAGE_FIELD, REQUIRED_PAGE_UNPUBLISH_MESSAGE, RICH_TEXT_EDITOR_FONTS, RICH_TEXT_EDITOR_FONTS_CSS, ROLES, ROLES_CELL, ROLES_FIELD, ROLES_FIELD_DESCRIPTION, ROLES_GLOBAL_DESCRIPTION, ROLES_GRANTS_FIELD, ROLES_LOCKOUT_MESSAGE, ROLES_MATRIX_FIELD, ROLES_ROW_LABEL, ROLES_SLUG, ROLE_LABELS, ROLE_NAME_FIELD, ROLE_SLUG_FIELD, ROOT_PAGE_KEY, ROOT_PAGE_SLUG, type ResolveAdminNavArgs, type ResolvedThemeIdentity, type Role, type RoleExtra, type RoleRow, type RolesDoc, SECTION_CONTROL_KEYS, SECTION_CONTROL_LABELS, SHARE_IMAGE_SIZE, SLUG_FIELD, SLUG_UNLOCK_WARNING, SYSTEM_COLOR_KEYS, type SectionControlKey, type SectionControls, type SeoDoc, type SeoImageDoc, type SeoImageSize, type SeoImageValue, type SeoMeta, type SeoPluginOptions, type SlugFieldOptions, type SystemColorKey, THEME_APPEARANCE_FIELD, THEME_APPEARANCE_SLUG, THEME_COLORS_SLUG, THEME_COLOR_FIELD, THEME_COLOR_SCALE_FIELD, THEME_CONTRAST_REPORT, THEME_DOCUMENT_CONTROLS, THEME_FEATURE_SLUGS, THEME_FONT_FIELD, THEME_GREY_SCALE_FIELD, THEME_IDENTITY_FALLBACK, THEME_IDENTITY_SLUG, THEME_LIBRARY_FIELD, THEME_PAIRING_FIELD, THEME_PREVIEW_BREAKPOINTS, THEME_PUBLISH_FIELD, THEME_SAVE_BUTTON, THEME_SECTION_HEADING, THEME_SLUG, THEME_TYPOGRAPHY_SLUG, TRANSLATION_GRANT, TRANSLATION_KEY_PANEL, TRANSLATION_SETTINGS_SLUG, type ThemeChild, type ThemeColorDoc, type ThemeDoc, type ThemeIdentityFallback, type ThemeLibraryColorDoc, type ThemeUploadDoc, type TranslationOptions, type UsersOptions, adminNav, adminOnlyApiTab, allowedFeaturesForUser, altFromFilename, applyRoleSlugsFromNames, authenticatedOrPublished, blockDrawer, blockLibraryCatalogue, blockLibraryEntriesFromConfig, blockThumbnailEndpoint, blockUsage, canManageBrand, canManageContent, canPublish, canUseFeature, colorTokenField, composeSlug, createAdminNav, createBlockLibrary, createBrandAssets, createFeatures, createFormSubmissions, createMedia, createNavigation, createPages, createQuestions, createRedirects, createRoles, createTaxonomy, createTheme, createUsers, defaultBlockLibraryValue, defaultFeaturesFieldValue, defaultRolesFieldValue, defaultSectionControls, deleteLibraryColor, developerOnlyAccess, documentCreateNew, documentTitle, documentTitleActions, ensureRootPage, facetField, featureCatalogue, featureGroupLabel, fillBlankAltFromFilename, findColorTokens, findColorUsages, firstImageIn, footerDesktopTracks, getFeaturesMatrix, getNavigation, getRolesMatrix, getSectionControls, groupBlocksByCategory, hasCapability, hasFeature, hasGrant, hasRole, headerCtaEnabled, hideUnlessDeveloper, hideUnlessFeature, inferredFolders, isAdmin, isAdminOrSelf, isAuthenticated, isDeveloper, isDeveloperTab, isFeatureGroupId, isFeatureSlug, isLockedFeature, isPackageFeatureSlug, isPrivilegedRole, isRole, isRoleName, isRoleSlug, isRootPageKey, isValidExternalHref, lexicalPlainText, listAlign, listAlignColumns, listAlignCss, lockSlugOnPublish, lookField, noIndexField, normalizeFooterDesktop, normalizeSlug, normalizeStoredRoles, packageThumbnailURL, pageEditorLooks, pageEditorSwatches, pageEditorTokens, parentPrefix, parseFeaturesMatrix, parseRolesMatrix, persistThemeChild, pruneUserRoles, publishThemeChild, recordPublishedSlugRedirect, redirectPath, replaceClientOriginalWithResizedFile, requireLayoutOnPublish, resetRolesMatrix, resolveAdminNav, resolveThemeIdentity, rewriteColorToken, rewriteColorTokens, rewriteColorUsages, richTextEditorFonts, roleDescription, roleLabel, roleSelectOptions, sanitizeRoleNameInput, sanitizeSvg, sectionControlsFromLibrary, sectionControlsOf, seedFeatures, seedRoleRows, seedRoles, seedTheme, seoPlugin, slugDepth, slugField, slugLeaf, slugifyRoleName, stampBlockLibrary, stampFeatureCatalogue, storedRoles, stripDrafts, syncAnswerText, themeColorKeys, themeLibraryFromDoc, titleTemplate, translation, truncateAtWord, validateBlockLibrary, validateExternalHref, validateFeaturesMatrix, validateFooterColumns, validateFooterSocialUrl, validateHeaderCta, validateRolesMatrix, withThumbnail, writePublishedSlugRedirect };
1357
+ export { ADMIN_NAV, ADMIN_NAV_ENTITY_FIELD, ADMIN_NAV_ITEM_ROW_LABEL, ADMIN_NAV_ROW_LABEL, ADMIN_NAV_SLUG, type AdminNavConfig, type AdminNavDoc, type AdminNavGroup, type AdminNavItem, type AdminNavVisibleEntities, BLOCK_DRAWER_CSS, BLOCK_DRAWER_STYLES, BLOCK_LIBRARY_CATEGORIES, BLOCK_LIBRARY_FIELD, BLOCK_LIBRARY_SLUG, BLOCK_THUMBNAIL_PATH, BRAND_ASSETS_MIME_TYPES, BRAND_ASSETS_SLUG, type BlockDrawerEntry, type BlockLibraryCategoryId, type BlockLibraryDoc, type BlockLibraryDraftHolder, type BlockLibraryEntry, type BlockLibraryHolder, type BlockLibraryKind, type BlockLibraryPayload, type BlockLibraryReader, type BlockLibraryRow, type BlockLibraryUsage, type BlockUsageOptions, CAPABILITIES, CAPABILITY_FEATURES, type Capability, type ColorSwatch, type ColorTokenHit, type ColorUsage, type ColorUsagesList, type ColorUsagesOption, type CreateBlockLibraryOptions, type CreateBrandAssetsOptions, type CreateFeaturesOptions, type CreateFormSubmissionsOptions, type CreateNavigationOptions, type CreateQuestionsOptions, type CreateRolesOptions, type CreateTaxonomyOptions, type CreateThemeOptions, DEFAULT_ROLE_GRANTS, DEFAULT_ROLE_MATRIX, DEFAULT_SECTION_CONTROLS, DESCRIPTION_LENGTH, DEVELOPER_DESCRIPTION, DOCUMENT_CREATE_NEW, DOCUMENT_TITLE_ACTIONS, DUPLICATE_ROLE_NAME_MESSAGE, DUPLICATE_ROLE_SLUG_MESSAGE, EXISTING_PARENT_MESSAGE, EXTERNAL_HREF_MESSAGE, type EditableTheme, FEATURES_MATRIX_FIELD, FEATURES_SLUG, FEATURE_GROUPS, FEATURE_GROUP_LABELS, FOOTER_COLUMNS_FIELD, FOOTER_COLUMN_WIDTHS, FOOTER_MAX_COLUMNS, FOOTER_MAX_LINK_COLUMNS, FOOTER_SOCIALS, FOOTER_TWELFTHS, FORM_SUBMISSIONS_SLUG, type FacetEntry, type FeatureExtra, type FeatureGroupId, type FeatureRow, type FeaturesDoc, type FooterColumnWidth, type FooterSocial, HERO_SECTION_CONTROLS, INVALID_ROLE_NAME_MESSAGE, LAST_ADMIN_DELETE_MESSAGE, LAST_ADMIN_DEMOTE_MESSAGE, LAST_USERS_TICK_MESSAGE, LAYOUT_DESCRIPTION, LAYOUT_REQUIRED_LABEL, LAYOUT_REQUIRED_MESSAGE, LIST_ALIGN, LOOK_FIELD, type ListAlign, type ListAlignColumn, type LookFieldMode, type LookFieldOptions, type LookOption, MEDIA_ALT_AUTOFILL, MEDIA_IN_USE_PATH, MEDIA_LIST, MISSING_PACKAGE_FEATURES_MESSAGE, MISSING_SEED_ROLES_MESSAGE, type MaybeUser, type MediaId, type MediaInUseOption, type MediaOptions, NAVIGATION_DB_NAME, NAVIGATION_FEATURE, NAVIGATION_FOOTER_DB_NAME, NAVIGATION_FOOTER_SLUG, NAVIGATION_SLUG, NEW_FOLDER_PARENT, NO_SECTION_CONTROLS, type NavigationBar, type NavigationDoc, type NavigationFooter, type NavigationHeader, type OrganizeByEntry, type OrganizeByLook, PACKAGE_BLOCK_SLUGS, PACKAGE_FEATURES, PACKAGE_FEATURE_SLUGS, PAGE_EDITOR_SYSTEM_KEYS, PAGE_SLUG_CELL, PAGE_TITLE_CELL, type PackageFeature, type PackageFeatureSlug, type PageEditorSystemKey, type PagesOptions, QUESTIONS_FEATURE, QUESTIONS_LIST, QUESTIONS_SLUG, REDIRECTS_SLUG, REQUIRED_PAGE_CELL, REQUIRED_PAGE_DELETE_MESSAGE, REQUIRED_PAGE_FIELD, REQUIRED_PAGE_UNPUBLISH_MESSAGE, RICH_TEXT_EDITOR_FONTS, RICH_TEXT_EDITOR_FONTS_CSS, ROLES, ROLES_CELL, ROLES_FIELD, ROLES_FIELD_DESCRIPTION, ROLES_GLOBAL_DESCRIPTION, ROLES_GRANTS_FIELD, ROLES_LOCKOUT_MESSAGE, ROLES_MATRIX_FIELD, ROLES_ROW_LABEL, ROLES_SLUG, ROLE_LABELS, ROLE_NAME_FIELD, ROLE_SLUG_FIELD, ROOT_PAGE_KEY, ROOT_PAGE_SLUG, type ResolveAdminNavArgs, type ResolvedThemeIdentity, type Role, type RoleExtra, type RoleRow, type RolesDoc, SECTION_CONTROL_KEYS, SECTION_CONTROL_LABELS, SHARE_IMAGE_SIZE, SLUG_FIELD, SLUG_UNLOCK_WARNING, SYSTEM_COLOR_KEYS, type SectionControlKey, type SectionControls, type SeoDoc, type SeoImageDoc, type SeoImageSize, type SeoImageValue, type SeoMeta, type SeoPluginOptions, type SlugFieldOptions, type SystemColorKey, THEME_APPEARANCE_FIELD, THEME_APPEARANCE_SLUG, THEME_COLORS_SLUG, THEME_COLOR_FIELD, THEME_COLOR_SCALE_FIELD, THEME_CONTRAST_REPORT, THEME_DOCUMENT_CONTROLS, THEME_FEATURE_SLUGS, THEME_FONT_FIELD, THEME_GREY_SCALE_FIELD, THEME_IDENTITY_FALLBACK, THEME_IDENTITY_SLUG, THEME_LIBRARY_FIELD, THEME_PAIRING_FIELD, THEME_PREVIEW_BREAKPOINTS, THEME_PUBLISH_FIELD, THEME_SAVE_BUTTON, THEME_SECTION_HEADING, THEME_SLUG, THEME_TYPOGRAPHY_SLUG, TRANSLATION_ACTIVITY_PANEL, TRANSLATION_GRANT, TRANSLATION_KEY_PANEL, TRANSLATION_SETTINGS_SLUG, TRANSLATION_STATUS_BAR, type ThemeChild, type ThemeColorDoc, type ThemeDoc, type ThemeIdentityFallback, type ThemeLibraryColorDoc, type ThemeUploadDoc, type TranslationOptions, type UsersOptions, adminNav, adminOnlyApiTab, allowedFeaturesForUser, altFromFilename, applyRoleSlugsFromNames, authenticatedOrPublished, blockDrawer, blockLibraryCatalogue, blockLibraryEntriesFromConfig, blockThumbnailEndpoint, blockUsage, canManageBrand, canManageContent, canPublish, canUseFeature, colorTokenField, composeSlug, createAdminNav, createBlockLibrary, createBrandAssets, createFeatures, createFormSubmissions, createMedia, createNavigation, createPages, createQuestions, createRedirects, createRoles, createTaxonomy, createTheme, createUsers, defaultBlockLibraryValue, defaultFeaturesFieldValue, defaultRolesFieldValue, defaultSectionControls, deleteLibraryColor, developerOnlyAccess, documentCreateNew, documentTitle, documentTitleActions, ensureRootPage, facetField, featureCatalogue, featureGroupLabel, fillBlankAltFromFilename, findColorTokens, findColorUsages, firstImageIn, footerDesktopTracks, getFeaturesMatrix, getNavigation, getRolesMatrix, getSectionControls, groupBlocksByCategory, hasCapability, hasFeature, hasGrant, hasRole, headerCtaEnabled, hideUnlessDeveloper, hideUnlessFeature, inferredFolders, isAdmin, isAdminOrSelf, isAuthenticated, isDeveloper, isDeveloperTab, isFeatureGroupId, isFeatureSlug, isLockedFeature, isPackageFeatureSlug, isPrivilegedRole, isRole, isRoleName, isRoleSlug, isRootPageKey, isValidExternalHref, lexicalPlainText, listAlign, listAlignColumns, listAlignCss, lockSlugOnPublish, lookField, noIndexField, normalizeFooterDesktop, normalizeSlug, normalizeStoredRoles, packageThumbnailURL, pageEditorLooks, pageEditorSwatches, pageEditorTokens, parentPrefix, parseFeaturesMatrix, parseRolesMatrix, persistThemeChild, pruneUserRoles, publishThemeChild, recordPublishedSlugRedirect, redirectPath, replaceClientOriginalWithResizedFile, requireLayoutOnPublish, resetRolesMatrix, resolveAdminNav, resolveThemeIdentity, rewriteColorToken, rewriteColorTokens, rewriteColorUsages, richTextEditorFonts, roleDescription, roleLabel, roleSelectOptions, sanitizeRoleNameInput, sanitizeSvg, sectionControlsFromLibrary, sectionControlsOf, seedFeatures, seedRoleRows, seedRoles, seedTheme, seoPlugin, slugDepth, slugField, slugLeaf, slugifyRoleName, stampBlockLibrary, stampFeatureCatalogue, storedRoles, stripDrafts, syncAnswerText, themeColorKeys, themeLibraryFromDoc, titleTemplate, translation, truncateAtWord, validateBlockLibrary, validateExternalHref, validateFeaturesMatrix, validateFooterColumns, validateFooterSocialUrl, validateHeaderCta, validateRolesMatrix, withThumbnail, writePublishedSlugRedirect };
1358
1358
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { n as titleTemplate, t as documentTitle } from "./title-DJ7C48gq.mjs";
2
2
  import { t as SHARE_IMAGE_SIZE } from "./share-image-C8ZtIcU8.mjs";
3
3
  import { C as THEME_PAIRING_FIELD, D as headingSelectValue, E as THEME_SECTION_HEADING, S as THEME_LIBRARY_FIELD, T as THEME_SAVE_BUTTON, _ as THEME_CONTRAST_REPORT, a as THEME_IDENTITY_SLUG, b as THEME_GREY_SCALE_FIELD, c as docFromConfig, d as validateSourceIncluded, f as validateThemeHex, g as THEME_COLOR_SCALE_FIELD, h as THEME_COLOR_FIELD, i as THEME_COLORS_SLUG, m as THEME_APPEARANCE_FIELD, n as SYSTEM_COLOR_KEYS, o as THEME_SLUG, p as LOOK_FIELD, r as THEME_APPEARANCE_SLUG, s as THEME_TYPOGRAPHY_SLUG, t as resolveThemeIdentity, u as themeConfigFromDoc, v as THEME_DOCUMENT_CONTROLS, w as THEME_PUBLISH_FIELD, x as THEME_IDENTITY_FALLBACK, y as THEME_FONT_FIELD } from "./identity-CN6EOeDM.mjs";
4
4
  import { a as pageEditorLooks, c as themeLibraryFromDoc, d as deleteLibraryColor, f as rewriteColorToken, i as PAGE_EDITOR_SYSTEM_KEYS, l as findColorTokens, n as colorTokenField, o as pageEditorSwatches, p as themeColorKeys, r as lookField, s as pageEditorTokens, t as THEME_PREVIEW_BREAKPOINTS, u as rewriteColorTokens } from "./preview-Br1SQCKn.mjs";
5
- import { $ as hasRole, $t as isFeatureSlug, At as featureCatalogue, B as allowedFeaturesForUser, Bt as THEME_FEATURE_SLUGS, Ct as resetRolesMatrix, Dt as validateRolesMatrix, Et as seedRoleRows, Ft as CAPABILITIES, G as authenticatedOrPublished, Gt as sanitizeRoleNameInput, H as getFeaturesMatrix, Ht as isRoleName, It as CAPABILITY_FEATURES, J as canPublish, Jt as FEATURE_GROUPS, K as canManageBrand, Kt as slugifyRoleName, Lt as DEFAULT_ROLE_GRANTS, Mt as parseFeaturesMatrix, Nt as stampFeatureCatalogue, Ot as MISSING_PACKAGE_FEATURES_MESSAGE, Pt as validateFeaturesMatrix, Q as hasGrant, Qt as isFeatureGroupId, Rt as ROLES, St as parseRolesMatrix, Tt as roleSelectOptions, U as hasFeature, Ut as isRoleSlug, V as canUseFeature, Vt as isRole, W as hideUnlessFeature, Wt as roleLabel, X as getRolesMatrix, Xt as PACKAGE_FEATURES, Y as developerOnlyAccess, Yt as FEATURE_GROUP_LABELS, Z as hasCapability, Zt as PACKAGE_FEATURE_SLUGS, _ as TRANSLATION_GRANT, _t as ROLES_SLUG, at as isDeveloperTab, bt as grantsFromStoredRole, ct as DEFAULT_ROLE_MATRIX, dt as DUPLICATE_ROLE_SLUG_MESSAGE, en as isLockedFeature, et as hideUnlessDeveloper, ft as INVALID_ROLE_NAME_MESSAGE, gt as ROLES_GLOBAL_DESCRIPTION, ht as ROLES_FIELD_DESCRIPTION, it as isDeveloper, jt as featureGroupLabel, kt as defaultFeaturesFieldValue, lt as DEVELOPER_DESCRIPTION, mt as MISSING_SEED_ROLES_MESSAGE, nt as isAdminOrSelf, ot as isPrivilegedRole, pt as LAST_USERS_TICK_MESSAGE, q as canManageContent, qt as FEATURES_SLUG, r as translation, rt as isAuthenticated, st as storedRoles, t as applyTranslation, tn as isPackageFeatureSlug, tt as isAdmin, ut as DUPLICATE_ROLE_NAME_MESSAGE, v as TRANSLATION_KEY_PANEL, vt as applyRoleSlugsFromNames, wt as roleDescription, xt as normalizeStoredRoles, y as TRANSLATION_SETTINGS_SLUG, yt as defaultRolesFieldValue, zt as ROLE_LABELS } from "./capability-DHPE2kon.mjs";
5
+ import { $t as seedRoleRows, At as isAuthenticated, B as TRANSLATION_STATUS_BAR, Bt as LAST_USERS_TICK_MESSAGE, Cn as PACKAGE_FEATURES, Ct as getRolesMatrix, Dn as isLockedFeature, Dt as hideUnlessDeveloper, En as isFeatureSlug, Et as hasRole, F as TRANSLATION_ACTIVITY_PANEL, Ft as DEFAULT_ROLE_MATRIX, Gt as applyRoleSlugsFromNames, Ht as ROLES_FIELD_DESCRIPTION, I as TRANSLATION_GRANT, It as DEVELOPER_DESCRIPTION, Jt as normalizeStoredRoles, Kt as defaultRolesFieldValue, L as TRANSLATION_KEY_PANEL, Lt as DUPLICATE_ROLE_NAME_MESSAGE, Mt as isDeveloperTab, Nt as isPrivilegedRole, On as isPackageFeatureSlug, Ot as isAdmin, Pt as storedRoles, Qt as roleSelectOptions, R as TRANSLATION_SETTINGS_SLUG, Rt as DUPLICATE_ROLE_SLUG_MESSAGE, Sn as FEATURE_GROUP_LABELS, St as developerOnlyAccess, Tn as isFeatureGroupId, Tt as hasGrant, Ut as ROLES_GLOBAL_DESCRIPTION, Vt as MISSING_SEED_ROLES_MESSAGE, Wt as ROLES_SLUG, Xt as resetRolesMatrix, Yt as parseRolesMatrix, Zt as roleDescription, _n as roleLabel, _t as hideUnlessFeature, an as parseFeaturesMatrix, bn as FEATURES_SLUG, bt as canManageContent, cn as CAPABILITIES, dn as ROLES, en as validateRolesMatrix, fn as ROLE_LABELS, gn as isRoleSlug, gt as hasFeature, hn as isRoleName, ht as getFeaturesMatrix, in as featureGroupLabel, jt as isDeveloper, kt as isAdminOrSelf, ln as CAPABILITY_FEATURES, mn as isRole, mt as canUseFeature, nn as defaultFeaturesFieldValue, on as stampFeatureCatalogue, pn as THEME_FEATURE_SLUGS, pt as allowedFeaturesForUser, qt as grantsFromStoredRole, r as translation, rn as featureCatalogue, sn as validateFeaturesMatrix, t as applyTranslation, tn as MISSING_PACKAGE_FEATURES_MESSAGE, un as DEFAULT_ROLE_GRANTS, vn as sanitizeRoleNameInput, vt as authenticatedOrPublished, wn as PACKAGE_FEATURE_SLUGS, wt as hasCapability, xn as FEATURE_GROUPS, xt as canPublish, yn as slugifyRoleName, yt as canManageBrand, zt as INVALID_ROLE_NAME_MESSAGE } from "./capability-CAXtTcSU.mjs";
6
6
  import { _ as sectionControlsOf, a as sectionControlsFromLibrary, c as BLOCK_LIBRARY_CATEGORIES, d as DEFAULT_SECTION_CONTROLS, f as HERO_SECTION_CONTROLS, g as defaultSectionControls, h as SECTION_CONTROL_LABELS, i as defaultBlockLibraryValue, l as BLOCK_LIBRARY_SLUG, m as SECTION_CONTROL_KEYS, n as getSectionControls, o as stampBlockLibrary, p as NO_SECTION_CONTROLS, r as blockLibraryCatalogue, s as validateBlockLibrary, t as blockLibraryEntriesFromConfig, u as PACKAGE_BLOCK_SLUGS } from "./published-hqtvmVUD.mjs";
7
7
  import { C as NAVIGATION_SLUG, S as NAVIGATION_FOOTER_SLUG, _ as validateExternalHref, a as FOOTER_MAX_LINK_COLUMNS, b as NAVIGATION_FEATURE, c as footerDesktopTracks, d as validateFooterColumns, f as validateFooterSocialUrl, g as linkField, h as isValidExternalHref, i as FOOTER_MAX_COLUMNS, l as footerFields, m as headerCtaEnabled, n as FOOTER_COLUMNS_FIELD, o as FOOTER_SOCIALS, p as EXTERNAL_HREF_MESSAGE, r as FOOTER_COLUMN_WIDTHS, s as FOOTER_TWELFTHS, t as getNavigation, u as normalizeFooterDesktop, v as validateHeaderCta, x as NAVIGATION_FOOTER_DB_NAME, y as NAVIGATION_DB_NAME } from "./published-BMt7Z5CF.mjs";
8
8
  import { a as REQUIRED_PAGE_UNPUBLISH_MESSAGE, c as isRequiredPageKey, i as REQUIRED_PAGE_FIELD, l as isRootPageKey, n as REQUIRED_PAGE_CELL, o as ROOT_PAGE_KEY, r as REQUIRED_PAGE_DELETE_MESSAGE, s as ROOT_PAGE_SLUG, t as PAGE_SLUG_CELL, u as requiredPageKeys } from "./root-page-key-kx3C1eyp.mjs";
@@ -3868,6 +3868,6 @@ const richTextEditorFonts = definePlugin({
3868
3868
  }
3869
3869
  });
3870
3870
  //#endregion
3871
- export { ADMIN_NAV, ADMIN_NAV_ENTITY_FIELD, ADMIN_NAV_ITEM_ROW_LABEL, ADMIN_NAV_ROW_LABEL, ADMIN_NAV_SLUG, BLOCK_DRAWER_CSS, BLOCK_DRAWER_STYLES, BLOCK_LIBRARY_CATEGORIES, BLOCK_LIBRARY_FIELD, BLOCK_LIBRARY_SLUG, BLOCK_THUMBNAIL_PATH, BRAND_ASSETS_MIME_TYPES, BRAND_ASSETS_SLUG, CAPABILITIES, CAPABILITY_FEATURES, DEFAULT_ROLE_GRANTS, DEFAULT_ROLE_MATRIX, DEFAULT_SECTION_CONTROLS, DESCRIPTION_LENGTH, DEVELOPER_DESCRIPTION, DOCUMENT_CREATE_NEW, DOCUMENT_TITLE_ACTIONS, DUPLICATE_ROLE_NAME_MESSAGE, DUPLICATE_ROLE_SLUG_MESSAGE, EXISTING_PARENT_MESSAGE, EXTERNAL_HREF_MESSAGE, FEATURES_MATRIX_FIELD, FEATURES_SLUG, FEATURE_GROUPS, FEATURE_GROUP_LABELS, FOOTER_COLUMNS_FIELD, FOOTER_COLUMN_WIDTHS, FOOTER_MAX_COLUMNS, FOOTER_MAX_LINK_COLUMNS, FOOTER_SOCIALS, FOOTER_TWELFTHS, FORM_SUBMISSIONS_SLUG, HERO_SECTION_CONTROLS, INVALID_ROLE_NAME_MESSAGE, LAST_ADMIN_DELETE_MESSAGE, LAST_ADMIN_DEMOTE_MESSAGE, LAST_USERS_TICK_MESSAGE, LAYOUT_DESCRIPTION, LAYOUT_REQUIRED_LABEL, LAYOUT_REQUIRED_MESSAGE, LIST_ALIGN, LOOK_FIELD, MEDIA_ALT_AUTOFILL, MEDIA_IN_USE_PATH, MEDIA_LIST, MISSING_PACKAGE_FEATURES_MESSAGE, MISSING_SEED_ROLES_MESSAGE, NAVIGATION_DB_NAME, NAVIGATION_FEATURE, NAVIGATION_FOOTER_DB_NAME, NAVIGATION_FOOTER_SLUG, NAVIGATION_SLUG, NEW_FOLDER_PARENT, NO_SECTION_CONTROLS, PACKAGE_BLOCK_SLUGS, PACKAGE_FEATURES, PACKAGE_FEATURE_SLUGS, PAGE_EDITOR_SYSTEM_KEYS, PAGE_SLUG_CELL, PAGE_TITLE_CELL, QUESTIONS_FEATURE, QUESTIONS_LIST, QUESTIONS_SLUG, REDIRECTS_SLUG, REQUIRED_PAGE_CELL, REQUIRED_PAGE_DELETE_MESSAGE, REQUIRED_PAGE_FIELD, REQUIRED_PAGE_UNPUBLISH_MESSAGE, RICH_TEXT_EDITOR_FONTS, RICH_TEXT_EDITOR_FONTS_CSS, ROLES, ROLES_CELL, ROLES_FIELD, ROLES_FIELD_DESCRIPTION, ROLES_GLOBAL_DESCRIPTION, ROLES_GRANTS_FIELD, ROLES_LOCKOUT_MESSAGE, ROLES_MATRIX_FIELD, ROLES_ROW_LABEL, ROLES_SLUG, ROLE_LABELS, ROLE_NAME_FIELD, ROLE_SLUG_FIELD, ROOT_PAGE_KEY, ROOT_PAGE_SLUG, SECTION_CONTROL_KEYS, SECTION_CONTROL_LABELS, SHARE_IMAGE_SIZE, SLUG_FIELD, SLUG_UNLOCK_WARNING, SYSTEM_COLOR_KEYS, THEME_APPEARANCE_FIELD, THEME_APPEARANCE_SLUG, THEME_COLORS_SLUG, THEME_COLOR_FIELD, THEME_COLOR_SCALE_FIELD, THEME_CONTRAST_REPORT, THEME_DOCUMENT_CONTROLS, THEME_FEATURE_SLUGS, THEME_FONT_FIELD, THEME_GREY_SCALE_FIELD, THEME_IDENTITY_FALLBACK, THEME_IDENTITY_SLUG, THEME_LIBRARY_FIELD, THEME_PAIRING_FIELD, THEME_PREVIEW_BREAKPOINTS, THEME_PUBLISH_FIELD, THEME_SAVE_BUTTON, THEME_SECTION_HEADING, THEME_SLUG, THEME_TYPOGRAPHY_SLUG, TRANSLATION_GRANT, TRANSLATION_KEY_PANEL, TRANSLATION_SETTINGS_SLUG, adminNav, adminOnlyApiTab, allowedFeaturesForUser, altFromFilename, applyRoleSlugsFromNames, authenticatedOrPublished, blockDrawer, blockLibraryCatalogue, blockLibraryEntriesFromConfig, blockThumbnailEndpoint, blockUsage, canManageBrand, canManageContent, canPublish, canUseFeature, colorTokenField, composeSlug, createAdminNav, createBlockLibrary, createBrandAssets, createFeatures, createFormSubmissions, createMedia, createNavigation, createPages, createQuestions, createRedirects, createRoles, createTaxonomy, createTheme, createUsers, defaultBlockLibraryValue, defaultFeaturesFieldValue, defaultRolesFieldValue, defaultSectionControls, deleteLibraryColor, developerOnlyAccess, documentCreateNew, documentTitle, documentTitleActions, ensureRootPage, facetField, featureCatalogue, featureGroupLabel, fillBlankAltFromFilename, findColorTokens, findColorUsages, firstImageIn, footerDesktopTracks, getFeaturesMatrix, getNavigation, getRolesMatrix, getSectionControls, groupBlocksByCategory, hasCapability, hasFeature, hasGrant, hasRole, headerCtaEnabled, hideUnlessDeveloper, hideUnlessFeature, inferredFolders, isAdmin, isAdminOrSelf, isAuthenticated, isDeveloper, isDeveloperTab, isFeatureGroupId, isFeatureSlug, isLockedFeature, isPackageFeatureSlug, isPrivilegedRole, isRole, isRoleName, isRoleSlug, isRootPageKey, isValidExternalHref, lexicalPlainText, listAlign, listAlignColumns, listAlignCss, lockSlugOnPublish, lookField, noIndexField, normalizeFooterDesktop, normalizeSlug, normalizeStoredRoles, packageThumbnailURL, pageEditorLooks, pageEditorSwatches, pageEditorTokens, parentPrefix, parseFeaturesMatrix, parseRolesMatrix, persistThemeChild, pruneUserRoles, publishThemeChild, recordPublishedSlugRedirect, redirectPath, replaceClientOriginalWithResizedFile, requireLayoutOnPublish, resetRolesMatrix, resolveAdminNav, resolveThemeIdentity, rewriteColorToken, rewriteColorTokens, rewriteColorUsages, richTextEditorFonts, roleDescription, roleLabel, roleSelectOptions, sanitizeRoleNameInput, sanitizeSvg, sectionControlsFromLibrary, sectionControlsOf, seedFeatures, seedRoleRows, seedRoles, seedTheme, seoPlugin, slugDepth, slugField, slugLeaf, slugifyRoleName, stampBlockLibrary, stampFeatureCatalogue, storedRoles, stripDrafts, syncAnswerText, themeColorKeys, themeLibraryFromDoc, titleTemplate, translation, truncateAtWord, validateBlockLibrary, validateExternalHref, validateFeaturesMatrix, validateFooterColumns, validateFooterSocialUrl, validateHeaderCta, validateRolesMatrix, withThumbnail, writePublishedSlugRedirect };
3871
+ export { ADMIN_NAV, ADMIN_NAV_ENTITY_FIELD, ADMIN_NAV_ITEM_ROW_LABEL, ADMIN_NAV_ROW_LABEL, ADMIN_NAV_SLUG, BLOCK_DRAWER_CSS, BLOCK_DRAWER_STYLES, BLOCK_LIBRARY_CATEGORIES, BLOCK_LIBRARY_FIELD, BLOCK_LIBRARY_SLUG, BLOCK_THUMBNAIL_PATH, BRAND_ASSETS_MIME_TYPES, BRAND_ASSETS_SLUG, CAPABILITIES, CAPABILITY_FEATURES, DEFAULT_ROLE_GRANTS, DEFAULT_ROLE_MATRIX, DEFAULT_SECTION_CONTROLS, DESCRIPTION_LENGTH, DEVELOPER_DESCRIPTION, DOCUMENT_CREATE_NEW, DOCUMENT_TITLE_ACTIONS, DUPLICATE_ROLE_NAME_MESSAGE, DUPLICATE_ROLE_SLUG_MESSAGE, EXISTING_PARENT_MESSAGE, EXTERNAL_HREF_MESSAGE, FEATURES_MATRIX_FIELD, FEATURES_SLUG, FEATURE_GROUPS, FEATURE_GROUP_LABELS, FOOTER_COLUMNS_FIELD, FOOTER_COLUMN_WIDTHS, FOOTER_MAX_COLUMNS, FOOTER_MAX_LINK_COLUMNS, FOOTER_SOCIALS, FOOTER_TWELFTHS, FORM_SUBMISSIONS_SLUG, HERO_SECTION_CONTROLS, INVALID_ROLE_NAME_MESSAGE, LAST_ADMIN_DELETE_MESSAGE, LAST_ADMIN_DEMOTE_MESSAGE, LAST_USERS_TICK_MESSAGE, LAYOUT_DESCRIPTION, LAYOUT_REQUIRED_LABEL, LAYOUT_REQUIRED_MESSAGE, LIST_ALIGN, LOOK_FIELD, MEDIA_ALT_AUTOFILL, MEDIA_IN_USE_PATH, MEDIA_LIST, MISSING_PACKAGE_FEATURES_MESSAGE, MISSING_SEED_ROLES_MESSAGE, NAVIGATION_DB_NAME, NAVIGATION_FEATURE, NAVIGATION_FOOTER_DB_NAME, NAVIGATION_FOOTER_SLUG, NAVIGATION_SLUG, NEW_FOLDER_PARENT, NO_SECTION_CONTROLS, PACKAGE_BLOCK_SLUGS, PACKAGE_FEATURES, PACKAGE_FEATURE_SLUGS, PAGE_EDITOR_SYSTEM_KEYS, PAGE_SLUG_CELL, PAGE_TITLE_CELL, QUESTIONS_FEATURE, QUESTIONS_LIST, QUESTIONS_SLUG, REDIRECTS_SLUG, REQUIRED_PAGE_CELL, REQUIRED_PAGE_DELETE_MESSAGE, REQUIRED_PAGE_FIELD, REQUIRED_PAGE_UNPUBLISH_MESSAGE, RICH_TEXT_EDITOR_FONTS, RICH_TEXT_EDITOR_FONTS_CSS, ROLES, ROLES_CELL, ROLES_FIELD, ROLES_FIELD_DESCRIPTION, ROLES_GLOBAL_DESCRIPTION, ROLES_GRANTS_FIELD, ROLES_LOCKOUT_MESSAGE, ROLES_MATRIX_FIELD, ROLES_ROW_LABEL, ROLES_SLUG, ROLE_LABELS, ROLE_NAME_FIELD, ROLE_SLUG_FIELD, ROOT_PAGE_KEY, ROOT_PAGE_SLUG, SECTION_CONTROL_KEYS, SECTION_CONTROL_LABELS, SHARE_IMAGE_SIZE, SLUG_FIELD, SLUG_UNLOCK_WARNING, SYSTEM_COLOR_KEYS, THEME_APPEARANCE_FIELD, THEME_APPEARANCE_SLUG, THEME_COLORS_SLUG, THEME_COLOR_FIELD, THEME_COLOR_SCALE_FIELD, THEME_CONTRAST_REPORT, THEME_DOCUMENT_CONTROLS, THEME_FEATURE_SLUGS, THEME_FONT_FIELD, THEME_GREY_SCALE_FIELD, THEME_IDENTITY_FALLBACK, THEME_IDENTITY_SLUG, THEME_LIBRARY_FIELD, THEME_PAIRING_FIELD, THEME_PREVIEW_BREAKPOINTS, THEME_PUBLISH_FIELD, THEME_SAVE_BUTTON, THEME_SECTION_HEADING, THEME_SLUG, THEME_TYPOGRAPHY_SLUG, TRANSLATION_ACTIVITY_PANEL, TRANSLATION_GRANT, TRANSLATION_KEY_PANEL, TRANSLATION_SETTINGS_SLUG, TRANSLATION_STATUS_BAR, adminNav, adminOnlyApiTab, allowedFeaturesForUser, altFromFilename, applyRoleSlugsFromNames, authenticatedOrPublished, blockDrawer, blockLibraryCatalogue, blockLibraryEntriesFromConfig, blockThumbnailEndpoint, blockUsage, canManageBrand, canManageContent, canPublish, canUseFeature, colorTokenField, composeSlug, createAdminNav, createBlockLibrary, createBrandAssets, createFeatures, createFormSubmissions, createMedia, createNavigation, createPages, createQuestions, createRedirects, createRoles, createTaxonomy, createTheme, createUsers, defaultBlockLibraryValue, defaultFeaturesFieldValue, defaultRolesFieldValue, defaultSectionControls, deleteLibraryColor, developerOnlyAccess, documentCreateNew, documentTitle, documentTitleActions, ensureRootPage, facetField, featureCatalogue, featureGroupLabel, fillBlankAltFromFilename, findColorTokens, findColorUsages, firstImageIn, footerDesktopTracks, getFeaturesMatrix, getNavigation, getRolesMatrix, getSectionControls, groupBlocksByCategory, hasCapability, hasFeature, hasGrant, hasRole, headerCtaEnabled, hideUnlessDeveloper, hideUnlessFeature, inferredFolders, isAdmin, isAdminOrSelf, isAuthenticated, isDeveloper, isDeveloperTab, isFeatureGroupId, isFeatureSlug, isLockedFeature, isPackageFeatureSlug, isPrivilegedRole, isRole, isRoleName, isRoleSlug, isRootPageKey, isValidExternalHref, lexicalPlainText, listAlign, listAlignColumns, listAlignCss, lockSlugOnPublish, lookField, noIndexField, normalizeFooterDesktop, normalizeSlug, normalizeStoredRoles, packageThumbnailURL, pageEditorLooks, pageEditorSwatches, pageEditorTokens, parentPrefix, parseFeaturesMatrix, parseRolesMatrix, persistThemeChild, pruneUserRoles, publishThemeChild, recordPublishedSlugRedirect, redirectPath, replaceClientOriginalWithResizedFile, requireLayoutOnPublish, resetRolesMatrix, resolveAdminNav, resolveThemeIdentity, rewriteColorToken, rewriteColorTokens, rewriteColorUsages, richTextEditorFonts, roleDescription, roleLabel, roleSelectOptions, sanitizeRoleNameInput, sanitizeSvg, sectionControlsFromLibrary, sectionControlsOf, seedFeatures, seedRoleRows, seedRoles, seedTheme, seoPlugin, slugDepth, slugField, slugLeaf, slugifyRoleName, stampBlockLibrary, stampFeatureCatalogue, storedRoles, stripDrafts, syncAnswerText, themeColorKeys, themeLibraryFromDoc, titleTemplate, translation, truncateAtWord, validateBlockLibrary, validateExternalHref, validateFeaturesMatrix, validateFooterColumns, validateFooterSocialUrl, validateHeaderCta, validateRolesMatrix, withThumbnail, writePublishedSlugRedirect };
3872
3872
 
3873
3873
  //# sourceMappingURL=index.mjs.map
@@ -1,5 +1,5 @@
1
- import { A as ModelPrice, B as AutoTranslateOptions, C as encryptApiKey, D as DEFAULT_TRANSLATE_MODEL, E as AnthropicTranslatorOptions, F as estimateCost, G as TranslateLocaleResult, H as BisonTranslationKind, I as modelPrice, J as TranslatedEntity, K as TranslateRequest, L as parseJsonArray, M as TranslatorCallEvent, N as anthropicTranslator, O as ECONOMY_TRANSLATE_MODEL, P as containsWord, R as translationSystemPrompt, S as decryptApiKey, T as AnthropicMessagesClient, U as BisonTranslationMarker, V as BISON_TRANSLATION_CONTEXT, W as Doc, X as TranslationFailureKind, Y as Translator, Z as classifyAnthropicError, _ as readTranslationSettings, a as translation, b as KeySource, c as KeyStatus, d as TRANSLATION_KEY_PANEL, f as TRANSLATION_SETTINGS_SLUG, g as invalidateTranslationSettings, h as TranslationSettingsDoc, i as hasLocalizedFields, j as TRANSLATE_MODEL_PRICES, k as KeyCheck, l as ResolvedTranslationSettings, m as TranslationModelChoice, n as TranslationOptions, o as TranslationStatus, p as TRANSLATION_STATE_SLUG, q as TranslateSite, r as applyTranslation, s as translationSettingsEndpoints, t as TranslationEntityHint, u as TRANSLATION_GRANT, v as resolveModel, w as resolveApiKey, x as ResolvedKey, y as siteFromInstructions, z as verifyAnthropicKey } from "./capability-CqdYCzG1.mjs";
2
- import { Block, CollectionAfterChangeHook, Config, Endpoint, Field, Payload, PayloadRequest, Plugin, SanitizedConfig } from "payload";
1
+ import { $ as BisonTranslationKind, A as usageThisMonth, B as KeyCheck, C as RATE_LIMIT_STREAK, D as monthKey, E as UsageMonth, F as resolveApiKey, G as containsWord, H as TRANSLATE_MODEL_PRICES, I as AnthropicMessagesClient, J as parseJsonArray, K as estimateCost, L as AnthropicTranslatorOptions, M as ResolvedKey, N as decryptApiKey, O as recordUsage, P as encryptApiKey, Q as BISON_TRANSLATION_CONTEXT, R as DEFAULT_TRANSLATE_MODEL, S as FAILURE_ADVICE, T as TRANSLATION_USAGE_SLUG, U as TranslatorCallEvent, V as ModelPrice, W as anthropicTranslator, X as verifyAnthropicKey, Y as translationSystemPrompt, Z as AutoTranslateOptions, _ as TranslationSettingsDoc, a as translation, at as TranslatedEntity, b as resolveModel, c as KeyStatus, ct as classifyAnthropicError, d as TRANSLATION_GRANT, et as BisonTranslationMarker, f as TRANSLATION_KEY_PANEL, g as TranslationModelChoice, h as TRANSLATION_STATUS_BAR, i as hasLocalizedFields, it as TranslateSite, j as KeySource, k as usageHistory, l as ResolvedTranslationSettings, m as TRANSLATION_STATE_SLUG, n as TranslationOptions, nt as TranslateLocaleResult, o as TranslationStatus, ot as Translator, p as TRANSLATION_SETTINGS_SLUG, q as modelPrice, r as applyTranslation, rt as TranslateRequest, s as translationSettingsEndpoints, st as TranslationFailureKind, t as TranslationEntityHint, tt as Doc, u as TRANSLATION_ACTIVITY_PANEL, v as invalidateTranslationSettings, w as RecordedFailure, x as siteFromInstructions, y as readTranslationSettings, z as ECONOMY_TRANSLATE_MODEL } from "./capability-Dotbq58Q.mjs";
2
+ import { Block, CollectionAfterChangeHook, CollectionConfig, Config, Endpoint, Field, GlobalConfig, Payload, PayloadRequest, Plugin, SanitizedConfig } from "payload";
3
3
 
4
4
  //#region src/translate/plugin.d.ts
5
5
  /**
@@ -237,6 +237,223 @@ declare function isLocalizedPath(fields: readonly ConfigField[], segments: reado
237
237
  */
238
238
  declare function localizeExistingContent(options: LocalizeExistingContentOptions): Promise<LocalizedTableCopy[]>;
239
239
  //#endregion
240
+ //#region src/translate/jobs.d.ts
241
+ /**
242
+ * Background translation jobs: the backfill that starts when translation
243
+ * is switched on (or a key is saved while it is on), "Fill all blank", and
244
+ * "Apply frozen words to existing Spanish". A job is a row in a hidden
245
+ * collection holding its queue of documents and a cursor, saved after every
246
+ * document, so a job interrupted by a failure or a redeploy resumes where it
247
+ * stopped and never redoes a finished document.
248
+ *
249
+ * A run processes documents for `RUN_BUDGET_MS`, then hands on to the next
250
+ * run with a signed request to its own endpoint, so no single function
251
+ * invocation runs long. A job whose last heartbeat is older than
252
+ * `STALE_AFTER_MS` (its chain broke on a redeploy) is resumed on the next
253
+ * cold start (`onInit`) or the next time the screen polls.
254
+ */
255
+ declare const TRANSLATION_JOBS_SLUG = "translation-jobs";
256
+ type TranslationJobKind = "backfill" | "fill-blank" | "frozen-fix";
257
+ type TranslationJobStatus = "running" | "paused" | "done" | "failed";
258
+ /** One document a job visits. */
259
+ type JobTarget = {
260
+ collection: string;
261
+ id: number | string;
262
+ } | {
263
+ global: string;
264
+ };
265
+ interface TranslationJobDoc {
266
+ id: number | string;
267
+ kind: TranslationJobKind;
268
+ status: TranslationJobStatus;
269
+ queue: JobTarget[];
270
+ cursor: number;
271
+ /** Strings the estimate counted. */
272
+ strings: number;
273
+ translated: number;
274
+ /** Frozen words the fix looks for. */
275
+ words?: string[] | null;
276
+ startedBy?: string | null;
277
+ origin?: string | null;
278
+ heartbeatAt?: string | null;
279
+ message?: string | null;
280
+ /** Why a job paused on its own: the recorded failure (out of credit, rejected key, cap). */
281
+ reason?: string | null;
282
+ /** Documents a failure the job could not stop for left untranslated. */
283
+ skipped?: number | null;
284
+ /** The runner that holds the job, and until when; one runner at a time. */
285
+ lease?: string | null;
286
+ leaseUntil?: string | null;
287
+ /** Bumped on every claim, so two runners can never both win one. */
288
+ leaseRev?: number | null;
289
+ createdAt?: string;
290
+ }
291
+ /**
292
+ * How long a claim lasts without renewal. Renewed before every document, so
293
+ * it covers one document's model calls (90s, one retry) with room to spare;
294
+ * a runner silent this long is gone, and the job may be claimed again.
295
+ */
296
+ declare const LEASE_MS = 300000;
297
+ /** What a job would do: the documents with work, and how many strings. */
298
+ interface JobEstimate {
299
+ documents: number;
300
+ strings: number;
301
+ /** Rough USD, from the model's price; real cost shows in usage once it runs. */
302
+ cost: number;
303
+ queue: JobTarget[];
304
+ /** For the frozen-word fix: the frozen words some translation lost. */
305
+ lostWords: string[];
306
+ }
307
+ /** Strings in the frozen-word fix: English keeps a frozen word (whole word, case-sensitive) and the translation lost it. */
308
+ declare function frozenWordForce(words: readonly string[]): (source: string, existing: unknown) => boolean;
309
+ /**
310
+ * Counts what a job would translate, reading each document's latest version
311
+ * (the published copy, or the current draft when there is one) in every
312
+ * ticked language. Changes nothing.
313
+ */
314
+ declare function estimateJob(payload: Payload, settings: ResolvedTranslationSettings, kind: TranslationJobKind, words?: readonly string[]): Promise<JobEstimate>;
315
+ /**
316
+ * Takes the job for `lease` if it is running and nobody else holds a live
317
+ * claim. The claim is a compare-and-set on `leaseRev`, so of two runners
318
+ * reading the same job only one can win.
319
+ */
320
+ declare function claimJob(payload: Payload, id: number | string, lease: string): Promise<boolean>;
321
+ /**
322
+ * Runs one job for up to `budgetMs` while holding `lease`: one document at
323
+ * a time. Before each document it renews the lease (and stops if another
324
+ * runner has it), re-reads the job (stops if it was paused) and the switch
325
+ * (pauses if it is off). A document's write and the cursor after it are
326
+ * made only while the lease is still this runner's. When a document's
327
+ * translation records a stopping failure (out of credit, a rejected key,
328
+ * the cap) the job pauses on that document, which is not counted done, and
329
+ * Resume picks it up after the Admin has fixed the cause. A document that
330
+ * fails for any other reason is skipped and counted. Returns `true` when
331
+ * work is left and the lease is still held, so the caller hands on.
332
+ */
333
+ declare function runJobSlice(payload: Payload, id: number | string, lease: string, budgetMs?: number): Promise<boolean>;
334
+ /**
335
+ * Restarts running jobs whose runner is gone (its claim lapsed, e.g. a
336
+ * redeploy broke the chain). Safe to call from every poll and every cold
337
+ * start: a fresh runner must win the claim, so at most one picks a job up.
338
+ */
339
+ declare function resumeStaleJobs(payload: Payload): Promise<number>;
340
+ /**
341
+ * Creates a job from an estimate and starts it. Single-flight: a job
342
+ * already running is returned instead, and if two starts race (switch-on
343
+ * and a key save, two Admins), the newer one stands down for the older.
344
+ */
345
+ declare function startJob(payload: Payload, input: {
346
+ kind: TranslationJobKind;
347
+ estimate: JobEstimate;
348
+ words?: readonly string[];
349
+ user?: unknown;
350
+ req?: Pick<PayloadRequest, "url" | "headers">;
351
+ }): Promise<TranslationJobDoc>;
352
+ /**
353
+ * The backfill when translation is switched on or a key is saved while it
354
+ * is on: unless a paused job is waiting to be resumed (the screen offers
355
+ * that instead), estimate every blank string and start filling it.
356
+ */
357
+ declare function startBackfill(payload: Payload, input?: {
358
+ user?: unknown;
359
+ req?: Pick<PayloadRequest, "url" | "headers">;
360
+ }): Promise<TranslationJobDoc | null>;
361
+ /** Public shape of a job for the screen. */
362
+ declare function jobView(job: TranslationJobDoc): {
363
+ id: string | number;
364
+ kind: TranslationJobKind;
365
+ status: TranslationJobStatus;
366
+ done: number;
367
+ total: number;
368
+ strings: number;
369
+ translated: number;
370
+ skipped: number;
371
+ startedBy: string | null;
372
+ message: string | null;
373
+ createdAt: string | null;
374
+ };
375
+ //#endregion
376
+ //#region src/translate/interface-text.d.ts
377
+ /**
378
+ * A site's interface text (the strings `next-intl` reads from
379
+ * `messages/<locale>.json`) as a localized CMS document, so the same
380
+ * translation (switch, key, instructions, fill-on-save, hand corrections
381
+ * kept) covers it. One row per message: a stable dotted key (`nav.plans`,
382
+ * `faq.items.0.question`) and its localized text.
383
+ */
384
+ declare const INTERFACE_TEXT_SLUG = "interface-text";
385
+ /** Nested `next-intl` messages: what `getMessages` returns and `importMessages` takes. */
386
+ type InterfaceMessages = {
387
+ [key: string]: string | InterfaceMessages | Array<string | InterfaceMessages>;
388
+ };
389
+ interface InterfaceTextRow {
390
+ id?: string | null;
391
+ key?: string | null;
392
+ value?: string | null;
393
+ }
394
+ interface InterfaceTextDoc {
395
+ messages?: InterfaceTextRow[] | null;
396
+ }
397
+ /** `{ nav: { plans: "Plans" }, list: ["a"] }` → `{ "nav.plans": "Plans", "list.0": "a" }`. Non-string leaves are skipped. */
398
+ declare function flattenMessages(messages: unknown, prefix?: string): Record<string, string>;
399
+ /** The reverse of `flattenMessages`: a level whose keys are 0..n-1 becomes an array. */
400
+ declare function unflattenMessages(flat: Readonly<Record<string, string>>): InterfaceMessages;
401
+ /** How long `getMessages` reuses one read per locale. A save in the same process clears it at once. */
402
+ declare const MESSAGES_CACHE_MS = 60000;
403
+ declare function invalidateMessages(payload: object): void;
404
+ /**
405
+ * The interface text for `locale` as `next-intl` messages (nested JSON).
406
+ * An empty translation reads as the default locale's text (Payload's
407
+ * fallback), so a page never shows a blank. Cached per process for
408
+ * `ttlMs` (60s by default): a request reads memory, and the database is
409
+ * read only when the cache refreshes or after a save in the same process.
410
+ *
411
+ * ```ts
412
+ * // src/i18n/request.ts
413
+ * export default getRequestConfig(async ({ requestLocale }) => {
414
+ * const locale = (await requestLocale) ?? "en";
415
+ * return { locale, messages: await getMessages(await getPayload({ config }), locale) };
416
+ * });
417
+ * ```
418
+ */
419
+ declare function getMessages(payload: Pick<Payload, "findGlobal">, locale: string, options?: {
420
+ ttlMs?: number;
421
+ }): Promise<InterfaceMessages>;
422
+ /**
423
+ * The Interface text Global: one row per message, key shared by every
424
+ * locale, text localized. Drafts on, so a publish is what re-translates
425
+ * changed English (the usual rules). The Content grant saves drafts; the
426
+ * Publish grant publishes, as on Pages and the Header.
427
+ */
428
+ declare function interfaceTextGlobal(): GlobalConfig;
429
+ interface ImportMessagesResult {
430
+ /** Keys added to the document. */
431
+ added: number;
432
+ /** Per locale, texts written into a blank. */
433
+ filled: Record<string, number>;
434
+ /** Per locale, texts left as they were because the CMS already had one. */
435
+ kept: Record<string, number>;
436
+ }
437
+ /**
438
+ * The migration path from `messages/<locale>.json`: the source locale's
439
+ * file sets the keys and fills blank English, every other file fills blank
440
+ * text in its locale. Anything already in the CMS is kept, so running it
441
+ * again (after an editor changed a string) overwrites nothing. It
442
+ * publishes what it writes, so it refuses while the Global has an
443
+ * unpublished draft: publishing on top would put that draft live. Writes with
444
+ * `context: { autoTranslate: false }`, so importing translates nothing;
445
+ * blank strings left over fill on the next publish or backfill.
446
+ *
447
+ * ```ts
448
+ * import en from "../src/messages/en.json";
449
+ * import es from "../src/messages/es.json";
450
+ * await importMessages(payload, { en, es });
451
+ * ```
452
+ */
453
+ declare function importMessages(payload: Pick<Payload, "findGlobal" | "updateGlobal" | "config">, files: Readonly<Record<string, unknown>>, options?: {
454
+ sourceLocale?: string;
455
+ }): Promise<ImportMessagesResult>;
456
+ //#endregion
240
457
  //#region src/translate/fields.d.ts
241
458
  /** Field configs plus the config-level blocks a `blockReferences` field points at. */
242
459
  interface FieldSchema {
@@ -295,7 +512,8 @@ declare function translationJob(input: {
295
512
  source: Doc;
296
513
  target?: Doc | null;
297
514
  previous?: Doc | null;
298
- overwrite?: boolean;
515
+ overwrite?: boolean; /** Also translate the strings this picks, filled target or not (the frozen-word fix). */
516
+ force?: (source: string, existing: unknown) => boolean;
299
517
  }): TranslationJob | null;
300
518
  //#endregion
301
519
  //#region src/translate/hooks.d.ts
@@ -325,7 +543,8 @@ type TranslateDocumentOptions = ({
325
543
  */
326
544
  translator?: Translator; /** The prompt hint; defaults to the collection's `context` hint, else the slug and the title. */
327
545
  context?: string; /** Defaults to Settings → Translation's instructions (the site's code `site` until the screen is saved). */
328
- site?: TranslateSite; /** Why this write happens, carried on each write as `context.bisonTranslation.kind`. Defaults to `manual`. */
546
+ site?: TranslateSite; /** Also re-translate the strings this picks, filled target or not (the frozen-word fix). */
547
+ force?: (source: string, existing: unknown) => boolean; /** Why this write happens, carried on each write as `context.bisonTranslation.kind`. Defaults to `manual`. */
329
548
  kind?: BisonTranslationKind;
330
549
  /**
331
550
  * Pass only while the caller's transaction is still open (a seed inside its
@@ -553,5 +772,5 @@ declare function fillMessages(options: {
553
772
  onProgress?: (done: number, total: number) => void;
554
773
  }): Promise<FillMessagesResult>;
555
774
  //#endregion
556
- export { ACTIVE_LOCALES_CACHE_MS, type ActiveLocales, type AnthropicMessagesClient, type AnthropicTranslatorOptions, type AutoTranslateOptions, type AutoTranslateState, BISON_TRANSLATION_CONTEXT, type BisonTranslationKind, type BisonTranslationMarker, DEFAULT_TRANSLATE_MODEL, type Doc, ECONOMY_TRANSLATE_MODEL, type FieldSchema, type KeyCheck, type KeySource, type KeyStatus, LIBRARY_DEFAULT_LOCALE, LIBRARY_LOCALES, LIBRARY_LOCALE_CODES, type LibraryLocaleCode, type LocalizeExistingContentOptions, type LocalizedTableCopy, type MessagesJson, type MigrationDb, type MigrationPayload, type MigrationSql, type ModelPrice, type ResolvedKey, type ResolvedTranslationSettings, TRANSACTION_TIMEOUT_MS, TRANSLATE_MODEL_PRICES, TRANSLATE_NOW, TRANSLATION_GRANT, TRANSLATION_KEY_PANEL, TRANSLATION_SETTINGS_SLUG, TRANSLATION_STATE_SLUG, type TranslateDocumentOptions, type TranslateLocaleResult, type TranslateRequest, type TranslateSite, type TranslatedEntity, type TranslationEntityHint, type TranslationFailureKind, type TranslationJob, type TranslationModelChoice, type TranslationOptions, type TranslationSettingsDoc, type TranslationStatus, type Translator, type TranslatorCallEvent, activeAlternates, activeLocales, anthropicTranslator, applyTranslation, autoTranslate, classifyAnthropicError, collectLocalizedStrings, containsWord, decryptApiKey, draftedTranslationDecision, encryptApiKey, estimateCost, fillMessages, hasLocalizedFields, inactiveLocaleRedirect, invalidateActiveLocales, invalidateTranslationSettings, isAutosave, isLocalizedPath, isTranslatorConfigured, localizeExistingContent, localizedCopyUnchanged, modelPrice, parseJsonArray, partitionStatements, readTranslateState, readTranslationSettings, resolveApiKey, resolveModel, runAfterCommit, sameRow, shouldSkipDraftedTranslation, shouldSkipUndraftedTranslation, siteFromInstructions, splitStatements, translateDocument, translateStrings, translation, translationJob, translationSettingsEndpoints, translationSystemPrompt, verifyAnthropicKey, withLibraryLocales, withTranslator };
775
+ export { ACTIVE_LOCALES_CACHE_MS, type ActiveLocales, type AnthropicMessagesClient, type AnthropicTranslatorOptions, type AutoTranslateOptions, type AutoTranslateState, BISON_TRANSLATION_CONTEXT, type BisonTranslationKind, type BisonTranslationMarker, DEFAULT_TRANSLATE_MODEL, type Doc, ECONOMY_TRANSLATE_MODEL, FAILURE_ADVICE, type FieldSchema, INTERFACE_TEXT_SLUG, type ImportMessagesResult, type InterfaceMessages, type InterfaceTextDoc, type InterfaceTextRow, type JobEstimate, type JobTarget, type KeyCheck, type KeySource, type KeyStatus, LEASE_MS, LIBRARY_DEFAULT_LOCALE, LIBRARY_LOCALES, LIBRARY_LOCALE_CODES, type LibraryLocaleCode, type LocalizeExistingContentOptions, type LocalizedTableCopy, MESSAGES_CACHE_MS, type MessagesJson, type MigrationDb, type MigrationPayload, type MigrationSql, type ModelPrice, RATE_LIMIT_STREAK, type RecordedFailure, type ResolvedKey, type ResolvedTranslationSettings, TRANSACTION_TIMEOUT_MS, TRANSLATE_MODEL_PRICES, TRANSLATE_NOW, TRANSLATION_ACTIVITY_PANEL, TRANSLATION_GRANT, TRANSLATION_JOBS_SLUG, TRANSLATION_KEY_PANEL, TRANSLATION_SETTINGS_SLUG, TRANSLATION_STATE_SLUG, TRANSLATION_STATUS_BAR, TRANSLATION_USAGE_SLUG, type TranslateDocumentOptions, type TranslateLocaleResult, type TranslateRequest, type TranslateSite, type TranslatedEntity, type TranslationEntityHint, type TranslationFailureKind, type TranslationJob, type TranslationJobDoc, type TranslationJobKind, type TranslationJobStatus, type TranslationModelChoice, type TranslationOptions, type TranslationSettingsDoc, type TranslationStatus, type Translator, type TranslatorCallEvent, type UsageMonth, activeAlternates, activeLocales, anthropicTranslator, applyTranslation, autoTranslate, claimJob, classifyAnthropicError, collectLocalizedStrings, containsWord, decryptApiKey, draftedTranslationDecision, encryptApiKey, estimateCost, estimateJob, fillMessages, flattenMessages, frozenWordForce, getMessages, hasLocalizedFields, importMessages, inactiveLocaleRedirect, interfaceTextGlobal, invalidateActiveLocales, invalidateMessages, invalidateTranslationSettings, isAutosave, isLocalizedPath, isTranslatorConfigured, jobView, localizeExistingContent, localizedCopyUnchanged, modelPrice, monthKey, parseJsonArray, partitionStatements, readTranslateState, readTranslationSettings, recordUsage, resolveApiKey, resolveModel, resumeStaleJobs, runAfterCommit, runJobSlice, sameRow, shouldSkipDraftedTranslation, shouldSkipUndraftedTranslation, siteFromInstructions, splitStatements, startBackfill, startJob, translateDocument, translateStrings, translation, translationJob, translationSettingsEndpoints, translationSystemPrompt, unflattenMessages, usageHistory, usageThisMonth, verifyAnthropicKey, withLibraryLocales, withTranslator };
557
776
  //# sourceMappingURL=translate.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"translate.d.mts","names":[],"sources":["../src/translate/plugin.ts","../src/translate/languages.ts","../src/translate/migrate-locales.ts","../src/translate/fields.ts","../src/translate/hooks.ts","../src/translate/document.ts","../src/translate/strings.ts","../src/translate/guards.ts","../src/translate/after-commit.ts","../src/translate/state.ts","../src/translate/endpoint.ts","../src/translate/messages.ts"],"mappings":";;;;;;AAsBA;;;;;;;;;iBAAgB,aAAA,CAAc,OAAA,EAAS,oBAAA,GAAuB,MAAA;;;;;;AAA9D;;;cCda,eAAA;EAAA;;;;;;KAKD,iBAAA,WAA4B,eAAA;AAAA,cAE3B,sBAAA,EAAwB,iBAAA;AAPrC;AAAA,cAUa,oBAAA;;;;;;;iBAcG,kBAAA,CACd,YAAA,EAAc,MAAA,mBACb,OAAA,CAAQ,MAAA;;UAyBM,aAAA;EA9CY;EAgD3B,aAAA;EAhDsC;EAkDtC,MAAA;EAhDW;EAkDX,QAAA;AAAA;;cAIW,uBAAA;AAAA,KAER,cAAA,GAAiB,IAAA,CAAK,OAAA;;;iBAWX,uBAAA,CAAwB,OAAA;;;;;;;;;AAvBxC;;;iBAoDgB,aAAA,CAAc,OAAA,EAAS,cAAA,EAAgB,OAAA;EAAW,KAAA;AAAA,IAAwB,OAAA,CAAQ,aAAA;;AA1ClG;;;;;AAA8C;;;;;AAa9C;;;iBAgGgB,sBAAA,CACd,QAAA,UACA,OAAA,EAAS,IAAA,CAAK,aAA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,OAAA,EAAS,OAAA,qBACrB,OAAA;;;UCpDc,kBAAA;ETWa;;;;;ESL5B,UAAA,GAAa,UAAA;;EAEb,IAAA,GAAO,aAAA;EACP,SAAA,IAAa,OAAA,EAAS,OAAA;EACtB,YAAA;EACA,aAAA;;EAEA,WAAA,EAAa,MAAA;IAAiB,OAAA,IAAW,GAAA,EAAK,GAAA;EAAA;;EAE9C,OAAA,EAAS,MAAA;IAAiB,OAAA,IAAW,GAAA,EAAK,GAAA;EAAA;AAAA;;ARX5C;;;;;iBQyBgB,kBAAA,CACd,MAAA,EAAQ,MAAA,GAAS,eAAA,GAAkB,OAAA,aAClC,QAAA,CAAS,kBAAA;;;;;ARVZ;;iBQoBgB,cAAA,WAAyB,MAAA,GAAS,eAAA,CAAA,CAAiB,MAAA,EAAQ,CAAA,EAAG,UAAA,EAAY,UAAA,GAAa,CAAA;;;;cC5C1F,aAAA;;;;KCJD,YAAA,sCAAkD,YAAA;EAAA,CAAoB,GAAA,WAAc,YAAA;AAAA;AAAA,UAgE/E,kBAAA;EX9CsB;EWgDrC,QAAA,EAAU,YAAA;EXhDkD;EWkD5D,UAAA;EXlDkE;;;;ACdpE;;EUuEE,QAAA;AAAA;;;;;;;AVlEF;iBU4EsB,YAAA,CAAa,OAAA;EACjC,MAAA,EAAQ,YAAA;EACR,MAAA,GAAS,YAAA;EACT,UAAA,EAAY,UAAA;EACZ,IAAA;EACA,EAAA;EACA,KAAA;EACA,OAAA;EACA,IAAA,GAAO,aAAA;EACP,UAAA,IAAc,IAAA,UAAc,KAAA;AAAA,IAC1B,OAAA,CAAQ,kBAAA"}
1
+ {"version":3,"file":"translate.d.mts","names":[],"sources":["../src/translate/plugin.ts","../src/translate/languages.ts","../src/translate/migrate-locales.ts","../src/translate/jobs.ts","../src/translate/interface-text.ts","../src/translate/fields.ts","../src/translate/hooks.ts","../src/translate/document.ts","../src/translate/strings.ts","../src/translate/guards.ts","../src/translate/after-commit.ts","../src/translate/state.ts","../src/translate/endpoint.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AA,CAAoB,GAAA,WAAc,YAAA;AAAA;AAAA,UAgE/E,kBAAA;Eb9CsB;EagDrC,QAAA,EAAU,YAAA;EbhDkD;EakD5D,UAAA;EblDkE;;;;ACdpE;;EYuEE,QAAA;AAAA;;;;;;;AZlEF;iBY4EsB,YAAA,CAAa,OAAA;EACjC,MAAA,EAAQ,YAAA;EACR,MAAA,GAAS,YAAA;EACT,UAAA,EAAY,UAAA;EACZ,IAAA;EACA,EAAA;EACA,KAAA;EACA,OAAA;EACA,IAAA,GAAO,aAAA;EACP,UAAA,IAAc,IAAA,UAAc,KAAA;AAAA,IAC1B,OAAA,CAAQ,kBAAA"}
@@ -1,4 +1,4 @@
1
- import { A as activeLocales, C as resolveModel, D as LIBRARY_LOCALES, E as LIBRARY_DEFAULT_LOCALE, F as encryptApiKey, I as resolveApiKey, L as collectLocalizedStrings, M as invalidateActiveLocales, N as withLibraryLocales, O as LIBRARY_LOCALE_CODES, P as decryptApiKey, R as sameRow, S as readTranslationSettings, T as ACTIVE_LOCALES_CACHE_MS, _ as TRANSLATION_GRANT, a as isAutosave, b as TRANSLATION_STATE_SLUG, c as shouldSkipDraftedTranslation, d as runAfterCommit, f as TRANSLATE_NOW, g as withTranslator, h as readTranslateState, i as translationSettingsEndpoints, j as inactiveLocaleRedirect, k as activeAlternates, l as shouldSkipUndraftedTranslation, m as BISON_TRANSLATION_CONTEXT, n as hasLocalizedFields, o as draftedTranslationDecision, p as translateDocument, r as translation, s as localizedCopyUnchanged, t as applyTranslation, u as TRANSACTION_TIMEOUT_MS, v as TRANSLATION_KEY_PANEL, w as siteFromInstructions, x as invalidateTranslationSettings, y as TRANSLATION_SETTINGS_SLUG, z as translationJob } from "./capability-DHPE2kon.mjs";
1
+ import { $ as LIBRARY_DEFAULT_LOCALE, A as TRANSLATE_NOW, B as TRANSLATION_STATUS_BAR, C as isAutosave, D as shouldSkipUndraftedTranslation, E as shouldSkipDraftedTranslation, F as TRANSLATION_ACTIVITY_PANEL, G as FAILURE_ADVICE, H as readTranslationSettings, I as TRANSLATION_GRANT, J as monthKey, K as RATE_LIMIT_STREAK, L as TRANSLATION_KEY_PANEL, M as BISON_TRANSLATION_CONTEXT, N as readTranslateState, O as TRANSACTION_TIMEOUT_MS, P as withTranslator, Q as ACTIVE_LOCALES_CACHE_MS, R as TRANSLATION_SETTINGS_SLUG, S as startJob, T as localizedCopyUnchanged, U as resolveModel, V as invalidateTranslationSettings, W as siteFromInstructions, X as usageHistory, Y as recordUsage, Z as usageThisMonth, _ as frozenWordForce, a as MESSAGES_CACHE_MS, at as invalidateActiveLocales, b as runJobSlice, c as importMessages, ct as encryptApiKey, d as unflattenMessages, dt as sameRow, et as LIBRARY_LOCALES, f as translationSettingsEndpoints, ft as translationJob, g as estimateJob, h as claimJob, i as INTERFACE_TEXT_SLUG, it as inactiveLocaleRedirect, j as translateDocument, k as runAfterCommit, l as interfaceTextGlobal, lt as resolveApiKey, m as TRANSLATION_JOBS_SLUG, n as hasLocalizedFields, nt as activeAlternates, o as flattenMessages, ot as withLibraryLocales, p as LEASE_MS, q as TRANSLATION_USAGE_SLUG, r as translation, rt as activeLocales, s as getMessages, st as decryptApiKey, t as applyTranslation, tt as LIBRARY_LOCALE_CODES, u as invalidateMessages, ut as collectLocalizedStrings, v as jobView, w as draftedTranslationDecision, x as startBackfill, y as resumeStaleJobs, z as TRANSLATION_STATE_SLUG } from "./capability-CAXtTcSU.mjs";
2
2
  import { a as TRANSLATE_MODEL_PRICES, c as estimateCost, d as translationSystemPrompt, f as verifyAnthropicKey, i as ECONOMY_TRANSLATE_MODEL, l as modelPrice, n as translateStrings, o as anthropicTranslator, p as classifyAnthropicError, r as DEFAULT_TRANSLATE_MODEL, s as containsWord, t as isTranslatorConfigured, u as parseJsonArray } from "./strings-Fd7kUCT7.mjs";
3
3
  import { t as fillMessages } from "./messages-dZV_aAnR.mjs";
4
4
  //#region src/translate/plugin.ts
@@ -264,6 +264,6 @@ WHERE l."_parent_id" = p."id" AND l."_locale"::text = ${literal(locale)}`);
264
264
  return copies;
265
265
  }
266
266
  //#endregion
267
- export { ACTIVE_LOCALES_CACHE_MS, BISON_TRANSLATION_CONTEXT, DEFAULT_TRANSLATE_MODEL, ECONOMY_TRANSLATE_MODEL, LIBRARY_DEFAULT_LOCALE, LIBRARY_LOCALES, LIBRARY_LOCALE_CODES, TRANSACTION_TIMEOUT_MS, TRANSLATE_MODEL_PRICES, TRANSLATE_NOW, TRANSLATION_GRANT, TRANSLATION_KEY_PANEL, TRANSLATION_SETTINGS_SLUG, TRANSLATION_STATE_SLUG, activeAlternates, activeLocales, anthropicTranslator, applyTranslation, autoTranslate, classifyAnthropicError, collectLocalizedStrings, containsWord, decryptApiKey, draftedTranslationDecision, encryptApiKey, estimateCost, fillMessages, hasLocalizedFields, inactiveLocaleRedirect, invalidateActiveLocales, invalidateTranslationSettings, isAutosave, isLocalizedPath, isTranslatorConfigured, localizeExistingContent, localizedCopyUnchanged, modelPrice, parseJsonArray, partitionStatements, readTranslateState, readTranslationSettings, resolveApiKey, resolveModel, runAfterCommit, sameRow, shouldSkipDraftedTranslation, shouldSkipUndraftedTranslation, siteFromInstructions, splitStatements, translateDocument, translateStrings, translation, translationJob, translationSettingsEndpoints, translationSystemPrompt, verifyAnthropicKey, withLibraryLocales, withTranslator };
267
+ export { ACTIVE_LOCALES_CACHE_MS, BISON_TRANSLATION_CONTEXT, DEFAULT_TRANSLATE_MODEL, ECONOMY_TRANSLATE_MODEL, FAILURE_ADVICE, INTERFACE_TEXT_SLUG, LEASE_MS, LIBRARY_DEFAULT_LOCALE, LIBRARY_LOCALES, LIBRARY_LOCALE_CODES, MESSAGES_CACHE_MS, RATE_LIMIT_STREAK, TRANSACTION_TIMEOUT_MS, TRANSLATE_MODEL_PRICES, TRANSLATE_NOW, TRANSLATION_ACTIVITY_PANEL, TRANSLATION_GRANT, TRANSLATION_JOBS_SLUG, TRANSLATION_KEY_PANEL, TRANSLATION_SETTINGS_SLUG, TRANSLATION_STATE_SLUG, TRANSLATION_STATUS_BAR, TRANSLATION_USAGE_SLUG, activeAlternates, activeLocales, anthropicTranslator, applyTranslation, autoTranslate, claimJob, classifyAnthropicError, collectLocalizedStrings, containsWord, decryptApiKey, draftedTranslationDecision, encryptApiKey, estimateCost, estimateJob, fillMessages, flattenMessages, frozenWordForce, getMessages, hasLocalizedFields, importMessages, inactiveLocaleRedirect, interfaceTextGlobal, invalidateActiveLocales, invalidateMessages, invalidateTranslationSettings, isAutosave, isLocalizedPath, isTranslatorConfigured, jobView, localizeExistingContent, localizedCopyUnchanged, modelPrice, monthKey, parseJsonArray, partitionStatements, readTranslateState, readTranslationSettings, recordUsage, resolveApiKey, resolveModel, resumeStaleJobs, runAfterCommit, runJobSlice, sameRow, shouldSkipDraftedTranslation, shouldSkipUndraftedTranslation, siteFromInstructions, splitStatements, startBackfill, startJob, translateDocument, translateStrings, translation, translationJob, translationSettingsEndpoints, translationSystemPrompt, unflattenMessages, usageHistory, usageThisMonth, verifyAnthropicKey, withLibraryLocales, withTranslator };
268
268
 
269
269
  //# sourceMappingURL=translate.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bison-lab/payload-core",
3
- "version": "5.0.0",
3
+ "version": "5.2.0",
4
4
  "description": "Site-agnostic Payload CMS configuration for Bison Lab sites: the SEO tab, the Theme global, the Roles Global, the brand-assets cupboard, and the metadata and theme readers for the pages they describe",
5
5
  "keywords": [
6
6
  "bison-lab",
@@ -1 +0,0 @@
1
- {"version":3,"file":"capability-CqdYCzG1.d.mts","names":[],"sources":["../src/translate/errors.ts","../src/translate/types.ts","../src/translate/anthropic.ts","../src/translate/key.ts","../src/translate/settings.ts","../src/translate/settings-endpoints.ts","../src/translate/capability.ts"],"mappings":";;;;;;AAWA;;;;;AAWA;;;KAXY,sBAAA;;iBAWI,sBAAA,CAAuB,KAAA,YAAiB,sBAAA;;;;KCrB5C,GAAA,GAAM,MAAA;;KAGN,oBAAA;;;;;ADkBZ;;;;;;;;AC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