"use strict";(self.webpackChunkelement_web=self.webpackChunkelement_web||[]).push([[9924],{"./node_modules/@vector-im/matrix-wysiwyg/dist/matrix-wysiwyg.js":(e,t,n)=>{n.d(t,{plainToRich:()=>q,richToPlain:()=>$,F:()=>G});var r=n("./node_modules/react/index.js"),_=n("./node_modules/@vector-im/matrix-wysiwyg/node_modules/@vector-im/matrix-wysiwyg-wasm/pkg/wysiwyg_bg.js");_.lI(new Proxy({},{get(){throw new Error("@element-hq/matrix-wysiwyg was used before it was initialized. Call `initAsync` first.")}}));let o=null;async function s(){o||(o=async function(){const e=await n.e(7088).then(n.bind(n,"./node_modules/@vector-im/matrix-wysiwyg/node_modules/@vector-im/matrix-wysiwyg-wasm/pkg/wysiwyg_bg.wasm"));_.lI(e),e.__wbindgen_start()}()),await o}function i(e){return"inputType"in e}function c(e){return"clipboardData"in e}function a(e,t,n,r){return r?r(e,t,n):e}function u(e,t,n,r,o,s,u,l){const d=a(e,{actions:r,content:()=>t.get_content_as_html(),messageContent:()=>t.get_content_as_message_html()},o,u);if(d){if(c(d)){const e=d.clipboardData,r=e?.getData("text/html"),o=e?.getData("text/plain")??"";if(r&&r!==o){const o=e?.types.includes("application/x-vnd.google-docs-document-slice-clip+wrapped")?_.bD.GoogleDoc:_.bD.UnknownExternal;return n(t.replace_html(r,o),"replace_html_paste")}return n(t.replace_text(o),"replace_text_paste")}switch(d.inputType){case"insertAtRoomSuggestion":if(s&&function(e){return i(e)&&"insertAtRoomSuggestion"===e.inputType}(d)){const{attributes:e}=d.data;return e.has("data-mention-type")&&e.delete("data-mention-type"),n(t.insert_at_room_mention_at_suggestion(s,e),"insert_at_room_mention_at_suggestion")}break;case"insertSuggestion":if(s&&function(e){return i(e)&&"insertSuggestion"===e.inputType}(d)){const{text:e,url:r,attributes:_}=d.data;return _.has("data-mention-type")&&_.delete("data-mention-type"),n(t.insert_mention_at_suggestion(r,e,s,_),"insert_mention_at_suggestion")}break;case"insertCommand":case"insertEmoji":if(s&&d.data){const e="insertCommand"===d.inputType;return n(t.replace_text_suggestion(d.data,s,e),"replace_text_suggestion")}break;case"clear":return n(t.clear(),"clear");case"deleteContentBackward":return n(t.backspace(),"backspace");case"deleteWordBackward":return n(t.backspace_word(),"backspace_word");case"deleteSoftLineBackward":{const e=document.getSelection();return e&&(e.modify("extend","backward","lineboundary"),document.dispatchEvent(new CustomEvent("selectionchange"))),n(t.delete(),"backspace_line")}case"deleteContentForward":case"deleteByCut":return n(t.delete(),"delete");case"deleteWordForward":return n(t.delete_word(),"delete_word");case"formatBold":return n(t.bold(),"bold");case"formatItalic":return n(t.italic(),"italic");case"formatStrikeThrough":return n(t.strike_through(),"strike_through");case"formatUnderline":return n(t.underline(),"underline");case"formatInlineCode":return n(t.inline_code(),"inline_code");case"historyRedo":return n(t.redo(),"redo");case"historyUndo":return n(t.undo(),"undo");case"insertCodeBlock":return n(t.code_block(),"code_block");case"insertQuote":return n(t.quote(),"quote");case"insertFromPaste":return;case"insertOrderedList":return n(t.ordered_list(),"ordered_list");case"insertLineBreak":case"insertParagraph":return g(t,s,l),n(t.enter(),"enter");case"insertReplacementText":{const e=o.innerHTML.slice(0,o.innerHTML.length-4);return n(t.set_content_from_html(e),"set_content_from_html",e)}case"insertCompositionText":case"insertFromComposition":case"insertText":if(d.data)return" "==d.data&&g(t,s,l),n(t.replace_text(d.data),"replace_text",d.data);break;case"insertUnorderedList":return n(t.unordered_list(),"unordered_list");case"insertLink":if(function(e){return i(e)&&"insertLink"==e.inputType}(d)){const{text:e,url:r}=d.data;return n(e?t.set_link_with_text(r,e,new Map):t.set_link(r,new Map),"insertLink")}break;case"removeLinks":return n(t.remove_links(),"remove_links");case"formatIndent":return n(t.indent(),"indent");case"formatOutdent":return n(t.unindent(),"unindent");case"sendMessage":return null;default:return console.error(`Unknown input type: ${d.inputType}`),console.error(e),null}}function g(e,t,n){if(n&&t&&3==t.key.key_type&&t.key.custom_key_value){const r=n.get(t.key.custom_key_value);r&&e.replace_text_suggestion(r,t,!1)}}}function l(e,t,n,r){e.innerHTML=t+"
",function(e,t,n){const r=document.createRange();let _=d(e,t),o=d(e,n);if(_.node&&o.node){const e=_.node.compareDocumentPosition(o.node)&Node.DOCUMENT_POSITION_PRECEDING,t=_.node===o.node&&o.offset<_.offset;if((e||t)&&([_,o]=[o,_],!_.node||!o.node))throw new Error;r.setStart(_.node,_.offset),r.setEnd(o.node,o.offset)}else r.selectNodeContents(e),r.collapse();const s=document.getSelection();s&&(s.removeAllRanges(),s.addRange(r))}(e,n,r)}function d(e,t,n){const r="LI"===e.nodeName&&!e.hasChildNodes(),_=e.nodeType===Node.TEXT_NODE;if(_&&e.parentElement?.hasAttribute("data-mention-type")){const n=m(e)?1:0,r=t-n;return r<=1?0===r?e.previousSibling?{node:e.previousSibling,offset:p(e.previousSibling,1/0)}:{node:e.parentNode?.parentNode??null,offset:0}:{node:null,offset:0}:{node:null,offset:t-n-1}}if(_){const n=m(e)?1:0;return x(e)?0===t?{node:e,offset:t}:{node:null,offset:t-n}:t<=(e.textContent?.length||0)?{node:e,offset:t}:{node:null,offset:t-(e.textContent?.length||0)-n}}if(r)return t<=(e.textContent?.length||0)?{node:e,offset:t}:{node:null,offset:t-(e.textContent?.length||0)};if("BR"===e.nodeName)return 0===t?{node:e,offset:0}:{node:null,offset:t-1};if(function(e){return b.includes(e.nodeName)&&0===e.textContent?.length}(e)&&0===t)return{node:e,offset:t};for(const n of e.childNodes){const e=d(n,t);if(e.node)return{node:e.node,offset:e.offset};t=e.offset}return{node:null,offset:t}}function g(e,t){const n=1===e.childNodes.length&&"BR"===e.firstChild?.nodeName;if(!t||n)return[0,0];return[t.anchorNode&&f(e,t.anchorNode,t.anchorOffset)||0,t.focusNode&&f(e,t.focusNode,t.focusOffset)||0]}function p(e,t){if(e.nodeType===Node.TEXT_NODE){const t=m(e)?1:0;return(e.textContent?.length??0)+t}if("BR"===e.nodeName)return 0===t?0:1;{let n=0,r=0;for(const _ of e.childNodes){if(r===t)break;n+=p(_,-1),r++}return n}}function w(e,t,n){const r=e.nodeType===Node.TEXT_NODE,_=e.parentElement?.hasAttribute("data-mention-type");if(e===t)return r?n>(e.textContent?.length??0)?{found:!1,offset:0}:_?{found:!0,offset:0===n?0:1}:{found:!0,offset:n}:{found:!0,offset:p(e,n)};if(r){const t=m(e)?1:0;return x(e)?{found:!1,offset:t}:_?{found:!1,offset:1+t}:{found:!1,offset:(e.textContent?.length??0)+t}}if("BR"===e.nodeName)return{found:!1,offset:1};{let r=0;for(const _ of e.childNodes){const e=w(_,t,n);if(e.found)return{found:!0,offset:r+e.offset};r+=e.offset}return{found:!1,offset:r}}}function f(e,t,n){if(t===e&&n===e.childNodes.length-1)return p(e,-1)-1;const r=new Range;r.setStart(e,0),r.setEnd(e,e.childNodes.length);const _=r.comparePoint(t,0);if(-1===_)return 0;if(1===_)return p(e,-1)-1;const o=w(e,t,n);return o.found?o.offset:-1}function m(e){if(null===e)return!1;let t=e;const n=y(t.parentNode);for(;t;){const e=t.nextSibling;if(e&&y(e)||n&&e&&!k(e)||e&&"BR"===e.nodeName)break;if(k(t))return!0;t=t.parentNode}return!1}const b=["EM","U","STRONG","DEL","CODE","A"],h=["OL","UL","LI","PRE","BLOCKQUOTE","P"];function y(e){return null!==e&&b.includes(e.nodeName||"")}function k(e){return h.includes(e.nodeName||"")}function x(e){const t=1===e.parentNode?.childNodes.length,n="P"===e.parentNode?.nodeName,r=" "===e.textContent;return n&&t&&r}const v=["bold","italic","strikeThrough","underline","undo","redo","orderedList","unorderedList","inlineCode","clear","link","codeBlock","quote","indent","unindent"],E=["@","#","/","",":"];function R(e){const t={};for(const[n,r]of e)t[n.substring(0,1).toLowerCase()+n.substring(1)]=r.toLowerCase();return t}function C(e,t,n,r){n?.preventDefault(),n?.stopPropagation(),e.dispatchEvent(new CustomEvent("wysiwygInput",{detail:{blockType:t,data:r}}))}function T(e,t,n,r,_){if(e.shiftKey&&e.altKey&&"5"===e.key)return"formatStrikeThrough";const o=function(){const e=navigator.userAgent.toLowerCase();return e.includes("iphone")||e.includes("ipad")?"iOS":e.includes("android")?"Android":e.includes("win")?"Windows":e.includes("mac")?"macOS":e.includes("linux")?"Linux":null}();if(("Windows"===o||"Linux"===o)&&e.ctrlKey&&"Backspace"===e.key)return"deleteWordBackward";if(e.ctrlKey||e.metaKey)switch(e.key){case"b":return"formatBold";case"i":return"formatItalic";case"u":return"formatUnderline";case"e":return"formatInlineCode";case"y":case"Z":return"historyRedo";case"z":return"historyUndo";case"Enter":return"sendMessage";case"Backspace":return"deleteSoftLineBackward"}return a(e,{actions:n,content:()=>t.get_content_as_html(),messageContent:()=>t.get_content_as_message_html()},r,_),null}function L(e){return R(e.action_states)}function N(e,t,n,r,_,o,s,i,c){const a=u(e,n,_.traceAction,o,t,s,i,c);if(a){const e=a.text_update().replace_all;e&&(l(t,e.replacement_html,e.start_utf16_codeunit,e.end_utf16_codeunit),_.setEditorHtml(e.replacement_html)),t.focus(),r&&function(e,t){e.innerHTML="";const n=t.document();let r=0;function _(e,t,n,r){const _=document.createElement(t);if(n&&(_.innerText=n.replace("​","~")),r)for(const[e,t]of r.entries()){const n=document.createAttribute(e);null!==t&&(n.value=t),_.setAttributeNode(n)}return e.appendChild(_),_}!function e(n,o){const s=_(o,"ul");s.className="group_"+r%10;const i=n.children(t);let c;for(;c=i.next_child();){const n=c.node_type(t);if("container"===n){const n=`dom_${r}`;r++;const o=_(s,"li");_(o,"input",null,new Map([["type","checkbox"],["id",n],["checked",null]])),_(o,"label",c.tag(t),new Map([["for",n]])),e(c,o)}else if("line_break"===n)_(s,"li","br");else if("text"===n){const e=_(s,"li");_(e,"span",'"',new Map([["class","quote"]])),_(e,"span",`${c.text(t)}`),_(e,"span",'"',new Map([["class","quote"]]))}else if("mention"===n){const e=_(s,"li");_(e,"span",'"Mention - ',new Map([["class","quote"]])),_(e,"span",`${c.text(t)}`),_(e,"span",'"',new Map([["class","quote"]]))}else console.error(`Unknown node type: ${n}`)}}(n,e)}(r,n);const o=a.menu_state().update(),s=a.menu_action().suggestion()?.suggestion_pattern,i=o?L(o):null,c=s||null;return{content:e?.replacement_html,actionStates:i,suggestion:c}}}function S(e,t,n,_,o,s,a,u){const[l,d]=(0,r.useState)({content:null,actionStates:v.reduce((e,t)=>(e[t]="enabled",e),{}),suggestion:null}),p=(0,r.useRef)(void 0),[w,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{n&&(d({content:n.get_content_as_html(),actionStates:R(n.action_states()),suggestion:null}),p.current=n.get_content_as_plain_text())},[n]),(0,r.useEffect)(()=>{const r=e.current;if(!n||!r)return;const w=e=>{try{const s=N(e,r,n,t.current,_,o,l.suggestion,a,u);s&&(d(e=>({content:void 0!==s.content?s.content:e.content,actionStates:s.actionStates||e.actionStates,suggestion:s.suggestion})),p.current=n.get_content_as_plain_text())}catch{s(p.current)}},m=e=>{i(e)&&!e.isComposing&&w(e)};r.addEventListener("input",m);const b=e=>{const t=i(e)&&"insertFromPaste"===e.inputType&&null!==e.dataTransfer;(c(e)||t)&&(e.preventDefault(),e.stopPropagation(),w(e))};r.addEventListener("paste",b);const h=e=>{w({inputType:e.detail.blockType,data:e.detail.data})};r.addEventListener("wysiwygInput",h);const y=e=>{!function(e,t,n,r,_){const o=T(e,n,r,t,_);o&&C(t,o,e)}(e,r,n,o,a)};r.addEventListener("keydown",y);const k=()=>{try{const e=function(e,t,{traceAction:n,getSelectionAccordingToActions:r}){const[_,o]=g(e,document.getSelection()),s=t.selection_start(),i=t.selection_end(),[c,a]=r();if(_===s&&_===c&&o===i&&o===a||_===i&&_===a&&o===s&&o===c)return;const u=t.select(_,o);n(null,"select",_,o);const l=u.menu_state().update();return l?L(l):void 0}(r,n,_);e&&d(({content:t,suggestion:n})=>({content:t,actionStates:e,suggestion:n})),p.current=n.get_content_as_plain_text()}catch{s(p.current)}};document.addEventListener("selectionchange",k);const x=e=>{if(!i(e)||!e.isComposing)return b(e)};r.addEventListener("beforeinput",x);const v=e=>{const t=new InputEvent("input",{data:e.data,inputType:"insertCompositionText"});m(t)};return r.addEventListener("compositionend",v),f(!0),()=>{f(!1),r.removeEventListener("input",m),r.removeEventListener("paste",b),r.removeEventListener("wysiwygInput",h),r.removeEventListener("keydown",y),r.removeEventListener("beforeinput",x),r.removeEventListener("compositionend",v),document.removeEventListener("selectionchange",k)}},[e,u,n,o,t,_,a,s,p,l.suggestion]),{areListenersReady:w,...l}}let I=!1,F=!1;async function O(){return F?Promise.resolve():I?new Promise(e=>{!function t(){F&&e(),setTimeout(t,200)}()}):(I=!0,await s(),void(F=!0))}function z(e){return"select"===e[0]}function j(e,t,n,r){n&&n.text_update(),e.innerText=function(e,t){let n="";function r(e,t,r){n+="select"===e?`model.select(Location::from(${t}), Location::from(${r}));\n`:void 0!==r?`model.${e}(${t??""}, ${r});\n`:"replace_text"===e?`model.${e}("${t??""}");\n`:"send"===e?`// Send: ${t??""}\n`:`model.${e}(${t??""});\n`}function o(){const e=function(e,t,n){const r=(0,_.PB)(e,-1,-1);return r.select(t,n),r.to_example_format()}(c,a[0],a[1]);n+=`let mut model = cm("${e}");\n`}let s=null,i=!0,c="",a=[0,0];for(const t of e){const[e,_,u]=t;if(i)"replace_text"===e?c+=A(_):z(t)?a=[t[1],t[2]]:(i=!1,o(),r(e,_,u));else if("select"===s&&"select"===e){const t=n.lastIndexOf("\n",n.length-2);t>-1&&(n=n.substring(0,t)+"\n",r(e,_,u))}else r(e,_,u);s=e}return i&&o(),n+=`assert_eq!(tx(&model), "${t}");\n`,n}(r,t.to_example_format()),e.scrollTo(0,e.scrollHeight-e.clientHeight)}function A(e){if(!e)return"";const t=document.createElement("p");return t.appendChild(document.createTextNode(e.toString())),t.innerHTML}function M(e,t){const n=(0,r.useRef)(null),[_,o]=(0,r.useState)([]),[s,i]=(0,r.useState)(""),c=(0,r.useCallback)(e=>{n.current&&i(e)},[n]),a=(0,r.useMemo)(()=>function(e,t,n){return(r,_,o,s)=>(!e||!n||(console.debug(void 0!==s?`composer_model.${_}(${o}, ${s})`:void 0!==o?`composer_model.${_}(${o})`:`composer_model.${_}()`),t.push([_,o,s]),j(e,n,r,t)),r)}(n.current,_,t),[n,_,t]),u=(0,r.useMemo)(()=>function(e){return()=>{for(let t=e.length-1;t>=0;t--){const n=e[t];if(z(n))return[n[1],n[2]]}return[-1,-1]}}(_),[_]),l=(0,r.useCallback)(()=>e.current&&n.current&&t&&o(function(e,t,n,r){const[_,o]=g(e,document.getSelection()),s=[["replace_text",r],["select",_,o]];return j(t,n,null,s),s}(e.current,n.current,t,s)),[e,n,t,s]),d=(0,r.useMemo)(()=>({traceAction:a,getSelectionAccordingToActions:u,onResetTestCase:l,setEditorHtml:c}),[a,u,l,c]);return{testRef:n,utilities:d}}function B(e){return E[e.key.key_type]||""}function D(e){switch(e.key.key_type){case 0:case 1:return"mention";case 2:return"command";case 3:return"custom";case 4:return"emoji";default:return"unknown"}}const P="\n",U=e=>{let t=e;return t.endsWith(P)&&(t=t.slice(0,-1)),t.replaceAll(/\\/g,"")};async function $(e,t){if(0===e.length)return"";await O();const n=(0,_.IU)();n.set_content_from_html(e);const r=t?n.get_content_as_message_markdown():n.get_content_as_markdown();return U(r)}async function q(e,t){if(0===e.length)return"";await O();const n=function(e){const{body:t}=(new DOMParser).parseFromString(e,"text/html"),n=document.createNodeIterator(t,void 0,Q);let r=n.nextNode(),_="";for(;null!==r;){const e="#text"===r.nodeName,t="A"===r.nodeName,o="DIV"===r.nodeName&&1===r.childNodes.length&&"BR"===r.firstChild?.nodeName,s=!H.includes(r.nodeName);if(o)_+=P;else if(e){let e=r.textContent;W(r)&&(e+=P),_+=e}else if(t){let e=r.firstChild?.parentElement?.outerHTML??"";W(r)&&(e+=P),_+=e}else s&&console.debug(`Converting unexpected node type ${r.nodeName}`);r=n.nextNode()}return _.endsWith(P.repeat(2))&&(_=_.slice(0,-1)),_}(e),r=(0,_.IU)();return r.set_content_from_markdown(n),t?r.get_content_as_message_html():r.get_content_as_html()}const H=["#text","BR","A","DIV","BODY"];function W(e){return"DIV"===(e.nextSibling||e.parentElement?.nextSibling)?.nodeName}function Q(e){return"#text"===e.nodeName&&e.parentElement?.hasAttribute("data-mention-type")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}function V(e){const t=e?.keys();return t?Array.from(t):[]}function G(e){const t=function(){const e=(0,r.useRef)(null);return(0,r.useEffect)(()=>{e.current?.childElementCount||e.current?.appendChild(document.createElement("br"))},[e]),e}(),n=(0,r.useRef)(null),[o,s]=(0,r.useState)(V(e?.emojiSuggestions));(0,r.useEffect)(()=>{s(V(e?.emojiSuggestions))},[e?.emojiSuggestions]);const{composerModel:i,onError:c}=function(e,t,n){const[o,s]=(0,r.useState)(null),i=(0,r.useCallback)(async t=>{let n;if(await O(),t)try{const r=(0,_.PB)(t,0,t.length);if(n=r,e.current){const t=r.get_content_as_html();l(e.current,t,0,t.length)}}catch{n=(0,_.IU)()}else n=(0,_.IU)();s(n)},[s,e]);return(0,r.useEffect)(()=>{o&&n&&o.set_custom_suggestion_patterns(n)},[o,n]),(0,r.useEffect)(()=>{e.current&&i(t)},[e,i,t]),{composerModel:o,onError:i}}(t,e?.initialContent,o),{testRef:a,utilities:u}=M(t,i),d=function(e,t){return(0,r.useMemo)(()=>{const n=(t,n)=>{e.current&&C(e.current,t,void 0,n)};return{bold:()=>n("formatBold"),italic:()=>n("formatItalic"),strikeThrough:()=>n("formatStrikeThrough"),underline:()=>n("formatUnderline"),undo:()=>n("historyUndo"),redo:()=>n("historyRedo"),orderedList:()=>n("insertOrderedList"),unorderedList:()=>n("insertUnorderedList"),inlineCode:()=>n("formatInlineCode"),clear:()=>n("clear"),insertText:e=>n("insertText",e),link:(e,t)=>n("insertLink",{url:e,text:t}),removeLinks:()=>n("removeLinks"),getLink:()=>t?.get_link_action()?.edit_link?.url||"",codeBlock:()=>n("insertCodeBlock"),quote:()=>n("insertQuote"),indent:()=>n("formatIndent"),unindent:()=>n("formatOutdent"),mention:(e,t,r)=>n("insertSuggestion",{url:e,text:t,attributes:r}),command:e=>n("insertCommand",e),emoji:e=>n("insertEmoji",e),mentionAtRoom:e=>n("insertAtRoomSuggestion",{attributes:e})}},[e,t])}(t,i),{content:g,actionStates:p,areListenersReady:w,suggestion:f}=S(t,n,i,u,d,c,e?.inputEventProcessor,e?.emojiSuggestions);!function(e,t=!1){(0,r.useEffect)(()=>{if(t){const t=setTimeout(()=>e.current?.focus(),200);return()=>clearTimeout(t)}},[e,t])}(t,e?.isAutoFocusEnabled);const m=(0,r.useMemo)(()=>function(e){return null===e?e:{text:e.text,keyChar:B(e),type:D(e)}}(f),[f]);return{ref:t,isWysiwygReady:w,wysiwyg:d,content:g,actionStates:p,debug:{modelRef:n,testRef:a,resetTestCase:u.onResetTestCase,traceAction:u.traceAction},suggestion:m,messageContent:i?.get_content_as_message_html()??null}}},"./node_modules/@vector-im/matrix-wysiwyg/node_modules/@vector-im/matrix-wysiwyg-wasm/pkg/wysiwyg_bg.js":(e,t,n)=>{let r;function _(e){r=e}function o(e){return null==e}function s(e){const t=r.__externref_table_alloc();return r.__wbindgen_export_1.set(t,e),t}n.d(t,{$P:()=>ye,$h:()=>ke,F9:()=>be,IU:()=>b,P1:()=>Ee,P9:()=>me,PB:()=>h,QR:()=>Ne,Qn:()=>Fe,WY:()=>ue,aI:()=>he,bD:()=>x,bL:()=>Le,cV:()=>we,dQ:()=>ae,hr:()=>ve,iA:()=>Re,jG:()=>xe,jn:()=>pe,k4:()=>le,lI:()=>_,qN:()=>Se,rn:()=>ce,rz:()=>Te,tm:()=>de,u1:()=>fe,wW:()=>ge,x$:()=>Ce,yc:()=>Ie});let i=new("undefined"==typeof TextDecoder?(0,module.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});i.decode();let c=null;function a(){return null!==c&&0!==c.byteLength||(c=new Uint8Array(r.memory.buffer)),c}function u(e,t){return e>>>=0,i.decode(a().subarray(e,e+t))}let l=0;let d=new("undefined"==typeof TextEncoder?(0,module.require)("util").TextEncoder:TextEncoder)("utf-8");const g="function"==typeof d.encodeInto?function(e,t){return d.encodeInto(e,t)}:function(e,t){const n=d.encode(e);return t.set(n),{read:e.length,written:n.length}};function p(e,t,n){if(void 0===n){const n=d.encode(e),r=t(n.length,1)>>>0;return a().subarray(r,r+n.length).set(n),l=n.length,r}let r=e.length,_=t(r,1)>>>0;const o=a();let s=0;for(;s127)break;o[_+s]=t}if(s!==r){0!==s&&(e=e.slice(s)),_=n(_,r,r=s+3*e.length,1)>>>0;const t=a().subarray(_+s,_+r);s+=g(e,t).written,_=n(_,r,s,1)>>>0}return l=s,_}let w=null;function f(){return(null===w||!0===w.buffer.detached||void 0===w.buffer.detached&&w.buffer!==r.memory.buffer)&&(w=new DataView(r.memory.buffer)),w}function m(e,t){try{return e.apply(this,t)}catch(e){const t=s(e);r.__wbindgen_exn_store(t)}}function b(){const e=r.composermodel_new();return R.__wrap(e)}function h(e,t,n){const _=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=l,s=r.new_composer_model_from_html(_,o,t,n);return R.__wrap(s)}function y(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function k(e){const t=r.__wbindgen_export_1.get(e);return r.__externref_table_dealloc(e),t}Object.freeze({Enabled:0,0:"Enabled",Reversed:1,1:"Reversed",Disabled:2,2:"Disabled"}),Object.freeze({Bold:0,0:"Bold",Italic:1,1:"Italic",StrikeThrough:2,2:"StrikeThrough",Underline:3,3:"Underline",InlineCode:4,4:"InlineCode",Link:5,5:"Link",Undo:6,6:"Undo",Redo:7,7:"Redo",OrderedList:8,8:"OrderedList",UnorderedList:9,9:"UnorderedList",Indent:10,10:"Indent",Unindent:11,11:"Unindent",CodeBlock:12,12:"CodeBlock",Quote:13,13:"Quote"}),Object.freeze({HtmlParseError:0,0:"HtmlParseError",MarkdownParseError:1,1:"MarkdownParseError"});const x=Object.freeze({Matrix:0,0:"Matrix",GoogleDoc:1,1:"GoogleDoc",UnknownExternal:2,2:"UnknownExternal"}),v=(Object.freeze({At:0,0:"At",Hash:1,1:"Hash",Slash:2,2:"Slash",Custom:3,3:"Custom",Colon:4,4:"Colon"}),["text/html","text/xml","application/xml","application/xhtml+xml","image/svg+xml"]),E="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_composermodel_free(e>>>0,1));class R{static __wrap(e){e>>>=0;const t=Object.create(R.prototype);return t.__wbg_ptr=e,E.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,E.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_composermodel_free(e,0)}static new(){const e=r.composermodel_new();return R.__wrap(e)}static from_example_format(e){const t=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=l,_=r.composermodel_from_example_format(t,n);return R.__wrap(_)}to_example_format(){let e,t;try{const n=r.composermodel_to_example_format(this.__wbg_ptr);return e=n[0],t=n[1],u(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}get_content_as_html(){let e,t;try{const n=r.composermodel_get_content_as_html(this.__wbg_ptr);return e=n[0],t=n[1],u(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}get_content_as_message_html(){let e,t;try{const n=r.composermodel_get_content_as_message_html(this.__wbg_ptr);return e=n[0],t=n[1],u(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}get_content_as_markdown(){let e,t;try{const n=r.composermodel_get_content_as_markdown(this.__wbg_ptr);return e=n[0],t=n[1],u(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}get_content_as_message_markdown(){let e,t;try{const n=r.composermodel_get_content_as_message_markdown(this.__wbg_ptr);return e=n[0],t=n[1],u(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}get_content_as_plain_text(){let e,t;try{const n=r.composermodel_get_content_as_plain_text(this.__wbg_ptr);return e=n[0],t=n[1],u(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}document(){const e=r.composermodel_document(this.__wbg_ptr);return M.__wrap(e)}action_states(){return r.composermodel_action_states(this.__wbg_ptr)}select(e,t){const n=r.composermodel_select(this.__wbg_ptr,e,t);return T.__wrap(n)}selection_start(){return r.composermodel_selection_start(this.__wbg_ptr)>>>0}selection_end(){return r.composermodel_selection_end(this.__wbg_ptr)>>>0}replace_text(e){const t=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=l,_=r.composermodel_replace_text(this.__wbg_ptr,t,n);return T.__wrap(_)}replace_html(e,t){const n=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),_=l,o=r.composermodel_replace_html(this.__wbg_ptr,n,_,t);return T.__wrap(o)}replace_text_suggestion(e,t,n){const _=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=l;y(t,oe);const s=r.composermodel_replace_text_suggestion(this.__wbg_ptr,_,o,t.__wbg_ptr,n);return T.__wrap(s)}set_content_from_html(e){const t=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=l,_=r.composermodel_set_content_from_html(this.__wbg_ptr,t,n);if(_[2])throw k(_[1]);return T.__wrap(_[0])}set_content_from_markdown(e){const t=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=l,_=r.composermodel_set_content_from_markdown(this.__wbg_ptr,t,n);if(_[2])throw k(_[1]);return T.__wrap(_[0])}clear(){const e=r.composermodel_clear(this.__wbg_ptr);return T.__wrap(e)}enter(){const e=r.composermodel_enter(this.__wbg_ptr);return T.__wrap(e)}backspace(){const e=r.composermodel_backspace(this.__wbg_ptr);return T.__wrap(e)}backspace_word(){const e=r.composermodel_backspace_word(this.__wbg_ptr);return T.__wrap(e)}delete(){const e=r.composermodel_delete(this.__wbg_ptr);return T.__wrap(e)}delete_word(){const e=r.composermodel_delete_word(this.__wbg_ptr);return T.__wrap(e)}bold(){const e=r.composermodel_bold(this.__wbg_ptr);return T.__wrap(e)}italic(){const e=r.composermodel_italic(this.__wbg_ptr);return T.__wrap(e)}strike_through(){const e=r.composermodel_strike_through(this.__wbg_ptr);return T.__wrap(e)}underline(){const e=r.composermodel_underline(this.__wbg_ptr);return T.__wrap(e)}quote(){const e=r.composermodel_quote(this.__wbg_ptr);return T.__wrap(e)}inline_code(){const e=r.composermodel_inline_code(this.__wbg_ptr);return T.__wrap(e)}code_block(){const e=r.composermodel_code_block(this.__wbg_ptr);return T.__wrap(e)}undo(){const e=r.composermodel_undo(this.__wbg_ptr);return T.__wrap(e)}redo(){const e=r.composermodel_redo(this.__wbg_ptr);return T.__wrap(e)}ordered_list(){const e=r.composermodel_ordered_list(this.__wbg_ptr);return T.__wrap(e)}unordered_list(){const e=r.composermodel_unordered_list(this.__wbg_ptr);return T.__wrap(e)}indent(){const e=r.composermodel_indent(this.__wbg_ptr);return T.__wrap(e)}unindent(){const e=r.composermodel_unindent(this.__wbg_ptr);return T.__wrap(e)}get_link_action(){const e=r.composermodel_get_link_action(this.__wbg_ptr);return q.__wrap(e)}set_link(e,t){const n=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),_=l,o=r.composermodel_set_link(this.__wbg_ptr,n,_,t);return T.__wrap(o)}set_link_with_text(e,t,n){const _=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=l,s=p(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=l,c=r.composermodel_set_link_with_text(this.__wbg_ptr,_,o,s,i,n);return T.__wrap(c)}set_custom_suggestion_patterns(e){r.composermodel_set_custom_suggestion_patterns(this.__wbg_ptr,e)}insert_at_room_mention(e){const t=r.composermodel_insert_at_room_mention(this.__wbg_ptr,e);return T.__wrap(t)}insert_mention(e,t,n){const _=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=l,s=p(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=l,c=r.composermodel_insert_mention(this.__wbg_ptr,_,o,s,i,n);return T.__wrap(c)}insert_at_room_mention_at_suggestion(e,t){y(e,oe);const n=r.composermodel_insert_at_room_mention_at_suggestion(this.__wbg_ptr,e.__wbg_ptr,t);return T.__wrap(n)}insert_mention_at_suggestion(e,t,n,_){const o=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=l,i=p(t,r.__wbindgen_malloc,r.__wbindgen_realloc),c=l;y(n,oe);const a=r.composermodel_insert_mention_at_suggestion(this.__wbg_ptr,o,s,i,c,n.__wbg_ptr,_);return T.__wrap(a)}remove_links(){const e=r.composermodel_remove_links(this.__wbg_ptr);return T.__wrap(e)}}const C="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_composerupdate_free(e>>>0,1));class T{static __wrap(e){e>>>=0;const t=Object.create(T.prototype);return t.__wbg_ptr=e,C.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,C.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_composerupdate_free(e,0)}text_update(){const e=r.composerupdate_text_update(this.__wbg_ptr);return ie.__wrap(e)}menu_state(){const e=r.composerupdate_menu_state(this.__wbg_ptr);return K.__wrap(e)}menu_action(){const e=r.composerupdate_menu_action(this.__wbg_ptr);return W.__wrap(e)}}const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_create_free(e>>>0,1));class N{static __wrap(e){e>>>=0;const t=Object.create(N.prototype);return t.__wbg_ptr=e,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_create_free(e,0)}}const S="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_createwithtext_free(e>>>0,1));class I{static __wrap(e){e>>>=0;const t=Object.create(I.prototype);return t.__wbg_ptr=e,S.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,S.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_createwithtext_free(e,0)}}const F="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_disabled_free(e>>>0,1));class O{static __wrap(e){e>>>=0;const t=Object.create(O.prototype);return t.__wbg_ptr=e,F.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_disabled_free(e,0)}}const z="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_domchildren_free(e>>>0,1));class j{static __wrap(e){e>>>=0;const t=Object.create(j.prototype);return t.__wbg_ptr=e,z.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,z.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_domchildren_free(e,0)}next_child(){const e=r.domchildren_next_child(this.__wbg_ptr);return 0===e?void 0:M.__wrap(e)}}const A="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_domhandle_free(e>>>0,1));class M{static __wrap(e){e>>>=0;const t=Object.create(M.prototype);return t.__wbg_ptr=e,A.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_domhandle_free(e,0)}node_type(e){let t,n;try{y(e,R);const _=r.domhandle_node_type(this.__wbg_ptr,e.__wbg_ptr);return t=_[0],n=_[1],u(_[0],_[1])}finally{r.__wbindgen_free(t,n,1)}}children(e){y(e,R);const t=r.domhandle_children(this.__wbg_ptr,e.__wbg_ptr);return j.__wrap(t)}text(e){let t,n;try{y(e,R);const _=r.domhandle_text(this.__wbg_ptr,e.__wbg_ptr);return t=_[0],n=_[1],u(_[0],_[1])}finally{r.__wbindgen_free(t,n,1)}}tag(e){let t,n;try{y(e,R);const _=r.domhandle_tag(this.__wbg_ptr,e.__wbg_ptr);return t=_[0],n=_[1],u(_[0],_[1])}finally{r.__wbindgen_free(t,n,1)}}}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_edit_free(e>>>0,1));class D{static __wrap(e){e>>>=0;const t=Object.create(D.prototype);return t.__wbg_ptr=e,B.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_edit_free(e,0)}get url(){let e,t;try{const n=r.__wbg_get_edit_url(this.__wbg_ptr);return e=n[0],t=n[1],u(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}set url(e){const t=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=l;r.__wbg_set_edit_url(this.__wbg_ptr,t,n)}}const P="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_keep_free(e>>>0,1));class U{static __wrap(e){e>>>=0;const t=Object.create(U.prototype);return t.__wbg_ptr=e,P.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_keep_free(e,0)}}const $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_linkaction_free(e>>>0,1));class q{static __wrap(e){e>>>=0;const t=Object.create(q.prototype);return t.__wbg_ptr=e,$.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,$.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_linkaction_free(e,0)}get create_with_text(){const e=r.__wbg_get_linkaction_create_with_text(this.__wbg_ptr);return 0===e?void 0:I.__wrap(e)}set create_with_text(e){let t=0;o(e)||(y(e,I),t=e.__destroy_into_raw()),r.__wbg_set_linkaction_create_with_text(this.__wbg_ptr,t)}get create(){const e=r.__wbg_get_linkaction_create(this.__wbg_ptr);return 0===e?void 0:N.__wrap(e)}set create(e){let t=0;o(e)||(y(e,N),t=e.__destroy_into_raw()),r.__wbg_set_linkaction_create(this.__wbg_ptr,t)}get edit_link(){const e=r.__wbg_get_linkaction_edit_link(this.__wbg_ptr);return 0===e?void 0:D.__wrap(e)}set edit_link(e){let t=0;o(e)||(y(e,D),t=e.__destroy_into_raw()),r.__wbg_set_linkaction_edit_link(this.__wbg_ptr,t)}get disabled(){const e=r.__wbg_get_linkaction_disabled(this.__wbg_ptr);return 0===e?void 0:O.__wrap(e)}set disabled(e){let t=0;o(e)||(y(e,O),t=e.__destroy_into_raw()),r.__wbg_set_linkaction_disabled(this.__wbg_ptr,t)}}const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_menuaction_free(e>>>0,1));class W{static __wrap(e){e>>>=0;const t=Object.create(W.prototype);return t.__wbg_ptr=e,H.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_menuaction_free(e,0)}keep(){return 0!==r.menuaction_keep(this.__wbg_ptr)}none(){return 0!==r.menuaction_none(this.__wbg_ptr)}suggestion(){const e=r.menuaction_suggestion(this.__wbg_ptr);return 0===e?void 0:V.__wrap(e)}}const Q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_menuactionsuggestion_free(e>>>0,1));class V{static __wrap(e){e>>>=0;const t=Object.create(V.prototype);return t.__wbg_ptr=e,Q.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_menuactionsuggestion_free(e,0)}get suggestion_pattern(){const e=r.__wbg_get_menuactionsuggestion_suggestion_pattern(this.__wbg_ptr);return oe.__wrap(e)}set suggestion_pattern(e){y(e,oe);var t=e.__destroy_into_raw();r.__wbg_set_menuactionsuggestion_suggestion_pattern(this.__wbg_ptr,t)}}const G="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_menustate_free(e>>>0,1));class K{static __wrap(e){e>>>=0;const t=Object.create(K.prototype);return t.__wbg_ptr=e,G.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,G.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_menustate_free(e,0)}keep(){return 0!==r.menustate_keep(this.__wbg_ptr)}update(){const e=r.menustate_update(this.__wbg_ptr);return 0===e?void 0:Y.__wrap(e)}}const X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_menustateupdate_free(e>>>0,1));class Y{static __wrap(e){e>>>=0;const t=Object.create(Y.prototype);return t.__wbg_ptr=e,X.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_menustateupdate_free(e,0)}get action_states(){return r.__wbg_get_menustateupdate_action_states(this.__wbg_ptr)}set action_states(e){r.__wbg_set_menustateupdate_action_states(this.__wbg_ptr,e)}}const J="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_patternkey_free(e>>>0,1));class Z{static __wrap(e){e>>>=0;const t=Object.create(Z.prototype);return t.__wbg_ptr=e,J.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,J.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_patternkey_free(e,0)}get key_type(){return r.__wbg_get_patternkey_key_type(this.__wbg_ptr)}set key_type(e){r.__wbg_set_patternkey_key_type(this.__wbg_ptr,e)}get custom_key_value(){const e=r.__wbg_get_patternkey_custom_key_value(this.__wbg_ptr);let t;return 0!==e[0]&&(t=u(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set custom_key_value(e){var t=o(e)?0:p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=l;r.__wbg_set_patternkey_custom_key_value(this.__wbg_ptr,t,n)}}const ee="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_replaceall_free(e>>>0,1));class te{static __wrap(e){e>>>=0;const t=Object.create(te.prototype);return t.__wbg_ptr=e,ee.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ee.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_replaceall_free(e,0)}get replacement_html(){let e,t;try{const n=r.__wbg_get_replaceall_replacement_html(this.__wbg_ptr);return e=n[0],t=n[1],u(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}set replacement_html(e){const t=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=l;r.__wbg_set_edit_url(this.__wbg_ptr,t,n)}get start_utf16_codeunit(){return r.__wbg_get_replaceall_start_utf16_codeunit(this.__wbg_ptr)>>>0}set start_utf16_codeunit(e){r.__wbg_set_replaceall_start_utf16_codeunit(this.__wbg_ptr,e)}get end_utf16_codeunit(){return r.__wbg_get_replaceall_end_utf16_codeunit(this.__wbg_ptr)>>>0}set end_utf16_codeunit(e){r.__wbg_set_replaceall_end_utf16_codeunit(this.__wbg_ptr,e)}}const ne="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_selection_free(e>>>0,1));class re{static __wrap(e){e>>>=0;const t=Object.create(re.prototype);return t.__wbg_ptr=e,ne.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_selection_free(e,0)}get start_utf16_codeunit(){return r.__wbg_get_selection_start_utf16_codeunit(this.__wbg_ptr)>>>0}set start_utf16_codeunit(e){r.__wbg_set_selection_start_utf16_codeunit(this.__wbg_ptr,e)}get end_utf16_codeunit(){return r.__wbg_get_selection_end_utf16_codeunit(this.__wbg_ptr)>>>0}set end_utf16_codeunit(e){r.__wbg_set_selection_end_utf16_codeunit(this.__wbg_ptr,e)}}const _e="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_suggestionpattern_free(e>>>0,1));class oe{static __wrap(e){e>>>=0;const t=Object.create(oe.prototype);return t.__wbg_ptr=e,_e.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,_e.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_suggestionpattern_free(e,0)}get key(){const e=r.__wbg_get_suggestionpattern_key(this.__wbg_ptr);return Z.__wrap(e)}set key(e){y(e,Z);var t=e.__destroy_into_raw();r.__wbg_set_suggestionpattern_key(this.__wbg_ptr,t)}get text(){let e,t;try{const n=r.__wbg_get_suggestionpattern_text(this.__wbg_ptr);return e=n[0],t=n[1],u(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}set text(e){const t=p(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=l;r.__wbg_set_edit_url(this.__wbg_ptr,t,n)}get start(){return r.__wbg_get_suggestionpattern_start(this.__wbg_ptr)>>>0}set start(e){r.__wbg_set_suggestionpattern_start(this.__wbg_ptr,e)}get end(){return r.__wbg_get_suggestionpattern_end(this.__wbg_ptr)>>>0}set end(e){r.__wbg_set_suggestionpattern_end(this.__wbg_ptr,e)}}const se="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_textupdate_free(e>>>0,1));class ie{static __wrap(e){e>>>=0;const t=Object.create(ie.prototype);return t.__wbg_ptr=e,se.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,se.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_textupdate_free(e,0)}get keep(){const e=r.__wbg_get_textupdate_keep(this.__wbg_ptr);return 0===e?void 0:U.__wrap(e)}set keep(e){let t=0;o(e)||(y(e,U),t=e.__destroy_into_raw()),r.__wbg_set_textupdate_keep(this.__wbg_ptr,t)}get replace_all(){const e=r.__wbg_get_textupdate_replace_all(this.__wbg_ptr);return 0===e?void 0:te.__wrap(e)}set replace_all(e){let t=0;o(e)||(y(e,te),t=e.__destroy_into_raw()),r.__wbg_set_textupdate_replace_all(this.__wbg_ptr,t)}get select(){const e=r.__wbg_get_textupdate_select(this.__wbg_ptr);return 0===e?void 0:re.__wrap(e)}set select(e){let t=0;o(e)||(y(e,re),t=e.__destroy_into_raw()),r.__wbg_set_textupdate_select(this.__wbg_ptr,t)}}function ce(e){const t=e.body;return o(t)?0:s(t)}function ae(e){return e.childNodes}function ue(e,t){let n,_;try{n=e,_=t,console.error(u(e,t))}finally{r.__wbindgen_free(n,_,1)}}function le(e,t,n){try{var _={a:t,b:n};e.forEach((e,t,n)=>{const o=_.a;_.a=0;try{return function(e,t,n,_,o){r.closure102_externref_shim(e,t,n,_,o)}(o,_.b,e,t,n)}finally{_.a=o}})}finally{_.a=_.b=0}}function de(e,t,n){try{var _={a:t,b:n};e.forEach((e,t)=>{const n=_.a;_.a=0;try{return function(e,t,n,_){r.closure105_externref_shim(e,t,n,_)}(n,_.b,e,t)}finally{_.a=n}})}finally{_.a=_.b=0}}function ge(e,t,n,_){const s=t.getAttribute(u(n,_));var i=o(s)?0:p(s,r.__wbindgen_malloc,r.__wbindgen_realloc),c=l;f().setInt32(e+4,c,!0),f().setInt32(e+0,i,!0)}function pe(){return m(function(e,t,n,_){const o=p(t.getPropertyValue(u(n,_)),r.__wbindgen_malloc,r.__wbindgen_realloc),s=l;f().setInt32(e+4,s,!0),f().setInt32(e+0,o,!0)},arguments)}function we(e,t){const n=e[t>>>0];return o(n)?0:s(n)}function fe(e,t,n){return e.hasAttribute(u(t,n))}function me(e){return e.length}function be(){return m(function(){return new DOMParser},arguments)}function he(){return new Map}function ye(){return new Error}function ke(e,t){const n=p(t.nodeName,r.__wbindgen_malloc,r.__wbindgen_realloc),_=l;f().setInt32(e+4,_,!0),f().setInt32(e+0,n,!0)}function xe(e){return e.nodeType}function ve(e,t){const n=t.nodeValue;var _=o(n)?0:p(n,r.__wbindgen_malloc,r.__wbindgen_realloc),s=l;f().setInt32(e+4,s,!0),f().setInt32(e+0,_,!0)}function Ee(){return m(function(e,t,n,r){return e.parseFromString(u(t,n),v[r])},arguments)}function Re(e,t,n){return e.set(t,n)}function Ce(e,t){const n=p(t.stack,r.__wbindgen_malloc,r.__wbindgen_realloc),_=l;f().setInt32(e+4,_,!0),f().setInt32(e+0,n,!0)}function Te(e){return e.style}function Le(){const e=r.__wbindgen_export_1,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}function Ne(e){return e}function Se(e,t){const n="string"==typeof t?t:void 0;var _=o(n)?0:p(n,r.__wbindgen_malloc,r.__wbindgen_realloc),s=l;f().setInt32(e+4,s,!0),f().setInt32(e+0,_,!0)}function Ie(e,t){return u(e,t)}function Fe(e,t){throw new Error(u(e,t))}}}]); //# sourceMappingURL=9924.js.map