=0)return!1;if(Qt.test(o))return!1}if(Xt.test(o))return!1;if("style"==e)return!ae.test(n);if("class"==e&&n&&/(^|\W)i-amphtml-/i.test(n))return!1;if(Bt(e)&&/__amp_source_origin/.test(n))return!1;var u=pt(r),s=Object.assign(c(),ie,u?oe:{})[t];if(s&&-1!=s.indexOf(e))return!1;var f=Object.assign(c(),ee,u?ne:{})[t];if(f){var l=f[e];if(l&&-1!=n.search(l))return!1}return!0}var se="purifier",fe={"script":{"attribute":"type","values":["application/json","application/ld+json"]}},ce={USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}},le=function(){function t(t,e,n){this.el=t,this._z=1,this.zz=lt(self),this.Dz=lt(self);var i=Object.assign(e||{},r(r({},ce),{},{ADD_ATTR:Kt,ADD_TAGS:["use"],FORBID_TAGS:Object.keys($t),FORCE_BODY:!0,RETURN_DOM:!0,ALLOW_UNKNOWN_PROTOCOLS:!0}));this.zz.setConfig(i),this.Fz(this.zz,n),this.Lz(this.Dz)}var e=t.prototype;return e.purifyHtml=function(t){return this.zz.sanitize(t)},e.purifyTagsForTripleMustache=function(t){var e=this.Dz.sanitize(t,{"ALLOWED_TAGS":pt(this.el)?Vt:Ht,"FORCE_BODY":!0,"RETURN_DOM_FRAGMENT":!0}),n=this.el.createElement("div");return n.appendChild(e),n.innerHTML},e.getAllowedTags=function(){var t={};this.zz.addHook("uponSanitizeElement",(function(e,n){Object.assign(t,n.allowedTags)}));var e=this.el.createElement("p");return this.zz.sanitize(e),Object.keys($t).forEach((function(e){t[e]=!1})),this.zz.removeHook("uponSanitizeElement"),t},e.validateAttributeChange=function(t,e,n){var r=t.nodeName.toLowerCase(),i=fe[r];if(i){var o=i.attribute,a=i.values;if(o===e&&(null==n||!a.includes(n)))return!1}if("a"===r&&"target"===e&&(null==n||!Jt.includes(n)))return!1;if(null==n)return!0;if(me(e)!==pe.NONE)return!1;if(!this.zz.isValidAttribute(r,e,n)){var u=Zt[r];if(!(u&&u.includes(e)||r.startsWith("amp-")))return!1}var s=t.ownerDocument?t.ownerDocument:t;return!(n&&!ue(r,e,n,s,!0))},e.Fz=function(t,e){var n,r,i=this,o=pt(this.el),a=[],u=[];t.addHook("uponSanitizeElement",(function(t,e){var r=e.tagName;if(n=e.allowedTags,r.startsWith("amp-")&&(n[r]=!o||Yt[r]),"a"===r){var i=h(t);i.hasAttribute("href")&&!i.hasAttribute("target")&&i.setAttribute("target","_top")}var u=fe[r];if(u){var s=u.attribute,f=u.values,c=h(t);c.hasAttribute(s)&&f.includes(c.getAttribute(s))&&(n[r]=!0,a.push(r))}})),t.addHook("afterSanitizeElements",(function(t){a.forEach((function(t){delete n[t]})),a.length=0})),t.addHook("uponSanitizeAttribute",(function(t,n){var o=t.nodeName.toLowerCase(),a=n.attrName,s=n.attrValue;r=n.allowedAttributes;var f=function(){r[a]||(r[a]=!0,u.push(a))};if(o.startsWith("amp-"))f();else{if("a"==o&&"target"==a){var c=s.toLowerCase();s=Jt.includes(c)?c:"_top"}var l=Zt[o];l&&l.includes(a)&&f()}var p=me(a);if(p===pe.CLASSIC){var m=a.substring(1,a.length-1);t.setAttribute("".concat(Pt).concat(m),s)}p!==pe.NONE&&t.setAttribute("i-amphtml-binding",""),ue(o,a,s,i.el,!0)?e&&s&&!a.startsWith(Pt)&&(s=e(o,a,s)):(n.keepAttr=!1,vt().error(se,'Removed invalid attribute %s[%s="%s"].',o,a,s)),n.attrValue=s})),t.addHook("afterSanitizeAttributes",(function(t){!function(t,e){var n=t.tagName.startsWith("AMP-"),r=t.hasAttribute("i-amphtml-binding");!r&&Wt[t.tagName]?t.setAttribute("i-amphtml-ignore",""):(r||n)&&(t.hasAttribute(Gt)||t.setAttribute(Gt,String(i._z++)))}(t),u.forEach((function(t){delete r[t]})),u.length=0,"use"===t.nodeName.toLowerCase()&&["href","xlink:href"].forEach((function(e){t.hasAttribute(e)&&!t.getAttribute(e).startsWith("#")&&(function(t){var e;null===(e=t.parentElement)||void 0===e||e.removeChild(t)}(t),vt().error(se,'Removed invalid