; (self.AMP=self.AMP||[]).push({m:1,v:"2505022142002",n:"amp-mustache",ev:"0.2",l:!0,f:function(t,e){(()=>{function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function r(t){for(var r=1;r""!==t)),null===(i=(s=self).__AMP_REPORT_ERROR)||void 0===i||i.call(s,p),p}("​​​",t,e,n,r,i,s,a,l,c,f,p)}var{entries:d,setPrototypeOf:h,isFrozen:g,getPrototypeOf:b,getOwnPropertyDescriptor:y}=Object,{freeze:v,seal:w,create:x}=Object,{apply:A,construct:_}="undefined"!=typeof Reflect&&Reflect;A||(A=function(t,e,n){return t.apply(e,n)}),v||(v=function(t){return t}),w||(w=function(t){return t}),_||(_=function(t,e){return new t(...e)});var E,T=L(Array.prototype.forEach),k=L(Array.prototype.pop),R=L(Array.prototype.push),S=L(String.prototype.toLowerCase),O=L(String.prototype.toString),j=L(String.prototype.match),P=L(String.prototype.replace),I=L(String.prototype.indexOf),M=L(String.prototype.trim),D=L(RegExp.prototype.test),z=(E=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n1?n-1:0),i=1;i/gm),Q=w(/\${[\w\W]*}/gm),tt=w(/^data-[\-\w.\u00B7-\uFFFF]/),et=w(/^aria-[\-\w]+$/),nt=w(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rt=w(/^(?:\w+script|data):/i),it=w(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ot=w(/^html$/i),st=Object.freeze({__proto__:null,MUSTACHE_EXPR:Z,ERB_EXPR:J,TMPLIT_EXPR:Q,DATA_ATTR:tt,ARIA_ATTR:et,IS_ALLOWED_URI:nt,IS_SCRIPT_OR_DATA:rt,ATTR_WHITESPACE:it,DOCTYPE_NAME:ot}),at=()=>"undefined"==typeof window?null:window,lt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e.currentScript&&e.currentScript.hasAttribute(r)&&(n=e.currentScript.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},ct=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:at();const n=e=>t(e);if(n.version="3.0.2",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;const r=e.document;let{document:i}=e;const{DocumentFragment:o,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:m}=e,h=l.prototype,g=N(h,"cloneNode"),b=N(h,"nextSibling"),y=N(h,"childNodes"),w=N(h,"parentNode");if("function"==typeof s){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}const x=lt(m,r),A=x?x.createHTML(""):"",{implementation:_,createNodeIterator:E,createDocumentFragment:L,getElementsByTagName:Z}=i,{importNode:J}=r;let Q={};n.isSupported="function"==typeof d&&"function"==typeof w&&_&&void 0!==_.createHTMLDocument;const{MUSTACHE_EXPR:tt,ERB_EXPR:et,TMPLIT_EXPR:rt,DATA_ATTR:it,ARIA_ATTR:ct,IS_SCRIPT_OR_DATA:ut,ATTR_WHITESPACE:ft}=st;let{IS_ALLOWED_URI:pt}=st,mt=null;const dt=F({},[...U,...B,...W,...H,...V]);let ht=null;const gt=F({},[...G,...X,...Y,...K]);let bt=Object.seal(Object.create(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}})),yt=null,vt=null,wt=!0,xt=!0,At=!1,_t=!0,Et=!1,Tt=!1,kt=!1,Rt=!1,St=!1,Ot=!1,jt=!1,Pt=!0,It=!1;const Mt="user-content-";let Dt=!0,zt=!1,Lt={},Ft=null;const Ct=F({},["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 Nt=null;const Ut=F({},["audio","video","img","source","image","track"]);let Bt=null;const Wt=F({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$t="http://www.w3.org/1998/Math/MathML",Ht="http://www.w3.org/2000/svg",qt="http://www.w3.org/1999/xhtml";let Vt=qt,Gt=!1,Xt=null;const Yt=F({},[$t,Ht,qt],O);let Kt;const Zt=["application/xhtml+xml","text/html"],Jt="text/html";let Qt,te=null;const ee=i.createElement("form"),ne=function(t){return t instanceof RegExp||t instanceof Function},re=function(t){te&&te===t||(t&&"object"==typeof t||(t={}),t=C(t),Kt=Kt=-1===Zt.indexOf(t.PARSER_MEDIA_TYPE)?Jt:t.PARSER_MEDIA_TYPE,Qt="application/xhtml+xml"===Kt?O:S,mt="ALLOWED_TAGS"in t?F({},t.ALLOWED_TAGS,Qt):dt,ht="ALLOWED_ATTR"in t?F({},t.ALLOWED_ATTR,Qt):gt,Xt="ALLOWED_NAMESPACES"in t?F({},t.ALLOWED_NAMESPACES,O):Yt,Bt="ADD_URI_SAFE_ATTR"in t?F(C(Wt),t.ADD_URI_SAFE_ATTR,Qt):Wt,Nt="ADD_DATA_URI_TAGS"in t?F(C(Ut),t.ADD_DATA_URI_TAGS,Qt):Ut,Ft="FORBID_CONTENTS"in t?F({},t.FORBID_CONTENTS,Qt):Ct,yt="FORBID_TAGS"in t?F({},t.FORBID_TAGS,Qt):{},vt="FORBID_ATTR"in t?F({},t.FORBID_ATTR,Qt):{},Lt="USE_PROFILES"in t&&t.USE_PROFILES,wt=!1!==t.ALLOW_ARIA_ATTR,xt=!1!==t.ALLOW_DATA_ATTR,At=t.ALLOW_UNKNOWN_PROTOCOLS||!1,_t=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Et=t.SAFE_FOR_TEMPLATES||!1,Tt=t.WHOLE_DOCUMENT||!1,St=t.RETURN_DOM||!1,Ot=t.RETURN_DOM_FRAGMENT||!1,jt=t.RETURN_TRUSTED_TYPE||!1,Rt=t.FORCE_BODY||!1,Pt=!1!==t.SANITIZE_DOM,It=t.SANITIZE_NAMED_PROPS||!1,Dt=!1!==t.KEEP_CONTENT,zt=t.IN_PLACE||!1,pt=t.ALLOWED_URI_REGEXP||nt,Vt=t.NAMESPACE||qt,bt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ne(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(bt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ne(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(bt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(bt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Et&&(xt=!1),Ot&&(St=!0),Lt&&(mt=F({},[...V]),ht=[],!0===Lt.html&&(F(mt,U),F(ht,G)),!0===Lt.svg&&(F(mt,B),F(ht,X),F(ht,K)),!0===Lt.svgFilters&&(F(mt,W),F(ht,X),F(ht,K)),!0===Lt.mathMl&&(F(mt,H),F(ht,Y),F(ht,K))),t.ADD_TAGS&&(mt===dt&&(mt=C(mt)),F(mt,t.ADD_TAGS,Qt)),t.ADD_ATTR&&(ht===gt&&(ht=C(ht)),F(ht,t.ADD_ATTR,Qt)),t.ADD_URI_SAFE_ATTR&&F(Bt,t.ADD_URI_SAFE_ATTR,Qt),t.FORBID_CONTENTS&&(Ft===Ct&&(Ft=C(Ft)),F(Ft,t.FORBID_CONTENTS,Qt)),Dt&&(mt["#text"]=!0),Tt&&F(mt,["html","head","body"]),mt.table&&(F(mt,["tbody"]),delete yt.tbody),v&&v(t),te=t)},ie=F({},["mi","mo","mn","ms","mtext"]),oe=F({},["foreignobject","desc","title","annotation-xml"]),se=F({},["title","style","font","a","script"]),ae=F({},B);F(ae,W),F(ae,$);const le=F({},H);F(le,q);const ce=function(t){let e=w(t);e&&e.tagName||(e={namespaceURI:Vt,tagName:"template"});const n=S(t.tagName),r=S(e.tagName);return!!Xt[t.namespaceURI]&&(t.namespaceURI===Ht?e.namespaceURI===qt?"svg"===n:e.namespaceURI===$t?"svg"===n&&("annotation-xml"===r||ie[r]):Boolean(ae[n]):t.namespaceURI===$t?e.namespaceURI===qt?"math"===n:e.namespaceURI===Ht?"math"===n&&oe[r]:Boolean(le[n]):t.namespaceURI===qt?!(e.namespaceURI===Ht&&!oe[r])&&!(e.namespaceURI===$t&&!ie[r])&&!le[n]&&(se[n]||!ae[n]):!("application/xhtml+xml"!==Kt||!Xt[t.namespaceURI]))},ue=function(t){R(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}},fe=function(t,e){try{R(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){R(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!ht[t])if(St||Ot)try{ue(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},pe=function(t){let e,n;if(Rt)t=""+t;else{const e=j(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Kt&&Vt===qt&&(t=''+t+"");const r=x?x.createHTML(t):t;if(Vt===qt)try{e=(new p).parseFromString(r,Kt)}catch(t){}if(!e||!e.documentElement){e=_.createDocument(Vt,"template",null);try{e.documentElement.innerHTML=Gt?A:r}catch(t){}}const o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),Vt===qt?Z.call(e,Tt?"html":"body")[0]:Tt?e.documentElement:o},me=function(t){return E.call(t.ownerDocument||t,t,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},de=function(t){return t instanceof f&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof u)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},he=function(t){return"object"==typeof a?t instanceof a:t&&"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},ge=function(t,e,r){Q[t]&&T(Q[t],(t=>{t.call(n,e,r,te)}))},be=function(t){let e;if(ge("beforeSanitizeElements",t,null),de(t))return ue(t),!0;const r=Qt(t.nodeName);if(ge("uponSanitizeElement",t,{tagName:r,allowedTags:mt}),t.hasChildNodes()&&!he(t.firstElementChild)&&(!he(t.content)||!he(t.content.firstElementChild))&&D(/<[/\w]/g,t.innerHTML)&&D(/<[/\w]/g,t.textContent))return ue(t),!0;if(!mt[r]||yt[r]){if(!yt[r]&&ve(r)){if(bt.tagNameCheck instanceof RegExp&&D(bt.tagNameCheck,r))return!1;if(bt.tagNameCheck instanceof Function&&bt.tagNameCheck(r))return!1}if(Dt&&!Ft[r]){const e=w(t)||t.parentNode,n=y(t)||t.childNodes;if(n&&e)for(let r=n.length-1;r>=0;--r)e.insertBefore(g(n[r],!0),b(t))}return ue(t),!0}return t instanceof l&&!ce(t)?(ue(t),!0):"noscript"!==r&&"noembed"!==r||!D(/<\/no(script|embed)/i,t.innerHTML)?(Et&&3===t.nodeType&&(e=t.textContent,e=P(e,tt," "),e=P(e,et," "),e=P(e,rt," "),t.textContent!==e&&(R(n.removed,{element:t.cloneNode()}),t.textContent=e)),ge("afterSanitizeElements",t,null),!1):(ue(t),!0)},ye=function(t,e,n){if(Pt&&("id"===e||"name"===e)&&(n in i||n in ee))return!1;if(xt&&!vt[e]&&D(it,e));else if(wt&&D(ct,e));else if(!ht[e]||vt[e]){if(!(ve(t)&&(bt.tagNameCheck instanceof RegExp&&D(bt.tagNameCheck,t)||bt.tagNameCheck instanceof Function&&bt.tagNameCheck(t))&&(bt.attributeNameCheck instanceof RegExp&&D(bt.attributeNameCheck,e)||bt.attributeNameCheck instanceof Function&&bt.attributeNameCheck(e))||"is"===e&&bt.allowCustomizedBuiltInElements&&(bt.tagNameCheck instanceof RegExp&&D(bt.tagNameCheck,n)||bt.tagNameCheck instanceof Function&&bt.tagNameCheck(n))))return!1}else if(Bt[e]);else if(D(pt,P(n,ft,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==I(n,"data:")||!Nt[t])if(At&&!D(ut,P(n,ft,"")));else if(n)return!1;return!0},ve=function(t){return t.indexOf("-")>0},we=function(t){let e,r,i,o;ge("beforeSanitizeAttributes",t,null);const{attributes:s}=t;if(!s)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ht};for(o=s.length;o--;){e=s[o];const{name:l,namespaceURI:c}=e;if(r="value"===l?e.value:M(e.value),i=Qt(l),a.attrName=i,a.attrValue=r,a.keepAttr=!0,a.forceKeepAttr=void 0,ge("uponSanitizeAttribute",t,a),r=a.attrValue,a.forceKeepAttr)continue;if(fe(l,t),!a.keepAttr)continue;if(!_t&&D(/\/>/i,r)){fe(l,t);continue}Et&&(r=P(r,tt," "),r=P(r,et," "),r=P(r,rt," "));const u=Qt(t.nodeName);if(ye(u,i,r)){if(!It||"id"!==i&&"name"!==i||(fe(l,t),r=Mt+r),x&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(c);else switch(m.getAttributeType(u,i)){case"TrustedHTML":r=x.createHTML(r);break;case"TrustedScriptURL":r=x.createScriptURL(r)}try{c?t.setAttributeNS(c,l,r):t.setAttribute(l,r),k(n.removed)}catch(t){}}}ge("afterSanitizeAttributes",t,null)},xe=function t(e){let n;const r=me(e);for(ge("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)ge("uponSanitizeShadowNode",n,null),be(n)||(n.content instanceof o&&t(n.content),we(n));ge("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t){let e,i,s,l,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Gt=!t,Gt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!he(t)){if("function"!=typeof t.toString)throw z("toString is not a function");if("string"!=typeof(t=t.toString()))throw z("dirty is not a string, aborting")}if(!n.isSupported)return t;if(kt||re(c),n.removed=[],"string"==typeof t&&(zt=!1),zt){if(t.nodeName){const e=Qt(t.nodeName);if(!mt[e]||yt[e])throw z("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof a)e=pe("\x3c!----\x3e"),i=e.ownerDocument.importNode(t,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?e=i:e.appendChild(i);else{if(!St&&!Et&&!Tt&&-1===t.indexOf("<"))return x&&jt?x.createHTML(t):t;if(e=pe(t),!e)return St?null:jt?A:""}e&&Rt&&ue(e.firstChild);const u=me(zt?t:e);for(;s=u.nextNode();)be(s)||(s.content instanceof o&&xe(s.content),we(s));if(zt)return t;if(St){if(Ot)for(l=L.call(e.ownerDocument);e.firstChild;)l.appendChild(e.firstChild);else l=e;return(ht.shadowroot||ht.shadowrootmod)&&(l=J.call(r,l,!0)),l}let f=Tt?e.outerHTML:e.innerHTML;return Tt&&mt["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&D(ot,e.ownerDocument.doctype.name)&&(f="\n"+f),Et&&(f=P(f,tt," "),f=P(f,et," "),f=P(f,rt," ")),x&&jt?x.createHTML(f):f},n.setConfig=function(t){re(t),kt=!0},n.clearConfig=function(){te=null,kt=!1},n.isValidAttribute=function(t,e,n){te||re({});const r=Qt(t),i=Qt(e);return ye(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&(Q[t]=Q[t]||[],R(Q[t],e))},n.removeHook=function(t){if(Q[t])return k(Q[t])},n.removeHooks=function(t){Q[t]&&(Q[t]=[])},n.removeAllHooks=function(){Q={}},n}();function ut(t){return function(t,e){const n=e.documentElement;return["⚡4email","amp4email"].some((t=>n.hasAttribute(t)))}(0,t)}var ft=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function pt(t,e=""){try{return decodeURIComponent(t)}catch(t){return e}}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var mt=self.__AMP_LOG;function dt(t){return mt.user||(mt.user=ht()),function(t,e){return e&&e.ownerDocument.defaultView!=t}(mt.user.win,t)?mt.userForEmbed||(mt.userForEmbed=ht()):mt.user}function ht(t){return function(t,e){throw new Error("failed to call initLogConstructor")}()}function gt(t,e,n,r,i,o,s,a,l,c,u){return t}function bt(t,e,n,r,i,o,s,a,l,c,u){return dt().assert(t,e,n,r,i,o,s,a,l,c,u)}var yt=/(\S+)(?:\s+(?:(-?\d+(?:\.\d+)?)([a-zA-Z]*)))?\s*(?:,|$)/g;function vt(t,e){return m(t.width!=e.width,"Duplicate width: %s",t.width),t.width-e.width}function wt(t,e){return m(t.dpr!=e.dpr,"Duplicate dpr: %s",t.dpr),t.dpr-e.dpr}function xt(t,e){return Et(t=At(t),e)}function At(t){return t.__AMP_TOP||(t.__AMP_TOP=t)}function _t(t){return t.nodeType?(n=t,e=(n.ownerDocument||n).defaultView,xt(e,"ampdoc")).getAmpDoc(t):t;var e,n}function Et(t,e){gt(function(t,e){const n=t.__AMP_SERVICES&&t.__AMP_SERVICES[e];return!(!n||!n.ctor)}(t,e));const n=Tt(t)[e];return n.obj||(gt(n.ctor),gt(n.context),n.obj=new n.ctor(n.context),gt(n.obj),n.context=null,n.resolve&&n.resolve(n.obj)),n.obj}function Tt(t){let e=t.__AMP_SERVICES;return e||(e=t.__AMP_SERVICES={}),e}var kt,Rt=(()=>self.AMP.config.urls)(),St=new Set(["c","v","a","ad"]),Ot=t=>"string"==typeof t?jt(t):t;function jt(t,e){return kt||(kt=self.document.createElement("a")),function(t,e,n){return t.href="",new URL(e,t.href)}(kt,t)}function Pt(t){return Rt.cdnProxyRegex.test(Ot(t).origin)}function It(t,e){return e=Ot(e),new URL(t,e.href).toString()}var Mt=(()=>self.AMP.config.urls)();function Dt(t,e,n){return zt(e)?function(t,e,n,r){var i;bt(!("__amp_source_origin"in function(t){const e=l();if(!t)return e;let n;for(;n=ft.exec(t);){const t=pt(n[1],n[1]),r=n[2]?pt(n[2].replace(/\+/g," "),n[2]):"";e[t]=r}return e}(jt(i=n).search)),"Source origin is not allowed in %s",i);const o=Pt(r),s=jt(function(t){if(!Pt(t=Ot(t)))return t.href;const e=t.pathname.split("/"),n=e[1];bt(St.has(n),"Unknown path prefix in url %s",t.href);const r=e[2],i="s"==r?"https://"+decodeURIComponent(e[3]):"http://"+decodeURIComponent(r);return bt(i.indexOf(".")>0,"Expected a . in origin %s",i),e.splice(1,"s"==r?3:2),i+e.join("/")+function(t,e){if(!t||"?"==t)return"";const n=new RegExp("[?&](amp_(js[^&=]*|gsa|r|kit)|usqp)\\b[^&]*","g"),r=t.replace(n,"").replace(/^[?&]/,"");return r?"?"+r:""}(t.search)+(t.hash||"")}(r));if("href"==e&&!n.startsWith("#"))return It(n,s);if("src"==e)return"amp-img"==t?Lt(n,s,o):It(n,s);if("srcset"==e){let t;try{t=function(t){const e=[];let n;for(;n=yt.exec(t);){const t=n[1];let r,i;if(n[2]){const t=n[3].toLowerCase();if("w"==t)r=parseInt(n[2],10);else{if("x"!=t)continue;i=parseFloat(n[2])}}else i=1;e.push({url:t,width:r,dpr:i})}return new class{constructor(t){m(t.length>0,"Srcset must have at least one source"),this.oT=t;let e=!1,n=!1;for(let r=0;r1.2))break;n=s,r=l,i=a}return n}Bk(t){const e=this.oT;let n=0,r=1/0;for(let i=0;it.url))}stringify(t){const e=[],n=this.oT;for(let r=0;rLt(t,s,o)))}return n}(t,e,n,self.location):n}function zt(t){return"src"==t||"href"==t||"xlink:href"==t||"srcset"==t}function Lt(t,e,n){const r=jt(It(t,e));return"data:"==r.protocol||Pt(r)||!n?r.href:`${Mt.cdn}/i/`+("https:"==r.protocol?"s/":"")+encodeURIComponent(r.host)+r.pathname+(r.search||"")+(r.hash||"")}var Ft="data-amp-bind-",Ct="i-amphtml-key",Nt={"AMP-IMG":["src","srcset","layout","width","height"]},Ut={"applet":!0,"audio":!0,"base":!0,"embed":!0,"frame":!0,"frameset":!0,"iframe":!0,"img":!0,"link":!0,"meta":!0,"object":!0,"style":!0,"video":!0},Bt={"amp-accordion":!0,"amp-anim":!0,"amp-bind-macro":!0,"amp-carousel":!0,"amp-fit-text":!0,"amp-img":!0,"amp-layout":!0,"amp-selector":!0,"amp-sidebar":!0,"amp-timeago":!0},Wt=["a","amp-img","article","aside","b","blockquote","br","caption","code","col","colgroup","dd","del","details","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","header","hr","i","ins","li","main","mark","nav","ol","p","pre","q","s","section","small","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","u","ul"],$t=["a","article","aside","b","blockquote","br","caption","code","col","colgroup","dd","del","details","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","header","hr","i","ins","li","main","mark","nav","ol","p","pre","q","s","section","small","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","u","ul"],Ht=["amp-fx","fallback","heights","layout","min-font-size","max-font-size","on","option","placeholder","submitting","submit-success","submit-error","validation-for","verify-error","visible-when-invalid","href","style","text","subscriptions-action","subscriptions-actions","subscriptions-decorate","subscriptions-dialog","subscriptions-display","subscriptions-section","subscriptions-service","subscriptions-google-rtc","amp-nested-submenu","amp-nested-submenu-open","amp-nested-submenu-close","itemprop"],qt={"a":["rel","target"],"div":["template"],"form":["action-xhr","verify-xhr","custom-validation-reporting","target"],"input":["mask-output"],"template":["type"],"textarea":["autoexpand"]},Vt=["_top","_blank"],Gt=/^(?:\w+script|data|blob):/i,Xt=/^(?:blob):/i,Yt=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Kt=Object.freeze({"input":{"type":/(?:image|button)/i}}),Zt=Object.freeze({"input":{"type":/(?:button|file|image|password)/i}}),Jt=Object.freeze(["form","formaction","formmethod","formtarget","formnovalidate","formenctype"]),Qt=Object.freeze({"input":Jt,"textarea":Jt,"select":Jt}),te=Object.freeze({"amp-anim":["controls"],"form":["name"]}),ee=/!important|position\s*:\s*fixed|position\s*:\s*sticky/i;function ne(t,e,n,r,i=!1){const o=n?n.replace(Yt,""):"";if(!i){if(e.startsWith("on")&&"on"!=e)return!1;const t=o.toLowerCase();if(t.indexOf("=0||t.indexOf("=0)return!1;if(Gt.test(o))return!1}if(Xt.test(o))return!1;if("style"==e)return!ee.test(n);if("class"==e&&n&&/(^|\W)i-amphtml-/i.test(n))return!1;if(zt(e)&&/__amp_source_origin/.test(n))return!1;const s=ut(r),a=Object.assign(l(),Qt,s?te:{})[t];if(a&&-1!=a.indexOf(e))return!1;const c=Object.assign(l(),Kt,s?Zt:{})[t];if(c){const t=c[e];if(t&&-1!=n.search(t))return!1}return!0}var re="purifier",ie={"script":{"attribute":"type","values":["application/json","application/ld+json"]}},oe={USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}};function se(t){return"["==t[0]&&"]"==t[t.length-1]?1:t.startsWith(Ft)?2:0}var ae={};!function(t){var e=Object.prototype.toString,n=Array.isArray||function(t){return"[object Array]"===e.call(t)};function r(t){return"function"==typeof t}function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function o(t,e){return null!=t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,e)}var s=RegExp.prototype.test,a=/\S/,l={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},c=/\s*/,u=/\s+/,f=/\s*=/,p=/\s*\}/,m=/#|\^|\/|>|\{|&|=|!/;function d(t){this.string=t,this.tail=t,this.pos=0}function h(t,e){this.view=t,this.cache={".":this.view},this.parent=e}function g(){this.cache={}}d.prototype.eos=function(){return""===this.tail},d.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return"";var n=e[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},d.prototype.scanUntil=function(t){var e,n=this.tail.search(t);switch(n){case-1:e=this.tail,this.tail="";break;case 0:e="";break;default:e=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=e.length,e},h.prototype.push=function(t){return new h(t,this)},h.prototype.lookup=function(t){var e,n=this.cache;if(n.hasOwnProperty(t))e=n[t];else{for(var i,s,a=this,l=!1;a;){if(t.indexOf(".")>0)for(e=a.view,i=t.split("."),s=0;null!=e&&s0?i[i.length-1][4]:n;break;default:r.push(e)}return n}(function(t){for(var e,n,r=[],i=0,o=t.length;i"===o?s=this.renderPartial(i,e,n,r):"&"===o?s=this.unescapedValue(i,e):"name"===o?s=this.escapedValue(i,e):"text"===o&&(s=this.rawValue(i)),void 0!==s&&(a+=s);return a},g.prototype.renderSection=function(t,e,i,o){var s=this,a="",l=e.lookup(t[1]);if(l){if(n(l))for(var c=0,u=l.length;c"'`=\/]/g,(function(t){return l[t]}))},t.sanitizeUnescaped=null,t.setUnescapedSanitizer=function(e){t.sanitizeUnescaped=e},t.Scanner=d,t.Context=h,t.Writer=g}(ae);var le=ae,ce="amp-mustache";t.registerTemplate(ce,class extends class{constructor(t,e){var n,r;this.element=t,this.win=t.ownerDocument.defaultView||e,this.Ee=(n=this.element,r="viewer",Et(function(t){const e=_t(t);return e.isSingleDoc()?e.win:e}(_t(n)),r)),this.compileCallback()}compileCallback(){}setHtml(t){}render(t){}renderAsString(t){}Wk(t,e){for(let n=t.firstChild;null!=n;n=n.nextSibling)if(3==n.nodeType){const t=n.textContent.trim();t&&e(t)}else 8==n.nodeType||c(n)&&e(n)}tryUnwrap(t){let e;return this.Wk(t,(t=>{e=void 0===e&&t.nodeType?t:null})),e||t}unwrapChildren(t){const e=[];return this.Wk(t,(t=>{if("string"==typeof t){const n=this.win.document.createElement("div");n.textContent=t,e.push(n)}else e.push(t)})),e}viewerCanRenderTemplates(){return this.Ee.hasCapability("viewerRenderTemplate")}}{constructor(t,e){super(t,e),function(t,e,n,r){!function(t,e,n,r,i,o){const s=Tt(t);let a=s[n];a||(a=s[n]={obj:null,promise:null,resolve:null,reject:null,context:null,ctor:null,sharedInstance:!1}),a.ctor||(a.ctor=r,a.context=e,a.sharedInstance=!1,a.resolve&&Et(t,n))}(t=At(t),t,e,n)}(e,"purifier",(function(){return new class{constructor(t,e,n){this.Vf=t,this.$k=1,this.Hk=ct(self),this.qk=ct(self);const i=Object.assign(e||{},r(r({},oe),{},{ADD_ATTR:Ht,ADD_TAGS:["use"],FORBID_TAGS:Object.keys(Ut),FORCE_BODY:!0,RETURN_DOM:!0,ALLOW_UNKNOWN_PROTOCOLS:!0}));this.Hk.setConfig(i),this.Gk(this.Hk,n),this.Xk(this.qk)}purifyHtml(t){return this.Hk.sanitize(t)}purifyTagsForTripleMustache(t){const e=this.qk.sanitize(t,{"ALLOWED_TAGS":ut(this.Vf)?$t:Wt,"FORCE_BODY":!0,"RETURN_DOM_FRAGMENT":!0}),n=this.Vf.createElement("div");return n.appendChild(e),n.innerHTML}getAllowedTags(){const t={};this.Hk.addHook("uponSanitizeElement",((e,n)=>{Object.assign(t,n.allowedTags)}));const e=this.Vf.createElement("p");return this.Hk.sanitize(e),Object.keys(Ut).forEach((e=>{t[e]=!1})),this.Hk.removeHook("uponSanitizeElement"),t}validateAttributeChange(t,e,n){const r=t.nodeName.toLowerCase(),i=ie[r];if(i){const{attribute:t,values:r}=i;if(t===e&&(null==n||!r.includes(n)))return!1}if("a"===r&&"target"===e&&(null==n||!Vt.includes(n)))return!1;if(null==n)return!0;if(0!==se(e))return!1;if(!this.Hk.isValidAttribute(r,e,n)){const t=qt[r];if(!(t&&t.includes(e)||r.startsWith("amp-")))return!1}const o=t.ownerDocument?t.ownerDocument:t;return!(n&&!ne(r,e,n,o,!0))}Gk(t,e){const n=ut(this.Vf);let r;const i=[];let o;const s=[];t.addHook("uponSanitizeElement",((t,e)=>{const{tagName:o}=e;if(r=e.allowedTags,o.startsWith("amp-")&&(r[o]=!n||Bt[o]),"a"===o){const e=p(t);e.hasAttribute("href")&&!e.hasAttribute("target")&&e.setAttribute("target","_top")}const s=ie[o];if(s){const{attribute:e,values:n}=s,a=p(t);a.hasAttribute(e)&&n.includes(a.getAttribute(e))&&(r[o]=!0,i.push(o))}})),t.addHook("afterSanitizeElements",(t=>{i.forEach((t=>{delete r[t]})),i.length=0})),t.addHook("uponSanitizeAttribute",((t,n)=>{const r=t.nodeName.toLowerCase(),{attrName:i}=n;let{attrValue:a}=n;o=n.allowedAttributes;const l=()=>{o[i]||(o[i]=!0,s.push(i))};if(r.startsWith("amp-"))l();else{if("a"==r&&"target"==i){const t=a.toLowerCase();a=Vt.includes(t)?t:"_top"}const t=qt[r];t&&t.includes(i)&&l()}const c=se(i);if(1===c){const e=i.substring(1,i.length-1);t.setAttribute(`data-amp-bind-${e}`,a)}0!==c&&t.setAttribute("i-amphtml-binding",""),ne(r,i,a,this.Vf,!0)?e&&a&&!i.startsWith(Ft)&&(a=e(r,i,a)):(n.keepAttr=!1,dt().error(re,'Removed invalid attribute %s[%s="%s"].',r,i,a)),n.attrValue=a})),t.addHook("afterSanitizeAttributes",(t=>{!function(t,e){const n=t.tagName.startsWith("AMP-"),r=t.hasAttribute("i-amphtml-binding");!r&&Nt[t.tagName]?t.setAttribute("i-amphtml-ignore",""):(r||n)&&(t.hasAttribute(Ct)||t.setAttribute(Ct,e()))}(t,(()=>String(this.$k++))),s.forEach((t=>{delete o[t]})),s.length=0,"use"===t.nodeName.toLowerCase()&&["href","xlink:href"].forEach((e=>{t.hasAttribute(e)&&!t.getAttribute(e).startsWith("#")&&(function(t){var e;null===(e=t.parentElement)||void 0===e||e.removeChild(t)}(t),dt().error(re,'Removed invalid . use[href] must start with "#".'))}))}))}Xk(t){let e;t.addHook("uponSanitizeElement",((t,n)=>{const{tagName:r}=n;if(e=n.allowedTags,"template"===r){const n=t.getAttribute("type");n&&"amp-mustache"===n.toLowerCase()&&(e.template=!0)}})),t.addHook("afterSanitizeElements",(t=>{e.template=!1}))}}(e.document,{},Dt)})),this.Yk=xt(e,"purifier"),le.setUnescapedSanitizer((t=>this.Yk.purifyTagsForTripleMustache(t)))}compileCallback(){if(!this.viewerCanRenderTemplates()){this.Kk={},this.Zk=this.Jk();try{le.parse(this.Zk,void 0)}catch(t){dt().error(ce,t.message,this.element)}}}Jk(){if("TEMPLATE"==this.element.tagName){const t=function(t){if("content"in t)return t.content.cloneNode(!0);{const e=t.ownerDocument.createDocumentFragment();return function(t,e){const n=e.ownerDocument.createDocumentFragment();for(let e=t.firstChild;e;e=e.nextSibling)n.appendChild(e.cloneNode(!0));e.appendChild(n)}(t,e),e}}(this.element);this.Qk(t);const e=this.element.ownerDocument.createElement("div");return e.appendChild(t),e.innerHTML}return"SCRIPT"==this.element.tagName?this.element.textContent:""}Qk(t){t.querySelectorAll("template").forEach(((t,e)=>{const n=`__AMP_NESTED_TEMPLATE_${e}`;this.Kk[n]=t.outerHTML;const r=this.element.ownerDocument.createTextNode(`{{{${n}}}}`);t.parentNode.replaceChild(r,t)}))}setHtml(t){const e=`
${t}
`,n=this.tryUnwrap(this.tS(e));return this.unwrapChildren(n)}render(t){return this.tryUnwrap(this.Jh(t))}renderAsString(t){return this.Jh(t).innerHTML}Jh(t){let e=t;"object"==typeof t&&(e=r(r({},t),this.Kk));const n=le.render(this.Zk,e,void 0);return this.tS(n)}tS(t){return this.Yk.purifyHtml(`
${t}
`).firstElementChild}})})(); /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ /*! * mustache.js - Logic-less {{mustache}} templates with JavaScript * http://github.com/janl/mustache.js */ /*! Bundled license information: dompurify/dist/purify.es.js: (*! @license DOMPurify 3.0.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.2/LICENSE *) */}}); //# sourceMappingURL=amp-mustache-0.2.mjs.map