PageSourceSearch

https://kindredly.ai/js/sanitizeHtmlCrb689hZ.js

js kindredly.ai collected 2026-10-02 01:13:29 UTC 29,921 bytes, 3 lines download raw bytes

vendor: 7,379 bytes, lines 1-2
1/*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */function je(r,o){(o==null||o>r.length)&&(o=r.length);for(var s=0,c=Array(o);s<o;s++)c[s]=r[s];return c}function Wn(r){if(Array.isArray(r))return r}function Bn(r,o){var s=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(s!=null){var c,u,d,S,ut=[],w=!0,Et=!1;try{if(d=(s=s.call(r)).next,o!==0)for(;!(w=(c=d.call(s)).done)&&(ut.push(c.value),ut.length!==o);w=!0);}catch(K){Et=!0,u=K}finally{try{if(!w&&s.return!=null&&(S=s.return(),Object(S)!==S))return}finally{if(Et)throw u}}return ut}}function Yn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function jn(r,o){return Wn(r)||Bn(r,o)||Xn(r,o)||Yn()}function Xn(r,o){if(r){if(typeof r=="string")return je(r,o);var s={}.toString.call(r).slice(8,-1);return s==="Object"&&r.constructor&&(s=r.constructor.name),s==="Map"||s==="Set"?Array.from(r):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?je(r,o):void 0}}const ln=Object.entries,Xe=Object.setPrototypeOf,$n=Object.isFrozen,Vn=Object.getPrototypeOf,Kn=Object.getOwnPropertyDescriptor;let y=Object.freeze,b=Object.seal,lt=Object.create,cn=typeof Reflect<"u"&&Reflect,ce=cn.apply,ue=cn.construct;y||(y=function(o){return o});b||(b=function(o){return o});ce||(ce=function(o,s){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d<c;d++)u[d-2]=arguments[d];return o.apply(s,u)});ue||(ue=function(o){for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u<s;u++)c[u-1]=arguments[u];return new o(...c)});const V=E(Array.prototype.forEach),qn=E(Array.prototype.lastIndexOf),$e=E(Array.prototype.pop),ht=E(Array.prototype.push),Zn=E(Array.prototype.splice),ct=Array.isArray,At=E(String.prototype.toLowerCase),ne=E(String.prototype.toString),Ve=E(String.prototype.match),_t=E(String.prototype.replace),Ke=E(String.prototype.indexOf),Jn=E(String.prototype.trim),Qn=E(Number.prototype.toString),to=E(Boolean.prototype.toString),qe=typeof BigInt>"u"?null:E(BigInt.prototype.toString),Ze=typeof Symbol>"u"?null:E(Symbol.prototype.toString),L=E(Object.prototype.hasOwnProperty),gt=E(Object.prototype.toString),O=E(RegExp.prototype.test),G=eo(TypeError);function E(r){return function(o){o instanceof RegExp&&(o.lastIndex=0);for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u<s;u++)c[u-1]=arguments[u];return ce(r,o,c)}}function eo(r){return function(){for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return ue(r,s)}}function m(r,o){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:At;if(Xe&&Xe(r,null),!ct(o))return r;let c=o.length;for(;c--;){let u=o[c];if(typeof u=="string"){const d=s(u);d!==u&&($n(o)||(o[c]=d),u=d)}r[u]=!0}return r}function no(r){for(let o=0;o<r.length;o++)L(r,o)||(r[o]=null);return r}function C(r){const o=lt(null);for(const c of ln(r)){var s=jn(c,2);const u=s[0],d=s[1];L(r,u)&&(ct(d)?o[u]=no(d):d&&typeof d=="object"&&d.constructor===Object?o[u]=C(d):o[u]=d)}return o}function oo(r){switch(typeof r){case"string":return r;case"number":return Qn(r);case"boolean":return to(r);case"bigint":return qe?qe(r):"0";case"symbol":return Ze?Ze(r):"Symbol()";case"undefined":return gt(r);case"function":case"object":{if(r===null)return gt(r);const o=r,s=P(o,"toString");if(typeof s=="function"){const c=s(o);return typeof c=="string"?c:gt(c)}return gt(r)}default:return gt(r)}}function P(r,o){for(;r!==null;){const c=Kn(r,o);if(c){if(c.get)return E(c.get);if(typeof c.value=="function")return E(c.value)}r=Vn(r)}function s(){return null}return s}function ro(r){try{return O(r,""),!0}catch{return!1}}const Je=y(["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"]),oe=y(["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"]),re=y(["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"]),io=y(["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"]),ie=y(["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"]),ao=y(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Qe=y(["#text"]),tn=y(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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","
2spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),ae=y(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),en=y(["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"]),xt=y(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),so=b(/{{[\w\W]*|^[\w\W]*}}/g),lo=b(/<%[\w\W]*|^[\w\W]*%>/g),co=b(/\${[\w\W]*/g),uo=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),fo=b(/^aria-[\-\w]+$/),nn=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),po=b(/^(?:\w+script|data):/i),mo=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),To=b(/^html$/i),ho=b(/^[a-z][.\w]*(-[.\w]+)+$/i),on=b(/<[/\w!]/g),rn=b(/<[/\w]/g),_o=b(/<\/no(script|embed|frames)/i),go=b(/\/>/i),N={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},un=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Ao=y(m({},un)),Eo=function(){const r={};return V(un,o=>{r[o]=b(new RegExp("</"+o+"(?=[\\t\\n\\f\\r />])","i"))}),y(r)}(),yo=function(){return typeof window>"u"?null:window},So=function(o,s){if(typeof o!="object"||typeof o.createPolicy!="function")return null;
vendor: 4,353 bytes, line 2
2let c=null;const u="data-tt-policy-suffix";s&&s.hasAttribute(u)&&(c=s.getAttribute(u));const d="dompurify"+(c?"#"+c:"");try{return o.createPolicy(d,{createHTML(S){return S},createScriptURL(S){return S}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},an=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},W=function(o,s,c,u){return L(o,s)&&ct(o[s])?m(u.base?C(u.base):{},o[s],u.transform):c},se=function(o,s,c){const u=L(o,s)?o[s]:void 0;return u&&typeof u=="object"?C(u):c()};function fn(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yo();const o=i=>fn(i);if(o.version="3.4.16",o.removed=[],!r||!r.document||r.document.nodeType!==N.document||!r.Element)return o.isSupported=!1,o;let s=r.document;const c=s,u=c.currentScript;r.DocumentFragment;const d=r.HTMLTemplateElement,S=r.Node,ut=r.Element,w=r.NodeFilter;r.NamedNodeMap===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;const Et=r.DOMParser,K=r.trustedTypes,U=ut.prototype,pn=P(U,"cloneNode"),kt=P(U,"remove"),fe=P(U,"removeAttributeNode"),mn=P(U,"nextSibling"),q=P(U,"childNodes"),Z=P(U,"parentNode"),pe=P(U,"shadowRoot"),Ut=P(U,"attributes"),B=S&&S.prototype?P(S.prototype,"nodeType"):null,J=S&&S.prototype?P(S.prototype,"nodeName"):null,yt=S&&S.prototype?P(S.prototype,"ownerDocument"):null,ft=function(t){return B?B(t):t.nodeType},Ft=function(t){return J?J(t):t.nodeName};if(typeof d=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let D,Y="",zt,me=!1,pt=0;const de=function(){if(pt>0)throw G('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Q=function(t){de(),pt++;try{return D.createHTML(t)}finally{pt--}},dn=function(t){de(),pt++;try{return D.createScriptURL(t)}finally{pt--}},Tn=function(){return me||(zt=So(K,u),me=!0),zt},St=s,Ht=St.implementation,Te=St.createNodeIterator,hn=St.createDocumentFragment,_n=St.getElementsByTagName,gn=c.importNode;let T=an();o.isSupported=typeof ln=="function"&&typeof Z=="function"&&Ht&&Ht.createHTMLDocument!==void 0;const An=so,En=lo,yn=co,Sn=uo,bn=fo,On=po,he=mo,Rn=ho;let _e=nn,h=null;const Gt=m({},[...Je,...oe,...re,...ie,...Qe]);let _=null;const Wt=m({},[...tn,...ae,...en,...xt]);let v=Object.seal(lt(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}})),mt=null,ge=null;const F=Object.seal(lt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ae=!0,Bt=!0,Ee=!1,ye=!0,z=!1,j=!0,X=!1,Yt=!1,bt=null,Ot=null,jt=!1,tt=!1,Rt=!1,Dt=!1,Se=!0,be=!1;const Oe="user-content-";let Xt=!0,$t=!1,et={},nt=null;const Re=m({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let De=null;const Le=m({},["audio","video","img","source","image","track"]);let we=null;const Ie=m({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lt="http://www.w3.org/1998/Math/MathML",wt="http://www.w3.org/2000/svg",x="http://www.w3.org/1999/xhtml";let ot=x,Vt=!1,Kt=null;const Dn=m({},[Lt,wt,x],ne),Ne=y(["mi","mo","mn","ms","mtext"]);let qt=m({},Ne);const Ce=y(["annotation-xml"]);let Zt=m({},Ce);const Ln=m({},["title","style","font","a","script"]);let dt=null;const wn=["application/xhtml+xml","text/html"],In="text/html";let A=null,rt=null;const Nn=s.createElement("form"),Me=function(t){return t instanceof RegExp||t instanceof Function},Jt=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(rt&&rt===t)return;(!t||typeof t!="object")&&(t={}
vendor: 11,281 bytes, line 2
2),t=C(t),dt=wn.indexOf(t.PARSER_MEDIA_TYPE)===-1?In:t.PARSER_MEDIA_TYPE,A=dt==="application/xhtml+xml"?ne:At,h=W(t,"ALLOWED_TAGS",Gt,{transform:A}),_=W(t,"ALLOWED_ATTR",Wt,{transform:A}),Kt=W(t,"ALLOWED_NAMESPACES",Dn,{transform:ne}),we=W(t,"ADD_URI_SAFE_ATTR",Ie,{transform:A,base:Ie}),De=W(t,"ADD_DATA_URI_TAGS",Le,{transform:A,base:Le}),nt=W(t,"FORBID_CONTENTS",Re,{transform:A}),mt=W(t,"FORBID_TAGS",C({}),{transform:A}),ge=W(t,"FORBID_ATTR",C({}),{transform:A}),et=L(t,"USE_PROFILES")?t.USE_PROFILES&&typeof t.USE_PROFILES=="object"?C(t.USE_PROFILES):t.USE_PROFILES:!1,Ae=t.ALLOW_ARIA_ATTR!==!1,Bt=t.ALLOW_DATA_ATTR!==!1,Ee=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ye=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,z=t.SAFE_FOR_TEMPLATES||!1,j=t.SAFE_FOR_XML!==!1,X=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,Rt=t.RETURN_DOM_FRAGMENT||!1,Dt=t.RETURN_TRUSTED_TYPE||!1,jt=t.FORCE_BODY||!1,Se=t.SANITIZE_DOM!==!1,be=t.SANITIZE_NAMED_PROPS||!1,Xt=t.KEEP_CONTENT!==!1,$t=t.IN_PLACE||!1,_e=ro(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:nn,ot=typeof t.NAMESPACE=="string"?t.NAMESPACE:x,qt=se(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>m({},Ne)),Zt=se(t,"HTML_INTEGRATION_POINTS",()=>m({},Ce));const e=se(t,"CUSTOM_ELEMENT_HANDLING",()=>lt(null));if(v=lt(null),L(e,"tagNameCheck")&&Me(e.tagNameCheck)&&(v.tagNameCheck=e.tagNameCheck),L(e,"attributeNameCheck")&&Me(e.attributeNameCheck)&&(v.attributeNameCheck=e.attributeNameCheck),L(e,"allowCustomizedBuiltInElements")&&typeof e.allowCustomizedBuiltInElements=="boolean"&&(v.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),b(v),z&&(Bt=!1),Rt&&(tt=!0),et&&(h=m({},Qe),_=lt(null),et.html===!0&&(m(h,Je),m(_,tn)),et.svg===!0&&(m(h,oe),m(_,ae),m(_,xt)),et.svgFilters===!0&&(m(h,re),m(_,ae),m(_,xt)),et.mathMl===!0&&(m(h,ie),m(_,en),m(_,xt))),F.tagCheck=null,F.attributeCheck=null,L(t,"ADD_TAGS")&&(typeof t.ADD_TAGS=="function"?F.tagCheck=t.ADD_TAGS:ct(t.ADD_TAGS)&&(h===Gt&&(h=C(h)),m(h,t.ADD_TAGS,A))),L(t,"ADD_ATTR")&&(typeof t.ADD_ATTR=="function"?F.attributeCheck=t.ADD_ATTR:ct(t.ADD_ATTR)&&(_===Wt&&(_=C(_)),m(_,t.ADD_ATTR,A))),L(t,"ADD_FORBID_CONTENTS")&&ct(t.ADD_FORBID_CONTENTS)&&(nt===Re&&(nt=C(nt)),m(nt,t.ADD_FORBID_CONTENTS,A)),Xt&&(h["#text"]=!0),X&&m(h,["html","head","body"]),h.table&&(m(h,["tbody"]),delete mt.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const n=D;D=t.TRUSTED_TYPES_POLICY;try{Y=Q("")}catch(a){throw D=n,a}}else t.TRUSTED_TYPES_POLICY===null?(D=void 0,Y=""):(D===void 0&&(D=Tn()),D&&typeof Y=="string"&&(Y=Q("")));y&&y(t),rt=t},Pe=m({},[...oe,...re,...io]),ve=m({},[...ie,...ao]),Cn=function(t,e,n){return e.namespaceURI===x?t==="svg":e.namespaceURI===Lt?t==="svg"&&(n==="annotation-xml"||qt[n]):!!Pe[t]},Mn=function(t,e,n){return e.namespaceURI===x?t==="math":e.namespaceURI===wt?t==="math"&&Zt[n]:!!ve[t]},Pn=function(t,e,n){return e.namespaceURI===wt&&!Zt[n]||e.namespaceURI===Lt&&!qt[n]?!1:!ve[t]&&(Ln[t]||!Pe[t])},vn=function(t){let e=Z(t);(!e||!e.tagName)&&(e={namespaceURI:ot,tagName:"template"});const n=At(t.tagName),a=At(e.tagName);return Kt[t.namespaceURI]?t.namespaceURI===wt?Cn(n,e,a):t.namespaceURI===Lt?Mn(n,e,a):t.namespaceURI===x?Pn(n,e,a):!!(dt==="application/xhtml+xml"&&Kt[t.namespaceURI]):!1},H=function(t){ht(o.removed,{element:t});try{Z(t).removeChild(t)}catch{if(kt(t),!Z(t))throw G("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},xe=function(t,e,n){try{fe(t,e)}catch{try{t.removeAttribute(n)}catch{}}},It=function(t){Nt(t);const e=q(t);if(e){const a=[];V(e,l=>{ht(a,l)}),V(a,l=>{try{kt(l)}catch{}})}const n=Ut(t);if(n)for(let a=n.length-1;a>=0;--a){const l=n[a],f=l&&l.name;typeof f=="string"&&xe(t,l,f)}},$=function(t,e,n){if(!n)try{n=e.getAttributeNode(t)}catch{n=null}ht(o.removed,{attribute:n||null,from:e});try{n?fe(e,n):e.removeAttribute(t)}catch{try{e.removeAttribute(t)}catch{}}if(t==="is")if(tt||Rt)try{H(e)}catch{}else try{e.setAttribute(t,"")}catch{}},xn=function(t){const e=Ut(t);if(e)for(let n=e.length-1;n>=0;--n){const a=e[n],l=a&&a.name;typeof l!="string"||_[A(l)]||xe(t,a,l)}},Nt=function(t){const e=[t];for(;e.length>0;){const n=e.pop();ft(n)===N.element&&xn(n);const a=q(n);if(a)for(let l=a.length-1;l>=0;--l)e.push(a[l])}},ke=function(t,e){return j?t==="patchsrc"?!0:t==="for"&&e!=="label"&&e!=="output":!1},kn=function(t){if(!j)return;const e=[t];for(;e.length>0;){const n=e.pop(),a=ft(n);if(a===N.processingInstruction||a===N.comment&&O(rn,n.data)){try{kt(n)}catch{}continue}if(a===N.element){const f=n,p=A(Ft(n));try{f.hasAttribute&&f.hasAttribute("patchsrc")&&f.removeAttribute("patchsrc"),f.hasAttribute&&f.hasAttribute("for")&&ke("for",p)&&f.removeAttribute("for")}catch{}}const l=q(n);if(l)for(let f=l.length-1;f>=0;--f)e.push(l[f])}},Ue=function(t){let e=null,n=null;if(jt)t="<remove></remove>"+t;else{const f=Ve(t,/^[\r\n\t ]+/);n=f&&f[0]}dt==="application/xhtml+xml"&&ot===x&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=D?Q(t):t;if(ot===x)try{e=new Et().parseFromString(a,dt)}catch{}if(!e||!e.documentElement){e=Ht.createDocument(ot,"template",null);try{e.documentElement.innerHTML=Vt?Y:a}catch{}}const l=e.body||e.documentElement;return t&&n&&l.insertBefore(s.createTextNode(n),l.childNodes[0]||null),ot===x?_n.call(e,X?"html":"body")[0]:X?e.documentElement:l},Fe=function(t){const e=yt?yt(t):t.ownerDocument;return Te.call(e||t,t,w.SHOW_ELEMENT|w.SHOW_COMMENT|w.SHOW_TEXT|w.SHOW_PROCESSING_INSTRUCTION|w.SHOW_CDATA_SECTION,null)},Ct=function(t){return t=_t(t,An," "),t=_t(t,En," "),t=_t(t,yn," "),t},Qt=function(t){var e;t.normalize();const n=yt?yt(t):t.ownerDocument,a=Te.call(n||t,t,w.SHOW_TEXT|w.SHOW_COMMENT|w.SHOW_CDATA_SECTION|w.SHOW_PROCESSING_INSTRUCTION,null);let l=a.nextNode();for(;l;)l.data=Ct(l.data),l=a.nextNode();const f=(e=t.querySelectorAll)===null||e===void 0?void 0:e.call(t,"template");f&&V(f,p=>{it(p.content)&&Qt(p.content)})},Mt=function(t){const e=J?J(t):null;return typeof e!="string"||A(e)!=="form"?!1:typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||t.attributes!==Ut(t)||typeof t.removeAttribute!="function"||typeof t.removeAttributeNode!="function"||typeof t.getAttributeNode!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function"||t.nodeType!==B(t)||t.childNodes!==q(t)},it=function(t){if(!B||typeof t!="object"||t===null)return!1;try{return B(t)===N.documentFragment}catch{return!1}},Tt=function(t){if(!B||typeof t!="object"||t===null)return!1;try{return typeof B(t)=="number"}catch{return!1}};function k(i,t,e){i.length!==0&&V(i,n=>{n.call(o,t,e,rt)})}const Un=function(t,e){return!!(j&&t.hasChildNodes()&&!Tt(t.firstElementChild)&&O(on,t.textContent)&&O(on,t.innerHTML)||j&&t.namespaceURI===x&&Ao[e]&&(Tt(t.firstElementChild)||typeof t.textContent=="string"&&O(Eo[e],t.textContent))||t.nodeType===N.processingInstruction||j&&t.nodeType===N.comment&&O(rn,t.data))},Pt=function(t,e){if(t instanceof RegExp)return O(t,e);if(t instanceof Function){for(var n=arguments.length,a=new Array(n>2?n-2:0),l=2;l<n;l++)a[l-2]=arguments[l];return!!t(e,...a)}return!1},Fn=function(t,e,n){if(!mt[e]&&We(e)&&Pt(v.tagNameCheck,e))return!1;if(Xt&&!nt[e]){const a=Z(t),l=q(t);if(l&&a){const f=l.length;for(let p=f-1;p>=0;--p){const g=t===n?pn(l[p],!0):l[p];a.insertBefore(g,mn(t))}}}return H(t),!0},ze=function(t,e,n,a){return t.length===0?e:e===n||e===a?C(e):e},at=function(t,e){return t===e||Z(t)!==null?!1:($t&&Nt(t),!0)},He=function(t,e){if(k(T.beforeSanitizeElements,t,null),at(t,e))return!0;if(Mt(t))return H(t),!0;const n=A(Ft(t));if(h=ze(T.uponSanitizeElement,h,Gt,bt),k(T.uponSanitizeElement,t,{tagName:n,allowedTags:h}),at(t,e))return!0;if(Un(t,n))return H(t),!0;if(mt[n]||!(F.tagCheck instanceof Function&&F.tagCheck(n))&&!h[n]){const a=Fn(t,n,e);return a===!1&&(k(T.afterSanitizeElements,t,null),at(t,e))?!0:a}if(ft(t)===N.element&&!vn(t)||(n==="noscript"||n==="noembed"||n==="noframes")&&O(_o,t.innerHTML))return H(t),!0;if(z&&t.nodeType===N.text){const a=Ct(t.textContent);t.textContent!==a&&(ht(o.removed,{element:t.cloneNode()}),t.textContent=a)}return k(T.afterSanitizeElements,t,null),at(t,e)},Ge=function(t,e,n){if(ge[e]||ke(e,t)||Se&&(e==="id"||e==="name")&&(n in s||n in Nn))return!1;const a=_[e]||F.attributeCheck instanceof Function&&F.attributeCheck(e,t);return Bt&&O(Sn,e)||Ae&&O(bn,e)?!0:a?we[e]||O(_e,_t(n,he,""))||(e==="src"||e==="xlink:href"||e==="href")&&t!=="script"&&Ke(n,"data:")===0&&De[t]||Ee&&!O(On,_t(n,he,""))?!0:!n:We(t)&&Pt(v.tagNameCheck,t)&&Pt(v.attributeNameCheck,e,t)||e==="is"&&v.allowCustomizedBuiltInElements&&Pt(v.tagNameCheck,n)},zn=m({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),We=function(t){return!zn[At(t)]&&O(Rn,t)},Hn=function(t,e,n,a){if(D&&typeof K=="object"&&typeof K.getAttributeType=="function"&&!n)switch(K.getAttributeType(t,e)){case"TrustedHTML":return Q(a);case"TrustedScriptURL":return dn(a)}return a},Gn=function(t,e,n,a){try{return n?t.setAttributeNS(n,e,a):t.setAttribute(e,a),Mt(t)?(H(t),!1):!0}catch{return $(e,t),!1}},Be=function(t,e){if(k(T.beforeSanitizeAttributes,t,null),at(t,e))return;const n=t.attributes;if(!n||Mt(t))return;_=ze(T.uponSanitizeAttribute,_,Wt,Ot);const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_,forceKeepAttr:void 0};let l=n.length;const f=A(t.nodeName);for(;l--;){const p=n[l],g=p.name,M=p.namespaceURI,I=p.value,st=A(g),ee=I;let R=g==="value"?ee:Jn(ee),Ye=!1;if(a.attrName=st,a.attrValue=R,a.keepAttr=!0,a.forceKeepAttr=void 0,k(T.uponSanitizeAttribute,t,a),R=a.attrValue,be&&(st==="id"||st==="name")&&Ke(R,Oe)!==0&&($(g,t,p),R=Oe+R,Ye=!0),j&&O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,R)){$(g,t,p);continue}if(st==="attributename"&&Ve(R,"href")){$(g,t,p);continue}if(!a.forceKeepAttr){if(!a.keepAttr){$(g,t,p);continue}if(!ye&&O(go,R)){$(g,t,p);continue}if(z&&(R=Ct(R)),!Ge(f,st,R)){$(g,t,p);continue}R=Hn(f,st,M,R),R!==ee&&Gn(t,g,M,R)&&Ye&&$e(o.removed)}}k(T.afterSanitizeAttributes,t,null),at(t,e)},vt=function(t){let e=null;const n=Fe(t);for(k(T.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)if(k(T.uponSanitizeShadowNode,e,null),He(e,t),Be(e,t),it(e.content)&&vt(e.content),ft(e)===N.element){const a=pe(e);it(a)&&(te(a),vt(a))}k(T.afterSanitizeShadowDOM,t,null)},te=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const n=e.pop();if(n.shadow){vt(n.shadow);continue}const a=n.node,l=ft(a)===N.element,f=q(a);if(f)for(let p=f.length-1;p>=0;--p)e.push({node:f[p],shadow:null});if(l){const p=J?J(a):null;if(typeof p=="string"&&A(p)==="template"){const g=a.content;it(g)&&e.push({node:g,shadow:null})}}if(l){const p=pe(a);it(p)&&e.push({node:null,shadow:p},{node:p,shadow:null})}}};return o.sanitize=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,n=null,a=null,l=null;if(Vt=!i,Vt&&(i="<!-->
2"),typeof i!="string"&&!Tt(i)&&(i=oo(i),typeof i!="string"))throw G("dirty is not a string, aborting");if(!o.isSupported)return i;Yt?(h=bt,_=Ot):Jt(t),(T.uponSanitizeElement.length>0||T.uponSanitizeAttribute.length>0)&&(h=C(h)),T.uponSanitizeAttribute.length>0&&(_=C(_)),o.removed=[];const f=$t&&typeof i!="string"&&Tt(i);if(f){kn(i);const M=Ft(i);if(typeof M=="string"){const I=A(M);if(!h[I]||mt[I])throw It(i),G("root node is forbidden and cannot be sanitized in-place")}if(Mt(i))throw It(i),G("root node is clobbered and cannot be sanitized in-place");try{te(i)}catch(I){throw It(i),I}}else if(Tt(i))e=Ue("<!---->"),n=e.ownerDocument.importNode(i,!0),n.nodeType===N.element&&n.nodeName==="BODY"||n.nodeName==="HTML"?e=n:e.appendChild(n),te(e);else{if(!tt&&!z&&!X&&i.indexOf("<")===-1)return D&&Dt?Q(i):i;if(e=Ue(i),!e)return tt?null:Dt?Y:""}e&&jt&&H(e.firstChild);const p=f?i:e;try{const M=Fe(p);for(;a=M.nextNode();)He(a,p),Be(a,p),it(a.content)&&vt(a.content)}catch(M){throw f&&(It(i),V(o.removed,I=>{I.element&&Nt(I.element)})),M}if(f){let M=!1;if(V(o.removed,I=>{I.element&&(I.element===i&&(M=!0),Nt(I.element))}),M)throw G("a node selected for removal could not be safely returned; refusing to sanitize in place");return z&&Qt(i),i}if(tt){if(z&&Qt(e),Rt)for(l=hn.call(e.ownerDocument);e.firstChild;)l.appendChild(e.firstChild);else l=e;return(_.shadowroot||_.shadowrootmode)&&(l=gn.call(c,l,!0)),l}let g=X?e.outerHTML:e.innerHTML;return X&&h["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&O(To,e.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+e.ownerDocument.doctype.name+`>
3`+g),z&&(g=Ct(g)),D&&Dt?Q(g):g},o.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Jt(i),Yt=!0,bt=h,Ot=_},o.clearConfig=function(){rt=null,Yt=!1,bt=null,Ot=null,D=zt,Y=""},o.isValidAttribute=function(i,t,e){rt||Jt({});const n=A(i),a=A(t);return Ge(n,a,e)},o.addHook=function(i,t){typeof t=="function"&&L(T,i)&&ht(T[i],t)},o.removeHook=function(i,t){if(L(T,i)){if(t!==void 0){const e=qn(T[i],t);return e===-1?void 0:Zn(T[i],e,1)[0]}return $e(T[i])}},o.removeHooks=function(i){L(T,i)&&(T[i]=[])},o.removeAllHooks=function(){T=an()},o}var le=fn();const bo={USE_PROFILES:{html:!0},ADD_TAGS:["details","summary"],ADD_ATTR:["target","loading","referrerpolicy"],FORBID_TAGS:["style","form","input","button","textarea","select","option","iframe","object","embed"],FORBID_ATTR:["style"]};let sn=!1;function Oo(r){return r?(!sn&&typeof le.addHook=="function"&&(le.addHook("afterSanitizeAttributes",o=>{o.tagName==="A"&&o.getAttribute("target")&&(o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"))}),sn=!0),String(le.sanitize(r,bo))):""}export{Oo as sanitizeRenderedHtml};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.