import{l as G}from"./cssfilter-af71ba68.js";var X={exports:{}},o={},x={indexOf:function(r,t){var e,n;if(Array.prototype.indexOf)return r.indexOf(t);for(e=0,n=r.length;e/g,fr=/"/g,lr=/"/g,ur=/&#([a-zA-Z0-9]*);?/gim,cr=/:?/gim,gr=/&newline;?/gim,w=/((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,k=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,D=/u\s*r\s*l\s*\(.*/gi;function U(r){return r.replace(fr,""")}function m(r){return r.replace(lr,'"')}function N(r){return r.replace(ur,function(e,n){return n[0]==="x"||n[0]==="X"?String.fromCharCode(parseInt(n.substr(1),16)):String.fromCharCode(parseInt(n,10))})}function Q(r){return r.replace(cr,":").replace(gr," ")}function $(r){for(var t="",e=0,n=r.length;e",n);if(a===-1)break;e=a+3}return t}function Tr(r){var t=r.split("");return t=t.filter(function(e){var n=e.charCodeAt(0);return n===127?!1:n<=31?n===10||n===13:!0}),t.join("")}o.whiteList=W();o.getDefaultWhiteList=W;o.onTag=er;o.onIgnoreTag=tr;o.onTagAttr=nr;o.onIgnoreTagAttr=ir;o.safeAttrValue=ar;o.escapeHtml=H;o.escapeQuote=U;o.unescapeQuote=m;o.escapeHtmlEntities=N;o.escapeDangerHtml5Entities=Q;o.clearNonPrintableCharacter=$;o.friendlyAttrValue=q;o.escapeAttrValue=z;o.onIgnoreTagStripAll=pr;o.StripTagBody=vr;o.stripCommentTag=dr;o.stripBlankChar=Tr;o.cssFilter=B;o.getDefaultCSSWhiteList=rr;var P={},h=x;function Ar(r){var t=h.spaceIndex(r);if(t===-1)var e=r.slice(1,-1);else var e=r.slice(1,t+1);return e=h.trim(e).toLowerCase(),e.slice(0,1)==="/"&&(e=e.slice(1)),e.slice(-1)==="/"&&(e=e.slice(0,-1)),e}function hr(r){return r.slice(0,2)===""){n+=e(r.slice(a,f)),c=r.slice(f,i+1),l=Ar(c),n+=t(f,n.length,l,c,hr(c)),a=i+1,f=!1;continue}if(g==='"'||g==="'")for(var A=1,v=r.charAt(i-A);v.trim()===""||v==="=";){if(v==="="){s=g;continue r}v=r.charAt(i-++A)}}else if(g===s){s=!1;continue}}return a0;t--){var e=r[t];if(e!==" ")return e==="="?t:-1}}function wr(r){return r[0]==='"'&&r[r.length-1]==='"'||r[0]==="'"&&r[r.length-1]==="'"}function V(r){return wr(r)?r.substr(1,r.length-2):r}P.parseTag=Er;P.parseAttr=Ir;var Cr=G.FilterCSS,p=o,Z=P,yr=Z.parseTag,Lr=Z.parseAttr,y=x;function C(r){return r==null}function Pr(r){var t=y.spaceIndex(r);if(t===-1)return{html:"",closing:r[r.length-2]==="/"};r=y.trim(r.slice(t+1,-1));var e=r[r.length-1]==="/";return e&&(r=y.trim(r.slice(0,-1))),{html:r,closing:e}}function Rr(r){var t={};for(var e in r)t[e]=r[e];return t}function M(r){r=Rr(r||{}),r.stripIgnoreTag&&(r.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),r.onIgnoreTag=p.onIgnoreTagStripAll),r.whiteList=r.whiteList||r.allowList||p.whiteList,r.onTag=r.onTag||p.onTag,r.onTagAttr=r.onTagAttr||p.onTagAttr,r.onIgnoreTag=r.onIgnoreTag||p.onIgnoreTag,r.onIgnoreTagAttr=r.onIgnoreTagAttr||p.onIgnoreTagAttr,r.safeAttrValue=r.safeAttrValue||p.safeAttrValue,r.escapeHtml=r.escapeHtml||p.escapeHtml,this.options=r,r.css===!1?this.cssFilter=!1:(r.css=r.css||{},this.cssFilter=new Cr(r.css))}M.prototype.process=function(r){if(r=r||"",r=r.toString(),!r)return"";var t=this,e=t.options,n=e.whiteList,a=e.onTag,f=e.onIgnoreTag,s=e.onTagAttr,i=e.onIgnoreTagAttr,u=e.safeAttrValue,l=e.escapeHtml,c=t.cssFilter;e.stripBlankChar&&(r=p.stripBlankChar(r)),e.allowCommentTag||(r=p.stripCommentTag(r));var g=!1;if(e.stripIgnoreTagBody){var g=p.StripTagBody(e.stripIgnoreTagBody,f);f=g.onIgnoreTag}var A=yr(r,function(v,J,d,T,K){var b={sourcePosition:v,position:J,isClosing:K,isWhite:n.hasOwnProperty(d)},I=a(d,T,b);if(!C(I))return I;if(b.isWhite){if(b.isClosing)return"";var O=Pr(T),Y=n[d],F=Lr(O.html,function(E,S){var R=y.indexOf(Y,E)!==-1,_=s(d,E,S,R);if(!C(_))return _;if(R)return S=u(d,E,S,c),S?E+'="'+S+'"':E;var _=i(d,E,S,R);return C(_)?void 0:_}),T="<"+d;return F&&(T+=" "+F),O.closing&&(T+=" /"),T+=">",T}else{var I=f(d,T,b);return C(I)?l(T):I}},l);return g&&(A=g.remove(A)),A};var Xr=M;(function(r,t){var e=o,n=P,a=Xr;function f(u,l){var c=new a(l);return c.process(u)}t=r.exports=f,t.filterXSS=f,t.FilterXSS=a;for(var s in e)t[s]=e[s];for(var s in n)t[s]=n[s];typeof window<"u"&&(window.filterXSS=r.exports);function i(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}i()&&(self.filterXSS=r.exports)})(X,X.exports);var xr=X.exports;export{xr as l};