/i,f)){bt(a,e);continue}if(Me&&v(/((--!?|])>)|<\/(style|title)/i,f)){bt(a,e);continue}Ie&&s([de,he,ge],e=>{f=g(f,e," ")});const m=st(e.nodeName);if(kt(m,u,f)){if(!je||"id"!==u&&"name"!==u||(bt(a,e),f=Ge+f),ae&&"object"==typeof Y&&"function"==typeof Y.getAttributeType)if(l);else switch(Y.getAttributeType(m,u)){case"TrustedHTML":f=ae.createHTML(f);break;case"TrustedScriptURL":f=ae.createScriptURL(f)}try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),Ct(e)?At(e):p(o.removed)}catch(e){}}}xt("afterSanitizeAttributes",e,null)},Lt=function e(t){let n=null;const o=St(t);for(xt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();){if(xt("uponSanitizeShadowNode",n,null),wt(n))continue;const t=ie(n);n.nodeType===$&&(t&&t.__depth?n.__depth=(n.__removalCount||0)+t.__depth+1:n.__depth=1),(n.__depth>=ft||n.__depth<0||A(n.__depth))&&At(n),n.content instanceof u&&(n.content.__depth=n.__depth,e(n.content)),Ot(n)}xt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Rt(e)){if("function"!=typeof e.toString)throw E("toString is not a function");if("string"!=typeof(e=e.toString()))throw E("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||ht(t),o.removed=[],"string"==typeof e&&(Ke=!1),Ke){if(e.nodeName){const t=st(e.nodeName);if(!be[t]||xe[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof S)n=Nt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===$&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!He&&!Ie&&!Ue&&-1===e.indexOf("<"))return ae&&Be?ae.createHTML(e):e;if(n=Nt(e),!n)return He?null:Be?le:""}n&&Fe&&At(n.firstChild);const c=St(Ke?e:n);for(;i=c.nextNode();){if(wt(i))continue;const e=ie(i);i.nodeType===$&&(e&&e.__depth?i.__depth=(i.__removalCount||0)+e.__depth+1:i.__depth=1),(i.__depth>=ft||i.__depth<0||A(i.__depth))&&At(i),i.content instanceof u&&(i.content.__depth=i.__depth,Lt(i.content)),Ot(i)}if(Ke)return e;if(He){if(ze)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Se.shadowroot||Se.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let p=Ue?n.outerHTML:n.innerHTML;return Ue&&be["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&v(q,n.ownerDocument.doctype.name)&&(p="\n"+p),Ie&&s([de,he,ge],e=>{p=g(p,e," ")}),ae&&Be?ae.createHTML(p):p},o.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){pt=null,Pe=!1},o.isValidAttribute=function(e,t,n){pt||ht({});const o=st(e),r=st(t);return kt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(me[e]=me[e]||[],f(me[e],t))},o.removeHook=function(e){if(me[e])return p(me[e])},o.removeHooks=function(e){me[e]&&(me[e]=[])},o.removeAllHooks=function(){me={}},o}()}()},317591:(e,t,n)=>{var o,r,i;i=function(){function e(){for(var e=0,t={};e{var o=n(680264),r=n(685850);e.exports=function(e){return r(e)&&"[object Date]"==o(e)}},900498:(e,t,n)=>{var o=n(828288),r=n(779269),i=n(389113),a=i&&i.isDate,l=a?r(a):o;e.exports=l}}])