/g,A=/"/g,S=/"/g,L=/([a-zA-Z0-9]*);?/gim,j=/:?/gim,T=/&newline;?/gim,C=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,z=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,I=/u\s*r\s*l\s*\(.*/gi;function N(t){return t.replace(A,""")}function W(t){return t.replace(S,'"')}function F(t){return t.replace(L,(function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))}))}function X(t){return t.replace(j,":").replace(T," ")}function Z(t){for(var e="",r=0,i=t.length;r0;e--){var r=t[e];if(" "!==r)return"="===r?e:-1}}function _(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}J.parseTag=function(t,e,r){var i="",o=0,n=!1,a=!1,s=0,l=t.length,c="",u="";t:for(s=0;s"===f||s===l-1){i+=r(t.slice(o,n)),c=D(u=t.slice(n,s+1)),i+=e(n,i.length,c,u,B(u)),o=s+1,n=!1;continue}if('"'===f||"'"===f)for(var d=1,g=t.charAt(s-d);""===g.trim()||"="===g;){if("="===g){a=f;continue t}g=t.charAt(s-++d)}}else if(f===a){a=!1;continue}}return o";var h=function(t){var e=K.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var r="/"===(t=K.trim(t.slice(e+1,-1)))[t.length-1];return r&&(t=K.trim(t.slice(0,-1))),{html:t,closing:r}}(f),m=r[u],b=Q(h.html,(function(t,e){var r=-1!==K.indexOf(m,t),i=n(u,t,e,r);return $(i)?r?(e=s(u,t,e,c))?t+'="'+e+'"':t:$(i=a(u,t,e,r))?void 0:i:i}));return f="<"+u,b&&(f+=" "+b),h.closing&&(f+=" /"),f+">"}return $(p=o(u,f,g))?l(f):p}),l);return u&&(f=u.remove(f)),f};var et=tt;function rt(t,e,r){if(r||2===arguments.length)for(var i,o=0,n=e.length;o255||(i=t.charCodeAt(s++))>255||(o=t.charCodeAt(s++))>255)throw new TypeError("invalid character found");n+=mt[(e=r<<16|i<<8|o)>>18&63]+mt[e>>12&63]+mt[e>>6&63]+mt[63&e]}return a?n.slice(0,a-3)+"===".substring(a):n},At=gt?function(t){return Buffer.from(t).toString("base64")}:function(t){for(var e=[],r=0,i=t.length;r>>6)+yt(128|63&e):yt(224|e>>>12&15)+yt(128|e>>>6&63)+yt(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return yt(240|e>>>18&7)+yt(128|e>>>12&63)+yt(128|e>>>6&63)+yt(128|63&e)},Lt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,jt=gt?function(t){return Buffer.from(t,"utf8").toString("base64")}:ht?function(t){return At(ht.encode(t))}:function(t){return kt(t.replace(Lt,St))},Tt=function(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))}(jt(t)):jt(t)},Ct=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,zt=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return yt(55296+(e>>>10))+yt(56320+(1023&e));case 3:return yt((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return yt((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},It=ft?function(t){return atob(xt(t))}:gt?function(t){return Buffer.from(t,"base64").toString("binary")}:function(t){if(t=t.replace(/\s+/g,""),!vt.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var e,r,i,o="",n=0;n>16&255):64===i?yt(e>>16&255,e>>8&255):yt(e>>16&255,e>>8&255,255&e);return o},Nt=gt?function(t){return wt(Buffer.from(t,"base64"))}:function(t){return wt(It(t).split("").map((function(t){return t.charCodeAt(0)})))},Wt=gt?function(t){return Buffer.from(t,"base64").toString("utf8")}:pt?function(t){return pt.decode(Nt(t))}:function(t){return It(t).replace(Ct,zt)},Ft=function(t){return Wt(function(t){return xt(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})))}(t))},Xt=function(t){return t&&t.Math==Math&&t},Zt=Xt("object"===("undefined"==typeof globalThis?"undefined":e(globalThis))&&globalThis)||Xt("object"===("undefined"==typeof window?"undefined":e(window))&&window)||Xt("object"===("undefined"==typeof self?"undefined":e(self))&&self)||Xt("object"===("undefined"==typeof global?"undefined":e(global))&&global)||Function("return this")(),Et={a:["target","title","spellcheck","rel"],canvas:[],abbr:["title"],address:[],area:["shape","coords","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:["dir"],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["alt","title","width","height","decoding"],ins:["datetime"],li:[],mark:[],nav:[],ol:["start"],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],delete:[],form:[],strong:[],mask:["maskunits","x","y","width","height","fill"],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],wbr:[],video:["autoplay","controls","loop","preload","height","width"],svg:["viewBox","version","xmlns","fill","width","height","stroke","stroke-width","style"],path:["d","fill","opacity","stroke","p-id","fill-rule","clip-rule","stroke-width","stroke-linecap","stroke-linejoin","fill-opacity","mask"],rect:["x","y","width","height","fill","stroke","rx"],g:[]},Ot={onIgnoreTagAttr:function(t,e,r){return t&&["href","src"].indexOf(e)>-1?Ot.domainWhiteList&&Array.isArray(Ot.domainWhiteList)&&Ot.domainWhiteList.length>0&&!ct(r,rt([],Ot.domainWhiteList,!0))?"":"".concat(e,'="').concat(nt(r),'"'):t&&(["style","class","id"].indexOf(e)>-1||e.indexOf("data-")>-1)?"".concat(e,'="').concat(r,'"'):void(Ot.xssLog&&Ot.xssLog({type:"attr",tagName:t,attrName:e,value:r}))},onIgnoreTag:function(t,e){if("style"===t)return e;Ot.xssLog&&Ot.xssLog({type:"tag",tagName:t,value:e})},whiteList:Et,mergeWhiteList:function(t){for(var e={},r=0,i=Object.keys(Et);r