/*! * @toast-ui/editor * @version 3.2.2 | Fri Feb 17 2023 * @author NHN Cloud FE Development Lab * @license MIT */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prosemirror-inputrules"),require("prosemirror-keymap"),require("prosemirror-model"),require("prosemirror-state"),require("prosemirror-view")):"function"==typeof define&&define.amd?define(["prosemirror-inputrules","prosemirror-keymap","prosemirror-model","prosemirror-state","prosemirror-view"],t):"object"==typeof exports?exports.toastui=t(require("prosemirror-inputrules"),require("prosemirror-keymap"),require("prosemirror-model"),require("prosemirror-state"),require("prosemirror-view")):(e.toastui=e.toastui||{},e.toastui.Editor=t(e[void 0],e[void 0],e[void 0],e[void 0],e[void 0]))}(self,(function(e,t,r,n,i){return function(){var o={368:function(e){ /*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */ e.exports=function(){"use strict";function e(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t1?r-1:0),i=1;i/gm),z=s(/^data-[\-\w.\u00B7-\uFFFF]/),j=s(/^aria-[\-\w]+$/),U=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_=s(/^(?:\w+script|data):/i),V=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function $(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:Z(),t=function(e){return X(e)};if(t.version="2.3.3",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var r=e.document,n=e.document,i=e.DocumentFragment,o=e.HTMLTemplateElement,s=e.Node,l=e.Element,u=e.NodeFilter,c=e.NamedNodeMap,p=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,k=e.Text,C=e.Comment,K=e.DOMParser,Y=e.trustedTypes,Q=l.prototype,J=N(Q,"cloneNode"),ee=N(Q,"nextSibling"),te=N(Q,"childNodes"),re=N(Q,"parentNode");if("function"==typeof o){var ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}var ie=W(Y,r),oe=ie&&Ie?ie.createHTML(""):"",ae=n,se=ae.implementation,le=ae.createNodeIterator,ue=ae.createDocumentFragment,ce=ae.getElementsByTagName,pe=r.importNode,fe={};try{fe=T(n).documentMode?n.documentMode:{}}catch(e){}var de={};t.isSupported="function"==typeof re&&se&&void 0!==se.createHTMLDocument&&9!==fe;var he=H,ge=P,me=z,ve=j,ye=_,be=V,we=U,xe=null,ke=L({},[].concat($(D),$(A),$(E),$(M),$(O))),Ce=null,Le=L({},[].concat($(q),$(F),$(B),$(I))),Te=null,Ne=null,De=!0,Ae=!0,Ee=!1,Se=!1,Me=!1,Re=!1,Oe=!1,qe=!1,Fe=!1,Be=!0,Ie=!1,He=!0,Pe=!0,ze=!1,je={},Ue=null,_e=L({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ve=null,Ge=L({},["audio","video","img","source","image","track"]),$e=null,Ze=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml",Ye=Ke,Qe=!1,Je=void 0,et=["application/xhtml+xml","text/html"],tt="text/html",rt=void 0,nt=null,it=n.createElement("form"),ot=function(e){nt&&nt===e||(e&&"object"===(void 0===e?"undefined":G(e))||(e={}),e=T(e),xe="ALLOWED_TAGS"in e?L({},e.ALLOWED_TAGS):ke,Ce="ALLOWED_ATTR"in e?L({},e.ALLOWED_ATTR):Le,$e="ADD_URI_SAFE_ATTR"in e?L(T(Ze),e.ADD_URI_SAFE_ATTR):Ze,Ve="ADD_DATA_URI_TAGS"in e?L(T(Ge),e.ADD_DATA_URI_TAGS):Ge,Ue="FORBID_CONTENTS"in e?L({},e.FORBID_CONTENTS):_e,Te="FORBID_TAGS"in e?L({},e.FORBID_TAGS):{},Ne="FORBID_ATTR"in e?L({},e.FORBID_ATTR):{},je="USE_PROFILES"in e&&e.USE_PROFILES,De=!1!==e.ALLOW_ARIA_ATTR,Ae=!1!==e.ALLOW_DATA_ATTR,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=e.SAFE_FOR_TEMPLATES||!1,Me=e.WHOLE_DOCUMENT||!1,qe=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,Be=!1!==e.RETURN_DOM_IMPORT,Ie=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,He=!1!==e.SANITIZE_DOM,Pe=!1!==e.KEEP_CONTENT,ze=e.IN_PLACE||!1,we=e.ALLOWED_URI_REGEXP||we,Ye=e.NAMESPACE||Ke,Je=Je=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?tt:e.PARSER_MEDIA_TYPE,rt="application/xhtml+xml"===Je?function(e){return e}:g,Se&&(Ae=!1),Fe&&(qe=!0),je&&(xe=L({},[].concat($(O))),Ce=[],!0===je.html&&(L(xe,D),L(Ce,q)),!0===je.svg&&(L(xe,A),L(Ce,F),L(Ce,I)),!0===je.svgFilters&&(L(xe,E),L(Ce,F),L(Ce,I)),!0===je.mathMl&&(L(xe,M),L(Ce,B),L(Ce,I))),e.ADD_TAGS&&(xe===ke&&(xe=T(xe)),L(xe,e.ADD_TAGS)),e.ADD_ATTR&&(Ce===Le&&(Ce=T(Ce)),L(Ce,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&L($e,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(Ue===_e&&(Ue=T(Ue)),L(Ue,e.FORBID_CONTENTS)),Pe&&(xe["#text"]=!0),Me&&L(xe,["html","head","body"]),xe.table&&(L(xe,["tbody"]),delete Te.tbody),a&&a(e),nt=e)},at=L({},["mi","mo","mn","ms","mtext"]),st=L({},["foreignobject","desc","title","annotation-xml"]),lt=L({},A);L(lt,E),L(lt,S);var ut=L({},M);L(ut,R);var ct=function(e){var t=re(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});var r=g(e.tagName),n=g(t.tagName);if(e.namespaceURI===Xe)return t.namespaceURI===Ke?"svg"===r:t.namespaceURI===We?"svg"===r&&("annotation-xml"===n||at[n]):Boolean(lt[r]);if(e.namespaceURI===We)return t.namespaceURI===Ke?"math"===r:t.namespaceURI===Xe?"math"===r&&st[n]:Boolean(ut[r]);if(e.namespaceURI===Ke){if(t.namespaceURI===Xe&&!st[n])return!1;if(t.namespaceURI===We&&!at[n])return!1;var i=L({},["title","style","font","a","script"]);return!ut[r]&&(i[r]||!lt[r])}return!1},pt=function(e){h(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},ft=function(e,r){try{h(t.removed,{attribute:r.getAttributeNode(e),from:r})}catch(e){h(t.removed,{attribute:null,from:r})}if(r.removeAttribute(e),"is"===e&&!Ce[e])if(qe||Fe)try{pt(r)}catch(e){}else try{r.setAttribute(e,"")}catch(e){}},dt=function(e){var t=void 0,r=void 0;if(Oe)e=""+e;else{var i=m(e,/^[\r\n\t ]+/);r=i&&i[0]}"application/xhtml+xml"===Je&&(e=''+e+"");var o=ie?ie.createHTML(e):e;if(Ye===Ke)try{t=(new K).parseFromString(o,Je)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(Ye,"template",null);try{t.documentElement.innerHTML=Qe?"":o}catch(e){}}var a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ye===Ke?ce.call(t,Me?"html":"body")[0]:Me?t.documentElement:a},ht=function(e){return le.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},gt=function(e){return!(e instanceof k||e instanceof C||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof p&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},mt=function(e){return"object"===(void 0===s?"undefined":G(s))?e instanceof s:e&&"object"===(void 0===e?"undefined":G(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},vt=function(e,r,n){de[e]&&f(de[e],(function(e){e.call(t,r,n,nt)}))},yt=function(e){var r=void 0;if(vt("beforeSanitizeElements",e,null),gt(e))return pt(e),!0;if(m(e.nodeName,/[\u0080-\uFFFF]/))return pt(e),!0;var n=rt(e.nodeName);if(vt("uponSanitizeElement",e,{tagName:n,allowedTags:xe}),!mt(e.firstElementChild)&&(!mt(e.content)||!mt(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return pt(e),!0;if("select"===n&&w(/