{% load common_extras %} {% comment %} Step 2 — the audience (SPEC §13.1). The rule builder is templates/contacts/_filter_bar.html, included unchanged, and its Alpine component is the CRM's (defined once in compose.html's alpine_components block, so it exists before Alpine initialises anything this partial swaps in). That is the point of contract 8: a broadcast audience and a saved segment are the same document evaluated by the same engine, so a second builder here would be a second list of sources and operators that could disagree with the one the segment page uses. `can_manage_crm` is deliberately absent from this context, which is what keeps the filter bar's save/update/delete-segment controls out of the composer — managing segments is the CRM's job, not a side effect of drafting a broadcast. Two forms, one Alpine scope, because forms cannot nest and these do different things: the top one GETs a preview on every edit, the bottom one POSTs the document that gets stored. Both read the same `serialised`, so the count an operator agrees to is computed from the rules they are looking at. {% endcomment %}
Opted-out contacts, and anyone the channel will not let you message, are left out automatically.