(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{DEFAULT_ALLOWED_ATTR:()=>re,DEFAULT_ALLOWED_TAGS:()=>oe,getTrustedTypesPolicy:()=>le,sanitizeHTML:()=>ie});const{entries:n,setPrototypeOf:o,isFrozen:r,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:l,seal:c,create:s}=Object,{apply:u,construct:m}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),c||(c=function(e){return e}),u||(u=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),m||(m=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const p=R(Array.prototype.forEach),f=R(Array.prototype.lastIndexOf),d=R(Array.prototype.pop),h=R(Array.prototype.push),g=R(Array.prototype.splice),T=R(String.prototype.toLowerCase),y=R(String.prototype.toString),E=R(String.prototype.match),A=R(String.prototype.replace),_=R(String.prototype.indexOf),b=R(String.prototype.trim),S=R(Object.prototype.hasOwnProperty),N=R(RegExp.prototype.test),w=(D=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m(D,t)});var D;function R(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return u(e,t,o)}}function O(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T;o&&o(e,null);let i=t.length;for(;i--;){let o=t[i];if("string"==typeof o){const e=n(o);e!==o&&(r(t)||(t[i]=e),o=e)}e[o]=!0}return e}function L(e){for(let t=0;t<e.length;t++)S(e,t)||(e[t]=null);return e}function C(e){const t=s(null);for(const[o,r]of n(e))S(e,o)&&(Array.isArray(r)?t[o]=L(r):r&&"object"==typeof r&&r.constructor===Object?t[o]=C(r):t[o]=r);return t}function v(e,t){for(;null!==e;){const n=a(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=i(e)}return function(){return null}}const k=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),M=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),z=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),P=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=l(["#text"]),F=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),H=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),W=l(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),B=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Y=c(/<%[\w\W]*|[\w\W]*%>/gm),j=c(/\$\{[\w\W]*/gm),X=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),q=c(/^aria-[\-\w]+$/),$=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=c(/^(?:\w+script|data):/i),V=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=c(/^html$/i),J=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var Q=Object.freeze({__proto__:null,ARIA_ATTR:q,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:J,DATA_ATTR:X,DOCTYPE_NAME:Z,ERB_EXPR:Y,IS_ALLOWED_URI:$,IS_SCRIPT_OR_DATA:K,MUSTACHE_EXPR:G,TMPLIT_EXPR:j});const ee=function(){return"undefined"==typeof window?null:window};var te=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee();const o=t=>e(t);if(o.version="3.4.0",o.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return o.isSupported=!1,o;let{document:r}=t;const i=r,a=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:u,Node:m,Element:D,NodeFilter:R,NamedNodeMap:L=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=t,X=D.prototype,q=v(X,"cloneNode"),K=v(X,"remove"),V=v(X,"nextSibling"),J=v(X,"childNodes"),te=v(X,"parentNode");if("function"==typeof u){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ne,oe="";const{implementation:re,createNodeIterator:ie,createDocumentFragment:ae,getElementsByTagName:le}=r,{importNode:ce}=i;let se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof n&&"function"==typeof te&&re&&void 0!==re.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:me,TMPLIT_EXPR:pe,DATA_ATTR:fe,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:Te}=Q;let{IS_ALLOWED_URI:ye}=Q,Ee=null;const Ae=O({},[...k,...M,...x,...z,...U]);let _e=null;const be=O({},[...F,...H,...W,...B]);let Se=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ne=null,we=null;const De=Object.seal(s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Re=!0,Oe=!0,Le=!1,Ce=!0,ve=!1,ke=!0,Me=!1,xe=!1,Ie=!1,ze=!1,Pe=!1,Ue=!1,Fe=!0,He=!1,We=!0,Be=!1,Ge={},Ye=null;const je=O({},["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"]);let Xe=null;const qe=O({},["audio","video","img","source","image","track"]);let $e=null;const Ke=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml";let Qe=Je,et=!1,tt=null;const nt=O({},[Ve,Ze,Je],y);let ot=O({},["mi","mo","mn","ms","mtext"]),rt=O({},["annotation-xml"]);const it=O({},["title","style","font","a","script"]);let at=null;const lt=["application/xhtml+xml","text/html"];let ct=null,st=null;const ut=r.createElement("form"),mt=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!st||st!==e){if(e&&"object"==typeof e||(e={}),e=C(e),at=-1===lt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ct="application/xhtml+xml"===at?y:T,Ee=S(e,"ALLOWED_TAGS")?O({},e.ALLOWED_TAGS,ct):Ae,_e=S(e,"ALLOWED_ATTR")?O({},e.ALLOWED_ATTR,ct):be,tt=S(e,"ALLOWED_NAMESPACES")?O({},e.ALLOWED_NAMESPACES,y):nt,$e=S(e,"ADD_URI_SAFE_ATTR")?O(C(Ke),e.ADD_URI_SAFE_ATTR,ct):Ke,Xe=S(e,"ADD_DATA_URI_TAGS")?O(C(qe),e.ADD_DATA_URI_TAGS,ct):qe,Ye=S(e,"FORBID_CONTENTS")?O({},e.FORBID_CONTENTS,ct):je,Ne=S(e,"FORBID_TAGS")?O({},e.FORBID_TAGS,ct):C({}),we=S(e,"FORBID_ATTR")?O({},e.FORBID_ATTR,ct):C({}),Ge=!!S(e,"USE_PROFILES")&&e.USE_PROFILES,Re=!1!==e.ALLOW_ARIA_ATTR,Oe=!1!==e.ALLOW_DATA_ATTR,Le=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ce=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ve=e.SAFE_FOR_TEMPLATES||!1,ke=!1!==e.SAFE_FOR_XML,Me=e.WHOLE_DOCUMENT||!1,ze=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Ue=e.RETURN_TRUSTED_TYPE||!1,Ie=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,He=e.SANITIZE_NAMED_PROPS||!1,We=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||$,Qe=e.NAMESPACE||Je,ot=e.MATHML_TEXT_INTEGRATION_POINTS||ot,rt=e.HTML_INTEGRATION_POINTS||rt,Se=e.CUSTOM_ELEMENT_HANDLING||s(null),e.CUSTOM_ELEMENT_HANDLING&&mt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&mt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ve&&(Oe=!1),Pe&&(ze=!0),Ge&&(Ee=O({},U),_e=s(null),!0===Ge.html&&(O(Ee,k),O(_e,F)),!0===Ge.svg&&(O(Ee,M),O(_e,H),O(_e,B)),!0===Ge.svgFilters&&(O(Ee,x),O(_e,H),O(_e,B)),!0===Ge.mathMl&&(O(Ee,z),O(_e,W),O(_e,B))),De.tagCheck=null,De.attributeCheck=null,e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?De.tagCheck=e.ADD_TAGS:(Ee===Ae&&(Ee=C(Ee)),O(Ee,e.ADD_TAGS,ct))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?De.attributeCheck=e.ADD_ATTR:(_e===be&&(_e=C(_e)),O(_e,e.ADD_ATTR,ct))),e.ADD_URI_SAFE_ATTR&&O($e,e.ADD_URI_SAFE_ATTR,ct),e.FORBID_CONTENTS&&(Ye===je&&(Ye=C(Ye)),O(Ye,e.FORBID_CONTENTS,ct)),e.ADD_FORBID_CONTENTS&&(Ye===je&&(Ye=C(Ye)),O(Ye,e.ADD_FORBID_CONTENTS,ct)),We&&(Ee["#text"]=!0),Me&&O(Ee,["html","head","body"]),Ee.table&&(O(Ee,["tbody"]),delete Ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,oe=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,a)),null!==ne&&"string"==typeof oe&&(oe=ne.createHTML(""));l&&l(e),st=e}},ft=O({},[...M,...x,...I]),dt=O({},[...z,...P]),ht=function(e){h(o.removed,{element:e});try{te(e).removeChild(e)}catch(t){K(e)}},gt=function(e,t){try{h(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ze||Pe)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Tt=function(e){let t=null,n=null;if(Ie)e="<remove></remove>"+e;else{const t=E(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===at&&Qe===Je&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ne?ne.createHTML(e):e;if(Qe===Je)try{t=(new Y).parseFromString(o,at)}catch(e){}if(!t||!t.documentElement){t=re.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?oe:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Qe===Je?le.call(t,Me?"html":"body")[0]:Me?t.documentElement:i},yt=function(e){return ie.call(e.ownerDocument||e,e,R.SHOW_ELEMENT|R.SHOW_COMMENT|R.SHOW_TEXT|R.SHOW_PROCESSING_INSTRUCTION|R.SHOW_CDATA_SECTION,null)},Et=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof L)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},At=function(e){return"function"==typeof m&&e instanceof m};function _t(e,t,n){p(e,e=>{e.call(o,t,n,st)})}const bt=function(e){let t=null;if(_t(se.beforeSanitizeElements,e,null),Et(e))return ht(e),!0;const n=ct(e.nodeName);if(_t(se.uponSanitizeElement,e,{tagName:n,allowedTags:Ee}),ke&&e.hasChildNodes()&&!At(e.firstElementChild)&&N(/<[/\w!]/g,e.innerHTML)&&N(/<[/\w!]/g,e.textContent))return ht(e),!0;if(ke&&e.namespaceURI===Je&&"style"===n&&At(e.firstElementChild))return ht(e),!0;if(7===e.nodeType)return ht(e),!0;if(ke&&8===e.nodeType&&N(/<[/\w]/g,e.data))return ht(e),!0;if(Ne[n]||!(De.tagCheck instanceof Function&&De.tagCheck(n))&&!Ee[n]){if(!Ne[n]&&Nt(n)){if(Se.tagNameCheck instanceof RegExp&&N(Se.tagNameCheck,n))return!1;if(Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))return!1}if(We&&!Ye[n]){const t=te(e)||e.parentNode,n=J(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=q(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,V(e))}}return ht(e),!0}return e instanceof D&&!function(e){let t=te(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=T(e.tagName),o=T(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===o||ot[o]):Boolean(ft[n]):e.namespaceURI===Ve?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&rt[o]:Boolean(dt[n]):e.namespaceURI===Je?!(t.namespaceURI===Ze&&!rt[o])&&!(t.namespaceURI===Ve&&!ot[o])&&!dt[n]&&(it[n]||!ft[n]):!("application/xhtml+xml"!==at||!tt[e.namespaceURI]))}(e)?(ht(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!N(/<\/no(script|embed|frames)/i,e.innerHTML)?(ve&&3===e.nodeType&&(t=e.textContent,p([ue,me,pe],e=>{t=A(t,e," ")}),e.textContent!==t&&(h(o.removed,{element:e.cloneNode()}),e.textContent=t)),_t(se.afterSanitizeElements,e,null),!1):(ht(e),!0)},St=function(e,t,n){if(we[t])return!1;if(Fe&&("id"===t||"name"===t)&&(n in r||n in ut))return!1;if(Oe&&!we[t]&&N(fe,t));else if(Re&&N(de,t));else if(De.attributeCheck instanceof Function&&De.attributeCheck(t,e));else if(!_e[t]||we[t]){if(!(Nt(e)&&(Se.tagNameCheck instanceof RegExp&&N(Se.tagNameCheck,e)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(e))&&(Se.attributeNameCheck instanceof RegExp&&N(Se.attributeNameCheck,t)||Se.attributeNameCheck instanceof Function&&Se.attributeNameCheck(t,e))||"is"===t&&Se.allowCustomizedBuiltInElements&&(Se.tagNameCheck instanceof RegExp&&N(Se.tagNameCheck,n)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))))return!1}else if($e[t]);else if(N(ye,A(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==_(n,"data:")||!Xe[e])if(Le&&!N(he,A(n,ge,"")));else if(n)return!1;return!0},Nt=function(e){return"annotation-xml"!==e&&E(e,Te)},wt=function(e){_t(se.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Et(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_e,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ct(a),u=c;let m="value"===a?u:b(u);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,_t(se.uponSanitizeAttribute,e,n),m=n.attrValue,!He||"id"!==s&&"name"!==s||(gt(a,e),m="user-content-"+m),ke&&N(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,m)){gt(a,e);continue}if("attributename"===s&&E(m,"href")){gt(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){gt(a,e);continue}if(!Ce&&N(/\/>/i,m)){gt(a,e);continue}ve&&p([ue,me,pe],e=>{m=A(m,e," ")});const f=ct(e.nodeName);if(St(f,s,m)){if(ne&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=ne.createHTML(m);break;case"TrustedScriptURL":m=ne.createScriptURL(m)}if(m!==u)try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),Et(e)?ht(e):d(o.removed)}catch(t){gt(a,e)}}else gt(a,e)}_t(se.afterSanitizeAttributes,e,null)},Dt=function(e){let t=null;const n=yt(e);for(_t(se.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)_t(se.uponSanitizeShadowNode,t,null),bt(t),wt(t),t.content instanceof c&&Dt(t.content);_t(se.afterSanitizeShadowDOM,e,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,a=null,l=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!At(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!o.isSupported)return e;if(xe||pt(t),o.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=ct(e.nodeName);if(!Ee[t]||Ne[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof m)n=Tt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!ze&&!ve&&!Me&&-1===e.indexOf("<"))return ne&&Ue?ne.createHTML(e):e;if(n=Tt(e),!n)return ze?null:Ue?oe:""}n&&Ie&&ht(n.firstChild);const s=yt(Be?e:n);for(;a=s.nextNode();)bt(a),wt(a),a.content instanceof c&&Dt(a.content);if(Be)return e;if(ze){if(ve){n.normalize();let e=n.innerHTML;p([ue,me,pe],t=>{e=A(e,t," ")}),n.innerHTML=e}if(Pe)for(l=ae.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(_e.shadowroot||_e.shadowrootmode)&&(l=ce.call(i,l,!0)),l}let u=Me?n.outerHTML:n.innerHTML;return Me&&Ee["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&N(Z,n.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+u),ve&&p([ue,me,pe],e=>{u=A(u,e," ")}),ne&&Ue?ne.createHTML(u):u},o.setConfig=function(){pt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),xe=!0},o.clearConfig=function(){st=null,xe=!1},o.isValidAttribute=function(e,t,n){st||pt({});const o=ct(e),r=ct(t);return St(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&h(se[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=f(se[e],t);return-1===n?void 0:g(se[e],n,1)[0]}return d(se[e])},o.removeHooks=function(e){se[e]=[]},o.removeAllHooks=function(){se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();let ne;const oe=["a","b","em","i","strong","p","br","abbr"],re=["target","href","rel","name","download","title"];function ie(e,t){const n={ALLOWED_TAGS:[...t?.tags||oe],ALLOWED_ATTR:[...t?.attr||re]},o=function(){if(void 0!==ne)return ne;if("undefined"==typeof window||!window.trustedTypes)return ne=null,null;try{ne=window.trustedTypes.createPolicy("woocommerce-sanitize-noop",{createHTML:e=>e})}catch(e){ne=null,console.warn('Failed to create "woocommerce-sanitize-noop" trusted type policy:',e)}return ne}();return o&&(n.TRUSTED_TYPES_POLICY=o),"HTMLBodyElement"===t?.returnType?n.RETURN_DOM=!0:"DocumentFragment"===t?.returnType&&(n.RETURN_DOM_FRAGMENT=!0),te.sanitize(e??"",n)}let ae;function le(){if(void 0!==ae)return ae;if("undefined"==typeof window||!window.trustedTypes)return ae=null,null;try{ae=window.trustedTypes.createPolicy("woocommerce-sanitize",{createHTML:e=>ie(e)})}catch(e){ae=null,console.warn('Failed to create "woocommerce-sanitize" trusted type policy:',e)}return ae}(window.wc=window.wc||{}).sanitize=t})();