{"version":3,"sources":["webpack:///./node_modules/matrix-react-sdk/src/components/views/rooms/wysiwyg_composer/components/EditionButtons.tsx","webpack:///./node_modules/matrix-react-sdk/src/components/views/rooms/wysiwyg_composer/hooks/useInitialContent.ts","webpack:///./node_modules/matrix-react-sdk/src/components/views/rooms/wysiwyg_composer/EditWysiwygComposer.tsx","webpack:///./node_modules/matrix-react-sdk/src/components/views/rooms/wysiwyg_composer/hooks/useWysiwygEditActionHandler.ts","webpack:///./node_modules/matrix-react-sdk/src/components/views/rooms/wysiwyg_composer/hooks/useEditing.ts","webpack:///./node_modules/matrix-react-sdk/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts","webpack:///./node_modules/matrix-react-sdk/src/components/views/rooms/wysiwyg_composer/utils/message.ts","webpack:///./node_modules/matrix-react-sdk/src/components/views/rooms/wysiwyg_composer/utils/isContentModified.ts"],"names":["EditionButtons","_ref","onCancelClick","onSaveClick","isSaveDisabled","React","createElement","className","AccessibleButton","kind","onClick","_t","disabled","useInitialContent","editorStateTransfer","roomContext","useRoomContext","mxClient","useMatrixClientContext","useMemo","room","partCreator","CommandPartCreator","parts","hasEditorState","getSerializedParts","map","p","deserializePart","getEvent","getContent","format","_editorStateTransfer$","formatted_body","replace","getFormattedContent","parseEvent","shouldEscape","SettingsStore","getValue","reduce","content","part","text","parseEditorStateTransfer","Content","forwardRef","composerFunctions","composerElement","composerContext","useComposerContext","timeoutId","useRef","handler","useCallback","payload","_payload$context","current","context","TimelineRenderingType","Room","action","Action","FocusEditMessageComposer","focusComposer","ComposerInsert","timelineRenderingType","composerType","ComposerType","Edit","setSelection","selection","then","insertText","useDispatcher","defaultDispatcher","useWysiwygEditActionHandler","EditWysiwygComposer","_ref2","props","_objectWithoutProperties","_excluded","defaultContextValue","getDefaultContextValue","initialContent","isReady","undefined","editMessage","endEditing","onChange","setIsSaveDisabled","useState","setContent","_content","_isSaveDisabled","useEditing","ComposerContext","Provider","value","WysiwygComposer","_extends","classNames","onSend","ref","Fragment","async","createMessageContent","message","isHTML","relation","replyToEvent","permalinkCreator","includeReplyLegacyFallback","editedEvent","isEditing","Boolean","isReply","replyEventId","isReplyAndEditing","body","richToPlain","bodyPrefix","mxEvent","lines","split","l","trim","length","startsWith","getTextReplyFallback","formattedBodyPrefix","html","mxReply","DOMParser","parseFromString","querySelector","outerHTML","getHtmlReplyFallback","msgtype","MsgType","Text","isMarkdownEnabled","formattedBody","plainToRich","_objectSpread","attachRelation","rel_type","event_id","getId","addReplyToMessageContent","includeLegacyFallback","sendMessage","params","roomId","posthogEvent","eventName","inThread","THREAD_RELATION_TYPE","name","PosthogAnalytics","instance","trackEvent","decorateStartSendingTime","threadId","prom","doMaybeLocalRoomAction","actualRoomId","dis","dispatch","event","CHAT_EFFECTS","forEach","effect","containsEmoji","emojis","command","resp","sendRoundTripMetric","getThread","editContent","newContent","cancelPreviousPendingEdit","createRedactEventDialog","onCloseDialog","response","getRoomId","oldContent","isContentModified","threadRootId"],"mappings":"kPA2BO,SAASA,EAAcC,GAIO,IAJN,cAC3BC,EAAa,YACbC,EAAW,eACXC,GAAiB,GACCH,EAClB,OACII,IAAAC,cAAA,OAAKC,UAAU,kCACXF,IAAAC,cAACE,IAAgB,CAACC,KAAK,YAAYC,QAASR,GACvCS,YAAG,WAERN,IAAAC,cAACE,IAAgB,CAACC,KAAK,UAAUC,QAASP,EAAaS,SAAUR,GAC5DO,YAAG,SAIpB,C,0ICwBO,SAASE,EAAkBC,GAC9B,MAAMC,EAAcC,cACdC,EAAWC,cAEjB,OAAOC,mBAA4B,KAC/B,GAAIL,GAAuBC,EAAYK,KACnC,OArCL,SACHN,EACAM,EACAH,GAEA,MAAMI,EAAc,IAAIC,IAAmBF,EAAMH,GAEjD,IAAIM,EACJ,GAAIT,EAAoBU,iBAGpBD,EAAQT,EAAoBW,qBAAqBC,KAAKC,GAAMN,EAAYO,gBAAgBD,SACrF,CAKH,GAA2D,2BAAvDb,EAAoBe,WAAWC,aAAaC,OAC5C,OA3BZ,SA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