<commit_before>Records        = require 'shared/services/records'
ModalService   = require 'shared/services/modal_service'
I18n           = require 'shared/services/i18n'
EventBus       = require 'shared/services/event_bus'
utils          = require 'shared/record_store/utils'
LmoUrlService  = require 'shared/services/lmo_url_service'
AbilityService = require 'shared/services/ability_service'
FlashService   = require 'shared/services/flash_service'
{ audiencesFor, audienceValuesFor } = require 'shared/helpers/announcement'

angular.module('loomioApp').directive 'announcementForm', ->
  scope: {announcement: '='}
  restrict: 'E'
  templateUrl: 'generated/components/announcement/form/announcement_form.html'
  controller: ['$scope', ($scope) ->
    if $scope.announcement.model.isA('group')
      $scope.announcement.model.fetchToken().then ->
        $scope.shareableLink = LmoUrlService.shareableLink($scope.announcement.model)

    $scope.canUpdateAnyoneCanParticipate = ->
      $scope.announcement.model.isA('poll') &&<commit_msg>fix sharable link text on poll<commit_after>Records        = require 'shared/services/records'
ModalService   = require 'shared/services/modal_service'
I18n           = require 'shared/services/i18n'
EventBus       = require 'shared/services/event_bus'
utils          = require 'shared/record_store/utils'
LmoUrlService  = require 'shared/services/lmo_url_service'
AbilityService = require 'shared/services/ability_service'
FlashService   = require 'shared/services/flash_service'
{ audiencesFor, audienceValuesFor } = require 'shared/helpers/announcement'

angular.module('loomioApp').directive 'announcementForm', ->
  scope: {announcement: '='}
  restrict: 'E'
  templateUrl: 'generated/components/announcement/form/announcement_form.html'
  controller: ['$scope', ($scope) ->

    $scope.shareableLink = LmoUrlService.shareableLink($scope.announcement.model)
    if $scope.announcement.model.isA('group')
      $scope.announcement.model.fetchToken().then ->
        $scope.shareableLink = LmoUrlService.shareableLink($scope.announcement.model)

    $scope.canUpdateAnyoneCanParticipate = ->
      $scope.announcement.model.isA('poll') &&
{'fraction_non_alphanumeric': 0.12511457378551788, 'fraction_numerical': 0.0036663611365719525, 'mean_word_length': 4.684895833333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5396631', 'n_tokens_mistral': 672, 'n_tokens_neox': 662, 'n_words': 99}