@azx-pbc/axiom-web 0.0.0-stage → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +161 -2
  3. package/dist/address.d.ts +32 -0
  4. package/dist/address.d.ts.map +1 -0
  5. package/dist/address.js +146 -0
  6. package/dist/address.js.map +1 -0
  7. package/dist/capture/MediaCapture.d.ts +45 -0
  8. package/dist/capture/MediaCapture.d.ts.map +1 -0
  9. package/dist/capture/MediaCapture.js +669 -0
  10. package/dist/capture/MediaCapture.js.map +1 -0
  11. package/dist/capture/SignatureCapture.d.ts +31 -0
  12. package/dist/capture/SignatureCapture.d.ts.map +1 -0
  13. package/dist/capture/SignatureCapture.js +329 -0
  14. package/dist/capture/SignatureCapture.js.map +1 -0
  15. package/dist/capture/copy.d.ts +101 -0
  16. package/dist/capture/copy.d.ts.map +1 -0
  17. package/dist/capture/copy.js +1369 -0
  18. package/dist/capture/copy.js.map +1 -0
  19. package/dist/capture/index.d.ts +19 -0
  20. package/dist/capture/index.d.ts.map +1 -0
  21. package/dist/capture/index.js +14 -0
  22. package/dist/capture/index.js.map +1 -0
  23. package/dist/capture/media-kind.d.ts +16 -0
  24. package/dist/capture/media-kind.d.ts.map +1 -0
  25. package/dist/capture/media-kind.js +64 -0
  26. package/dist/capture/media-kind.js.map +1 -0
  27. package/dist/capture/permissions.d.ts +109 -0
  28. package/dist/capture/permissions.d.ts.map +1 -0
  29. package/dist/capture/permissions.js +172 -0
  30. package/dist/capture/permissions.js.map +1 -0
  31. package/dist/capture/refusal.d.ts +13 -0
  32. package/dist/capture/refusal.d.ts.map +1 -0
  33. package/dist/capture/refusal.js +16 -0
  34. package/dist/capture/refusal.js.map +1 -0
  35. package/dist/controls.d.ts +64 -0
  36. package/dist/controls.d.ts.map +1 -0
  37. package/dist/controls.js +2524 -0
  38. package/dist/controls.js.map +1 -0
  39. package/dist/coordinate.d.ts +38 -0
  40. package/dist/coordinate.d.ts.map +1 -0
  41. package/dist/coordinate.js +220 -0
  42. package/dist/coordinate.js.map +1 -0
  43. package/dist/copy.d.ts +313 -0
  44. package/dist/copy.d.ts.map +1 -0
  45. package/dist/copy.js +2602 -0
  46. package/dist/copy.js.map +1 -0
  47. package/dist/countries.d.ts +14 -0
  48. package/dist/countries.d.ts.map +1 -0
  49. package/dist/countries.js +264 -0
  50. package/dist/countries.js.map +1 -0
  51. package/dist/format/calendar-locale.d.ts +19 -0
  52. package/dist/format/calendar-locale.d.ts.map +1 -0
  53. package/dist/format/calendar-locale.js +38 -0
  54. package/dist/format/calendar-locale.js.map +1 -0
  55. package/dist/format/country-names.d.ts +21 -0
  56. package/dist/format/country-names.d.ts.map +1 -0
  57. package/dist/format/country-names.js +2277 -0
  58. package/dist/format/country-names.js.map +1 -0
  59. package/dist/format/date.d.ts +58 -0
  60. package/dist/format/date.d.ts.map +1 -0
  61. package/dist/format/date.js +155 -0
  62. package/dist/format/date.js.map +1 -0
  63. package/dist/format/digits.d.ts +23 -0
  64. package/dist/format/digits.d.ts.map +1 -0
  65. package/dist/format/digits.js +46 -0
  66. package/dist/format/digits.js.map +1 -0
  67. package/dist/format/index.d.ts +28 -0
  68. package/dist/format/index.d.ts.map +1 -0
  69. package/dist/format/index.js +24 -0
  70. package/dist/format/index.js.map +1 -0
  71. package/dist/format/locale.d.ts +33 -0
  72. package/dist/format/locale.d.ts.map +1 -0
  73. package/dist/format/locale.js +39 -0
  74. package/dist/format/locale.js.map +1 -0
  75. package/dist/format/media-type.d.ts +8 -0
  76. package/dist/format/media-type.d.ts.map +1 -0
  77. package/dist/format/media-type.js +302 -0
  78. package/dist/format/media-type.js.map +1 -0
  79. package/dist/format/money.d.ts +52 -0
  80. package/dist/format/money.d.ts.map +1 -0
  81. package/dist/format/money.js +36 -0
  82. package/dist/format/money.js.map +1 -0
  83. package/dist/format/number.d.ts +28 -0
  84. package/dist/format/number.d.ts.map +1 -0
  85. package/dist/format/number.js +91 -0
  86. package/dist/format/number.js.map +1 -0
  87. package/dist/host.d.ts +122 -0
  88. package/dist/host.d.ts.map +1 -0
  89. package/dist/host.js +20 -0
  90. package/dist/host.js.map +1 -0
  91. package/dist/index.d.ts +57 -0
  92. package/dist/index.d.ts.map +1 -0
  93. package/dist/index.js +49 -0
  94. package/dist/index.js.map +1 -0
  95. package/dist/media.d.ts +42 -0
  96. package/dist/media.d.ts.map +1 -0
  97. package/dist/media.js +151 -0
  98. package/dist/media.js.map +1 -0
  99. package/dist/pickers/DatePicker.d.ts +35 -0
  100. package/dist/pickers/DatePicker.d.ts.map +1 -0
  101. package/dist/pickers/DatePicker.js +212 -0
  102. package/dist/pickers/DatePicker.js.map +1 -0
  103. package/dist/pickers/TimeSegments.d.ts +27 -0
  104. package/dist/pickers/TimeSegments.d.ts.map +1 -0
  105. package/dist/pickers/TimeSegments.js +82 -0
  106. package/dist/pickers/TimeSegments.js.map +1 -0
  107. package/dist/pickers/day-picker-locale.d.ts +15 -0
  108. package/dist/pickers/day-picker-locale.d.ts.map +1 -0
  109. package/dist/pickers/day-picker-locale.js +46 -0
  110. package/dist/pickers/day-picker-locale.js.map +1 -0
  111. package/dist/render/dom.d.ts +100 -0
  112. package/dist/render/dom.d.ts.map +1 -0
  113. package/dist/render/dom.js +882 -0
  114. package/dist/render/dom.js.map +1 -0
  115. package/dist/render/layout.d.ts +45 -0
  116. package/dist/render/layout.d.ts.map +1 -0
  117. package/dist/render/layout.js +8 -0
  118. package/dist/render/layout.js.map +1 -0
  119. package/dist/schedule/SchedulePicker.d.ts +46 -0
  120. package/dist/schedule/SchedulePicker.d.ts.map +1 -0
  121. package/dist/schedule/SchedulePicker.js +160 -0
  122. package/dist/schedule/SchedulePicker.js.map +1 -0
  123. package/dist/schedule/timeslot.d.ts +52 -0
  124. package/dist/schedule/timeslot.d.ts.map +1 -0
  125. package/dist/schedule/timeslot.js +265 -0
  126. package/dist/schedule/timeslot.js.map +1 -0
  127. package/dist/styles.css +2151 -0
  128. package/dist/theme/index.d.ts +12 -0
  129. package/dist/theme/index.d.ts.map +1 -0
  130. package/dist/theme/index.js +11 -0
  131. package/dist/theme/index.js.map +1 -0
  132. package/dist/theme/presets.d.ts +93 -0
  133. package/dist/theme/presets.d.ts.map +1 -0
  134. package/dist/theme/presets.js +200 -0
  135. package/dist/theme/presets.js.map +1 -0
  136. package/dist/tokens.css +234 -0
  137. package/dist/wizard-checkpoints.d.ts +18 -0
  138. package/dist/wizard-checkpoints.d.ts.map +1 -0
  139. package/dist/wizard-checkpoints.js +56 -0
  140. package/dist/wizard-checkpoints.js.map +1 -0
  141. package/package.json +76 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controls.js","sourceRoot":"","sources":["../src/controls.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,YAAY,GACb,MAAM,sBAAsB,CAAC;AAU9B,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,aAAa,GACd,MAAM,wBAAwB,CAAC;AAShC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5F,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;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SAAS,EAAC,EAAE,EAAE,SAAS,wBAAqB,EAAE,YACxD,OAAO,GACN,CACL,EACA,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACtC,YAAG,SAAS,EAAC,UAAU,EAAC,IAAI,EAAC,OAAO,EAAC,EAAE,EAAE,SAAS,iBAAc,SAAS,YACtE,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,gBAAgB,CAAC,GACpD,CACL,EACA,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACnC,YAAG,SAAS,EAAC,UAAU,EAAC,IAAI,EAAC,OAAO,EAAC,EAAE,EAAE,cAAc,gBAAa,SAAS,YAC1E,YAAY,GACX,CACL,IACA,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import {\n errorKey,\n renderDisplayText,\n renderFieldText,\n renderValueText,\n useAsyncOptions,\n useBufferedInput,\n useField,\n useFormState,\n} from '@azx-pbc/axiom-react';\nimport type {\n AsyncOptionList,\n BufferedFormat,\n BufferRefusalReason,\n FieldError,\n FieldProps,\n RenderControlNode,\n RenderTranslate,\n} from '@azx-pbc/axiom-react';\nimport {\n AxiomError,\n WriteRefusedError,\n canonicalizeRestricted,\n isRecord,\n mediaAcceptMatches,\n optionCodeValue,\n sameWireValue,\n} from '@azx-pbc/axiom-runtime';\nimport type {\n Control,\n FieldOption,\n FormBlocker,\n OptionItem,\n UnavailableOption,\n WireValue,\n} from '@azx-pbc/axiom-runtime';\nimport { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport type { ChangeEvent, Context, KeyboardEvent, ReactElement } from 'react';\nimport { formCopy, useHostCopy } from './copy.js';\nimport type { FormCopy, HostCopy, WebBufferReason } from './copy.js';\nimport { useHostActions, useLocale } from './host.js';\nimport { AddressEditor } from './address.js';\nimport { CoordinateEditor } from './coordinate.js';\nimport { DatePicker } from './pickers/DatePicker.js';\nimport { TimeSegments } from './pickers/TimeSegments.js';\nimport { ScheduleField } from './schedule/SchedulePicker.js';\nimport { scheduleText } from './schedule/timeslot.js';\nimport {\n friendlyMediaType,\n humanSize,\n isImageMedia,\n mediaBytes,\n mediaDisplayLine,\n mediaLine,\n mediaMime,\n} from './media.js';\nimport { isCanonicalMoneyText } from './format/money.js';\nimport { formatDecimal, groupCanonicalNumericText, isDecimalString } from './format/number.js';\nimport { DEFAULT_DIGIT_POLICY } from './format/digits.js';\nimport { resolveLocale } from './format/locale.js';\nimport type { Locale } from './format/locale.js';\n\n/**\n * One control, painted from its declaration.\n *\n * The declared control decides which native affordance appears, and nothing here knows which\n * document it is painting. A control whose value the host cannot write from the domain it holds\n * — a media reference, a timeslot with no host loader — is shown read-only rather than as a text\n * box that would write a value the wire contract refuses. A captured signature is read-only too,\n * with the host's own sign action beside it when the page has a signer: the record it signs is the\n * one the page shows, so a branch the page excluded is not in the signing.\n *\n * An address and a coordinate are edited as their declared records rather than as text: the\n * address editor writes only a complete shape, and the coordinate editor offers the host's\n * capture beside manual decimal entries so a denied or offline reader is never left without a\n * path to answer.\n */\n\n/** The presentation hints a compiled field carries for a host component. */\nexport interface ControlConstraints {\n readonly minimum: number | string | undefined;\n readonly maximum: number | string | undefined;\n readonly step: number | string | undefined;\n readonly units: readonly string[] | undefined;\n readonly accept: readonly string[] | undefined;\n readonly minBytes: number | undefined;\n readonly maxBytes: number | undefined;\n readonly scale: number | undefined;\n readonly currency: string | undefined;\n}\n\n/** The controlled props every custom control slot receives. */\nexport interface ControlComponentProps {\n readonly controlId: string;\n readonly descriptionId: string | undefined;\n readonly errorId: string;\n readonly field: FieldProps;\n readonly value: WireValue | undefined;\n readonly setValue: (value: WireValue) => void;\n /**\n * Non-throwing write path: returns the engine outcome (`committed` or `refused`) instead of\n * throwing `WriteRefusedError`, so a custom control can inspect and display expected refusals.\n */\n readonly trySetValue: NonNullable<FieldProps['trySetValue']>;\n readonly error: FieldError | undefined;\n readonly required: boolean;\n readonly disabled: boolean;\n readonly readOnly: boolean;\n readonly mayWrite: boolean;\n readonly locale: string | undefined;\n readonly options: readonly FieldOption[] | undefined;\n readonly constraints: ControlConstraints;\n}\n\n/** A host component that replaces one default control entry. */\nexport type ControlComponent = (props: ControlComponentProps) => ReactElement | null;\n\n/** The slot map a host supplies to `RenderedForm` / `LayoutTree`. */\nexport type ControlComponents = Partial<Record<Control | 'signature' | 'media', ControlComponent>>;\n\n/** The map in force for the tree; absent means every control uses the adapter's default. */\nexport const ControlComponentsContext: Context<ControlComponents | undefined> = createContext<\n ControlComponents | undefined\n>(undefined);\n\n/** How one declared control is painted, with the parse contract a text entry needs. */\ntype ControlPlan =\n | { readonly family: 'buffered'; readonly format: BufferedFormat }\n | { readonly family: 'text' }\n | { readonly family: 'boolean' }\n | { readonly family: 'boolean-choice' }\n | { readonly family: 'choice' }\n | { readonly family: 'radio-group' }\n | { readonly family: 'combobox' }\n | { readonly family: 'rating' }\n | { readonly family: 'list' }\n | { readonly family: 'media' }\n | { readonly family: 'signature' }\n | { readonly family: 'quantity' }\n | { readonly family: 'slider' }\n | { readonly family: 'date' }\n | { readonly family: 'datetime' }\n | { readonly family: 'time' }\n | { readonly family: 'duration' }\n | { readonly family: 'address' }\n | { readonly family: 'coordinate' }\n | { readonly family: 'static' };\n\n/**\n * The control-to-affordance table, keyed by the primitive and the hint together.\n *\n * The hint alone is not enough: the wire refuses a value of the wrong shape, and `writeTo`\n * absorbs that refusal as the documented \"the record would not take it\" case. A plan keyed only\n * by `control` therefore loses data silently for the two pairs where the hint's affordance and\n * the primitive disagree — an integer `percentage` and a boolean `select`/`radio`. Each branch\n * below states the wire type its affordance writes.\n *\n * A hint the compiler admits on a primitive it cannot write (a `checkbox` on a string) falls back\n * to the primitive's own entry rather than an affordance that would be refused. `datetime`,\n * `media_capture` and `timeslot` stay static/paged because the reference host has no capture\n * provider for them; that is a documented capability limit, not a silent refusal.\n */\nfunction planOf(node: RenderControlNode): ControlPlan {\n const { primitive } = node.declaration;\n switch (node.control) {\n case 'percentage':\n return primitive === 'integer'\n ? { family: 'buffered', format: { kind: 'integer' } }\n : { family: 'buffered', format: { kind: 'decimal' } };\n case 'checkbox':\n case 'switch':\n // A checkbox writes a JSON boolean. A string field carrying the hint keeps a text entry.\n return primitive === 'boolean' ? { family: 'boolean' } : { family: 'text' };\n case 'select':\n return primitive === 'boolean' ? { family: 'boolean-choice' } : { family: 'choice' };\n // A radio is a radio group and a combobox is a filtering picker. Painting either as a\n // `<select>` would erase the affordance the author declared while claiming to honour it.\n case 'radio':\n return primitive === 'boolean' ? { family: 'boolean-choice' } : { family: 'radio-group' };\n case 'combobox':\n return primitive === 'boolean' ? { family: 'boolean-choice' } : { family: 'combobox' };\n // A rating is a short scale of stops, which is a radio group of stars or numbers rather\n // than a dropdown. `likert` keeps the picker: its domain is usually a long labelled scale.\n case 'rating':\n return { family: 'rating' };\n case 'likert':\n return { family: 'choice' };\n case 'text':\n case 'textarea':\n case 'email':\n case 'url':\n case 'password':\n return { family: 'text' };\n case 'phone':\n // A control hint implies no validation (`MODEL-3.1.3`). A national spelling such as\n // `(415) 555-0123` writes the raw string; `is_phone` is the optional canonical check.\n return { family: 'text' };\n case 'integer':\n return { family: 'buffered', format: { kind: 'integer' } };\n case 'decimal':\n return { family: 'buffered', format: { kind: 'decimal' } };\n case 'money':\n return { family: 'buffered', format: { kind: 'money' } };\n case 'quantity':\n // A quantity is an exact amount and a unit. The numeric entry is buffered against the\n // declaration's scale and the picker supplies the value's second member, so one control\n // writes `{ value, unit }` rather than a bare number the wire would refuse.\n return { family: 'quantity' };\n case 'slider':\n return { family: 'slider' };\n case 'date':\n return { family: 'date' };\n case 'datetime':\n return { family: 'datetime' };\n case 'time':\n return { family: 'time' };\n case 'duration':\n return { family: 'duration' };\n // An address and a coordinate are structured records, not scalars: the wire refuses a\n // string where either shape is required, so a text box would silently lose the write. The\n // matrix admits exactly one hint per primitive, and the primitive is restated here because\n // a hint the compiler refuses on a string was historically painted as a static value.\n case 'address':\n return primitive === 'address' ? { family: 'address' } : { family: 'static' };\n case 'map':\n return primitive === 'coordinate' ? { family: 'coordinate' } : { family: 'static' };\n case 'media_capture':\n return { family: 'media' };\n case 'signature_capture':\n return { family: 'signature' };\n case 'multiselect':\n case 'rank':\n case 'tags':\n return { family: 'list' };\n case 'timeslot':\n return { family: 'choice' };\n default:\n return assertNeverControl(node.control);\n }\n}\n\n/** A union arm the compiler proves unreachable. */\nfunction assertNeverControl(value: never): never {\n throw new Error(`unreachable control: ${JSON.stringify(value)}`);\n}\n\n/**\n * One write a control attempts, with the session's refusal kept out of the event handler.\n *\n * `field.enabled` is the binding's own answer — access permits a write and every `enabled` rule\n * passes — so a refused interaction is not offered at all. The guard is still repeated at the\n * write because access can be revoked between the render and the click, and the engine's\n * structured refusal must never escape a DOM handler: a browser reports an uncaught handler error\n * to the console and continues, leaving the control showing a value the record does not hold.\n * A write refusal the session states as an `AxiomError` (a row identity that cannot be cleared,\n * for one) is a refusal too: it is reported to the control rather than thrown, so the reader sees\n * why the value returned and nobody sees a console error.\n */\nfunction writeTo(\n field: FieldProps,\n value: WireValue,\n onRefusal?: (message: string | undefined) => void,\n): boolean {\n if (!field.enabled) return false;\n try {\n field.setValue(value);\n onRefusal?.(undefined);\n return true;\n } catch (error) {\n if (error instanceof WriteRefusedError) {\n onRefusal?.(undefined);\n return false;\n }\n if (error instanceof AxiomError) {\n onRefusal?.(error.message);\n return false;\n }\n throw error;\n }\n}\n\n/** How one direct binding write ended when a control calls the session outside `writeTo`. */\ntype WriteAttempt = { readonly kind: 'accepted' } | { readonly kind: 'refused' };\n\n/**\n * A write a control makes by handing the binding straight to a hook, caught before it escapes.\n *\n * `useBufferedInput` calls `field.setValue` itself, so its `setText`/`onBlur` callbacks are the\n * one write path in this adapter that does not pass through `writeTo`. Access may still be\n * revoked between the render that offered the control and the keystroke that answers it, and the\n * engine's `WriteRefusedError` must become a sentence beside the control rather than an uncaught\n * handler error the browser reports and then continues past. An `AxiomError` is the session's\n * structured refusal too; a programmer error is not caught here.\n */\nfunction absorbWrite(run: () => void): WriteAttempt {\n try {\n run();\n return { kind: 'accepted' };\n } catch (error) {\n if (error instanceof WriteRefusedError || error instanceof AxiomError) {\n return { kind: 'refused' };\n }\n throw error;\n }\n}\n\n/**\n * The failures one control paints.\n *\n * The binding already answers this under the session's reveal policy: a warning, a refused entry\n * and the failures a visit or a submit has revealed are in `visibleErrors`, while an untouched\n * requirement and a rule still missing an operand are not. The adapter adds no second policy.\n */\nfunction visibleErrorsOf(field: FieldProps): readonly FieldError[] {\n return field.visibleErrors;\n}\n\n/**\n * The artifact states a message key for a rule, deferred check or gate and none for the rest, so\n * the four message-less kinds carry the host's own copy in the selected locale.\n */\nfunction errorTextOf(\n error: FieldError,\n field: FieldProps,\n translate: RenderTranslate,\n copy: HostCopy,\n): string {\n const label = translate(field.descriptor.labelKey ?? field.fieldId);\n switch (error.kind) {\n case 'validate':\n case 'deferred':\n case 'gate':\n return translate(error.messageKey, error.params);\n case 'required':\n // The artifact's own sentence wins when it declared one; the host's generic sentence\n // exists for a requirement the artifact states no message for.\n return error.messageKey === undefined\n ? copy.required(label, error.rowName)\n : translate(error.messageKey, error.params);\n case 'cardinality':\n // A minimum of zero cannot fail, so the catalogue states no sentence and the control\n // paints none rather than an empty paragraph.\n return copy.cardinality(label, error.bound, error.count, error.limit) ?? '';\n case 'invalid-value':\n return copy.invalidValue(label);\n case 'access':\n return copy.notEditable(label, error.access);\n case 'screen': {\n const sentence = translate(error.messageKey);\n const reasons = error.reasons.map((reason) => translate(reason.messageKey, reason.params));\n return reasons.length === 0 ? sentence : `${sentence} ${reasons.join('; ')}`;\n }\n case 'row-key':\n // The entry, not the record: the value on screen still belongs to the row it showed.\n return copy.rowKey(label, error.rowName);\n default:\n return assertNeverError(error);\n }\n}\n\n/** A union arm the compiler proves unreachable. */\nfunction assertNeverError(value: never): never {\n throw new Error(`unreachable field error: ${JSON.stringify(value)}`);\n}\n\n/** The classes one affordance carries: the base control hook plus its declared kind. */\nfunction controlClassName(control: Control): string {\n return `ax-control ax-control--${control}`;\n}\n\n/**\n * A field's visible name, wherever the family paints it.\n *\n * A single control takes it as its `<label>`; a radio group takes it as its `<legend>`. The\n * words and the required marker are the same either way, so a group cannot drift into a caption\n * that says less than the control above it would.\n */\nfunction ControlLabel({\n node,\n field,\n copy,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly copy: HostCopy;\n}): ReactElement {\n return (\n <>\n {node.label}\n {field.a11y.required ? (\n <>\n <span aria-hidden=\"true\"> *</span>\n <span className=\"ax-visually-hidden axiom-visually-hidden\"> {copy.requiredMarker()}</span>\n </>\n ) : null}\n </>\n );\n}\n\nexport function Control({\n node,\n rowKey,\n translate,\n}: {\n readonly node: RenderControlNode;\n readonly rowKey?: string | number;\n readonly translate: RenderTranslate;\n}): ReactElement {\n const field = useField(node.fieldId, rowKey);\n const copy = useHostCopy();\n const locale = useLocale();\n const components = useContext(ControlComponentsContext);\n const Custom =\n components?.[node.control] ??\n (node.declaration.primitive === 'signature_ref'\n ? components?.signature\n : node.declaration.primitive === 'media_ref'\n ? components?.media\n : undefined);\n const canCustom =\n Custom !== undefined &&\n field.computation.kind === 'none' &&\n field.withheldReason !== 'masked' &&\n field.withheldReason !== 'write_only' &&\n field.access !== 'masked';\n // The binding owns the ids: the control, its failure and its description are three elements\n // the session already names, so a row cannot collide with its sibling and this adapter invents\n // no convention of its own.\n const id = field.a11y.controlId;\n const errorId = field.a11y.errorId;\n const descriptionId = field.a11y.descriptionId;\n // A value the record withholds is one the reader did not answer, so the note describes the\n // record rather than a control the reader has changed. The binding owns the answer, so a masked,\n // redacted or stored `write_only` value states it without the host naming the field again.\n const showDeferred = field.withheld === true;\n // The deferral is text the control is described by, so a reader who lands on the empty box is\n // told the record holds a value the server chose not to send rather than that nobody answered.\n const deferredId = `${id}-deferred`;\n const hasVisibleErrors = visibleErrorsOf(field).length > 0;\n // A visible failure and the hint are both reasons the control cannot be used as it stands, so\n // the control is described by the concatenation rather than by whichever one wins: swapping\n // the hint out on failure removes the help text exactly when the reader needs it.\n const describedBy = [\n hasVisibleErrors ? errorId : undefined,\n node.description === undefined ? undefined : descriptionId,\n showDeferred ? deferredId : undefined,\n ]\n .filter((entry) => entry !== undefined)\n .join(' ');\n const plan = planOf(node);\n // A caption that names a group is never a `<label for>`: pointing one at the first option let\n // a click on the caption answer for the user. These families paint the caption as their own\n // `<legend>` instead, and the group is the element a summary link reaches.\n const checkboxGroup =\n plan.family === 'list' &&\n node.control !== 'rank' &&\n node.declaration.primitive === 'array' &&\n (node.declaration.options !== undefined || node.declaration.optionSource !== undefined);\n // The states belong on the field wrapper so the label, hint and failure can react to them; the\n // control itself still carries `aria-invalid`/`aria-required`, which is what assistive\n // technology reads. A value this device may not write is read-only in every branch below.\n // A masked or stored `write_only` value has no editable control at all; a redacted value the\n // access answer still permits a write keeps an ordinary control and states the handoff beside\n // it. The wrapper's read-only marker follows the same answer.\n const settled = field.withheldReason === 'masked' || field.withheldReason === 'write_only';\n const readOnlyLike = field.computation.kind !== 'none' || settled || field.readOnly;\n // A standalone boolean is one row: the mark and its label side by side. Its label is the\n // choice's own `<label>`, so no second label above it is painted unless the entry is read-only\n // or replaced by a host slot.\n const labelBeside = !readOnlyLike && plan.family === 'boolean';\n const labelInGroup =\n !readOnlyLike &&\n ((plan.family === 'radio-group' && node.declaration.options !== undefined) ||\n plan.family === 'rating' ||\n plan.family === 'address' ||\n plan.family === 'coordinate' ||\n checkboxGroup ||\n choiceListSource(node, field) !== undefined ||\n node.control === 'rank' ||\n (plan.family === 'list' && node.declaration.items?.primitive === 'media_ref') ||\n (plan.family === 'boolean-choice' && node.control === 'radio'));\n const customPaint = canCustom && Custom !== undefined;\n return (\n <div\n className=\"ax-field\"\n data-control={node.control}\n data-binding={node.fieldId}\n {...(field.a11y.invalid ? { 'data-invalid': '' } : {})}\n {...(field.a11y.required ? { 'data-required': '' } : {})}\n {...(readOnlyLike ? { 'data-readonly': '' } : {})}\n {...(field.withheld === true ? { 'data-deferred': node.fieldId } : {})}\n >\n {(labelBeside || labelInGroup) && !customPaint ? null : (\n <label className=\"ax-label\" htmlFor={id} id={`${id}-label`}>\n <ControlLabel node={node} field={field} copy={copy} />\n </label>\n )}\n {customPaint && Custom !== undefined ? (\n <Custom\n controlId={id}\n descriptionId={descriptionId}\n errorId={errorId}\n field={field}\n value={field.value}\n setValue={field.setValue}\n trySetValue={field.trySetValue}\n error={visibleErrorsOf(field)[0]}\n required={field.a11y.required}\n disabled={field.disabled}\n readOnly={field.readOnly}\n mayWrite={field.mayWrite}\n locale={locale}\n options={node.declaration.options}\n constraints={{\n minimum: node.declaration.minimum,\n maximum: node.declaration.maximum,\n step: node.declaration.step,\n units: node.declaration.units,\n accept: node.declaration.accept,\n minBytes: node.declaration.minBytes,\n maxBytes: node.declaration.maxBytes,\n scale: node.declaration.scale,\n currency: node.declaration.currency,\n }}\n />\n ) : (\n <Entry\n node={node}\n field={field}\n plan={plan}\n id={id}\n {...(rowKey === undefined ? {} : { rowKey })}\n {...(describedBy === '' ? {} : { describedBy })}\n translate={translate}\n />\n )}\n {node.description === undefined ? null : (\n <p className=\"ax-hint\" id={descriptionId}>\n {node.description}\n </p>\n )}\n {showDeferred ? (\n <p className=\"ax-hint\" id={deferredId} data-deferred-note=\"\">\n {copy.deferredValue()}\n </p>\n ) : null}\n <Errors id={errorId} field={field} translate={translate} copy={copy} />\n </div>\n );\n}\n\n/** The failures a control announces, in the artifact's order. */\nfunction Errors({\n id,\n field,\n translate,\n copy,\n}: {\n readonly id: string;\n readonly field: FieldProps;\n readonly translate: RenderTranslate;\n readonly copy: HostCopy;\n}): ReactElement | null {\n const errors = visibleErrorsOf(field);\n if (errors.length === 0) return null;\n return (\n <div id={id}>\n {errors.map((error) => (\n <p\n className=\"ax-error\"\n key={errorKey(error)}\n {...(error.kind === 'screen' ? { 'data-screen-id': error.screenId } : {})}\n >\n {errorTextOf(error, field, translate, copy)}\n </p>\n ))}\n </div>\n );\n}\n\n/**\n * The direction a value's own script runs in, independent of the sentence around it.\n *\n * Digits, a decimal point and a sign are a left-to-right run even in an Arabic paragraph. A\n * numeric value is therefore stated `ltr` inside its `<bdi>` isolation; a string, a date's own\n * text or a host-formatted value keeps the container's direction.\n */\nfunction valueDirection(primitive: string): 'ltr' | undefined {\n switch (primitive) {\n case 'integer':\n case 'decimal':\n case 'money':\n case 'instant':\n case 'coordinate':\n return 'ltr';\n default:\n return undefined;\n }\n}\n\n/**\n * A freeform list of text entries, typed as one comma-separated line.\n *\n * The comma rule is stated beside the entry through the control's own description relation,\n * and each commit announces how many entries the record now holds.\n *\n * The text is a draft until it is committed, because a controlled value derived from the record\n * erases the separator on the keystroke that types it: the record is `[\"one\"]`, the rendered text\n * is `one`, and a comma written into it is removed before the next character. Keeping the typed\n * line until blur or Enter is what lets a person write a second entry at all.\n */\nfunction FreeformListEntry({\n field,\n shared,\n}: {\n readonly field: FieldProps;\n readonly shared: SharedProps;\n}): ReactElement {\n const copy = useHostCopy();\n const committed = Array.isArray(field.value)\n ? field.value\n .map((entry) => renderValueText(entry, copy.display, field.descriptor.items?.primitive))\n .join(', ')\n : '';\n const [draft, setDraft] = useState<string | undefined>(undefined);\n // One live region for the entry count, always present so a committed count is announced:\n // a status node that mounts together with its text is silent in some readers.\n const [announcement, setAnnouncement] = useState('');\n const text = draft ?? committed;\n // The comma rule travels in the same description relation the control already carries, so\n // a reader who lands on the entry hears how to write a second one before typing it.\n const hintId = `${shared.id}-tags-hint`;\n const described = [shared['aria-describedby'], hintId]\n .filter((entry) => entry !== undefined && entry !== '')\n .join(' ');\n const commit = (): void => {\n const entries = text\n .split(',')\n .map((entry) => entry.trim())\n .filter((entry) => entry !== '');\n writeTo(field, entries.length === 0 ? null : entries);\n setDraft(undefined);\n setAnnouncement(copy.freeformTagsCount(entries.length));\n };\n return (\n <>\n <input\n {...shared}\n {...(described === '' ? {} : { 'aria-describedby': described })}\n type=\"text\"\n value={text}\n onChange={(event: ChangeEvent<HTMLInputElement>) => setDraft(event.target.value)}\n onBlur={() => {\n commit();\n shared.onBlur?.();\n }}\n onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key !== 'Enter') return;\n event.preventDefault();\n commit();\n }}\n />\n <p className=\"ax-hint\" id={hintId}>\n {copy.freeformTagsHint()}\n </p>\n <p className=\"ax-hint\" role=\"status\" data-tags-count=\"\">\n {announcement}\n </p>\n </>\n );\n}\n\n/**\n * A wire value read as text, for a control the host does not write from its own domain.\n *\n * A static value is still a control a reader can reach, so it carries the relations the\n * interactive branches carry: the failure it is described by when one is visible, the help text\n * otherwise, and `aria-invalid` when a rule fails. A `masked` value is the one case where the\n * visible text is a placeholder and the withholding itself is the fact to announce, so a\n * visually-hidden sentence states it inside the same output.\n */\nfunction ReadOnlyValue({\n field,\n id,\n control,\n extraDescribedBy,\n}: {\n readonly field: FieldProps;\n readonly id: string;\n readonly control: Control;\n readonly extraDescribedBy?: string;\n}): ReactElement {\n const copy = useHostCopy();\n // The same relation `Control` computes: the hint, the visible failure and the deferral are\n // three answers to \"why is this what it is\", so the control is described by all of them.\n // See `Control`: the note describes a withheld value, not a control the reader has answered.\n const showDeferred = field.withheld === true;\n const deferredId = `${id}-deferred`;\n const describedBy = [\n visibleErrorsOf(field).length > 0 ? field.a11y.errorId : undefined,\n field.a11y.descriptionId,\n showDeferred ? deferredId : undefined,\n extraDescribedBy,\n ]\n .filter((entry) => entry !== undefined && entry !== '')\n .join(' ');\n const text = renderFieldText(field, copy.display);\n // A computed value the engine cannot decide has no text. A blank cell reads as \"this value\n // does not exist\"; the shared dash says the same without the empty box.\n // A value this record holds and the device may not read was never entered here, so the\n // static branch paints no placeholder of its own: the sentence beside it is the answer.\n const shown = renderDisplayText(text, field.withheld);\n return (\n <output\n id={id}\n // A read-only value is still a value a keyboard may copy or a summary link may land on.\n // `-1` makes it focusable by script without adding a tab stop of its own.\n tabIndex={-1}\n className={controlClassName(control)}\n data-readonly={field.fieldId}\n aria-invalid={field.a11y.invalid}\n {...(describedBy === '' ? {} : { 'aria-describedby': describedBy })}\n >\n {/* A value may be a number, a date, a money amount or a Latin identifier inside an RTL\n sentence. Isolating the run keeps its own direction and stops the punctuation around\n it from being reordered. */}\n <bdi {...(valueDirection(field.descriptor.primitive) === undefined ? {} : { dir: 'ltr' })}>\n {shown}\n {/* A percentage's canonical number is a ratio of one hundred; without its sign the\n reader cannot tell it from an ordinary decimal. */}\n {control === 'percentage' ? copy.percentageSign() : null}\n </bdi>\n {field.withheld === true ? (\n <span className=\"ax-visually-hidden axiom-visually-hidden\" data-withheld=\"\">\n {copy.withheldValue()}\n </span>\n ) : null}\n </output>\n );\n}\n\n/** The list of attributes every entry shares, so each affordance states only what differs. */\ninterface SharedProps {\n readonly className: string;\n readonly id: string;\n readonly 'aria-required': boolean;\n readonly 'aria-invalid': boolean;\n readonly 'aria-describedby': string | undefined;\n readonly 'aria-busy': boolean | undefined;\n readonly disabled: boolean;\n readonly readOnly: boolean;\n readonly onBlur: () => void;\n}\n\nfunction Entry({\n node,\n field,\n plan,\n id,\n rowKey,\n describedBy,\n translate,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly plan: ControlPlan;\n readonly id: string;\n readonly rowKey?: string | number;\n readonly describedBy?: string;\n readonly translate: RenderTranslate;\n}): ReactElement {\n const copy = useHostCopy();\n const locale = useLocale();\n const { nativeTimeslot } = useHostActions();\n // A writer owns this value. Painting its control would offer a write the session must refuse.\n if (field.computation.kind !== 'none')\n return <ReadOnlyValue field={field} id={id} control={node.control} />;\n // A value the record withholds is delivered as `undefined` on purpose: for a masked binding the\n // host's stand-in (`field.text`) is the only text the page may show, and a stored `write_only`\n // one has no readable text at all. Both paint as the static answer the record gives, and the\n // note beside them says the value is settled elsewhere.\n if (field.withheldReason === 'masked' || field.withheldReason === 'write_only')\n return <ReadOnlyValue field={field} id={id} control={node.control} />;\n const shared: SharedProps = {\n className: controlClassName(node.control),\n id,\n 'aria-required': field.a11y.required,\n 'aria-invalid': field.a11y.invalid,\n 'aria-describedby': describedBy,\n 'aria-busy': field.a11y.busy ? true : undefined,\n disabled: field.disabled,\n readOnly: field.readOnly,\n onBlur: field.onBlur,\n };\n // One availability story reaches every affordance: when the record refuses or cannot decide an\n // offered code, the options are painted as a list that states each answer in place. A held code\n // the domain no longer offers keeps the sentence the select and the radio group state beside\n // it, because the list is not the place to describe a value that is not an entry.\n if (choiceListSource(node, field) === 'declared') {\n if (field.readOnly) return <ReadOnlyValue field={field} id={id} control={node.control} />;\n const options = node.declaration.options ?? [];\n const heldCode = unmatchedDeclaredCode(options, field.value);\n return (\n <>\n <ChoiceList\n node={node}\n field={field}\n shared={shared}\n entries={declaredChoiceEntries(node, field, translate, copy)}\n multiple={node.declaration.primitive === 'array'}\n allowClear={\n plan.family === 'choice' ||\n plan.family === 'combobox' ||\n (plan.family === 'boolean-choice' && node.control !== 'radio')\n }\n />\n {heldCode === undefined ? null : (\n <p className=\"ax-hint\" data-held-value=\"\">\n {heldCodeSentence(field, translate, copy)}\n </p>\n )}\n </>\n );\n }\n switch (plan.family) {\n case 'buffered':\n return (\n <BufferedEntry\n node={node}\n field={field}\n id={id}\n {...(rowKey === undefined ? {} : { rowKey })}\n {...(describedBy === undefined ? {} : { describedBy })}\n format={plan.format}\n />\n );\n case 'text':\n return <TextEntry node={node} field={field} shared={shared} />;\n case 'boolean':\n // A checkbox has no `readonly` state in HTML: a `readonly` attribute is ignored and the\n // box still toggles, which would hand the session a write it must refuse. A value the\n // access answer leaves read-only is painted as a value instead.\n if (field.readOnly) return <ReadOnlyValue field={field} id={id} control={node.control} />;\n return (\n <label className=\"ax-choice\" htmlFor={shared.id} id={`${shared.id}-label`}>\n <input\n {...shared}\n type=\"checkbox\"\n {...(node.control === 'switch' ? { role: 'switch' } : {})}\n checked={field.value === true}\n onChange={(event: ChangeEvent<HTMLInputElement>) =>\n writeTo(field, event.target.checked)\n }\n />\n <span>\n {node.label}\n {field.a11y.required ? (\n <>\n <span className=\"ax-required\" aria-hidden=\"true\">\n {' '}\n *\n </span>\n <span className=\"ax-visually-hidden axiom-visually-hidden\">\n {' '}\n {copy.requiredMarker()}\n </span>\n </>\n ) : null}\n </span>\n </label>\n );\n case 'boolean-choice':\n if (field.readOnly) return <ReadOnlyValue field={field} id={id} control={node.control} />;\n return <BooleanChoice node={node} field={field} shared={shared} translate={translate} />;\n case 'choice': {\n // Nor does a `<select>`: an option is still selectable under a `readonly` attribute, so\n // the same refusal would be thrown out of `onChange`. Paint the read-only answer instead.\n if (field.readOnly) return <ReadOnlyValue field={field} id={id} control={node.control} />;\n if (node.control === 'timeslot' && nativeTimeslot !== true) {\n return (\n <ScheduleField\n fieldId={node.fieldId}\n label={node.label}\n value={field.value}\n hasHostSource={node.declaration.optionSource !== undefined}\n {...(node.declaration.options === undefined\n ? {}\n : { declaredOptions: node.declaration.options })}\n controlId={id}\n describedBy={describedBy}\n required={field.a11y.required}\n invalid={field.a11y.invalid}\n busy={field.a11y.busy}\n disabled={field.disabled}\n readOnly={field.readOnly}\n {...(rowKey === undefined ? {} : { rowKey })}\n onBlur={field.onBlur}\n onChange={(value) => writeTo(field, value)}\n />\n );\n }\n const options = node.declaration.options;\n if (options === undefined && node.declaration.optionSource !== undefined) {\n return (\n <AsyncChoice\n node={node}\n field={field}\n shared={shared}\n {...(rowKey === undefined ? {} : { rowKey })}\n translate={translate}\n />\n );\n }\n if (options === undefined)\n return <ReadOnlyValue field={field} id={id} control={node.control} />;\n // A measured option's record value is not its source code. Match through the runtime's\n // mapping so a selected duration paints its own entry rather than the no-choice entry.\n const selected = options.find((option) =>\n sameWireValue(optionCodeValue(node.declaration, option.code), field.value),\n );\n // A held code no option matches keeps its own disabled entry: the control must not look\n // empty while the record still holds a value, and the sentence beside it says why the\n // entry cannot be chosen again.\n const heldCode = unmatchedDeclaredCode(options, field.value);\n const heldSentence =\n heldCode === undefined ? undefined : heldCodeSentence(field, translate, copy);\n return (\n <>\n <select\n {...shared}\n value={selected === undefined ? codeText(field.value) : String(selected.code)}\n onChange={(event: ChangeEvent<HTMLSelectElement>) => {\n const value = event.target.value;\n // The placeholder is the \"no choice\" entry: choosing it writes `null`, exactly as\n // emptying a text input does. Reading it as an index would select the first option.\n if (value === '') {\n writeTo(field, null);\n return;\n }\n const chosen = options.find((option) => String(option.code) === value);\n if (chosen !== undefined) {\n writeTo(field, optionCodeValue(node.declaration, chosen.code));\n }\n }}\n >\n <option value=\"\">{copy.selectPlaceholder()}</option>\n {heldCode === undefined ? null : (\n <option value={heldCode} disabled>\n {renderValueText(field.value, copy.display)}\n </option>\n )}\n {options.map((option) => (\n <option key={String(option.code)} value={String(option.code)}>\n {translate(option.labelKey)}\n {option.deprecated === true ? copy.deprecatedSuffix() : null}\n </option>\n ))}\n </select>\n {heldSentence === undefined ? null : (\n <p className=\"ax-hint\" data-held-value=\"\">\n {heldSentence}\n </p>\n )}\n {heldCode === undefined && options.length === 0 ? (\n <p className=\"ax-hint\" role=\"status\" data-empty-options=\"\">\n {copy.emptyOptions()}\n </p>\n ) : null}\n </>\n );\n }\n case 'list':\n return (\n <ListEntry\n node={node}\n field={field}\n shared={shared}\n {...(rowKey === undefined ? {} : { rowKey })}\n translate={translate}\n />\n );\n case 'radio-group':\n case 'rating': {\n if (field.readOnly) return <ReadOnlyValue field={field} id={id} control={node.control} />;\n if (node.declaration.options === undefined) {\n if (node.declaration.optionSource?.kind === 'host') {\n return (\n <AsyncChoice\n node={node}\n field={field}\n shared={shared}\n {...(rowKey === undefined ? {} : { rowKey })}\n translate={translate}\n />\n );\n }\n return <ReadOnlyValue field={field} id={id} control={node.control} />;\n }\n return (\n <ChoiceRadioGroup\n node={node}\n field={field}\n shared={shared}\n translate={translate}\n variant={plan.family === 'rating' ? 'rating' : 'plain'}\n />\n );\n }\n case 'combobox':\n if (field.readOnly) return <ReadOnlyValue field={field} id={id} control={node.control} />;\n if (node.declaration.options === undefined) {\n if (node.declaration.optionSource?.kind === 'host') {\n return (\n <AsyncChoice\n node={node}\n field={field}\n shared={shared}\n {...(rowKey === undefined ? {} : { rowKey })}\n translate={translate}\n />\n );\n }\n return <ReadOnlyValue field={field} id={id} control={node.control} />;\n }\n return <ComboboxEntry node={node} field={field} shared={shared} translate={translate} />;\n case 'date':\n return (\n <DatePicker\n controlId={id}\n descriptionId={field.a11y.descriptionId}\n errorId={field.a11y.errorId}\n label={node.label}\n value={typeof field.value === 'string' ? field.value : undefined}\n setValue={(value) => writeTo(field, value)}\n required={field.a11y.required}\n invalid={field.a11y.invalid}\n disabled={field.disabled}\n readOnly={field.readOnly}\n locale={locale}\n minimum={node.declaration.minimum}\n maximum={node.declaration.maximum}\n onBlur={field.onBlur}\n />\n );\n case 'datetime':\n return <DateTimeEntry node={node} field={field} id={id} describedBy={describedBy} />;\n case 'time':\n return <TimeEntry node={node} field={field} id={id} describedBy={describedBy} />;\n case 'duration':\n return <DurationEntry node={node} field={field} shared={shared} />;\n case 'media':\n return (\n <MediaEntry\n field={field}\n id={id}\n translate={translate}\n accept={node.declaration.accept}\n minBytes={node.declaration.minBytes}\n maxBytes={node.declaration.maxBytes}\n />\n );\n case 'signature':\n return <SignatureEntry field={field} id={id} control={node.control} translate={translate} />;\n case 'quantity':\n return (\n <QuantityEntry\n node={node}\n field={field}\n id={id}\n {...(rowKey === undefined ? {} : { rowKey })}\n {...(describedBy === undefined ? {} : { describedBy })}\n />\n );\n case 'slider':\n return <SliderEntry node={node} field={field} shared={shared} translate={translate} />;\n case 'address':\n // A read-only address is a value, not six disabled boxes: the static reading states the\n // whole address through the host's display formatter and offers no write at all.\n if (field.readOnly) return <ReadOnlyValue field={field} id={id} control={node.control} />;\n return (\n <AddressEditor\n controlId={id}\n legend={<ControlLabel node={node} field={field} copy={copy} />}\n label={node.label}\n value={field.value}\n setValue={(value) => writeTo(field, value)}\n describedBy={describedBy}\n required={field.a11y.required}\n invalid={field.a11y.invalid}\n disabled={field.disabled}\n onBlur={field.onBlur}\n />\n );\n case 'coordinate':\n if (field.readOnly) return <ReadOnlyValue field={field} id={id} control={node.control} />;\n return (\n <CoordinateEditor\n controlId={id}\n fieldId={node.fieldId}\n legend={<ControlLabel node={node} field={field} copy={copy} />}\n label={node.label}\n value={field.value}\n setValue={(value) => writeTo(field, value)}\n describedBy={describedBy}\n required={field.a11y.required}\n invalid={field.a11y.invalid}\n disabled={field.disabled}\n onBlur={field.onBlur}\n />\n );\n case 'static':\n return <ReadOnlyValue field={field} id={id} control={node.control} />;\n default:\n return assertNeverPlan(plan);\n }\n}\n\n/**\n * A captured signature as a person reads it.\n *\n * The wire id (`sig_1`) is an internal reference, never visible text. What matters is that the\n * record is signed, when, and how many declared fields the signature covers; a value that does\n * not carry those facts falls back to the ordinary read-only value.\n */\nfunction SignatureValue({\n field,\n id,\n control,\n extraDescribedBy,\n}: {\n readonly field: FieldProps;\n readonly id: string;\n readonly control: Control;\n readonly extraDescribedBy?: string;\n}): ReactElement {\n const copy = useHostCopy();\n // A hook must run before the branches that fall back to the ordinary read-only value.\n const deferred = field.withheld === true;\n if (field.maskedText !== undefined || field.access === 'masked') {\n return (\n <ReadOnlyValue\n field={field}\n id={id}\n control={control}\n {...(extraDescribedBy === undefined ? {} : { extraDescribedBy })}\n />\n );\n }\n const value = field.computation.kind === 'value' ? field.computation.value : field.value;\n const record = isRecord(value) ? value : undefined;\n const signedAt =\n record !== undefined && typeof record['signedAt'] === 'string' ? record['signedAt'] : undefined;\n const targets =\n record !== undefined && Array.isArray(record['coveredTargets'])\n ? record['coveredTargets']\n : undefined;\n if (signedAt === undefined && targets === undefined) {\n return (\n <ReadOnlyValue\n field={field}\n id={id}\n control={control}\n {...(extraDescribedBy === undefined ? {} : { extraDescribedBy })}\n />\n );\n }\n const covered = targets?.length ?? field.descriptor.covers?.length;\n const describedBy = [\n visibleErrorsOf(field).length > 0 ? field.a11y.errorId : undefined,\n field.a11y.descriptionId,\n deferred ? `${id}-deferred` : undefined,\n extraDescribedBy,\n ]\n .filter((entry) => entry !== undefined && entry !== '')\n .join(' ');\n return (\n <output\n id={id}\n tabIndex={-1}\n className={controlClassName(control)}\n data-readonly={field.fieldId}\n aria-invalid={field.a11y.invalid}\n {...(describedBy === '' ? {} : { 'aria-describedby': describedBy })}\n >\n <bdi>{copy.signed(signedAt, covered)}</bdi>\n </output>\n );\n}\n\n/**\n * A captured signature: its value, and the host's sign action when this page has a signer.\n *\n * The binding is read like every other host-domain control: nothing here writes a signature the\n * wire contract did not produce, and the action asks the host to sign the record as it stands.\n * A page with no signer (an offline build or a host without a capture port) paints the value\n * alongside a localized notice explaining that this device cannot sign, rather than offering a\n * button that can only fail or leaving a blocked field unexplained.\n */\nfunction SignatureEntry({\n field,\n id,\n control,\n translate,\n}: {\n readonly field: FieldProps;\n readonly id: string;\n readonly control: Control;\n readonly translate: RenderTranslate;\n}): ReactElement {\n const { captureSignature } = useHostActions();\n const copy = useHostCopy();\n const [failure, setFailure] = useState<string | undefined>(undefined);\n // A read-only viewer must not be offered the signer: `enabled` is the access answer plus every\n // `enabled` rule, and a signature is only ever signed over a record the page may write.\n if (!field.enabled || field.access !== 'read_write')\n return <SignatureValue field={field} id={id} control={control} />;\n const label = translate(field.descriptor.labelKey ?? field.fieldId);\n if (captureSignature === undefined) {\n const unavailableId = `${id}-signature-unavailable`;\n return (\n <>\n <SignatureValue field={field} id={id} control={control} extraDescribedBy={unavailableId} />\n <p className=\"ax-hint\" id={unavailableId}>\n {copy.signatureUnavailable(label)}\n </p>\n </>\n );\n }\n const paintFailure = (detail: string | undefined): void => setFailure(detail);\n const capture = (): void => {\n setFailure(undefined);\n // The action is host code on the other side of a boundary: a synchronous throw and a\n // rejected promise are the same failure, and neither may escape an event handler unhandled.\n try {\n void captureSignature(field.fieldId, { label }).then(paintFailure, (error: unknown) => {\n paintFailure(error instanceof Error ? error.message : copy.signerFailed());\n });\n } catch (error) {\n paintFailure(error instanceof Error ? error.message : copy.signerFailed());\n }\n };\n return (\n <>\n <SignatureValue field={field} id={id} control={control} />\n <div className=\"ax-actions\">\n <button type=\"button\" className=\"ax-button ax-button--secondary\" onClick={capture}>\n {copy.captureSignature(label)}\n </button>\n </div>\n {failure === undefined ? null : (\n <div className=\"ax-error\" role=\"alert\">\n <p>{copy.captureFailed()}</p>\n <p className=\"ax-hint\">{failure}</p>\n </div>\n )}\n </>\n );\n}\n\n/**\n * A boolean painted as a choice.\n *\n * The compiler admits `select`/`radio` on a boolean and states its two codes as the strings\n * `\"true\"` and `\"false\"` — a code is the value the control writes, and a boolean's wire value is\n * a JSON boolean. This converts the selected code back to one; writing the code itself would be\n * refused by the wire and, because `writeTo` absorbs that refusal, would look like a dead control.\n */\nfunction BooleanChoice({\n node,\n field,\n shared,\n translate,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly translate: RenderTranslate;\n}): ReactElement {\n const copy = useHostCopy();\n const declared = node.declaration.options;\n const options: readonly FieldOption[] =\n declared === undefined\n ? ([\n { code: 'true', labelKey: '' },\n { code: 'false', labelKey: '' },\n ] as const)\n : declared;\n const value = field.value === true ? 'true' : field.value === false ? 'false' : '';\n if (node.control === 'radio') {\n return (\n <fieldset\n className=\"ax-radio-group\"\n id={shared.id}\n tabIndex={-1}\n aria-invalid={shared['aria-invalid']}\n aria-describedby={shared['aria-describedby']}\n aria-busy={shared['aria-busy']}\n disabled={shared.disabled}\n onBlur={shared.onBlur}\n >\n <legend className=\"ax-label\">\n <ControlLabel node={node} field={field} copy={copy} />\n </legend>\n {options.map((option, index) => {\n const code = String(option.code);\n return (\n <label key={code} className=\"ax-choice\">\n <input\n id={`${shared.id}-${String(index)}`}\n className=\"ax-control--radio\"\n type=\"radio\"\n name={shared.id}\n value={code}\n checked={value === code}\n disabled={shared.disabled}\n aria-required={shared['aria-required']}\n onChange={() => writeTo(field, code === 'true')}\n />\n <span>\n {option.labelKey === ''\n ? (copy.display(code === 'true') ?? code)\n : translate(option.labelKey)}\n {option.deprecated === true ? copy.deprecatedSuffix() : null}\n </span>\n </label>\n );\n })}\n </fieldset>\n );\n }\n return (\n <select\n {...shared}\n value={value}\n onChange={(event: ChangeEvent<HTMLSelectElement>) => {\n const next = event.target.value;\n if (next === '') {\n writeTo(field, null);\n return;\n }\n writeTo(field, next === 'true');\n }}\n >\n <option value=\"\">{copy.selectPlaceholder()}</option>\n {options.map((option) => {\n const code = String(option.code);\n return (\n <option key={code} value={code}>\n {option.labelKey === ''\n ? (copy.display(code === 'true') ?? code)\n : translate(option.labelKey)}\n {option.deprecated === true ? copy.deprecatedSuffix() : null}\n </option>\n );\n })}\n </select>\n );\n}\n\n/**\n * A non-boolean choice as a real radio group, and a rating as its numbered stops.\n *\n * A `<select>` was the wrong affordance for both: it hides the domain behind a picker, opens a\n * wheel on iOS, and makes a three-stop rating a dropdown. Native radios keep the whole domain\n * visible, move as one tab stop, and take their group name from a `<legend>` — which, unlike the\n * `<label>` a single control uses, cannot be clicked to answer for the user.\n *\n * A rating's stops keep the declared labels (usually numbers 1–5) and add a star that is\n * decoration only, so the word the screen reader hears is the scale's own.\n */\nfunction ChoiceRadioGroup({\n node,\n field,\n shared,\n translate,\n variant,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly translate: RenderTranslate;\n readonly variant: 'plain' | 'rating';\n}): ReactElement {\n const copy = useHostCopy();\n const options = node.declaration.options ?? [];\n // A held code no option matches is stated beside the group rather than as another radio: a\n // radio for it would be a second selectable answer, while the record's value is not one.\n const heldCode = unmatchedDeclaredCode(options, field.value);\n const heldSentence =\n heldCode === undefined ? undefined : heldCodeSentence(field, translate, copy);\n return (\n <fieldset\n className={variant === 'rating' ? 'ax-radio-group ax-rating' : 'ax-radio-group'}\n // The group is the element a summary link lands on; `-1` makes it focusable by script\n // without adding a tab stop of its own. The radios follow it as one tab stop.\n id={shared.id}\n tabIndex={-1}\n aria-invalid={shared['aria-invalid']}\n aria-describedby={shared['aria-describedby']}\n aria-busy={shared['aria-busy']}\n disabled={shared.disabled}\n onBlur={shared.onBlur}\n >\n <legend className=\"ax-label\">\n <ControlLabel node={node} field={field} copy={copy} />\n </legend>\n {options.map((option, index) => {\n const code = String(option.code);\n const value = optionCodeValue(node.declaration, option.code);\n return (\n <label key={code} className=\"ax-choice\">\n <input\n id={`${shared.id}-${String(index)}`}\n className=\"ax-control--radio\"\n type=\"radio\"\n name={shared.id}\n value={code}\n checked={sameWireValue(field.value, value)}\n disabled={shared.disabled}\n aria-required={shared['aria-required']}\n onChange={() => writeTo(field, value)}\n />\n <span>\n {variant === 'rating' ? (\n <span className=\"ax-rating-star\" aria-hidden=\"true\">\n ★{' '}\n </span>\n ) : null}\n {translate(option.labelKey)}\n {option.deprecated === true ? copy.deprecatedSuffix() : null}\n </span>\n </label>\n );\n })}\n {heldSentence === undefined ? null : (\n <p className=\"ax-hint\" data-held-value=\"\">\n {heldSentence}\n </p>\n )}\n {heldCode === undefined && options.length === 0 ? (\n <p className=\"ax-hint\" role=\"status\" data-empty-options=\"\">\n {copy.emptyOptions()}\n </p>\n ) : null}\n </fieldset>\n );\n}\n\n/**\n * One entry of a choice list: the value it writes, the words it shows, and its availability.\n *\n * `state` is the runtime's answer, never a second decision made here: a declared condition and a\n * host page's `available: false` both arrive in `field.unavailableOptions`, and `reason` is either\n * the sentence the declaration or the page stated or the host's own words for the case.\n */\ninterface ChoiceEntry {\n /** The value the record takes when the entry is pressed; `null` is the no-choice entry. */\n readonly value: WireValue;\n readonly key: string;\n /** The wire code, kept for a `data-` attribute rather than for a sentence. */\n readonly code: string;\n readonly label: string;\n readonly deprecated?: boolean;\n readonly state?: 'unavailable' | 'undetermined';\n readonly reason?: string;\n}\n\n/**\n * Why one offered code may not be chosen, in the words the page renders, `ENGINE-7.1.7`.\n *\n * A declaration that states a reason key has its words translated; a host page that states none,\n * and a code whose availability is still undecided, fall back to the host's own sentence, because\n * the artifact never declared one and the catalogue must not invent a message key.\n */\nfunction availabilityWords(\n answer: UnavailableOption,\n fieldLabel: string,\n optionLabel: string,\n translate: RenderTranslate,\n copy: HostCopy,\n): Pick<ChoiceEntry, 'state' | 'reason'> {\n if (answer.messageKey !== undefined) {\n return { state: answer.state, reason: translate(answer.messageKey, answer.params) };\n }\n return {\n state: answer.state,\n reason:\n answer.state === 'unavailable'\n ? copy.unavailableOption(optionLabel)\n : copy.undeterminedOption(fieldLabel, optionLabel, answer.cause ?? 'unknown'),\n };\n}\n\n/**\n * How a control's options reach a choice list, or `undefined` when it paints its own affordance.\n *\n * The list is used exactly when the record's own answer states that an offered code may not be\n * chosen, and that answer already merges a declared condition with a host page's item, so one\n * condition decides the caption's home and the widget alike. Two shapes are left alone: a\n * `timeslot` page's value is a slot record the runtime states no code for, and a `rank` orders\n * its options rather than selecting among them.\n */\nfunction choiceListSource(\n node: RenderControlNode,\n field: FieldProps,\n): 'declared' | 'host' | undefined {\n const { declaration } = node;\n if (field.unavailableOptions === undefined || field.unavailableOptions.length === 0)\n return undefined;\n if (node.control === 'rank' || node.control === 'timeslot') return undefined;\n if (declaration.options !== undefined) return 'declared';\n return declaration.optionSource?.kind === 'host' ? 'host' : undefined;\n}\n\n/** The declared domain as choice entries, each carrying the record's availability answer. */\nfunction declaredChoiceEntries(\n node: RenderControlNode,\n field: FieldProps,\n translate: RenderTranslate,\n copy: HostCopy,\n): readonly ChoiceEntry[] {\n const answers = field.unavailableOptions ?? [];\n return (node.declaration.options ?? []).map((option) => {\n const label = translate(option.labelKey);\n const answer = answers.find((entry) => sameWireValue(entry.code, option.code));\n return {\n // The runtime owns the code-to-wire mapping: boolean and duration choices do not hold\n // their source code as the record's value.\n value: optionCodeValue(node.declaration, option.code),\n key: `declared:${String(option.code)}`,\n code: String(option.code),\n label,\n ...(option.deprecated === true ? { deprecated: true } : {}),\n ...(answer === undefined\n ? {}\n : availabilityWords(answer, node.label, label, translate, copy)),\n };\n });\n}\n\n/** A loaded page as choice entries, matched to the record's answer for the same code. */\nfunction hostChoiceEntries(\n items: readonly OptionItem[],\n answers: readonly UnavailableOption[],\n fieldLabel: string,\n translate: RenderTranslate,\n copy: HostCopy,\n): readonly ChoiceEntry[] {\n return items.map((item, index) => {\n const label =\n item.labelKey === '' ? renderValueText(item.value, copy.display) : translate(item.labelKey);\n const answer = answers.find((entry) => sameWireValue(entry.code, item.value));\n return {\n value: item.value,\n key: `host:${String(index)}:${canonicalizeRestricted(item.value)}`,\n code: String(item.value),\n label,\n ...(item.deprecated === true ? { deprecated: true } : {}),\n ...(answer === undefined\n ? {}\n : availabilityWords(answer, fieldLabel, label, translate, copy)),\n };\n });\n}\n\n/**\n * A multiple-selection write with the held values no painted entry represents.\n *\n * A host page is a window onto its domain, not the whole record. Values outside that window were\n * not toggled, so they keep their existing order ahead of the selected entries' painted order.\n */\nfunction withUnpaintedHeldValues(\n heldValues: readonly WireValue[],\n paintedValues: readonly WireValue[],\n selectedValues: readonly WireValue[],\n): WireValue[] {\n const painted = new Set(paintedValues.map((value) => canonicalizeRestricted(value)));\n return [\n ...heldValues.filter((value) => !painted.has(canonicalizeRestricted(value))),\n ...selectedValues,\n ];\n}\n\n/**\n * The keyboard hand-off a host choice list owes the affordance that replaces it.\n *\n * A page refresh can remove the entry the reader was on, and the availability branch can give way\n * to the declared control. Both take the focused element out of the document, and a browser drops\n * focus to `<body>` rather than to what replaced it. The list cannot make that hand-off itself,\n * because the list is what is being removed, so the owner whose lifetime spans the remount\n * remembers the request and answers it after the replacement has painted.\n *\n * The request is spent once it lands, which is the same contract `OptionsStatus` and the rank\n * control keep. A request that stayed armed would reclaim focus from the page body on every later\n * render of this owner, whether a host page settled or a sibling wrote, long after the reader had\n * left of their own accord, and a move the reader did not cause is the one WCAG 3.2.1 forbids. It\n * is not spent before it lands either: the replacement can be painted in a later commit than the\n * one that dropped focus, so a render with nothing to hand on to leaves the request outstanding.\n */\nfunction useChoiceListFocusHandoff(shared: SharedProps): {\n readonly shared: SharedProps;\n readonly onListFocus: () => void;\n} {\n const restoreFocus = useRef(false);\n useEffect(() => {\n if (!restoreFocus.current) return;\n const active = document.activeElement;\n const control = document.getElementById(shared.id);\n // Focus inside this binding's own affordance says the entry the reader was on is still\n // painted, so the hand-off is not due and a later render must still be able to make it.\n if (active !== null && control !== null && control.contains(active)) return;\n if (active === null || active === document.body) {\n control?.focus();\n if (control !== null && document.activeElement === control) restoreFocus.current = false;\n return;\n }\n // The reader is on an element the page can name, so they moved on: there is nothing to hand\n // the keyboard on to and a later render must not take it back from them.\n restoreFocus.current = false;\n });\n // `ChoiceList` keeps the hand-off in an effect's dependencies, so the callback is one identity\n // for the owner's lifetime rather than a new one per render.\n const onListFocus = useCallback(() => {\n restoreFocus.current = true;\n }, []);\n return {\n shared: {\n ...shared,\n onBlur: () => {\n // A named exit is the reader's own move: there is nothing to hand the keyboard on to.\n restoreFocus.current = false;\n shared.onBlur();\n },\n },\n onListFocus,\n };\n}\n\n/**\n * A choice field whose options stay selectable when the record may not hold them.\n *\n * A native `<select>` and a native radio both express \"unavailable\" by removing the option from\n * the tab order or refusing the click, which is exactly what a reader needs here: the reason is\n * read at the option, and pressing an unavailable option still hands the write to the session so\n * a host can stage the alternative it suggests. So every entry is a focusable `option` carrying\n * `aria-selected` and, when the record refuses its code, `aria-disabled` and the sentence that\n * says why. Focus moves by arrow, `Home` and `End`, and one entry is the list's tab stop; `Enter`\n * and `Space` write, as a click does.\n *\n * The HTML `disabled` attribute is never set: an unavailable option is announced as such and\n * stays pressable, and a field-level refusal is announced on the list while `writeTo` keeps the\n * write from reaching the session.\n */\nfunction ChoiceList({\n node,\n field,\n shared,\n entries,\n multiple,\n allowClear,\n onFocus,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly entries: readonly ChoiceEntry[];\n readonly multiple: boolean;\n readonly allowClear: boolean;\n readonly onFocus?: () => void;\n}): ReactElement {\n const copy = useHostCopy();\n const labelId = `${shared.id}-label`;\n // The entry the list focuses when a reader tabs to it, and the one the arrows move from. It is\n // the record's own choice until the reader moves it, so the list opens where the answer is.\n const [movedTo, setMovedTo] = useState<number | undefined>(undefined);\n const list = useRef<HTMLUListElement | null>(null);\n const focusWithin = useRef(false);\n useEffect(() => {\n return () => {\n // A write can make the last refused code available and replace this list with the declared\n // control. If the reader was inside the list, land on that replacement rather than <body>.\n // An async host hands this to its owner, whose lifetime covers the page refresh too.\n if (onFocus === undefined && focusWithin.current) {\n document.getElementById(shared.id)?.focus();\n }\n };\n }, [onFocus, shared.id]);\n // A key no declared code can spell, because a code is any string: the no-choice entry is the\n // one entry that belongs to no domain.\n const options =\n allowClear && !multiple\n ? [{ value: null, key: 'no-choice', code: '', label: copy.selectPlaceholder() }, ...entries]\n : entries;\n // One comparison states both what the record holds and what a press toggles: a wire value is\n // identified by its canonical text, which is how the checkbox group beside this list decides\n // membership too. Two comparators would let the entry the reader sees selected and the entry a\n // press removes disagree.\n const heldValues = multiple && Array.isArray(field.value) ? field.value : [];\n const held = new Set(heldValues.map((value) => canonicalizeRestricted(value)));\n const isSelected = (entry: ChoiceEntry): boolean => {\n if (multiple) return held.has(canonicalizeRestricted(entry.value));\n if (entry.value === null) return field.value === undefined || field.value === null;\n return field.value !== undefined && sameWireValue(field.value, entry.value);\n };\n const chosen = options.findIndex((entry) => isSelected(entry));\n const active =\n options.length === 0 ? -1 : Math.min(movedTo ?? Math.max(chosen, 0), options.length - 1);\n const focusAt = (index: number): void => {\n setMovedTo(index);\n const painted = list.current?.querySelectorAll<HTMLElement>('[role=\"option\"]');\n painted?.[index]?.focus();\n };\n const activate = (entry: ChoiceEntry): void => {\n if (!multiple) {\n writeTo(field, entry.value);\n return;\n }\n // A multiple selection writes the entries in the order they are painted, never in the order\n // the reader happened to press them, so two records holding one set hold one array. A host\n // page is only a window onto its domain: values held outside that window are not entries the\n // reader toggled and stay in the record in their existing order.\n const next = new Set(held);\n const token = canonicalizeRestricted(entry.value);\n if (next.has(token)) next.delete(token);\n else next.add(token);\n writeTo(\n field,\n withUnpaintedHeldValues(\n heldValues,\n options.map((option) => option.value),\n options\n .filter((option) => next.has(canonicalizeRestricted(option.value)))\n .map((option) => option.value),\n ),\n );\n };\n const onKeyDown = (event: KeyboardEvent<HTMLElement>, index: number): void => {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n focusAt(Math.min(index + 1, options.length - 1));\n return;\n case 'ArrowUp':\n event.preventDefault();\n focusAt(Math.max(index - 1, 0));\n return;\n case 'Home':\n event.preventDefault();\n focusAt(0);\n return;\n case 'End':\n event.preventDefault();\n focusAt(options.length - 1);\n return;\n // Enter and Space are the two ways a keyboard presses a button, and an option is one: the\n // write is the same one a pointer makes, so the session decides what happens to it.\n case 'Enter':\n case ' ': {\n event.preventDefault();\n const entry = options[index];\n if (entry !== undefined) activate(entry);\n return;\n }\n default:\n return;\n }\n };\n return (\n <fieldset\n className=\"ax-choice-list\"\n {...(shared.disabled ? { 'aria-disabled': true } : {})}\n onFocus={() => {\n focusWithin.current = true;\n onFocus?.();\n }}\n onBlur={(event) => {\n if (event.currentTarget.contains(event.relatedTarget)) return;\n focusWithin.current = false;\n shared.onBlur();\n }}\n >\n <legend className=\"ax-label\" id={labelId}>\n <ControlLabel node={node} field={field} copy={copy} />\n </legend>\n <ul\n ref={list}\n // The list is the control a summary link and this binding's `id` name, and it is\n // focusable by script so a link lands on it without adding a tab stop of its own.\n id={shared.id}\n tabIndex={-1}\n role=\"listbox\"\n aria-labelledby={labelId}\n aria-describedby={shared['aria-describedby']}\n aria-invalid={shared['aria-invalid']}\n aria-required={shared['aria-required']}\n aria-busy={shared['aria-busy']}\n {...(multiple ? { 'aria-multiselectable': true } : {})}\n >\n {options.map((entry, index) => {\n const entryId = `${shared.id}-option-${String(index)}`;\n const reasonId = `${entryId}-reason`;\n return (\n <li\n key={entry.key}\n id={entryId}\n className=\"ax-option\"\n role=\"option\"\n // The name is the entry's own visible text: the label, and the reason when the\n // record refuses the code. `label-content-name-mismatch` (WCAG 2.5.3) requires the\n // name to contain what is painted, because a voice user reads the reason on screen\n // and addresses the option by it.\n aria-labelledby={\n entry.reason === undefined ? `${entryId}-label` : `${entryId}-label ${reasonId}`\n }\n aria-selected={isSelected(entry)}\n {...(entry.state === 'unavailable' ? { 'aria-disabled': 'true' as const } : {})}\n {...(entry.state === undefined ? {} : { 'data-option-state': entry.state })}\n data-option-code={entry.code}\n tabIndex={index === active ? 0 : -1}\n onClick={() => activate(entry)}\n onKeyDown={(event) => onKeyDown(event, index)}\n >\n <span className=\"ax-option-label\" id={`${entryId}-label`}>\n {entry.label}\n {entry.deprecated === true ? copy.deprecatedSuffix() : null}\n </span>{' '}\n {/* The space is the word boundary the accessible-name comparison reads: without it\n the label and the reason are one token, and a reader addressing the entry by the\n reason is not. It sits between two grid items, so it paints nothing. */}\n {entry.reason === undefined ? null : (\n <span className=\"ax-option-reason\" id={reasonId} data-option-reason=\"\">\n {entry.reason}\n </span>\n )}\n </li>\n );\n })}\n </ul>\n </fieldset>\n );\n}\n\n/**\n * A choice whose declared affordance is a filtering combobox.\n *\n * The input keeps the typed query, the listbox filters on the visible labels, and only an\n * explicit choice (a click, or Enter on the active option) writes a value. Arrow keys move the\n * active option through `aria-activedescendant`, so focus never leaves the input and a keyboard\n * user hears each candidate as they pass it. Typing nothing must not select anything: the\n * placeholder problem a `<select>` has cannot arise here. Prefix matches lead substring matches\n * so typing the start of a label finds it first. The hint below the input states the contract in\n * one sentence, because filtering plus Enter-to-commit is not what a native select does.\n */\nfunction ComboboxEntry({\n node,\n field,\n shared,\n translate,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly translate: RenderTranslate;\n}): ReactElement {\n const copy = useHostCopy();\n const options = node.declaration.options ?? [];\n const listId = `${shared.id}-listbox`;\n const hintId = `${shared.id}-combobox-hint`;\n const [query, setQuery] = useState<string | undefined>(undefined);\n const [open, setOpen] = useState(false);\n const [activeIndex, setActiveIndex] = useState(0);\n const selected = options.find((option) =>\n sameWireValue(optionCodeValue(node.declaration, option.code), field.value),\n );\n // A held code no option matches leaves the entry empty: the typed text is a query, never the\n // record, so showing the stale label would turn it into a filter that hides the domain. The\n // sentence below the input says what the record holds and why it is not offered.\n const heldCode = unmatchedDeclaredCode(options, field.value);\n const heldSentence =\n heldCode === undefined ? undefined : heldCodeSentence(field, translate, copy);\n const text = query ?? (selected === undefined ? '' : translate(selected.labelKey));\n // The selected label is not a query: opening the list offers the whole domain, and only what\n // the user types narrows it. Otherwise focusing a selected combobox would hide every other\n // option and a reader could not change their answer.\n const needle = query === undefined ? '' : query.trim().toLowerCase();\n const lowered = (option: FieldOption): string => translate(option.labelKey).toLowerCase();\n const matching =\n needle === '' ? options : options.filter((option) => lowered(option).includes(needle));\n // Prefix matches lead substring matches, keeping declaration order inside each run: typing the\n // start of a label must not bury it under a longer label that merely contains those letters.\n const filtered =\n needle === ''\n ? matching\n : [\n ...matching.filter((option) => lowered(option).startsWith(needle)),\n ...matching.filter((option) => !lowered(option).startsWith(needle)),\n ];\n const active = filtered[Math.min(activeIndex, filtered.length - 1)];\n // A list with no candidate is not a listbox: the control stays closed rather than announcing\n // an empty popup, and `aria-activedescendant` never names an option that is not painted.\n const showList = open && filtered.length > 0;\n const comboboxDescribed = [shared['aria-describedby'], hintId]\n .filter((entry) => entry !== undefined && entry !== '')\n .join(' ');\n const choose = (option: FieldOption): void => {\n writeTo(field, optionCodeValue(node.declaration, option.code));\n setQuery(undefined);\n setOpen(false);\n setActiveIndex(0);\n };\n return (\n <>\n <input\n {...shared}\n aria-describedby={comboboxDescribed === '' ? undefined : comboboxDescribed}\n type=\"text\"\n role=\"combobox\"\n autoComplete={node.hints.web.autoComplete}\n aria-autocomplete=\"list\"\n aria-expanded={showList}\n {...(showList\n ? {\n 'aria-controls': listId,\n ...(active === undefined\n ? {}\n : { 'aria-activedescendant': `${shared.id}-option-${String(activeIndex)}` }),\n }\n : {})}\n value={text}\n onFocus={() => setOpen(true)}\n onChange={(event: ChangeEvent<HTMLInputElement>) => {\n const next = event.target.value;\n setQuery(next);\n setOpen(true);\n setActiveIndex(0);\n // Emptying the entry is a clear, exactly as it is in a text field; a prefix still\n // being typed writes nothing until it names an option.\n if (next === '') writeTo(field, null);\n }}\n onKeyDown={(event) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n if (!showList) {\n setOpen(true);\n return;\n }\n setActiveIndex((index) => Math.min(index + 1, filtered.length - 1));\n return;\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n setActiveIndex((index) => Math.max(index - 1, 0));\n return;\n }\n if (event.key === 'Home') {\n event.preventDefault();\n if (!showList) setOpen(true);\n setActiveIndex(0);\n return;\n }\n if (event.key === 'End') {\n event.preventDefault();\n if (!showList) setOpen(true);\n setActiveIndex(Math.max(filtered.length - 1, 0));\n return;\n }\n if (event.key === 'Enter' && showList && active !== undefined) {\n event.preventDefault();\n choose(active);\n return;\n }\n if (event.key === 'Escape') {\n setOpen(false);\n setQuery(undefined);\n }\n }}\n onBlur={() => {\n setOpen(false);\n setQuery(undefined);\n shared.onBlur();\n }}\n />\n <p className=\"ax-hint\" id={hintId}>\n {copy.comboboxHint()}\n </p>\n {heldSentence === undefined ? null : (\n <p className=\"ax-hint\" data-held-value=\"\">\n {heldSentence}\n </p>\n )}\n {filtered.length === 0 ? (\n <p className=\"ax-hint\" role=\"status\" data-empty-options=\"\">\n {copy.emptyOptions()}\n </p>\n ) : null}\n {showList ? (\n <ul className=\"ax-rank-list\" id={listId} role=\"listbox\" aria-label={node.label}>\n {filtered.map((option, index) => (\n <li\n key={String(option.code)}\n id={`${shared.id}-option-${String(index)}`}\n role=\"option\"\n aria-selected={sameWireValue(\n optionCodeValue(node.declaration, option.code),\n field.value,\n )}\n {...(index === activeIndex ? { 'data-active': '' } : {})}\n // Selecting on mousedown keeps focus in the input: the blur that a click would\n // cause is what would otherwise close the list before the choice lands.\n onMouseDown={(event) => {\n event.preventDefault();\n choose(option);\n }}\n >\n {translate(option.labelKey)}\n {option.deprecated === true ? copy.deprecatedSuffix() : null}\n </li>\n ))}\n </ul>\n ) : null}\n </>\n );\n}\n\n/** The object URL a media reference can be previewed from, when the host answers one. */\nfunction mediaSrcOf(\n mediaSrc: ((reference: Readonly<Record<string, WireValue>>) => string | undefined) | undefined,\n value: WireValue,\n): string | undefined {\n if (mediaSrc === undefined || !isRecord(value)) return undefined;\n return mediaSrc(value);\n}\n\n/**\n * A media reference's thumbnail: the host's object URL for an image, or a neutral glyph and the\n * media type. A missing preview is a capability answer, never a broken image frame.\n */\nfunction MediaPreview({\n value,\n src,\n}: {\n readonly value: WireValue;\n readonly src: string | undefined;\n}): ReactElement {\n const mime = mediaMime(value);\n if (src !== undefined && isImageMedia(value)) {\n return <img className=\"ax-media-thumb\" src={src} alt=\"\" loading=\"lazy\" />;\n }\n return (\n <span className=\"ax-media-thumb ax-media-thumb--glyph\" data-media-glyph=\"\">\n <span className=\"ax-media-glyph\" aria-hidden=\"true\">\n ▧\n </span>\n {mime === '' ? null : <span className=\"ax-media-type\">{friendlyMediaType(mime)}</span>}\n </span>\n );\n}\n\n/** The media blockers a summary is painting for one file of one field. */\nfunction mediaBlockersOf(\n blockers: readonly FormBlocker[],\n fieldId: string,\n index: number | undefined,\n): readonly Extract<FormBlocker, { readonly kind: 'media' }>[] {\n return blockers.flatMap((blocker) =>\n blocker.kind === 'media' && blocker.fieldId === fieldId && blocker.index === index\n ? [blocker]\n : [],\n );\n}\n\n/** The host's sentence for a media constraint, under the file it is about. */\nfunction MediaConstraintErrors({\n blockers,\n fieldId,\n label,\n}: {\n readonly blockers: readonly Extract<FormBlocker, { readonly kind: 'media' }>[];\n readonly fieldId: string;\n readonly label: string;\n}): ReactElement | null {\n const copy = useHostCopy();\n if (blockers.length === 0) return null;\n return (\n <>\n {blockers.map((blocker) => (\n <p\n className=\"ax-error\"\n role=\"alert\"\n key={`${fieldId}:${blocker.member}:${String(blocker.value)}`}\n >\n {copy.mediaConstraint(label, blocker.member, blocker.limit, blocker.value)}\n </p>\n ))}\n </>\n );\n}\n\n/** How one capture failed, kept structural so the sentence is chosen here, not by the host. */\ntype MediaFailure =\n | { readonly kind: 'too-large'; readonly bytes: number; readonly limit: number }\n | { readonly kind: 'server'; readonly limit: number | undefined }\n | {\n readonly kind: 'constraint';\n readonly member: 'accept' | 'minBytes';\n readonly limit: readonly string[] | number;\n readonly value: string | number;\n }\n | { readonly kind: 'detail'; readonly detail: string };\n\n/** The catalogue sentence one capture failure states, and the host detail kept apart from it. */\ninterface MediaFailureText {\n readonly sentence: string;\n readonly detail?: string;\n}\n\n/** The host sentence one capture failure states, with both sizes in the host's own units. */\nfunction mediaFailureText(\n failure: MediaFailure,\n label: string,\n copy: HostCopy,\n locale: string | undefined,\n): MediaFailureText {\n switch (failure.kind) {\n case 'too-large':\n return {\n sentence: copy.mediaTooLarge(\n humanSize(failure.bytes, locale),\n humanSize(failure.limit, locale),\n ),\n };\n case 'server':\n return { sentence: copy.mediaServerRefused() };\n case 'constraint':\n return {\n sentence: copy.mediaConstraint(label, failure.member, failure.limit, failure.value),\n };\n case 'detail':\n return { sentence: copy.mediaFailed(), detail: failure.detail };\n }\n}\n\n/** The declaration facts a capture reference is checked against, before it is written. */\ninterface MediaBounds {\n readonly accept: readonly string[] | undefined;\n readonly minBytes: number | undefined;\n readonly maxBytes: number | undefined;\n}\n\n/**\n * Why a captured reference is outside its declaration, in the declaration's own terms.\n *\n * The adapter never uploads, but a host can return a reference it already stored. `maxBytes`\n * has its own catalogue sentence; a `minBytes` or `accept` violation is stated as the detail the\n * host sentence wraps, because those two need the file's own type and size to be actionable.\n */\nfunction mediaOutsideDeclared(reference: WireValue, bounds: MediaBounds): MediaFailure | undefined {\n const bytes = mediaBytes(reference);\n if (bytes !== undefined && bounds.maxBytes !== undefined && bytes > bounds.maxBytes) {\n return { kind: 'too-large', bytes, limit: bounds.maxBytes };\n }\n if (bytes !== undefined && bounds.minBytes !== undefined && bytes < bounds.minBytes) {\n return { kind: 'constraint', member: 'minBytes', limit: bounds.minBytes, value: bytes };\n }\n const mime = mediaMime(reference);\n if (\n mime !== '' &&\n bounds.accept !== undefined &&\n bounds.accept.length > 0 &&\n !mediaAcceptMatches(bounds.accept, mime)\n ) {\n return { kind: 'constraint', member: 'accept', limit: bounds.accept, value: mime };\n }\n return undefined;\n}\n\n/**\n * The failure a rejected capture action states.\n *\n * A host that already knows why (the file's type or size) throws `CaptureRefusedError`, whose\n * message is a clause the catalogue sentence wraps; any other rejection is the store's, and its\n * status code is never repeated. A synchronous throw and a rejected promise are the same case.\n */\nfunction mediaCaptureFailure(error: unknown, bounds: MediaBounds): MediaFailure {\n if (error instanceof Error && error.name === 'AxiomCaptureRefused' && error.message !== '') {\n return { kind: 'detail', detail: error.message };\n }\n return { kind: 'server', limit: bounds.maxBytes };\n}\n\n/**\n * One `media_ref`: the reference the host already resolved, and the host's capture action.\n *\n * The adapter never uploads. `captureMedia` is host code that opens a picker and returns the\n * closed `media_ref` it chose (id, digest, media type, size); this control writes that answer.\n * A media blocker carries no artifact message, so its host sentence is painted here, under the\n * file it names, when the blocker has no array index.\n */\nfunction MediaEntry({\n field,\n id,\n translate,\n accept,\n minBytes,\n maxBytes,\n}: {\n readonly field: FieldProps;\n readonly id: string;\n readonly translate: RenderTranslate;\n readonly accept: readonly string[] | undefined;\n readonly minBytes: number | undefined;\n readonly maxBytes: number | undefined;\n}): ReactElement {\n const { captureMedia, mediaSrc } = useHostActions();\n const copy = useHostCopy();\n const locale = useLocale();\n const summary = useFormState();\n const [failure, setFailure] = useState<MediaFailure | undefined>(undefined);\n const value = field.value;\n const label = translate(field.descriptor.labelKey ?? field.fieldId);\n const hasValue = value !== undefined && value !== null;\n const canCapture = captureMedia !== undefined && field.enabled && field.access === 'read_write';\n const src = value === undefined || value === null ? undefined : mediaSrcOf(mediaSrc, value);\n const blockers = mediaBlockersOf(summary.visibleBlockers, field.fieldId, undefined);\n const bounds: MediaBounds = { accept, minBytes, maxBytes };\n const capture = (): void => {\n if (captureMedia === undefined) return;\n setFailure(undefined);\n try {\n void captureMedia(field.fieldId, {\n label,\n ...(accept === undefined ? {} : { accept }),\n ...(minBytes === undefined ? {} : { minBytes }),\n ...(maxBytes === undefined ? {} : { maxBytes }),\n }).then(\n (reference) => {\n if (reference === undefined) return;\n const refused = mediaOutsideDeclared(reference, bounds);\n if (refused !== undefined) {\n setFailure(refused);\n return;\n }\n writeTo(field, reference);\n },\n (error: unknown) => setFailure(mediaCaptureFailure(error, bounds)),\n );\n } catch (error) {\n setFailure(mediaCaptureFailure(error, bounds));\n }\n };\n const refusalId = `${id}-media-refusal`;\n // An id may be stated only when its element is rendered: the field error node appears only when\n // failures are visible, the description only when declared, the deferral note only when\n // withheld, and the capture refusal only after a rejected capture.\n const describedBy = [\n visibleErrorsOf(field).length > 0 ? field.a11y.errorId : undefined,\n field.a11y.descriptionId,\n field.withheld === true ? `${id}-deferred` : undefined,\n failure === undefined ? undefined : refusalId,\n ]\n .filter((entry) => entry !== undefined && entry !== '')\n .join(' ');\n const describedAttr = describedBy === '' ? undefined : describedBy;\n const invalid = field.a11y.invalid || failure !== undefined;\n const failureText =\n failure === undefined ? undefined : mediaFailureText(failure, label, copy, locale);\n return (\n <>\n {hasValue ? (\n <output\n id={id}\n className={`${controlClassName('media_capture')} ax-media`}\n data-readonly={field.fieldId}\n aria-invalid={invalid}\n aria-describedby={describedAttr}\n >\n <MediaPreview value={value} src={src} />\n <span className=\"ax-media-body\">\n <span className=\"ax-media-line ax-row-key\" title={mediaLine(value, locale)}>\n {mediaDisplayLine(value, 28, locale)}\n </span>\n {canCapture ? (\n <span\n className=\"ax-actions\"\n aria-invalid={invalid ? true : undefined}\n aria-describedby={describedAttr}\n >\n <button type=\"button\" className=\"ax-button ax-button--secondary\" onClick={capture}>\n {copy.attachMedia()}\n </button>\n <button\n type=\"button\"\n className=\"ax-button ax-button--danger\"\n onClick={() => writeTo(field, null)}\n >\n {copy.removeMedia(label)}\n </button>\n </span>\n ) : null}\n </span>\n </output>\n ) : canCapture ? null : (\n <output\n id={id}\n className={controlClassName('media_capture')}\n data-readonly={field.fieldId}\n aria-invalid={invalid}\n aria-describedby={describedAttr}\n >\n —\n </output>\n )}\n {!hasValue && canCapture ? (\n <div\n className=\"ax-actions\"\n aria-invalid={invalid ? true : undefined}\n aria-describedby={describedAttr}\n >\n <button\n type=\"button\"\n className=\"ax-button ax-button--secondary\"\n aria-describedby={describedAttr}\n onClick={capture}\n >\n {copy.attachMedia()}\n </button>\n </div>\n ) : null}\n <MediaConstraintErrors blockers={blockers} fieldId={field.fieldId} label={label} />\n {failureText === undefined ? null : (\n <>\n <p className=\"ax-error\" role=\"alert\" id={refusalId} data-media-failure={failure?.kind}>\n {failureText.sentence}\n </p>\n {failureText.detail === undefined ? null : (\n <p className=\"ax-hint\">{failureText.detail}</p>\n )}\n </>\n )}\n </>\n );\n}\n\n/**\n * A `media_ref[]` value: the captured references, and the host's capture action per file.\n *\n * `minItems` is the count contract, so adding the first reference is what clears a `belowMin`\n * blocker and removing the last restores it. Nothing is uploaded; the host owns storage. A media\n * blocker with an `index` is painted under that entry, where the file it names is visible.\n */\nfunction MediaListEntry({\n field,\n id,\n translate,\n accept,\n minBytes,\n maxBytes,\n}: {\n readonly field: FieldProps;\n readonly id: string;\n readonly translate: RenderTranslate;\n readonly accept: readonly string[] | undefined;\n readonly minBytes: number | undefined;\n readonly maxBytes: number | undefined;\n}): ReactElement {\n const { captureMedia, mediaSrc } = useHostActions();\n const copy = useHostCopy();\n const locale = useLocale();\n const summary = useFormState();\n const [failure, setFailure] = useState<MediaFailure | undefined>(undefined);\n const values: readonly WireValue[] = Array.isArray(field.value) ? field.value : [];\n const label = translate(field.descriptor.labelKey ?? field.fieldId);\n const canCapture = captureMedia !== undefined && field.enabled && field.access === 'read_write';\n const bounds: MediaBounds = { accept, minBytes, maxBytes };\n const capture = (): void => {\n if (captureMedia === undefined) return;\n setFailure(undefined);\n try {\n void captureMedia(field.fieldId, {\n label,\n ...(accept === undefined ? {} : { accept }),\n ...(minBytes === undefined ? {} : { minBytes }),\n ...(maxBytes === undefined ? {} : { maxBytes }),\n }).then(\n (reference) => {\n if (reference === undefined) return;\n const refused = mediaOutsideDeclared(reference, bounds);\n if (refused !== undefined) {\n setFailure(refused);\n return;\n }\n writeTo(field, [...values, reference]);\n },\n (error: unknown) => setFailure(mediaCaptureFailure(error, bounds)),\n );\n } catch (error) {\n setFailure(mediaCaptureFailure(error, bounds));\n }\n };\n // An id may be stated only when its element is rendered: the error node appears when the\n // failure is painted, so an unconditional `errorId` is a promise to nothing — axe reports it as\n // incomplete and a screen reader reads no description, or whatever later takes the id.\n const describedBy = [field.showError ? field.a11y.errorId : undefined, field.a11y.descriptionId]\n .filter((entry) => entry !== undefined && entry !== '')\n .join(' ');\n const failureText =\n failure === undefined ? undefined : mediaFailureText(failure, label, copy, locale);\n return (\n <fieldset\n className=\"ax-checklist\"\n id={id}\n tabIndex={-1}\n aria-invalid={field.a11y.invalid || failure !== undefined}\n {...(describedBy === '' ? {} : { 'aria-describedby': describedBy })}\n disabled={field.disabled}\n onBlur={field.onBlur}\n >\n <legend className=\"ax-label\">{label}</legend>\n {values.length === 0 ? <p className=\"ax-hint\">{copy.rowsEmpty()}</p> : null}\n {values.length === 0 ? null : (\n <ul id={`${id}-list`} className=\"ax-rows ax-media-list\">\n {values.map((value, index) => {\n const name = `${label} ${String(index + 1)}`;\n const blockers = mediaBlockersOf(summary.visibleBlockers, field.fieldId, index);\n return (\n <li\n key={`${String(index)}:${canonicalizeRestricted(value)}`}\n className=\"ax-row ax-media-item\"\n >\n <MediaPreview value={value} src={mediaSrcOf(mediaSrc, value)} />\n <span className=\"ax-media-body\">\n <span className=\"ax-media-line ax-row-key\" title={mediaLine(value, locale)}>\n {mediaDisplayLine(value, 28, locale)}\n </span>\n {canCapture ? (\n <span className=\"ax-actions\">\n <button\n type=\"button\"\n className=\"ax-button ax-button--danger\"\n onClick={() =>\n writeTo(\n field,\n values.filter((_, at) => at !== index),\n )\n }\n >\n {copy.removeMedia(name)}\n </button>\n </span>\n ) : null}\n </span>\n <MediaConstraintErrors blockers={blockers} fieldId={field.fieldId} label={label} />\n </li>\n );\n })}\n </ul>\n )}\n {canCapture ? (\n <div className=\"ax-actions\">\n <button type=\"button\" className=\"ax-button ax-button--secondary\" onClick={capture}>\n {copy.attachMedia()}\n </button>\n </div>\n ) : null}\n {failureText === undefined ? null : (\n <>\n <p className=\"ax-error\" role=\"alert\" data-media-failure={failure?.kind}>\n {failureText.sentence}\n </p>\n {failureText.detail === undefined ? null : (\n <p className=\"ax-hint\">{failureText.detail}</p>\n )}\n </>\n )}\n </fieldset>\n );\n}\n\n/**\n * A choice whose domain the host loads on demand, `[MODEL-3.1.8]`.\n *\n * The items come from `useAsyncOptions`, keyed by the declared dependencies, so a source offers\n * the values the window the form holds asks for and one change reloads one source. The selected\n * item is matched by the wire contract's own equality, because a timeslot is an object rather\n * than a code. A `combobox` over the same domain is `SearchableChoice`: the one declaration that\n * states a filtering affordance gets a search.\n */\nfunction AsyncChoice({\n node,\n field,\n shared,\n rowKey,\n translate,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly rowKey?: string | number;\n readonly translate: RenderTranslate;\n}): ReactElement {\n const pages = useAsyncOptions(node.fieldId, rowKey);\n const copy = useHostCopy();\n // The query belongs to the host-choice composite, not to one affordance it can temporarily\n // replace: an unreadable basis or an availability list must not revive an invisible filter.\n const [query, setQuery] = useState<string | undefined>(undefined);\n // This owner outlives the availability branch it can replace, so it is the one that can hand\n // the keyboard on to the control that takes the branch's place.\n const handoff = useChoiceListFocusHandoff(shared);\n const selected = pages.items.findIndex((item) => sameWireValue(item.value, field.value));\n // A picker whose domain has not arrived offers nothing yet: its first page is still loading,\n // so the select is not usable and states that it is busy while the status line announces it.\n const busy = pages.readable && pages.loading;\n // The loaded page is the domain a reader is choosing from, so a code the record refuses is\n // painted in place: the answers are the record's own, and the labels are the page's. The list\n // replaces the search too, because a page that states availability cannot be painted by a\n // native affordance and the declared form of the control is already that list.\n if (choiceListSource(node, field) === 'host') {\n return (\n <>\n <ChoiceList\n node={node}\n field={field}\n shared={handoff.shared}\n entries={hostChoiceEntries(\n pages.items,\n field.unavailableOptions ?? [],\n node.label,\n translate,\n copy,\n )}\n multiple={false}\n allowClear={node.control !== 'radio'}\n onFocus={handoff.onListFocus}\n />\n <OptionsStatus pages={pages} copy={copy} controlId={shared.id} />\n </>\n );\n }\n if (node.control === 'combobox') {\n // A domain keyed by a value this device may not read is not a search the reader can use: no\n // page is requested, every candidate would be missing, and an empty entry that accepts text\n // would say nothing about why. The value the record holds is painted instead.\n if (!pages.readable) {\n return (\n <>\n <ReadOnlyValue field={field} id={shared.id} control={node.control} />\n <OptionsStatus pages={pages} copy={copy} controlId={shared.id} />\n </>\n );\n }\n return (\n <SearchableChoice\n node={node}\n field={field}\n shared={shared}\n {...(rowKey === undefined ? {} : { rowKey })}\n translate={translate}\n query={query}\n setQuery={setQuery}\n />\n );\n }\n if (node.control === 'radio') {\n // A radio group paints a static value until its host domain answers availability; keep that\n // fallback rather than silently replacing the affordance with a select.\n return (\n <>\n <ReadOnlyValue field={field} id={shared.id} control={node.control} />\n <OptionsStatus pages={pages} copy={copy} controlId={shared.id} />\n </>\n );\n }\n return (\n <>\n <select\n {...shared}\n aria-busy={busy ? true : shared['aria-busy']}\n disabled={shared.disabled || busy}\n value={selected === -1 ? '' : String(selected)}\n onChange={(event: ChangeEvent<HTMLSelectElement>) => {\n const value = event.target.value;\n // `Number('')` is `0`, so the placeholder would otherwise read as \"choose the first\n // slot\". The placeholder is the no-choice entry and writes `null`.\n if (value === '') {\n writeTo(field, null);\n return;\n }\n const item = pages.items[Number(value)];\n if (item !== undefined) writeTo(field, item.value);\n }}\n >\n <option value=\"\">{copy.selectPlaceholder()}</option>\n {pages.items.map((item, index) => (\n <option key={canonicalizeRestricted(item.value)} value={String(index)}>\n {item.labelKey === ''\n ? renderValueText(item.value, copy.display)\n : translate(item.labelKey)}\n {item.deprecated === true ? copy.deprecatedSuffix() : null}\n </option>\n ))}\n </select>\n <OptionsStatus pages={pages} copy={copy} controlId={shared.id} />\n </>\n );\n}\n\n/** A union arm the compiler proves unreachable. */\nfunction assertNeverPlan(value: never): never {\n throw new Error(`unreachable control plan: ${JSON.stringify(value)}`);\n}\n\n/**\n * A host-loaded domain the reader can search, `[MODEL-3.1.8]`.\n *\n * The input is the query and nothing else: what the reader types narrows the host's pages, and\n * the record changes only when an option is chosen. Enter on text that names nothing writes\n * nothing, Escape restores the committed value, and emptying the entry restores the first page.\n * The committed label is read from the domain the pages have offered rather than from the last\n * page, so a value chosen out of a search keeps its words when the search moves on; it is not\n * painted as one of the current matches, because the page the reader is looking at may not hold\n * it.\n *\n * A page for the current text has not arrived yet while the pages are loading, and the empty\n * result states its own sentence: a search that matches nothing is a different answer from a\n * source that offers nothing.\n */\nfunction SearchableChoice({\n node,\n field,\n shared,\n rowKey,\n translate,\n query,\n setQuery,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly rowKey?: string | number;\n readonly translate: RenderTranslate;\n readonly query: string | undefined;\n readonly setQuery: (query: string | undefined) => void;\n}): ReactElement {\n const pages = useAsyncOptions(node.fieldId, rowKey);\n const copy = useHostCopy();\n const listId = `${shared.id}-listbox`;\n const hintId = `${shared.id}-combobox-hint`;\n const [open, setOpen] = useState(false);\n const [activeIndex, setActiveIndex] = useState(0);\n const list = useRef<HTMLUListElement | null>(null);\n // A page that marks a code unavailable paints the choice list instead of this search (see\n // `choiceListSource`), so this list states no availability answer and no entry is refused.\n const entries = hostChoiceEntries(pages.items, [], node.label, translate, copy);\n const held = field.value === undefined || field.value === null ? undefined : field.value;\n const committedItem =\n held === undefined ? undefined : pages.offered.find((item) => sameWireValue(item.value, held));\n const committed =\n held === undefined\n ? ''\n : committedItem === undefined || committedItem.labelKey === ''\n ? renderValueText(held, copy.display)\n : translate(committedItem.labelKey);\n const text = query ?? committed;\n const busy = pages.readable && pages.loading;\n // A list with no candidate is not a listbox: the control stays closed rather than announcing\n // an empty popup, and `aria-activedescendant` never names an option that is not painted. A\n // page still in flight holds the list open and busy, so the reader is told the answer is the\n // host's rather than seeing the list disappear on every keystroke.\n const showList = open && (busy || entries.length > 0);\n // The active entry is read through the list rather than stored: a page that arrives after a\n // dependency moved can hold fewer options than the reader had moved through, and an index past\n // the end would name an option that is not painted and commit one that is.\n const activeAt = entries.length === 0 ? -1 : Math.min(activeIndex, entries.length - 1);\n const active = activeAt === -1 ? undefined : entries[activeAt];\n const described = [shared['aria-describedby'], hintId]\n .filter((entry) => entry !== undefined && entry !== '')\n .join(' ');\n useEffect(() => {\n if (!showList) return;\n const painted = list.current?.children[activeAt];\n // `scrollIntoView` is a browser behaviour; a DOM without layout (jsdom) has none.\n if (painted instanceof HTMLElement) painted.scrollIntoView?.({ block: 'nearest' });\n }, [showList, activeAt]);\n const search = (next: string): void => {\n setQuery(next);\n setOpen(true);\n setActiveIndex(0);\n pages.search(next);\n };\n const resetSearch = (): void => {\n setQuery(undefined);\n setOpen(false);\n setActiveIndex(0);\n // The entry shows the value the record holds, so the pages go back to the first one the\n // source offers rather than staying narrowed by text that is no longer on screen.\n pages.search('');\n };\n const choose = (entry: ChoiceEntry): void => {\n writeTo(field, entry.value);\n resetSearch();\n };\n /** Moves the active entry, clamped to the list the current page paints. */\n const move = (to: number): void => {\n setActiveIndex(Math.max(0, Math.min(to, entries.length - 1)));\n };\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>): void => {\n // Composing readers use the same arrows, Escape and Enter to operate the IME. Those keys\n // belong to the text composition, not to a candidate the record could commit.\n if (event.nativeEvent.isComposing) return;\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (!showList) setOpen(true);\n else move(activeAt + 1);\n return;\n case 'ArrowUp':\n event.preventDefault();\n move(activeAt - 1);\n return;\n case 'Home':\n event.preventDefault();\n if (!showList) setOpen(true);\n move(0);\n return;\n case 'End':\n event.preventDefault();\n if (!showList) setOpen(true);\n move(entries.length - 1);\n return;\n // Only an entry commits. Text that names no option is a search that found nothing, and\n // writing it would turn the record into free text the domain never offered.\n case 'Enter':\n if (!showList || active === undefined) return;\n event.preventDefault();\n choose(active);\n return;\n case 'Escape':\n resetSearch();\n return;\n default:\n return;\n }\n };\n const leave = (destination: EventTarget | null): void => {\n if (destination instanceof HTMLElement) {\n const paging = destination.closest('[data-options-more]');\n // Moving between this entry and its own paging action stays inside one composite control.\n // Another control's action, and a return from paging to this entry, are distinguished by id.\n if (destination.id === shared.id || paging?.getAttribute('data-options-more') === shared.id) {\n return;\n }\n }\n resetSearch();\n shared.onBlur();\n };\n return (\n <>\n <input\n {...shared}\n aria-describedby={described === '' ? undefined : described}\n type=\"text\"\n role=\"combobox\"\n autoComplete={node.hints.web.autoComplete}\n aria-autocomplete=\"list\"\n aria-expanded={showList}\n {...(showList ? { 'aria-controls': listId } : {})}\n {...(showList && active !== undefined\n ? { 'aria-activedescendant': `${shared.id}-option-${String(activeAt)}` }\n : {})}\n value={text}\n onFocus={() => setOpen(true)}\n onChange={(event: ChangeEvent<HTMLInputElement>) => search(event.target.value)}\n onKeyDown={onKeyDown}\n onBlur={(event) => leave(event.relatedTarget)}\n />\n <p className=\"ax-hint\" id={hintId}>\n {copy.comboboxHint()}\n </p>\n {showList ? (\n <ul\n ref={list}\n className=\"ax-rank-list\"\n id={listId}\n role=\"listbox\"\n aria-label={node.label}\n aria-busy={busy ? true : undefined}\n >\n {entries.map((entry, index) => (\n <li\n key={entry.key}\n id={`${shared.id}-option-${String(index)}`}\n role=\"option\"\n aria-selected={sameWireValue(entry.value, field.value)}\n {...(index === activeAt ? { 'data-active': '' } : {})}\n // Selecting on mousedown keeps focus in the input: the blur a click would cause\n // is what would otherwise close the list before the choice lands.\n onMouseDown={(event) => {\n event.preventDefault();\n choose(entry);\n }}\n >\n {entry.label}\n {entry.deprecated === true ? copy.deprecatedSuffix() : null}\n </li>\n ))}\n </ul>\n ) : null}\n <OptionsStatus\n pages={pages}\n copy={copy}\n controlId={shared.id}\n emptySentence={\n query === undefined || query.trim() === '' ? copy.emptyOptions() : copy.noMatches()\n }\n onLeave={leave}\n />\n </>\n );\n}\n\nfunction codeText(value: FieldProps['value']): string {\n return typeof value === 'string' || typeof value === 'number' ? String(value) : '';\n}\n\n/**\n * A scalar code the record holds that no declared option matches, or `undefined`.\n *\n * Only a complete declared domain can answer this: a paginated host page may hold the value on\n * a later page, so async domains never report a held code as missing.\n */\nfunction unmatchedDeclaredCode(\n options: readonly FieldOption[],\n value: FieldProps['value'],\n): string | undefined {\n if (typeof value !== 'string' && typeof value !== 'number') return undefined;\n const offered = options.some((option) => sameWireValue(option.code, value));\n return offered ? undefined : codeText(value);\n}\n\n/**\n * The sentence a held code is announced with.\n *\n * The field's own invalid-value words win when the engine states them; otherwise the host's\n * generic sentence says the domain no longer offers the value. An unavailable option is a\n * blocker the summary names, while a code no option matches is invalid, so the invalid words\n * are the reuse here.\n */\nfunction heldCodeSentence(field: FieldProps, translate: RenderTranslate, copy: HostCopy): string {\n const label = translate(field.descriptor.labelKey ?? field.fieldId);\n const invalid = visibleErrorsOf(field).find((error) => error.kind === 'invalid-value');\n if (invalid !== undefined) return errorTextOf(invalid, field, translate, copy);\n return copy.invalidValue(label);\n}\n\nfunction TextEntry({\n node,\n field,\n shared,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n}): ReactElement {\n const copy = useHostCopy();\n // A write the session refuses (a row identity that may not be cleared, for one) leaves the\n // value as it was; without a sentence beside the control the page that snaps back reads as a\n // dead input. The refusal is local to this entry and cleared by the next accepted write.\n const [refusal, setRefusal] = useState<string | undefined>(undefined);\n const refusalId = `${shared.id}-refusal`;\n const describedBy = [shared['aria-describedby'], refusal === undefined ? undefined : refusalId]\n .filter((id) => id !== undefined)\n .join(' ');\n const relations = {\n ...shared,\n 'aria-invalid': shared['aria-invalid'] || refusal !== undefined,\n ...(describedBy === '' ? {} : { 'aria-describedby': describedBy }),\n };\n const write = (value: WireValue): void => {\n writeTo(field, value, (message) => {\n setRefusal(message === undefined ? undefined : copy.writeRefused());\n });\n };\n const message =\n refusal === undefined ? null : (\n <p className=\"ax-error\" role=\"alert\" id={refusalId}>\n {refusal}\n </p>\n );\n const text = typeof field.value === 'string' ? field.value : '';\n if (node.control === 'textarea') {\n return (\n <>\n <textarea\n {...relations}\n placeholder={node.placeholder}\n value={text}\n onChange={(event: ChangeEvent<HTMLTextAreaElement>) =>\n write(event.target.value === '' ? null : event.target.value)\n }\n />\n {message}\n </>\n );\n }\n return (\n <>\n <input\n {...relations}\n // A string field carrying the `checkbox`/`switch` hint is painted as text (a boolean is\n // the only wire value a checkbox can write), so the hint's own `type=\"checkbox\"` would\n // turn the entry into a control that never carries the text the user types.\n type={\n node.control === 'checkbox' || node.control === 'switch' ? 'text' : node.hints.web.type\n }\n inputMode={node.hints.web.inputMode}\n autoComplete={node.hints.web.autoComplete}\n // A password entry is never autocorrected or autocapitalised: the platform's suggestion\n // bubble would show fragments of a secret beside the field it belongs to.\n autoCorrect={node.hints.web.autoCorrect}\n autoCapitalize={node.hints.web.autoCapitalize}\n placeholder={node.placeholder}\n value={text}\n onChange={(event: ChangeEvent<HTMLInputElement>) =>\n write(event.target.value === '' ? null : event.target.value)\n }\n />\n {message}\n </>\n );\n}\n\n/** One choice in a checkbox group, with the value it writes and the text it shows. */\ninterface CheckboxChoice {\n readonly key: string;\n readonly value: WireValue;\n readonly label: string;\n readonly disabled?: boolean;\n /** A declared option the domain still offers but no longer recommends; never disabling. */\n readonly deprecated?: boolean;\n}\n\n/**\n * A multiple selection as a checkbox group.\n *\n * It is the default for every list family: a native `<select multiple>` needs modifier-click on\n * desktop and has no usable affordance on iOS. Each box is a 44 px target, the group carries the\n * field's required/invalid/described-by relations, and the write is the options in declaration\n * order — never the order the user happened to tick them — so two records with the same selection\n * hold the same array.\n */\nfunction CheckboxGroup({\n node,\n field,\n shared,\n choices,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly choices: readonly CheckboxChoice[];\n}): ReactElement {\n const copy = useHostCopy();\n const heldValues = Array.isArray(field.value) ? field.value : [];\n const selected = new Set(heldValues.map((value) => canonicalizeRestricted(value)));\n const labelId = `${shared.id}-label`;\n const toggle = (choice: CheckboxChoice, checked: boolean): void => {\n const next = new Set(selected);\n const token = canonicalizeRestricted(choice.value);\n if (checked) next.add(token);\n else next.delete(token);\n writeTo(\n field,\n withUnpaintedHeldValues(\n heldValues,\n choices.map((choice) => choice.value),\n choices\n .filter((choice) => next.has(canonicalizeRestricted(choice.value)))\n .map((choice) => choice.value),\n ),\n );\n };\n return (\n <fieldset\n className=\"ax-checklist\"\n // The group itself is the element a summary link lands on: a `<label for>` pointing at the\n // first box would make the caption answer the question for the user.\n id={shared.id}\n tabIndex={-1}\n aria-describedby={shared['aria-describedby']}\n aria-invalid={shared['aria-invalid']}\n aria-busy={shared['aria-busy']}\n disabled={shared.disabled}\n onBlur={shared.onBlur}\n >\n <legend className=\"ax-label\" id={labelId}>\n <ControlLabel node={node} field={field} copy={copy} />\n </legend>\n {choices.map((choice, index) => (\n <label key={choice.key} className=\"ax-check\">\n <input\n id={`${shared.id}-${String(index)}`}\n type=\"checkbox\"\n value={choice.key}\n checked={selected.has(canonicalizeRestricted(choice.value))}\n disabled={shared.disabled || choice.disabled === true}\n aria-required={shared['aria-required']}\n aria-invalid={shared['aria-invalid']}\n aria-describedby={shared['aria-describedby']}\n onChange={(event: ChangeEvent<HTMLInputElement>) =>\n toggle(choice, event.target.checked)\n }\n />\n <span>\n {choice.label}\n {choice.deprecated === true ? copy.deprecatedSuffix() : null}\n </span>\n </label>\n ))}\n {choices.length === 0 ? (\n <p className=\"ax-hint\" role=\"status\" data-empty-options=\"\">\n {copy.emptyOptions()}\n </p>\n ) : null}\n </fieldset>\n );\n}\n\n/**\n * A list control: a declared option domain is a multiple selection, and a freeform list of\n * strings is comma-separated text. A list of structured items has no text spelling, so it is\n * shown read-only rather than written as a string the item contract would refuse.\n *\n * `rank` is not a multiple selection: a native multi-select reports which options are chosen,\n * never the order the user chose them in. It gets an ordered list whose writes are the order on\n * screen (`MODEL-3.1.6`).\n */\nfunction ListEntry({\n node,\n field,\n shared,\n rowKey,\n translate,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly rowKey?: string | number;\n readonly translate: RenderTranslate;\n}): ReactElement {\n const copy = useHostCopy();\n const { nativeMultiSelect } = useHostActions();\n const options = node.declaration.options;\n const source = node.declaration.optionSource;\n if (field.readOnly) return <ReadOnlyValue field={field} id={shared.id} control={node.control} />;\n if (node.control === 'rank') {\n if (options !== undefined)\n return <StaticRankEntry node={node} field={field} shared={shared} translate={translate} />;\n if (source?.kind === 'field') {\n return (\n <FieldRankEntry\n field={field}\n shared={shared}\n sourceFieldId={source.fieldId}\n label={node.label}\n />\n );\n }\n if (source?.kind === 'host') {\n return (\n <HostRankEntry\n node={node}\n field={field}\n shared={shared}\n {...(rowKey === undefined ? {} : { rowKey })}\n translate={translate}\n />\n );\n }\n return <StaticRankEntry node={node} field={field} shared={shared} translate={translate} />;\n }\n if (options === undefined && source?.kind === 'field') {\n // A `tags` domain declared as another field's recorded array. The domain is that field's\n // current value, read through the same binding; it is not a page list and has no loader.\n return (\n <FieldListEntry node={node} field={field} shared={shared} sourceFieldId={source.fieldId} />\n );\n }\n if (options === undefined && source?.kind === 'host') {\n // A `tags` domain loaded from the host is the same paginated domain a `timeslot` picker uses.\n return (\n <HostListEntry\n node={node}\n field={field}\n shared={shared}\n {...(rowKey === undefined ? {} : { rowKey })}\n translate={translate}\n />\n );\n }\n if (node.declaration.items?.primitive === 'media_ref') {\n return (\n <MediaListEntry\n field={field}\n id={shared.id}\n translate={translate}\n accept={node.declaration.accept}\n minBytes={node.declaration.minBytes}\n maxBytes={node.declaration.maxBytes}\n />\n );\n }\n if (options === undefined) {\n if (node.declaration.items?.primitive !== 'string')\n return <ReadOnlyValue field={field} id={shared.id} control={node.control} />;\n return <FreeformListEntry field={field} shared={shared} />;\n }\n const heldValues: readonly WireValue[] = Array.isArray(field.value) ? field.value : [];\n const held = new Set(heldValues.map((entry) => canonicalizeRestricted(entry)));\n const chosen = new Set(\n options.flatMap((option) =>\n held.has(canonicalizeRestricted(optionCodeValue(node.declaration, option.code)))\n ? [String(option.code)]\n : [],\n ),\n );\n const choices = options.map((option) => ({\n key: String(option.code),\n value: optionCodeValue(node.declaration, option.code),\n label: translate(option.labelKey),\n deprecated: option.deprecated === true,\n }));\n if (!nativeMultiSelect) {\n return <CheckboxGroup node={node} field={field} shared={shared} choices={choices} />;\n }\n return (\n <fieldset\n className=\"ax-checklist\"\n id={`${shared.id}-group`}\n tabIndex={-1}\n aria-invalid={shared['aria-invalid']}\n aria-describedby={shared['aria-describedby']}\n aria-busy={shared['aria-busy']}\n disabled={shared.disabled}\n onBlur={shared.onBlur}\n >\n <legend className=\"ax-label\">\n <ControlLabel node={node} field={field} copy={copy} />\n </legend>\n <select\n {...shared}\n id={shared.id}\n aria-required={shared['aria-required']}\n multiple\n value={[...chosen]}\n onChange={(event: ChangeEvent<HTMLSelectElement>) => {\n const selected = new Set<string>();\n for (const option of event.target.options) {\n if (option.selected) selected.add(option.value);\n }\n writeTo(\n field,\n withUnpaintedHeldValues(\n heldValues,\n choices.map((choice) => choice.value),\n options\n .filter((option) => selected.has(String(option.code)))\n .map((option) => optionCodeValue(node.declaration, option.code)),\n ),\n );\n }}\n >\n {options.map((option) => (\n <option key={String(option.code)} value={String(option.code)}>\n {translate(option.labelKey)}\n {option.deprecated === true ? copy.deprecatedSuffix() : null}\n </option>\n ))}\n </select>\n {options.length === 0 ? (\n <p className=\"ax-hint\" role=\"status\" data-empty-options=\"\">\n {copy.emptyOptions()}\n </p>\n ) : null}\n </fieldset>\n );\n}\n\n/**\n * A list control whose domain is a host source.\n *\n * `tags` and `rank` may declare a host `optionSource`; it is the same paginated domain a\n * `timeslot` picker uses, so it resolves through `useAsyncOptions` rather than a bare text box.\n */\nfunction HostListEntry({\n node,\n field,\n shared,\n rowKey,\n translate,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly rowKey?: string | number;\n readonly translate: RenderTranslate;\n}): ReactElement {\n const pages = useAsyncOptions(node.fieldId, rowKey);\n const copy = useHostCopy();\n const { nativeMultiSelect } = useHostActions();\n const handoff = useChoiceListFocusHandoff(shared);\n const chosen = Array.isArray(field.value) ? field.value : [];\n const selected = pages.items.flatMap((item, index) =>\n chosen.some((entry) => sameWireValue(entry, item.value)) ? [String(index)] : [],\n );\n const busy = pages.readable && pages.loading;\n // A multiple selection whose loaded page carries a code the record refuses is painted as the\n // same list, so the reason and the press reach the reader in place of a checkbox it could not\n // tick and a reason it could not read.\n if (choiceListSource(node, field) === 'host') {\n return (\n <>\n <ChoiceList\n node={node}\n field={field}\n shared={handoff.shared}\n entries={hostChoiceEntries(\n pages.items,\n field.unavailableOptions ?? [],\n node.label,\n translate,\n copy,\n )}\n multiple\n allowClear={false}\n onFocus={handoff.onListFocus}\n />\n <OptionsStatus pages={pages} copy={copy} controlId={shared.id} />\n </>\n );\n }\n // A further page does not change the affordance: the group keeps the items it has while one\n // more is requested, rather than handing the reader a native list they did not ask for. The\n // group owns the empty sentence, but the same status component stays mounted across every\n // affordance so the further-page action keeps its press and focus state.\n if (\n pages.readable &&\n pages.resolved &&\n !nativeMultiSelect &&\n pages.error === undefined &&\n (pages.items.length > 0 || !pages.hasMore)\n ) {\n return (\n <>\n <CheckboxGroup\n node={node}\n field={field}\n shared={shared}\n choices={pages.items.map((item, index) => ({\n key: `${String(index)}:${canonicalizeRestricted(item.value)}`,\n value: item.value,\n label:\n item.labelKey === ''\n ? renderValueText(item.value, copy.display)\n : translate(item.labelKey),\n deprecated: item.deprecated === true,\n }))}\n />\n <OptionsStatus pages={pages} copy={copy} controlId={shared.id} includeEmpty={false} />\n </>\n );\n }\n return (\n <>\n <select\n {...shared}\n multiple\n aria-busy={busy ? true : shared['aria-busy']}\n disabled={shared.disabled || busy}\n value={selected}\n onChange={(event: ChangeEvent<HTMLSelectElement>) => {\n const picked: WireValue[] = [];\n for (const option of event.target.options) {\n if (!option.selected) continue;\n const item = pages.items[Number(option.value)];\n if (item !== undefined) picked.push(item.value);\n }\n writeTo(\n field,\n withUnpaintedHeldValues(\n chosen,\n pages.items.map((item) => item.value),\n picked,\n ),\n );\n }}\n >\n {pages.items.map((item, index) => (\n <option\n key={`${String(index)}:${canonicalizeRestricted(item.value)}`}\n value={String(index)}\n >\n {item.labelKey === ''\n ? renderValueText(item.value, copy.display)\n : translate(item.labelKey)}\n {item.deprecated === true ? copy.deprecatedSuffix() : null}\n </option>\n ))}\n </select>\n <OptionsStatus pages={pages} copy={copy} controlId={shared.id} />\n </>\n );\n}\n\n/**\n * The page states a host-loaded domain reports, painted under the control that offers it.\n *\n * Loading, a domain that resolved to nothing, a page the loader refused and a domain that holds\n * further pages are different answers, so each has its own line or action. An unresolved page and\n * one whose dependency is withheld state neither loading nor an empty domain, and a page that\n * states another page is not yet an empty domain.\n *\n * `controlId` is the id of whichever affordance this domain is painted through: a press that\n * finishes the domain removes the action it was pressed on, and the reader's keyboard has to land\n * on the control rather than on the document.\n */\nfunction OptionsStatus({\n pages,\n copy,\n controlId,\n includeEmpty = true,\n emptySentence,\n onLeave,\n}: {\n readonly pages: AsyncOptionList;\n readonly copy: HostCopy;\n readonly controlId: string;\n /** A checkbox group paints its own empty sentence; every other control delegates it here. */\n readonly includeEmpty?: boolean;\n /** What an empty domain says: a search that matched nothing states its own sentence. */\n readonly emptySentence?: string;\n /** Moves focus from the paging action, naming where it went. */\n readonly onLeave?: (destination: EventTarget | null) => void;\n}): ReactElement {\n return (\n <>\n <p className=\"ax-hint\" role=\"status\" data-options-status=\"\">\n {pages.readable && pages.loading ? copy.loadingOptions() : ''}\n </p>\n {includeEmpty &&\n pages.readable &&\n pages.resolved &&\n pages.error === undefined &&\n pages.items.length === 0 &&\n !pages.hasMore ? (\n <p className=\"ax-hint\" role=\"status\" data-empty-options=\"\">\n {emptySentence ?? copy.emptyOptions()}\n </p>\n ) : null}\n {!pages.readable || pages.error === undefined ? null : (\n <div className=\"ax-error\" role=\"alert\" data-options=\"failed\">\n <p>{copy.optionsFailed()}</p>\n <p className=\"ax-hint\" data-options-detail=\"\">\n {pages.error.message}\n </p>\n </div>\n )}\n <OptionsMore\n pages={pages}\n copy={copy}\n controlId={controlId}\n {...(onLeave === undefined ? {} : { onLeave })}\n />\n </>\n );\n}\n\n/**\n * The action that asks a paginated domain for its next page.\n *\n * A page list is bounded and cancellable, so the consumer advances it: the reader asks, the\n * machine loads one more page and the control re-reads the merged domain — including the\n * availability answers the new page carries. The action stays painted while a page is in flight,\n * so the keyboard rests on it across the load, and a press while one is loading is the machine's\n * to refuse rather than a second request.\n */\nfunction OptionsMore({\n pages,\n copy,\n controlId,\n onLeave,\n}: {\n readonly pages: AsyncOptionList;\n readonly copy: HostCopy;\n readonly controlId: string;\n readonly onLeave?: (destination: EventTarget | null) => void;\n}): ReactElement | null {\n const [asked, setAsked] = useState(false);\n const complete = !pages.loading && !pages.hasMore;\n useEffect(() => {\n if (!asked || !complete) return;\n // The action that was pressed is gone, and the domain may have published an availability\n // answer that replaces the affordance in a later commit, so the keyboard is handed over once\n // both have settled. A reader who moved on during the load keeps where they went.\n const handoff = setTimeout(() => {\n setAsked(false);\n if (document.activeElement === null || document.activeElement === document.body) {\n document.getElementById(controlId)?.focus();\n }\n }, 0);\n return () => {\n clearTimeout(handoff);\n };\n }, [asked, complete, controlId]);\n if (!pages.readable || !pages.hasMore || pages.error !== undefined) return null;\n return (\n <div\n className=\"ax-actions\"\n data-options-more={controlId}\n onBlur={(event) => onLeave?.(event.relatedTarget)}\n >\n <button\n type=\"button\"\n className=\"ax-button ax-button--secondary\"\n aria-busy={pages.loading ? true : undefined}\n onClick={() => {\n setAsked(true);\n pages.loadMore();\n }}\n >\n {copy.loadMoreOptions()}\n </button>\n </div>\n );\n}\n\n/** A decorated value in a ranking: its label, already resolved for this locale. */\ninterface RankItem {\n readonly key: string;\n readonly value: WireValue;\n readonly label: string;\n}\n\n/**\n * A list control whose domain is another field's recorded array.\n *\n * `optionSource: { kind: \"field\" }` names a sibling binding, not a page list; asking\n * `useAsyncOptions` for one is a programming error. The domain is that binding's current value,\n * read through the same session, so an edit to the source repaints this picker.\n */\nfunction FieldListEntry({\n node,\n field,\n shared,\n sourceFieldId,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly sourceFieldId: string;\n}): ReactElement {\n const source = useField(sourceFieldId);\n const copy = useHostCopy();\n const { nativeMultiSelect } = useHostActions();\n const items: readonly WireValue[] = Array.isArray(source.value) ? source.value : [];\n const chosen: readonly WireValue[] = Array.isArray(field.value) ? field.value : [];\n const selected = items.flatMap((value, index) =>\n chosen.some((entry) => sameWireValue(entry, value)) ? [String(index)] : [],\n );\n if (!nativeMultiSelect) {\n return (\n <CheckboxGroup\n node={node}\n field={field}\n shared={shared}\n choices={items.map((value, index) => ({\n key: `${String(index)}:${canonicalizeRestricted(value)}`,\n value,\n label: renderValueText(value, copy.display),\n }))}\n />\n );\n }\n return (\n <fieldset\n className=\"ax-checklist\"\n id={`${shared.id}-group`}\n tabIndex={-1}\n aria-invalid={shared['aria-invalid']}\n aria-describedby={shared['aria-describedby']}\n aria-busy={shared['aria-busy']}\n disabled={shared.disabled}\n onBlur={shared.onBlur}\n >\n <legend className=\"ax-label\">\n <ControlLabel node={node} field={field} copy={copy} />\n </legend>\n <select\n {...shared}\n id={shared.id}\n aria-required={shared['aria-required']}\n multiple\n value={selected}\n onChange={(event: ChangeEvent<HTMLSelectElement>) => {\n const picked: WireValue[] = [];\n for (const option of event.target.options) {\n if (!option.selected) continue;\n const value = items[Number(option.value)];\n if (value !== undefined) picked.push(value);\n }\n writeTo(field, withUnpaintedHeldValues(chosen, items, picked));\n }}\n >\n {items.map((value, index) => (\n <option key={`${String(index)}:${canonicalizeRestricted(value)}`} value={String(index)}>\n {renderValueText(value, copy.display)}\n </option>\n ))}\n </select>\n {items.length === 0 ? (\n <p className=\"ax-hint\" role=\"status\" data-empty-options=\"\">\n {copy.emptyOptions()}\n </p>\n ) : null}\n </fieldset>\n );\n}\n\n/** A ranking with a static, declared option domain. */\nfunction StaticRankEntry({\n node,\n field,\n shared,\n translate,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly translate: RenderTranslate;\n}): ReactElement {\n const domain: readonly RankItem[] = (node.declaration.options ?? []).map((option) => ({\n key: String(option.code),\n value: option.code,\n label: translate(option.labelKey),\n }));\n return (\n <RankEditor\n field={field}\n shared={shared}\n label={node.label}\n domain={domain}\n busy={false}\n status=\"\"\n failure={undefined}\n />\n );\n}\n\n/** A ranking whose domain is another field's value, or a host source: loaded pages of items. */\nfunction HostRankEntry({\n node,\n field,\n shared,\n rowKey,\n translate,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly rowKey?: string | number;\n readonly translate: RenderTranslate;\n}): ReactElement {\n const pages = useAsyncOptions(node.fieldId, rowKey);\n const copy = useHostCopy();\n const domain: readonly RankItem[] = pages.items.map((item) => ({\n key: canonicalizeRestricted(item.value),\n value: item.value,\n label:\n item.labelKey === '' ? renderValueText(item.value, copy.display) : translate(item.labelKey),\n }));\n return (\n <RankEditor\n field={field}\n shared={shared}\n label={node.label}\n domain={domain}\n busy={pages.loading}\n status={pages.loading ? copy.loadingOptions() : ''}\n failure={pages.error === undefined ? undefined : copy.optionsFailed()}\n failureDetail={pages.error?.message}\n />\n );\n}\n\n/** A ranking whose domain is another field's recorded array, read through the same session. */\nfunction FieldRankEntry({\n field,\n shared,\n sourceFieldId,\n label,\n}: {\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly sourceFieldId: string;\n readonly label: string;\n}): ReactElement {\n const source = useField(sourceFieldId);\n const copy = useHostCopy();\n const items: readonly WireValue[] = Array.isArray(source.value) ? source.value : [];\n const domain: readonly RankItem[] = items.map((value, index) => ({\n key: `${String(index)}:${canonicalizeRestricted(value)}`,\n value,\n label: renderValueText(value, copy.display),\n }));\n return (\n <RankEditor\n field={field}\n shared={shared}\n label={label}\n domain={domain}\n busy={false}\n status=\"\"\n failure={undefined}\n />\n );\n}\n\n/**\n * The orderable list, shared by a declared and a loaded domain.\n *\n * A native `<select multiple>` reports membership, not order, so it can never store a ranking.\n * This control renders the current value as an ordered list; moving, removing or adding writes\n * the array in the order on screen, which is the order the user expressed.\n */\nfunction RankEditor({\n field,\n shared,\n label,\n domain,\n busy,\n status,\n failure,\n failureDetail,\n}: {\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly label: string;\n readonly domain: readonly RankItem[];\n readonly busy: boolean;\n readonly status: string;\n readonly failure: string | undefined;\n /** The loader's own reason, painted apart from the failure sentence. */\n readonly failureDetail?: string | undefined;\n}): ReactElement {\n const copy = useHostCopy();\n const values: readonly WireValue[] = Array.isArray(field.value) ? field.value : [];\n const entries: readonly RankItem[] = values.map((value) => {\n const match = domain.find((item) => sameWireValue(item.value, value));\n return {\n // A ranking's values are unique, so the value alone is the identity: a move changes the\n // position but not the row, and a key carrying the index would remount it (and lose focus).\n key: canonicalizeRestricted(value),\n value,\n label: match?.label ?? renderValueText(value, copy.display),\n };\n });\n const addable = domain.filter(\n (item) => !values.some((value) => sameWireValue(value, item.value)),\n );\n const commit = (next: readonly WireValue[]): void => {\n writeTo(field, next);\n };\n return (\n <RankOrder\n shared={shared}\n label={label}\n entries={entries}\n addable={addable}\n busy={busy}\n status={status}\n failure={failure}\n failureDetail={failureDetail}\n copy={copy}\n onMove={(index, delta) => {\n const next = [...values];\n const target = index + delta;\n if (target < 0 || target >= next.length) return;\n const moved = next.splice(index, 1)[0];\n if (moved === undefined) return;\n next.splice(target, 0, moved);\n commit(next);\n }}\n onRemove={(index) => {\n commit(values.filter((_, at) => at !== index));\n }}\n onAdd={(value) => {\n commit([...values, value]);\n }}\n />\n );\n}\n\n/** Where a rank interaction should leave the keyboard when the list repaints. */\ntype RankFocus =\n | { readonly where: 'button'; readonly action: 'up' | 'down' | 'remove'; readonly key: string }\n | { readonly where: 'add' };\n\n/** The presentational half of a ranking: an ordered list plus one add picker. */\nfunction RankOrder({\n shared,\n label,\n entries,\n addable,\n busy,\n status,\n failure,\n failureDetail,\n copy,\n onMove,\n onRemove,\n onAdd,\n}: {\n readonly shared: SharedProps;\n readonly label: string;\n readonly entries: readonly RankItem[];\n readonly addable: readonly RankItem[];\n readonly busy: boolean;\n readonly status: string;\n readonly failure: string | undefined;\n /** The loader's own reason, painted apart from the failure sentence. */\n readonly failureDetail?: string | undefined;\n readonly copy: HostCopy;\n readonly onMove: (index: number, delta: 1 | -1) => void;\n readonly onRemove: (index: number) => void;\n readonly onAdd: (value: WireValue) => void;\n}): ReactElement {\n // Each handle registers itself under its action and its value, so a reordered list still has\n // one address per row and the effect below can hand the keyboard back after the repaint.\n const buttons = useRef(new Map<string, HTMLButtonElement>());\n const addPicker = useRef<HTMLSelectElement | null>(null);\n const pendingFocus = useRef<RankFocus | undefined>(undefined);\n const [announcement, setAnnouncement] = useState('');\n useEffect(() => {\n const request = pendingFocus.current;\n if (request === undefined) return;\n pendingFocus.current = undefined;\n if (request.where === 'add' || entries.length === 0) {\n addPicker.current?.focus();\n return;\n }\n const wanted = buttons.current.get(`${request.action}:${request.key}`);\n // A moved row's pressed button may have become disabled at the end of its travel (the first\n // row has no \"up\"), so its other move handle is the same row's handle.\n const alternate =\n request.action === 'remove'\n ? undefined\n : buttons.current.get(`${request.action === 'up' ? 'down' : 'up'}:${request.key}`);\n const target = [wanted, alternate].find((button) => button !== undefined && !button.disabled);\n if (target !== undefined) {\n target.focus();\n return;\n }\n // The row itself may be gone (a removal whose neighbour was already at its bound). Land on\n // the next enabled handle rather than on `<body>`.\n for (const button of buttons.current.values()) {\n if (!button.disabled) {\n button.focus();\n return;\n }\n }\n addPicker.current?.focus();\n }, [entries]);\n const register = (\n action: 'up' | 'down' | 'remove',\n key: string,\n ): ((element: HTMLButtonElement | null) => void) => {\n return (element) => {\n const token = `${action}:${key}`;\n if (element === null) buttons.current.delete(token);\n else buttons.current.set(token, element);\n };\n };\n const move = (index: number, delta: 1 | -1): void => {\n const entry = entries[index];\n if (entry === undefined) return;\n const position = index + delta + 1;\n if (position < 1 || position > entries.length) return;\n pendingFocus.current = {\n where: 'button',\n action: delta === -1 ? 'up' : 'down',\n key: entry.key,\n };\n setAnnouncement(copy.rankMoved(entry.label, position, entries.length));\n onMove(index, delta);\n };\n const remove = (index: number): void => {\n const entry = entries[index];\n if (entry === undefined) return;\n const next = entries[index + 1] ?? entries[index - 1];\n pendingFocus.current =\n next === undefined ? { where: 'add' } : { where: 'button', action: 'remove', key: next.key };\n setAnnouncement(copy.rankRemoved(entry.label, entries.length - 1));\n onRemove(index);\n };\n return (\n <fieldset\n className=\"ax-rank\"\n id={shared.id}\n tabIndex={-1}\n aria-invalid={shared['aria-invalid']}\n aria-describedby={shared['aria-describedby']}\n aria-busy={shared['aria-busy']}\n disabled={shared.disabled}\n onBlur={shared.onBlur}\n >\n <legend className=\"ax-label\">{label}</legend>\n {entries.length === 0 ? (\n <p className=\"ax-hint\">{copy.rankEmpty()}</p>\n ) : (\n <ol className=\"ax-rank-list\">\n {entries.map((entry, index) => (\n <li key={entry.key} className=\"ax-rank-item\">\n <span className=\"ax-rank-label\">{entry.label}</span>\n <div className=\"ax-actions\">\n <button\n type=\"button\"\n ref={register('up', entry.key)}\n aria-label={copy.rankMoveUp(entry.label)}\n disabled={busy || index === 0}\n onClick={() => move(index, -1)}\n >\n ↑\n </button>\n <button\n type=\"button\"\n ref={register('down', entry.key)}\n aria-label={copy.rankMoveDown(entry.label)}\n disabled={busy || index === entries.length - 1}\n onClick={() => move(index, 1)}\n >\n ↓\n </button>\n <button\n type=\"button\"\n ref={register('remove', entry.key)}\n aria-label={copy.rankRemove(entry.label)}\n disabled={busy}\n onClick={() => remove(index)}\n >\n ×\n </button>\n </div>\n </li>\n ))}\n </ol>\n )}\n {/* The fieldset above carries the binding's id and described-by relations; this picker\n uses a distinct id and clears `aria-describedby` so the failure is not announced twice.\n It stays rendered with no addable option so focus can still land here when the list\n empties, and `aria-label` names both the action and the field. */}\n <select\n {...shared}\n id={`${shared.id}-add`}\n aria-describedby={undefined}\n aria-required={shared['aria-required']}\n ref={addPicker}\n className=\"ax-control ax-control--rank\"\n aria-label={copy.rankAddTo(label)}\n disabled={shared.disabled || busy}\n value=\"\"\n onChange={(event: ChangeEvent<HTMLSelectElement>) => {\n const value = event.target.value;\n // The placeholder is the picker's current value, not an option: choosing it is a\n // \"no choice\" gesture and appends nothing. `Number('')` would be `0`, the first item.\n if (value === '') return;\n const item = addable[Number(value)];\n if (item !== undefined) onAdd(item.value);\n }}\n >\n <option value=\"\">{copy.rankAdd()}</option>\n {addable.map((item, index) => (\n <option key={item.key} value={String(index)}>\n {item.label}\n </option>\n ))}\n </select>\n {/* One live region for the ranking, always present so a message written into it is\n announced: a status node that mounts together with its text is silent in some readers. */}\n <p className=\"ax-hint\" role=\"status\" data-rank-status=\"\">\n {status === '' ? announcement : status}\n </p>\n {failure === undefined ? null : (\n <div className=\"ax-error\" role=\"alert\">\n <p>{failure}</p>\n {failureDetail === undefined ? null : <p className=\"ax-hint\">{failureDetail}</p>}\n </div>\n )}\n </fieldset>\n );\n}\n\n/**\n * A bounded number as a slider.\n *\n * The bounds and step are the compiled presentation hints, not the enforcement: the declared\n * rules still decide what may be submitted. The current value is stated beside the track, the\n * ends are labelled, and a declared option domain supplies tick labels. A range input cannot be\n * read-only, so a read-only binding paints its value instead.\n *\n * A range input with no value paints the platform's midpoint, which would claim an answer the\n * record does not hold and disagree with both the empty output beside it and the first nudge.\n * An unanswered field therefore pins the thumb to the declared minimum — where a nudge starts —\n * and states that it has no answer yet, visibly and through `aria-valuetext`.\n */\nfunction SliderEntry({\n node,\n field,\n shared,\n translate,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n readonly translate: RenderTranslate;\n}): ReactElement {\n const copy = useHostCopy();\n if (field.readOnly) return <ReadOnlyValue field={field} id={shared.id} control={node.control} />;\n const minimum = node.declaration.minimum;\n const maximum = node.declaration.maximum;\n if (minimum === undefined || maximum === undefined) {\n // A slider without a whole range has no track; until the declaration carries one, the value\n // is still editable as a number rather than painted by a control that cannot move.\n return <BufferedEntry node={node} field={field} id={shared.id} format={{ kind: 'decimal' }} />;\n }\n const step = node.declaration.step;\n const value = field.value;\n const text = typeof value === 'string' || typeof value === 'number' ? String(value) : '';\n const unanswered = text === '';\n // The thumb sits at the start of the declared range, not at the browser's midpoint. That is\n // also the value the first nudge steps away from, so the track and the write agree.\n const position = unanswered ? String(minimum) : text;\n const positionNumber = Number(position);\n const unansweredText = unanswered ? copy.notAnswered(node.label) : undefined;\n const options = node.declaration.options ?? [];\n return (\n <div className=\"ax-slider\">\n <div className=\"ax-slider-head\">\n <output htmlFor={shared.id} className=\"ax-slider-value\" aria-label={node.label}>\n {unansweredText === undefined ? <bdi dir=\"ltr\">{text}</bdi> : unansweredText}\n </output>\n <span className=\"ax-slider-bounds\">\n {String(minimum)}–{String(maximum)}\n </span>\n </div>\n <input\n {...shared}\n type=\"range\"\n min={String(minimum)}\n max={String(maximum)}\n {...(step === undefined ? {} : { step: String(step) })}\n value={position}\n {...(Number.isFinite(positionNumber) ? { 'aria-valuenow': positionNumber } : {})}\n {...(unansweredText === undefined ? {} : { 'aria-valuetext': unansweredText })}\n onChange={(event: ChangeEvent<HTMLInputElement>) => {\n const next = event.target.value;\n writeTo(field, node.declaration.primitive === 'integer' ? Number(next) : next);\n }}\n />\n {options.length === 0 ? null : (\n <div className=\"ax-slider-ticks\" aria-hidden=\"true\">\n {options.map((option) => (\n <span key={String(option.code)} className=\"ax-slider-tick\">\n {translate(option.labelKey)}\n </span>\n ))}\n </div>\n )}\n </div>\n );\n}\n\n/** Whether the declaration asks for seconds on a time or date-time control. */\nfunction wantsSeconds(node: RenderControlNode): boolean {\n return node.declaration.annotations?.['seconds'] === true;\n}\n\n/** The local civil date and clock of a stored instant, when it is one. */\nfunction localPartsOf(\n iso: string | undefined,\n): { readonly date: string; readonly time: string } | undefined {\n if (iso === undefined) return undefined;\n const date = new Date(iso);\n if (Number.isNaN(date.getTime())) return undefined;\n const pad = (value: number): string => String(value).padStart(2, '0');\n return {\n date: `${String(date.getFullYear())}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`,\n time: `${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`,\n };\n}\n\n/** How one duration text entry parses against `MODEL-2.1.24` (a whole number at least zero). */\ntype DurationParse =\n | { readonly kind: 'empty' }\n | { readonly kind: 'partial' }\n | { readonly kind: 'value'; readonly amount: number }\n | {\n readonly kind: 'invalid';\n readonly reason: BufferRefusalReason | WebBufferReason;\n readonly params?: Readonly<Record<string, string | number>>;\n };\n\nfunction parseDurationAmount(raw: string): DurationParse {\n const trimmed = raw.trim();\n if (trimmed === '') return { kind: 'empty' };\n if (trimmed === '+') return { kind: 'partial' };\n const body = trimmed.startsWith('+') ? trimmed.slice(1) : trimmed;\n if (body.startsWith('-')) {\n return { kind: 'invalid', reason: 'buffer.integer.minimum', params: { minimum: 0 } };\n }\n if (/^[0-9]*[.,][0-9]*$/u.test(body)) {\n return { kind: 'invalid', reason: 'buffer.integer.no_point' };\n }\n if (!/^[0-9]+$/u.test(body)) {\n return { kind: 'invalid', reason: 'buffer.integer.digits' };\n }\n const amount = Number(body);\n if (!Number.isSafeInteger(amount)) {\n return { kind: 'invalid', reason: 'buffer.integer.not_safe' };\n }\n return { kind: 'value', amount };\n}\n\n/**\n * A duration as a whole number and the declared unit, `MODEL-2.1.24`.\n *\n * The unit travels in the value, so the control writes `{ amount, unit }` and never a bare\n * number; the affix states the localized unit and is associated with the input through\n * `aria-describedby` so assistive technology announces the unit beside the field label.\n * Invalid edits (negative or fractional entries) stay buffered in the input with an explicit\n * localized refusal sentence rather than silently reverting to the committed value.\n */\nfunction DurationEntry({\n node,\n field,\n shared,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly shared: SharedProps;\n}): ReactElement {\n const copy = useHostCopy();\n const record = isRecord(field.value) ? field.value : undefined;\n const committed =\n record !== undefined && typeof record['amount'] === 'number' ? String(record['amount']) : '';\n const unit = node.declaration.unit ?? 'minutes';\n const [draft, setDraft] = useState<{ readonly id: string; readonly text: string } | undefined>(\n undefined,\n );\n const [writeRefusal, setWriteRefusal] = useState<string | undefined>(undefined);\n const text = draft !== undefined && draft.id === shared.id ? draft.text : committed;\n const parsed = parseDurationAmount(text);\n const parseError = parsed.kind === 'invalid' ? parsed : undefined;\n const unitId = `${shared.id}-unit`;\n const refusalId = `${shared.id}-refusal`;\n const writeRefusalId = `${shared.id}-write-refusal`;\n const described = [\n shared['aria-describedby'],\n unitId,\n parseError === undefined ? undefined : refusalId,\n writeRefusal === undefined ? undefined : writeRefusalId,\n ]\n .filter((entry) => entry !== undefined && entry !== '')\n .join(' ');\n const commitValue = (next: WireValue, canonicalText: string, raw: string): void => {\n const result = absorbWrite(() => field.setValue(next));\n if (result.kind === 'accepted') {\n setWriteRefusal(undefined);\n setDraft(raw === canonicalText ? undefined : { id: shared.id, text: raw });\n return;\n }\n setWriteRefusal(copy.writeRefused());\n setDraft({ id: shared.id, text: raw });\n };\n return (\n <>\n <div className=\"ax-duration\">\n <input\n {...shared}\n type={node.hints.web.type}\n inputMode={node.hints.web.inputMode}\n autoComplete={node.hints.web.autoComplete}\n autoCorrect={node.hints.web.autoCorrect}\n autoCapitalize={node.hints.web.autoCapitalize}\n placeholder={node.placeholder}\n aria-invalid={\n shared['aria-invalid'] || parseError !== undefined || writeRefusal !== undefined\n }\n aria-describedby={described === '' ? undefined : described}\n value={text}\n onChange={(event: ChangeEvent<HTMLInputElement>) => {\n const raw = event.target.value;\n const next = parseDurationAmount(raw);\n if (next.kind === 'empty') {\n commitValue(null, '', raw);\n return;\n }\n if (next.kind === 'value') {\n commitValue({ amount: next.amount, unit }, String(next.amount), raw);\n return;\n }\n setWriteRefusal(undefined);\n setDraft({ id: shared.id, text: raw });\n }}\n onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key !== 'Escape') return;\n setDraft(undefined);\n setWriteRefusal(undefined);\n }}\n onBlur={() => {\n if (parsed.kind === 'empty') {\n if (committed !== '') {\n commitValue(null, '', '');\n } else {\n setDraft(undefined);\n }\n } else if (parsed.kind === 'value') {\n const target: WireValue = { amount: parsed.amount, unit };\n if (!sameWireValue(target, field.value)) {\n commitValue(target, String(parsed.amount), String(parsed.amount));\n } else {\n setDraft(undefined);\n }\n }\n shared.onBlur();\n }}\n />\n <span className=\"ax-duration-unit\" id={unitId}>\n {copy.durationUnit(unit)}\n </span>\n </div>\n {parseError === undefined ? null : (\n <p className=\"ax-error\" role=\"alert\" id={refusalId} data-buffer=\"refused\">\n {copy.buffer(parseError.reason, parseError.params)}\n </p>\n )}\n {writeRefusal === undefined ? null : (\n <p className=\"ax-error\" role=\"alert\" id={writeRefusalId} data-write=\"refused\">\n {writeRefusal}\n </p>\n )}\n </>\n );\n}\n\n/** A time of day on its own, written as `HH:MM` or `HH:MM:SS`. */\nfunction TimeEntry({\n node,\n field,\n id,\n describedBy,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly id: string;\n readonly describedBy: string | undefined;\n}): ReactElement {\n const locale = useLocale();\n return (\n <TimeSegments\n controlId={id}\n value={typeof field.value === 'string' ? field.value : undefined}\n onChange={(text) => writeTo(field, text)}\n seconds={wantsSeconds(node)}\n locale={locale}\n disabled={field.disabled}\n readOnly={field.readOnly}\n label={node.label}\n describedBy={describedBy}\n invalid={field.a11y.invalid}\n required={field.a11y.required}\n onBlur={field.onBlur}\n />\n );\n}\n\n/**\n * A date and a time of day on one binding.\n *\n * The value is still the wire's canonical UTC instant. The date picker edits the local civil\n * date, the segments edit the local clock, and the two are combined into the instant the record\n * holds; the browser's zone is the host commitment `datetime` already documents.\n *\n * A time alone is not an instant, so the clock segments are disabled — and say why — until a date\n * has been chosen. Previously an empty field still painted an editable `09:00` clock whose\n * keystrokes were silently dropped: `write` returned early with no date, so ArrowUp moved nothing\n * and wrote nothing. Refusing the interaction with a stated reason is the honest empty state, and\n * choosing a date enables the clock at the default reading it shows.\n */\nfunction DateTimeEntry({\n node,\n field,\n id,\n describedBy,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly id: string;\n readonly describedBy: string | undefined;\n}): ReactElement {\n const locale = useLocale();\n const stored = typeof field.value === 'string' ? field.value : undefined;\n const local = localPartsOf(stored);\n const date = local?.date;\n const time = local?.time ?? '09:00:00';\n const dateFirstId = `${id}-date-first`;\n // The reason is the calendar's own word for the gesture, so a reader who lands on a disabled\n // segment hears the action that would enable it rather than a sentence invented here. A field\n // the session has already made read-only or disabled offers no such gesture, so it states no\n // instruction it cannot honour.\n const clockBlocked = date === undefined && !field.readOnly && !field.disabled;\n const dateFirst = clockBlocked ? scheduleText(locale).chooseDate : undefined;\n const timeDescribed = [describedBy, dateFirst === undefined ? undefined : dateFirstId]\n .filter((entry) => entry !== undefined && entry !== '')\n .join(' ');\n const write = (nextDate: string | undefined, nextTime: string): void => {\n if (nextDate === undefined) return;\n const [year, month, day] = nextDate.split('-').map(Number);\n const [hours, minutes, seconds] = nextTime.split(':').map(Number);\n if (\n year === undefined ||\n month === undefined ||\n day === undefined ||\n hours === undefined ||\n minutes === undefined\n ) {\n return;\n }\n const instant = new Date(year, month - 1, day, hours, minutes, seconds ?? 0);\n if (Number.isNaN(instant.getTime())) return;\n writeTo(field, instant.toISOString());\n };\n return (\n <div className=\"ax-datetime\">\n <DatePicker\n controlId={id}\n descriptionId={field.a11y.descriptionId}\n errorId={field.a11y.errorId}\n label={node.label}\n value={date}\n setValue={(next) => write(next, time)}\n required={field.a11y.required}\n invalid={field.a11y.invalid}\n disabled={field.disabled}\n readOnly={field.readOnly}\n locale={locale}\n minimum={node.declaration.minimum}\n maximum={node.declaration.maximum}\n onBlur={field.onBlur}\n />\n <TimeSegments\n controlId={`${id}-time`}\n value={time}\n onChange={(next) => write(date, next)}\n seconds={wantsSeconds(node)}\n locale={locale}\n disabled={field.disabled || date === undefined}\n readOnly={field.readOnly}\n label={node.label}\n describedBy={timeDescribed === '' ? undefined : timeDescribed}\n invalid={field.a11y.invalid}\n required={field.a11y.required}\n onBlur={field.onBlur}\n />\n {dateFirst === undefined ? null : (\n <p className=\"ax-hint\" id={dateFirstId}>\n {dateFirst}\n </p>\n )}\n </div>\n );\n}\n\n/** One currency's mark and the side the copy layer puts it on. */\ninterface CurrencyAffix {\n readonly side: 'before' | 'after';\n readonly mark: string;\n}\n\n/**\n * The currency mark and placement `formCopy` uses, read back from its own output.\n *\n * The mark table and `MONEY_MARK` live in the copy layer, and this adapter must not carry a\n * second copy of either: the summary and the entry would then be two chances to state the same\n * amount differently. Formatting a sentinel amount through `display` and removing the digits it\n * printed yields exactly the mark and gap the sentence uses, on the side it uses.\n */\nfunction currencyAffix(\n copy: FormCopy,\n language: Locale,\n currency: string,\n): CurrencyAffix | undefined {\n const sentinel = '123456789';\n const shown = copy.display({ minor: sentinel, currency, scale: 0 });\n if (shown === undefined) return undefined;\n const digits = groupCanonicalNumericText(sentinel, language, DEFAULT_DIGIT_POLICY);\n const at = shown.indexOf(digits);\n if (at === -1) return undefined;\n const before = shown.slice(0, at);\n const after = shown.slice(at + digits.length);\n if (before.trim() === '' && after.trim() === '') return undefined;\n return before.trim() === '' ? { side: 'after', mark: after } : { side: 'before', mark: before };\n}\n\n/**\n * Canonical numeric text in the locale's marks.\n *\n * The value is the caller's: a percentage or a quantity arrives as canonical decimal text, while\n * a scaled quantity may keep trailing zeros and is money text. Anything else has no display, so\n * the summary says nothing rather than formatting a value the record does not hold.\n */\nfunction localeNumberText(text: string, language: Locale): string | undefined {\n if (isDecimalString(text)) return formatDecimal(text, language);\n if (isCanonicalMoneyText(text)) {\n return groupCanonicalNumericText(text, language, DEFAULT_DIGIT_POLICY);\n }\n return undefined;\n}\n\n/** A text entry whose raw keystrokes are not the value, `[MODEL-7.1.1]`. */\n/** A declared bound as an integer, when it is one; a decimal bound is ignored by the stepper. */\nfunction integerBoundOf(value: number | string | undefined): number | undefined {\n if (typeof value === 'number') return Number.isInteger(value) ? value : undefined;\n if (typeof value !== 'string' || value.trim() === '') return undefined;\n const parsed = Number(value);\n return Number.isInteger(parsed) ? parsed : undefined;\n}\n\n/** The declared step as a positive integer; an absent or fractional step steps by one. */\nfunction integerStepOf(node: RenderControlNode): number {\n const parsed = integerBoundOf(node.declaration.step);\n return parsed === undefined || parsed <= 0 ? 1 : parsed;\n}\n\n/** The committed value as an integer, when the wire holds one. */\nfunction integerOf(value: FieldProps['value']): number | undefined {\n if (typeof value === 'number') return Number.isInteger(value) ? value : undefined;\n if (typeof value === 'string' && /^-?\\d+$/u.test(value.trim())) {\n const parsed = Number(value);\n return Number.isInteger(parsed) ? parsed : undefined;\n }\n return undefined;\n}\n\n/**\n * The value one step would write, or `undefined` when the step would leave the declared range.\n *\n * Refusing rather than clamping is deliberate: a reader at the maximum who presses `+` should\n * see the button disabled and the value unchanged, not a silent write that looks like a step.\n * An empty entry steps from the minimum when one is declared, so the first press lands inside\n * the range rather than at a value the artifact forbids.\n */\nfunction steppedInteger(\n value: FieldProps['value'],\n delta: number,\n minimum: number | undefined,\n maximum: number | undefined,\n): number | undefined {\n const current = integerOf(value) ?? minimum ?? 0;\n const next = current + delta;\n if (minimum !== undefined && next < minimum) return undefined;\n if (maximum !== undefined && next > maximum) return undefined;\n return next;\n}\n\n/** Whether the declared step can move an integer stepper: absent, or a positive whole number. */\nfunction integerStepUsable(step: number | string | undefined): boolean {\n if (step === undefined) return true;\n const parsed = integerBoundOf(step);\n return parsed !== undefined && parsed > 0;\n}\n\n/**\n * The bounds sentence an integer entry states, or `undefined` when the declaration states none.\n *\n * The engine stays the only decider of a refused value: this states the declared bounds in\n * words and on the input's own `min` and `max`, so the stepper, the attributes and the words\n * agree before any value is written.\n */\nfunction integerBoundsOf(\n minimum: number | undefined,\n maximum: number | undefined,\n):\n | {\n readonly reason: 'buffer.integer.minimum' | 'buffer.integer.maximum' | 'buffer.integer.range';\n readonly params: Readonly<Record<string, number>>;\n }\n | undefined {\n if (minimum !== undefined && maximum !== undefined) {\n return { reason: 'buffer.integer.range', params: { minimum, maximum } };\n }\n if (minimum !== undefined) {\n return { reason: 'buffer.integer.minimum', params: { minimum } };\n }\n if (maximum !== undefined) {\n return { reason: 'buffer.integer.maximum', params: { maximum } };\n }\n return undefined;\n}\n\n/**\n * A whole-number refusal restated for a percentage, which names the percent instead.\n *\n * Only the three reasons that talk about whole numbers are restated; a neutral decimal reason\n * passes through unchanged.\n */\nfunction percentageReasonOf(reason: BufferRefusalReason): BufferRefusalReason | WebBufferReason {\n if (reason === 'buffer.integer.digits') return 'buffer.percentage.digits';\n if (reason === 'buffer.integer.no_point') return 'buffer.percentage.no_point';\n if (reason === 'buffer.integer.not_safe') return 'buffer.percentage.not_safe';\n return reason;\n}\n\n/** An over-scale refusal restated for a quantity, whose parser key names the money family. */\nfunction quantityReasonOf(reason: BufferRefusalReason): BufferRefusalReason | WebBufferReason {\n if (reason === 'buffer.money.scale_exceeded') return 'buffer.quantity.scale_exceeded';\n return reason;\n}\n\nfunction BufferedEntry({\n node,\n field,\n id,\n rowKey,\n describedBy,\n format,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly id: string;\n readonly rowKey?: string | number;\n readonly describedBy?: string;\n readonly format: BufferedFormat;\n}): ReactElement {\n const locale = useLocale();\n const language = resolveLocale(locale).language;\n const buffer = useBufferedInput(\n node.fieldId,\n format,\n rowKey,\n locale === undefined ? undefined : { locale },\n );\n const copy = useHostCopy();\n const currency = format.kind === 'money' ? node.declaration.currency : undefined;\n // The value and the sign are the host's copy. The marker and its side come from the same copy\n // when its display exposes placement. A custom display that does not is still paired with the\n // packaged marker rather than leaving the amount unidentified; the value itself stays the\n // host's, never the packaged one.\n const affix =\n currency === undefined\n ? undefined\n : (currencyAffix(copy, language, currency) ??\n currencyAffix(formCopy(language), language, currency));\n const percentage = node.control === 'percentage';\n // The summary states the committed amount, never the half-typed entry: a group mark or a bare\n // `12.` is an entry the record does not hold yet, and formatting it would invent a value.\n // A money value is the wire record, so the same `display` the read-only control and the demo\n // use is the only formatter: one amount cannot be grouped one way here and another way there.\n const committedText =\n buffer.dirty || format.kind === 'money'\n ? undefined\n : percentage && (typeof field.value === 'string' || typeof field.value === 'number')\n ? String(field.value)\n : undefined;\n const amountText =\n committedText === undefined ? undefined : localeNumberText(committedText, language);\n // The domain a bare number does not state: the currency for money, the sign for a percentage.\n // The entry keeps the canonical text; these are the visible and announced words beside it.\n const display = buffer.dirty\n ? undefined\n : format.kind === 'money'\n ? field.value === undefined || field.value === null\n ? undefined\n : copy.display(field.value)\n : percentage\n ? `${amountText ?? committedText}${copy.percentageSign()}`\n : undefined;\n // The mark and its side are the copy layer's, read once through `currencyAffix`; the span that\n // carries it is named so a reader who lands on the entry hears which currency it is in.\n const prefix = affix?.side === 'before' ? affix.mark : undefined;\n const suffix = affix?.side === 'after' ? affix.mark : undefined;\n const domainId = affix === undefined ? (percentage ? `${id}-unit` : undefined) : `${id}-currency`;\n const displayId = `${id}-display`;\n // A refusal is about this control, so it is described by it: an invalid input whose description\n // omits the reason it is invalid leaves a reader who returns to the field without the answer.\n const refusalId = `${id}-refusal`;\n // The buffer writes through `field.setValue` itself, so a session refusal is caught here and\n // painted as this control's second failure rather than escaping the keystroke handler.\n const [writeRefusal, setWriteRefusal] = useState<string | undefined>(undefined);\n const writeRefusalId = `${id}-write-refusal`;\n const attempt = (run: () => void): void => {\n setWriteRefusal(absorbWrite(run).kind === 'accepted' ? undefined : copy.writeRefused());\n };\n // A whole number is a quantity a reader adjusts as often as types: the stepper is the mouse and\n // arrow-key path, while the input keeps the buffered parse contract untouched.\n const integer = format.kind === 'integer';\n const step = integerStepOf(node);\n const minimum = integerBoundOf(node.declaration.minimum);\n const maximum = integerBoundOf(node.declaration.maximum);\n // A declared step the stepper cannot honour stays stated instead of stepping by one: the\n // stepper is disabled, the declaration is worded, and typing still writes exact values the\n // engine alone decides on.\n const stepUsable = integerStepUsable(node.declaration.step);\n const stepId = `${id}-step`;\n const stepSentence =\n integer && !stepUsable && node.declaration.step !== undefined\n ? copy.buffer('buffer.integer.step', { step: String(node.declaration.step) })\n : undefined;\n // The declared bounds the stepper respects, stated in words and on the input itself.\n const bounds = integer ? integerBoundsOf(minimum, maximum) : undefined;\n const boundsText = bounds === undefined ? undefined : copy.buffer(bounds.reason, bounds.params);\n const boundsId = `${id}-bounds`;\n // A percentage names the percent in a whole-number refusal; the params travel unchanged.\n const shownParseError =\n percentage && integer && buffer.parseError !== undefined\n ? percentageReasonOf(buffer.parseError)\n : buffer.parseError;\n const described = [\n describedBy,\n shownParseError === undefined ? undefined : refusalId,\n writeRefusal === undefined ? undefined : writeRefusalId,\n boundsText === undefined ? undefined : boundsId,\n stepSentence === undefined ? undefined : stepId,\n domainId,\n display === undefined ? undefined : displayId,\n ]\n .filter((entry) => entry !== undefined)\n .join(' ');\n // A dirty buffer is an entry the record does not hold yet: a half-typed `12.` or a refused\n // write. Disabling the stepper while dirty prevents an enabled handle from silently no-oping or\n // discarding the reader's draft before it commits.\n const stepperDisabled = field.disabled || field.readOnly || !stepUsable || buffer.dirty;\n const stepTo = (delta: number): void => {\n if (stepperDisabled) return;\n const next = steppedInteger(field.value, delta, minimum, maximum);\n if (next !== undefined) attempt(() => buffer.setText(String(next)));\n };\n const blur = (): void => {\n const result = absorbWrite(() => buffer.onBlur());\n if (result.kind === 'accepted') {\n setWriteRefusal(undefined);\n return;\n }\n setWriteRefusal(copy.writeRefused());\n // The buffer's handler stopped before recording the visit; a refused commit is still the\n // reader leaving the field, so the host's reveal rule must still see it.\n field.onBlur();\n };\n const nextDown =\n integer && stepUsable ? steppedInteger(field.value, -step, minimum, maximum) : undefined;\n const nextUp =\n integer && stepUsable ? steppedInteger(field.value, step, minimum, maximum) : undefined;\n const input = (\n <input\n id={id}\n className={controlClassName(node.control)}\n type={node.hints.web.type}\n inputMode={node.hints.web.inputMode}\n autoComplete={node.hints.web.autoComplete}\n autoCorrect={node.hints.web.autoCorrect}\n autoCapitalize={node.hints.web.autoCapitalize}\n placeholder={node.placeholder}\n aria-required={field.a11y.required}\n aria-invalid={\n field.a11y.invalid || buffer.parseKind === 'invalid' || writeRefusal !== undefined\n }\n aria-describedby={described}\n // A buffered entry builds its own attributes rather than sharing `SharedProps`; without\n // this line a submission that settles a server-tier check leaves the control silent.\n aria-busy={field.a11y.busy ? true : undefined}\n disabled={field.disabled}\n readOnly={field.readOnly}\n value={buffer.text}\n onChange={(event: ChangeEvent<HTMLInputElement>) =>\n attempt(() => buffer.setText(event.target.value))\n }\n {...(!integer || minimum === undefined ? {} : { min: String(minimum) })}\n {...(!integer || maximum === undefined ? {} : { max: String(maximum) })}\n // Escape forgets the half-typed or refused entry and shows the committed value again;\n // focus stays in the entry and the refusal pattern is unchanged. Arrow keys step a whole\n // number and never scroll the page: they run only for an integer entry with a usable\n // step, and `preventDefault` is what keeps a focused input from moving the viewport.\n onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Escape') {\n buffer.reset();\n return;\n }\n if (!integer || !stepUsable) return;\n if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') return;\n event.preventDefault();\n stepTo(event.key === 'ArrowUp' ? step : -step);\n }}\n // The buffer's own blur commits the entry and records the visit; `blur` keeps that contract\n // and only adds the refusal it would otherwise have thrown out of the handler.\n onBlur={blur}\n />\n );\n return (\n <>\n {integer ? (\n <span className=\"ax-stepper\" data-stepper=\"\">\n <button\n type=\"button\"\n className=\"ax-stepper__button\"\n aria-label={copy.integerStep(node.label, 'decrease')}\n aria-controls={id}\n disabled={stepperDisabled || nextDown === undefined}\n onClick={() => stepTo(-step)}\n >\n −\n </button>\n {input}\n <button\n type=\"button\"\n className=\"ax-stepper__button\"\n aria-label={copy.integerStep(node.label, 'increase')}\n aria-controls={id}\n disabled={stepperDisabled || nextUp === undefined}\n onClick={() => stepTo(step)}\n >\n +\n </button>\n </span>\n ) : prefix === undefined && suffix === undefined && !percentage ? (\n input\n ) : (\n <span\n className={percentage ? 'ax-percentage' : 'ax-money'}\n {...(suffix === undefined\n ? {}\n : { style: { gridTemplateColumns: 'minmax(0, 1fr) auto' } })}\n >\n {prefix === undefined ? null : (\n <span className=\"ax-money-prefix\" id={`${id}-currency`}>\n {prefix}\n </span>\n )}\n {input}\n {suffix === undefined ? null : (\n <span\n className=\"ax-money-prefix\"\n id={`${id}-currency`}\n style={{ borderInlineStart: 0, borderInlineEnd: '1px solid var(--ax-border)' }}\n >\n {suffix}\n </span>\n )}\n {percentage ? (\n <span className=\"ax-control-suffix\" id={`${id}-unit`}>\n {copy.percentageSign()}\n </span>\n ) : null}\n </span>\n )}\n {display === undefined ? null : (\n <p className=\"ax-hint\" id={displayId} data-value-display=\"\">\n {display}\n </p>\n )}\n {boundsText === undefined ? null : (\n <p className=\"ax-hint\" id={boundsId}>\n {boundsText}\n </p>\n )}\n {stepSentence === undefined ? null : (\n <p className=\"ax-hint\" id={stepId}>\n {stepSentence}\n </p>\n )}\n {shownParseError === undefined ? null : (\n <p className=\"ax-error\" role=\"alert\" id={refusalId} data-buffer=\"refused\">\n {copy.buffer(shownParseError, buffer.parseErrorParams)}\n </p>\n )}\n {writeRefusal === undefined ? null : (\n <p className=\"ax-error\" role=\"alert\" id={writeRefusalId} data-write=\"refused\">\n {writeRefusal}\n </p>\n )}\n </>\n );\n}\n\n/** The amount member of a committed quantity, when the value carries one. */\nfunction quantityAmountOf(value: FieldProps['value']): string | undefined {\n if (!isRecord(value)) return undefined;\n const amount = value['value'];\n return typeof amount === 'string' ? amount : undefined;\n}\n\n/** The unit member of a committed quantity, when the value carries one. */\nfunction quantityUnitOf(value: FieldProps['value']): string | undefined {\n if (!isRecord(value)) return undefined;\n const unit = value['unit'];\n return typeof unit === 'string' ? unit : undefined;\n}\n\n/**\n * A measured quantity: an exact amount and the unit the declaration admits, `MODEL-2.1.21`.\n *\n * The text entry is buffered like every decimal, so `12.` is kept as an entry and only a\n * complete amount is written; the unit picker supplies the value's second member, so a write is\n * always `{ value, unit }` and never a bare number the wire would refuse. A declaration with\n * scale zero is an integer quantity, so it uses a whole-number keypad and a stepper, and its\n * parse refuses a decimal point the declaration could not hold.\n */\nfunction QuantityEntry({\n node,\n field,\n id,\n rowKey,\n describedBy,\n}: {\n readonly node: RenderControlNode;\n readonly field: FieldProps;\n readonly id: string;\n readonly rowKey?: string | number;\n readonly describedBy?: string;\n}): ReactElement {\n const locale = useLocale();\n const language = resolveLocale(locale).language;\n const copy = useHostCopy();\n const units = node.declaration.units ?? [];\n const committedUnit = quantityUnitOf(field.value);\n const [chosenUnit, setChosenUnit] = useState<string | undefined>(undefined);\n const unit =\n chosenUnit !== undefined && units.includes(chosenUnit)\n ? chosenUnit\n : committedUnit !== undefined && units.includes(committedUnit)\n ? committedUnit\n : (units[0] ?? '');\n const integer = (node.declaration.scale ?? 0) === 0;\n const buffer = useBufferedInput(\n node.fieldId,\n { kind: 'quantity', unit },\n rowKey,\n locale === undefined ? undefined : { locale },\n );\n const refusalId = `${id}-refusal`;\n // Same contract as `BufferedEntry`: the buffer writes through the binding itself, so a session\n // refusal is caught and painted here instead of escaping the amount entry or its blur.\n const [writeRefusal, setWriteRefusal] = useState<string | undefined>(undefined);\n const writeRefusalId = `${id}-write-refusal`;\n const attempt = (run: () => void): void => {\n setWriteRefusal(absorbWrite(run).kind === 'accepted' ? undefined : copy.writeRefused());\n };\n const committedAmount = buffer.dirty ? undefined : quantityAmountOf(field.value);\n const amountText =\n committedAmount === undefined ? undefined : localeNumberText(committedAmount, language);\n const display = amountText === undefined ? undefined : `${amountText} ${unit}`;\n const displayId = `${id}-display`;\n // An over-scale quantity refuses under its own key; the money key would misname the family.\n const shownParseError =\n buffer.parseError === undefined ? undefined : quantityReasonOf(buffer.parseError);\n // The summary carries the unit, so a reader who cannot see the picker still hears the measure,\n // and the failure and the help text are both still named.\n const described = [\n describedBy,\n shownParseError === undefined ? undefined : refusalId,\n writeRefusal === undefined ? undefined : writeRefusalId,\n display === undefined ? undefined : displayId,\n ]\n .filter((entry) => entry !== undefined)\n .join(' ');\n const changeUnit = (next: string): void => {\n setChosenUnit(next);\n const amount = quantityAmountOf(field.value);\n // With no committed amount the picker only chooses what the next keystroke will write.\n if (amount === undefined) return;\n writeTo(field, { value: amount, unit: next });\n };\n const step = (delta: 1 | -1): void => {\n const amount = quantityAmountOf(field.value);\n if (amount === undefined) return;\n const current = Number(amount);\n const next = current + delta;\n if (!Number.isSafeInteger(current) || !Number.isSafeInteger(next)) return;\n writeTo(field, { value: String(next), unit });\n };\n return (\n <>\n <div className=\"ax-quantity\">\n {integer ? (\n <button\n type=\"button\"\n className=\"ax-quantity-step\"\n aria-label={copy.quantityStep(node.label, 'decrease')}\n disabled={field.disabled || !field.enabled}\n onClick={() => step(-1)}\n >\n −\n </button>\n ) : null}\n <input\n id={id}\n className={controlClassName(node.control)}\n type={node.hints.web.type}\n inputMode={integer ? 'numeric' : node.hints.web.inputMode}\n autoComplete={node.hints.web.autoComplete}\n placeholder={node.placeholder}\n // Two controls share this field, so each says which half it is: \"Area, amount\" and\n // \"Area, unit\" are two names, where the field label twice was one name for both.\n aria-label={copy.quantityAmount(node.label)}\n aria-required={field.a11y.required}\n aria-invalid={\n field.a11y.invalid || buffer.parseKind === 'invalid' || writeRefusal !== undefined\n }\n aria-describedby={described}\n aria-busy={field.a11y.busy ? true : undefined}\n disabled={field.disabled}\n readOnly={field.readOnly}\n value={buffer.text}\n onChange={(event: ChangeEvent<HTMLInputElement>) =>\n attempt(() => buffer.setText(event.target.value))\n }\n onBlur={() => {\n const result = absorbWrite(() => buffer.onBlur());\n if (result.kind === 'accepted') {\n setWriteRefusal(undefined);\n return;\n }\n setWriteRefusal(copy.writeRefused());\n field.onBlur();\n }}\n />\n {integer ? (\n <button\n type=\"button\"\n className=\"ax-quantity-step\"\n aria-label={copy.quantityStep(node.label, 'increase')}\n disabled={field.disabled || !field.enabled}\n onClick={() => step(1)}\n >\n +\n </button>\n ) : null}\n <select\n className=\"ax-control ax-control--quantity-unit\"\n aria-label={copy.quantityUnit(node.label)}\n aria-describedby={described}\n disabled={field.disabled || !field.enabled}\n value={unit}\n onChange={(event: ChangeEvent<HTMLSelectElement>) => changeUnit(event.target.value)}\n >\n {units.map((entry) => (\n <option key={entry} value={entry}>\n {entry}\n </option>\n ))}\n </select>\n </div>\n {display === undefined ? null : (\n <p className=\"ax-hint\" id={displayId} data-value-display=\"\">\n {display}\n </p>\n )}\n {shownParseError === undefined ? null : (\n <p className=\"ax-error\" role=\"alert\" id={refusalId} data-buffer=\"refused\">\n {copy.buffer(shownParseError, buffer.parseErrorParams)}\n </p>\n )}\n {writeRefusal === undefined ? null : (\n <p className=\"ax-error\" role=\"alert\" id={writeRefusalId} data-write=\"refused\">\n {writeRefusal}\n </p>\n )}\n </>\n );\n}\n"]}