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AAA,CAAK,IAAA,GAAO,KAAA;AACZ,IAAA,OAAO,IAAA;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,UAAU,KAAA,EAAe;AACvB,IAAA,IAAA,CAAK,KAAA,GAAQ,KAAA;AACb,IAAA,OAAO,IAAA;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKA,YAAY,KAAA,EAAe;AACzB,IAAA,IAAA,CAAK,OAAA,GAAU,KAAA;AACf,IAAA,OAAO,IAAA;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,eAAe,KAAA,EAAa;AAC1B,IAAA,IAAA,CAAK,UAAA,GAAa,KAAA;AAClB,IAAA,OAAO,IAAA;AAAA,EACT;AACF","file":"message-update.mjs","sourcesContent":["import { ChannelData } from '../../models';\nimport { IActivity, Activity } from '../activity';\n\nexport interface IMessageUpdateActivity extends IActivity<'messageUpdate'> {\n  /**\n   * The text content of the message.\n   */\n  text: string;\n\n  /**\n   * The text to speak.\n   * @deprecated This will be removed by end of summer 2026.\n   */\n  speak?: string;\n\n  /**\n   * The text to display if the channel cannot render cards.\n   */\n  summary?: string;\n\n  /**\n   * The time at which the activity should be considered to be \"expired\" and should not be\n   * presented to the recipient.\n   * @deprecated This will be removed by end of summer 2026.\n   */\n  expiration?: Date;\n\n  /**\n   * A value that is associated with the activity.\n   */\n  value?: any;\n\n  channelData: ChannelData & {\n    eventType: 'undeleteMessage' | 'editMessage';\n  };\n}\n\nexport class MessageUpdateActivity\n  extends Activity<'messageUpdate'>\n  implements IMessageUpdateActivity\n{\n  /**\n   * The text content of the message.\n   */\n  text!: string;\n\n  /**\n   * The text to speak.\n   * @deprecated This will be removed by end of summer 2026.\n   */\n  speak?: string;\n\n  /**\n   * The text to display if the channel cannot render cards.\n   */\n  summary?: string;\n\n  /**\n   * The time at which the activity should be considered to be \"expired\" and should not be\n   * presented to the recipient.\n   * @deprecated This will be removed by end of summer 2026.\n   */\n  expiration?: Date;\n\n  /**\n   * A value that is associated with the activity.\n   */\n  value?: any;\n\n  declare channelData: ChannelData & {\n    eventType: 'undeleteMessage' | 'editMessage';\n  };\n\n  constructor(\n    eventType: 'undeleteMessage' | 'editMessage',\n    value: Omit<Partial<IMessageUpdateActivity>, 'type'> = {}\n  ) {\n    super({\n      ...value,\n      type: 'messageUpdate',\n      channelData: {\n        ...value?.channelData,\n        eventType,\n      },\n    });\n\n    Object.assign(this, {\n      ...value,\n      channelData: {\n        ...value?.channelData,\n        eventType,\n      },\n    });\n  }\n\n  /**\n   * initialize from interface\n   */\n  static from(activity: IMessageUpdateActivity) {\n    return new MessageUpdateActivity(activity.channelData.eventType, activity);\n  }\n\n  /**\n   * convert to interface\n   */\n  toInterface(): IMessageUpdateActivity {\n    return Object.assign({}, this);\n  }\n\n  /**\n   * copy to a new instance\n   */\n  clone(options: Omit<Partial<IMessageUpdateActivity>, 'type'> = {}) {\n    return new MessageUpdateActivity(this.channelData.eventType, {\n      ...this.toInterface(),\n      ...options,\n    });\n  }\n\n  /**\n   * The text content of the message.\n   */\n  withText(value: string) {\n    this.text = value;\n    return this;\n  }\n\n  /**\n   * The text to speak.\n   * @deprecated This will be removed by end of summer 2026.\n   */\n  withSpeak(value: string) {\n    this.speak = value;\n    return this;\n  }\n\n  /**\n   * The text to display if the channel cannot render cards.\n   */\n  withSummary(value: string) {\n    this.summary = value;\n    return this;\n  }\n\n  /**\n   * The time at which the activity should be considered to be \"expired\" and should not be\n   * presented to the recipient.\n   * @deprecated This will be removed by end of summer 2026.\n   */\n  withExpiration(value: Date) {\n    this.expiration = value;\n    return this;\n  }\n}\n"]}