var _dll_dompurify_4ce7410a16ea8d4708eb;(()=>{var t={234:function(t){ /*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */ t.exports=function(){"use strict";function t(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e1?n-1:0),r=1;r/gm),k=i(/^data-[\-\w.\u00B7-\uFFFF]/),F=i(/^aria-[\-\w]+$/),C=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=i(/^(?:\w+script|data):/i),I=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function z(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:W(),e=function(t){return G(t)};if(e.version="2.2.3",e.removed=[],!t||!t.document||9!==t.document.nodeType)return e.isSupported=!1,e;var n=t.document,o=t.document,i=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,c=t.NodeFilter,l=t.NamedNodeMap,T=void 0===l?t.NamedNodeMap||t.MozNamedAttrMap:l,_=t.Text,$=t.Comment,q=t.DOMParser,V=t.trustedTypes;if("function"==typeof s){var K=o.createElement("template");K.content&&K.content.ownerDocument&&(o=K.content.ownerDocument)}var X=B(V,n),J=X&&Lt?X.createHTML(""):"",Y=o,Z=Y.implementation,Q=Y.createNodeIterator,tt=Y.getElementsByTagName,et=Y.createDocumentFragment,nt=n.importNode,ot={};try{ot=O(o).documentMode?o.documentMode:{}}catch(t){}var rt={};e.isSupported=Z&&void 0!==Z.createHTMLDocument&&9!==ot;var it=P,st=R,at=k,ct=F,lt=H,ut=I,pt=C,dt=null,ft=v({},[].concat(z(S),z(E),z(A),z(j),z(L))),mt=null,ht=v({},[].concat(z(x),z(M),z(N),z(D))),yt=null,wt=null,gt=!0,bt=!0,Tt=!1,_t=!1,vt=!1,Ot=!1,St=!1,Et=!1,At=!1,jt=!0,Lt=!1,xt=!0,Mt=!0,Nt=!1,Dt={},Pt=v({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),Rt=null,kt=v({},["audio","video","img","source","image","track"]),Ft=null,Ct=v({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ht=null,It=o.createElement("form"),Ut=function(t){Ht&&Ht===t||(t&&"object"===(void 0===t?"undefined":U(t))||(t={}),t=O(t),dt="ALLOWED_TAGS"in t?v({},t.ALLOWED_TAGS):ft,mt="ALLOWED_ATTR"in t?v({},t.ALLOWED_ATTR):ht,Ft="ADD_URI_SAFE_ATTR"in t?v(O(Ct),t.ADD_URI_SAFE_ATTR):Ct,Rt="ADD_DATA_URI_TAGS"in t?v(O(kt),t.ADD_DATA_URI_TAGS):kt,yt="FORBID_TAGS"in t?v({},t.FORBID_TAGS):{},wt="FORBID_ATTR"in t?v({},t.FORBID_ATTR):{},Dt="USE_PROFILES"in t&&t.USE_PROFILES,gt=!1!==t.ALLOW_ARIA_ATTR,bt=!1!==t.ALLOW_DATA_ATTR,Tt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,_t=t.SAFE_FOR_TEMPLATES||!1,vt=t.WHOLE_DOCUMENT||!1,Et=t.RETURN_DOM||!1,At=t.RETURN_DOM_FRAGMENT||!1,jt=!1!==t.RETURN_DOM_IMPORT,Lt=t.RETURN_TRUSTED_TYPE||!1,St=t.FORCE_BODY||!1,xt=!1!==t.SANITIZE_DOM,Mt=!1!==t.KEEP_CONTENT,Nt=t.IN_PLACE||!1,pt=t.ALLOWED_URI_REGEXP||pt,_t&&(bt=!1),At&&(Et=!0),Dt&&(dt=v({},[].concat(z(L))),mt=[],!0===Dt.html&&(v(dt,S),v(mt,x)),!0===Dt.svg&&(v(dt,E),v(mt,M),v(mt,D)),!0===Dt.svgFilters&&(v(dt,A),v(mt,M),v(mt,D)),!0===Dt.mathMl&&(v(dt,j),v(mt,N),v(mt,D))),t.ADD_TAGS&&(dt===ft&&(dt=O(dt)),v(dt,t.ADD_TAGS)),t.ADD_ATTR&&(mt===ht&&(mt=O(mt)),v(mt,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&v(Ft,t.ADD_URI_SAFE_ATTR),Mt&&(dt["#text"]=!0),vt&&v(dt,["html","head","body"]),dt.table&&(v(dt,["tbody"]),delete yt.tbody),r&&r(t),Ht=t)},zt=function(t){d(e.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.outerHTML=J}},Wt=function(t,n){try{d(e.removed,{attribute:n.getAttributeNode(t),from:n})}catch(t){d(e.removed,{attribute:null,from:n})}n.removeAttribute(t)},Bt=function(t){var e=void 0,n=void 0;if(St)t=""+t;else{var r=m(t,/^[\r\n\t ]+/);n=r&&r[0]}var i=X?X.createHTML(t):t;try{e=(new q).parseFromString(i,"text/html")}catch(t){}if(!e||!e.documentElement){var s=(e=Z.createHTMLDocument("")).body;s.parentNode.removeChild(s.parentNode.firstElementChild),s.outerHTML=i}return t&&n&&e.body.insertBefore(o.createTextNode(n),e.body.childNodes[0]||null),tt.call(e,vt?"html":"body")[0]},Gt=function(t){return Q.call(t.ownerDocument||t,t,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,(function(){return c.FILTER_ACCEPT}),!1)},$t=function(t){return!(t instanceof _||t instanceof $||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof T&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute&&"string"==typeof t.namespaceURI)},qt=function(t){return"object"===(void 0===a?"undefined":U(a))?t instanceof a:t&&"object"===(void 0===t?"undefined":U(t))&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Vt=function(t,n,o){rt[t]&&u(rt[t],(function(t){t.call(e,n,o,Ht)}))},Kt=function(t){var n=void 0;if(Vt("beforeSanitizeElements",t,null),$t(t))return zt(t),!0;if(m(t.nodeName,/[\u0080-\uFFFF]/))return zt(t),!0;var o=f(t.nodeName);if(Vt("uponSanitizeElement",t,{tagName:o,allowedTags:dt}),("svg"===o||"math"===o)&&0!==t.querySelectorAll("p, br, form, table, h1, h2, h3, h4, h5, h6").length)return zt(t),!0;if(!qt(t.firstElementChild)&&(!qt(t.content)||!qt(t.content.firstElementChild))&&g(/<[/\w]/g,t.innerHTML)&&g(/<[/\w]/g,t.textContent))return zt(t),!0;if(!dt[o]||yt[o]){if(Mt&&!Pt[o]&&"function"==typeof t.insertAdjacentHTML)try{var r=t.innerHTML;t.insertAdjacentHTML("AfterEnd",X?X.createHTML(r):r)}catch(t){}return zt(t),!0}return"noscript"!==o&&"noembed"!==o||!g(/<\/no(script|embed)/i,t.innerHTML)?(_t&&3===t.nodeType&&(n=t.textContent,n=h(n,it," "),n=h(n,st," "),t.textContent!==n&&(d(e.removed,{element:t.cloneNode()}),t.textContent=n)),Vt("afterSanitizeElements",t,null),!1):(zt(t),!0)},Xt=function(t,e,n){if(xt&&("id"===e||"name"===e)&&(n in o||n in It))return!1;if(bt&&g(at,e));else if(gt&&g(ct,e));else{if(!mt[e]||wt[e])return!1;if(Ft[e]);else if(g(pt,h(n,ut,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==y(n,"data:")||!Rt[t])if(Tt&&!g(lt,h(n,ut,"")));else if(n)return!1}return!0},Jt=function(t){var n=void 0,o=void 0,r=void 0,i=void 0;Vt("beforeSanitizeAttributes",t,null);var s=t.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:mt};for(i=s.length;i--;){var c=n=s[i],l=c.name,u=c.namespaceURI;if(o=w(n.value),r=f(l),a.attrName=r,a.attrValue=o,a.keepAttr=!0,a.forceKeepAttr=void 0,Vt("uponSanitizeAttribute",t,a),o=a.attrValue,!a.forceKeepAttr&&(Wt(l,t),a.keepAttr))if(g(/\/>/i,o))Wt(l,t);else{_t&&(o=h(o,it," "),o=h(o,st," "));var d=t.nodeName.toLowerCase();if(Xt(d,r,o))try{u?t.setAttributeNS(u,l,o):t.setAttribute(l,o),p(e.removed)}catch(t){}}}Vt("afterSanitizeAttributes",t,null)}},Yt=function t(e){var n=void 0,o=Gt(e);for(Vt("beforeSanitizeShadowDOM",e,null);n=o.nextNode();)Vt("uponSanitizeShadowNode",n,null),Kt(n)||(n.content instanceof i&&t(n.content),Jt(n));Vt("afterSanitizeShadowDOM",e,null)};return e.sanitize=function(o,r){var s=void 0,c=void 0,l=void 0,u=void 0,p=void 0;if(o||(o="\x3c!--\x3e"),"string"!=typeof o&&!qt(o)){if("function"!=typeof o.toString)throw b("toString is not a function");if("string"!=typeof(o=o.toString()))throw b("dirty is not a string, aborting")}if(!e.isSupported){if("object"===U(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof o)return t.toStaticHTML(o);if(qt(o))return t.toStaticHTML(o.outerHTML)}return o}if(Ot||Ut(r),e.removed=[],"string"==typeof o&&(Nt=!1),Nt);else if(o instanceof a)1===(c=(s=Bt("\x3c!----\x3e")).ownerDocument.importNode(o,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?s=c:s.appendChild(c);else{if(!Et&&!_t&&!vt&&-1===o.indexOf("<"))return X&&Lt?X.createHTML(o):o;if(!(s=Bt(o)))return Et?null:J}s&&St&&zt(s.firstChild);for(var d=Gt(Nt?o:s);l=d.nextNode();)3===l.nodeType&&l===u||Kt(l)||(l.content instanceof i&&Yt(l.content),Jt(l),u=l);if(u=null,Nt)return o;if(Et){if(At)for(p=et.call(s.ownerDocument);s.firstChild;)p.appendChild(s.firstChild);else p=s;return jt&&(p=nt.call(n,p,!0)),p}var f=vt?s.outerHTML:s.innerHTML;return _t&&(f=h(f,it," "),f=h(f,st," ")),X&&Lt?X.createHTML(f):f},e.setConfig=function(t){Ut(t),Ot=!0},e.clearConfig=function(){Ht=null,Ot=!1},e.isValidAttribute=function(t,e,n){Ht||Ut({});var o=f(t),r=f(e);return Xt(o,r,n)},e.addHook=function(t,e){"function"==typeof e&&(rt[t]=rt[t]||[],d(rt[t],e))},e.removeHook=function(t){rt[t]&&p(rt[t])},e.removeHooks=function(t){rt[t]&&(rt[t]=[])},e.removeAllHooks=function(){rt={}},e}return G()}()},21:(t,e,n)=>{"use strict";n.r(e),n.d(e,{TrustedTypeConfig:()=>_,TrustedTypePolicy:()=>p,TrustedTypePolicyFactory:()=>d,TrustedTypesEnforcer:()=>H,trustedTypes:()=>m}); /** * @license * Copyright 2017 Google Inc. All Rights Reserved. * * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE. * * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document */ const o=["onabort","onactivate","onactivateinvisible","onafterprint","onafterupdate","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onariarequest","onauxclick","onbeforeactivate","onbeforecopy","onbeforecut","onbeforedeactivate","onbeforeeditfocus","onbeforepaste","onbeforeprint","onbeforeunload","onbegin","onblur","onbounce","oncancel","oncanplay","oncanplaythrough","oncellchange","onchange","onclick","onclose","oncommand","oncontextmenu","oncontrolselect","oncopy","oncuechange","oncut","ondataavailable","ondatasetchanged","ondatasetcomplete","ondblclick","ondeactivate","ondrag","ondragdrop","ondragend","ondragenter","ondragexit","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onend","onended","onerror","onerrorupdate","onexit","onfilterchange","onfinish","onfocus","onfocusin","onfocusout","onformdata","onfullscreenchange","onfullscreenerror","ongotpointercapture","onhelp","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlayoutcomplete","onload","onloadeddata","onloadedmetadata","onloadend","onloadstart","onlosecapture","onlostpointercapture","onmediacomplete","onmediaerror","onmessage","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onmove","onmoveend","onmovestart","onmozfullscreenchange","onmozfullscreenerror","onmscontentzoom","onmsgesturechange","onmsgesturedoubletap","onmsgestureend","onmsgesturehold","onmsgesturestart","onmsgesturetap","onmsgotpointercapture","onmsinertiastart","onmslostpointercapture","onmsmanipulationstatechanged","onmspointercancel","onmspointerdown","onmspointerenter","onmspointerleave","onmspointermove","onmspointerout","onmspointerover","onmspointerup","onoffline","ononline","onoutofsync","onoverscroll","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerrawupdate","onpointerup","onprogress","onpropertychange","onratechange","onreadystatechange","onrepeat","onreset","onresize","onresizeend","onresizestart","onresume","onreverse","onrowdelete","onrowenter","onrowexit","onrowinserted","onscroll","onscrollend","onsearch","onseek","onseeked","onseeking","onselect","onselectionchange","onselectstart","onshow","onstalled","onstart","onstop","onstorage","onsubmit","onsuspend","onsynchrestored","ontimeerror","ontimeupdate","ontoggle","ontrackchange","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onunload","onurlflip","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkitfullscreenchange","onwebkitfullscreenerror","onwebkittransitionend","onwheel"]; /** * @license * Copyright 2017 Google Inc. All Rights Reserved. * * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE. * * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document */ const r="undefined"!=typeof window,i=t=>{throw new TypeError("undefined conversion")},s=t=>null,{toLowerCase:a,toUpperCase:c}=String.prototype,l="http://www.w3.org/1999/xhtml",u="http://www.w3.org/2000/svg",p=function(){throw new TypeError("Illegal constructor")},d=function(){throw new TypeError("Illegal constructor")},f="default",{trustedTypes:m,setPolicyNameRestrictions:h,clearPolicyNameRestrictions:y,getDefaultPolicy:w,resetDefaultPolicy:g}=function(){const{assign:t,create:e,defineProperty:n,freeze:m,getOwnPropertyNames:h,getPrototypeOf:y,prototype:w}=Object,{hasOwnProperty:g}=w,{forEach:b,push:T}=Array.prototype,_=Symbol(),v=function(t){let n=S.get(t);return void 0===n&&(n=e(null),S.set(t,n)),n};function O(t){const e=y(t);if(null==e||y(e)!==w)throw new Error;for(const o of h(e))n(t,o,{value:t[o]});return t}const S=O(new WeakMap),E=O([]),A=O([]);let j=!0,L=null,x=!1;class M{constructor(t,e){if(t!==_)throw new Error("cannot call the constructor");n(this,"policyName",{value:""+e,enumerable:!0})}toString(){return v(this).v}valueOf(){return v(this).v}}function N(t,e){m(t.prototype),delete t.name,n(t,"name",{value:e})}class D extends M{}N(D,"TrustedScriptURL");class P extends M{}N(P,"TrustedHTML");class R extends M{}N(R,"TrustedScript"),N(M,"TrustedType");const k=m(e(new P(_,"")));v(k).v="";const F=m(e(new R(_,"")));v(F).v="";const C={[l]:{EMBED:{attributes:{src:D.name}},IFRAME:{attributes:{srcdoc:P.name}},OBJECT:{attributes:{data:D.name,codebase:D.name}},SCRIPT:{attributes:{src:D.name,text:R.name},properties:{innerText:R.name,textContent:R.name,text:R.name}},"*":{attributes:{},properties:{innerHTML:P.name,outerHTML:P.name}}},[u]:{"*":{attributes:{},properties:{}}}},H={codebase:"codeBase",formaction:"formAction"};r&&!("srcdoc"in HTMLIFrameElement.prototype)&&delete C[l].IFRAME.attributes.srcdoc;for(const t of Object.keys(C[l])){C[l][t].properties||(C[l][t].properties={});for(const e of Object.keys(C[l][t].attributes))C[l][t].properties[H[e]?H[e]:e]=C[l][t].attributes[e]}for(const t of function(){if("undefined"!=typeof window){const t=[];for(const e in HTMLElement.prototype)"on"===e.slice(0,2)&&t.push(e);return t}return o}())C[l]["*"].attributes[t]="TrustedScript",C[u]["*"].attributes[t]="TrustedScript";const I={createHTML:P,createScriptURL:D,createScript:R},U=I.hasOwnProperty;function z(t){return e=>e instanceof t&&S.has(e)}function W(t,e,n,o="",r=""){const i=c.apply(String(t));let s=r||o;s||(s=l);const a=g.apply(C,[s])?C[s]:null;if(a)return g.apply(a,[i])&&a[i]&&g.apply(a[i][e],[n])&&a[i][e][n]?a[i][e][n]:g.apply(a,["*"])&&g.apply(a["*"][e],[n])&&a["*"][e][n]?a["*"][e][n]:void 0}function B(){return L}const G=e(d.prototype);return t(G,{createPolicy:function(t,o){const r=""+t;if(!r.match(/^[-#a-zA-Z0-9=_/@.%]+$/g))throw new TypeError("Policy "+r+" contains invalid characters.");if(x&&-1===A.indexOf(r)&&-1===A.indexOf("*"))throw new TypeError("Policy "+r+" disallowed.");if(r===f&&L)throw new TypeError("Policy "+r+" already exists.");if(x&&!j&&-1!==E.indexOf(r))throw new TypeError("Policy "+r+" exists.");E.push(r);const a=e(null);if(o&&"object"==typeof o)for(const t of h(o))U.call(I,t)&&(a[t]=o[t]);else console.warn("trustedTypes.createPolicy "+r+" was given an empty policy");m(a);const c=function(t,o){function r(n,r){const a=o[r]||(t==f?s:i),c=m(new n(_,t)),l={[r](n,...o){let r=a(""+n,...o);if(null==r){if(t==f)return r;r=""}const i=""+r,s=m(e(c));return v(s).v=i,s}}[r];return m(l)}const a=e(p.prototype);for(const t of h(I))a[t]=r(I[t],t);return n(a,"name",{value:t,writable:!1,configurable:!1,enumerable:!0}),m(a)}(r,a);return r===f&&(L=c),c},isHTML:z(P),isScriptURL:z(D),isScript:z(R),getAttributeType:function(t,e,n="",o=""){return W(t,"attributes",a.apply(String(e)),n,o)||null},getPropertyType:function(t,e,n=""){return W(t,"properties",String(e),n)||null},getTypeMapping:function(t=""){if(!t)try{t=document.documentElement.namespaceURI}catch(e){t=l}const e=C[t];return e?(n=e,JSON.parse(JSON.stringify(n))):{};var n},emptyHTML:k,emptyScript:F,defaultPolicy:L,TrustedHTML:P,TrustedScriptURL:D,TrustedScript:R}),n(G,"defaultPolicy",{get:B,set:()=>{}}),{trustedTypes:m(G),setPolicyNameRestrictions:function(t,e){x=!0,A.length=0,b.call(t,(t=>{T.call(A,""+t)})),j=e,E.length=0},clearPolicyNameRestrictions:function(){x=!1},getDefaultPolicy:B,resetDefaultPolicy:function(){L=null,E.splice(E.indexOf(f),1)}}}(),b="require-trusted-types-for",T="trusted-types";class _{constructor(t,e,n,o,r=null,i=null){this.isLoggingEnabled=t,this.isEnforcementEnabled=e,this.allowedPolicyNames=n,this.allowDuplicates=o,this.cspString=r,this.windowObject=i}static parseCSP(t){const e=/\s+/;return t.trim().split(/\s*;\s*/).map((t=>t.split(e))).reduce((function(t,e){return e[0]&&(t[e[0]]=e.slice(1).map((t=>t)).sort()),t}),{})}static fromCSP(t){const e=_.parseCSP(t),n=b in e&&e[b].includes("'script'");let o=["*"],r=!0;return T in e&&(o=e["trusted-types"].filter((t=>"'"!==t.charAt(0))),r=e["trusted-types"].includes("'allow-duplicates'"),1==e["trusted-types"].length&&"'none'"==e["trusted-types"][0]&&(o=[])),new _(!0,n,o,r,t)}} /** * @license * Copyright 2017 Google Inc. All Rights Reserved. * * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE. * * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document */const{defineProperty:v}=Object;function O(t,e,n){v(t,e,{set:n})}function S(t,e,n,o){v(t,e,{set:n,get:o,configurable:!0})}function E(t,e,n){v(t,e,{value:n})} /** * @license * Copyright 2017 Google Inc. All Rights Reserved. * * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE. * * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document */const{apply:A}=Reflect,{getOwnPropertyNames:j,getOwnPropertyDescriptor:L,getPrototypeOf:x}=Object,{hasOwnProperty:M,isPrototypeOf:N}=Object.prototype,{slice:D}=String.prototype;let P;const R=m.getTypeMapping(l),k={TrustedHTML:m.TrustedHTML,TrustedScript:m.TrustedScript,TrustedScriptURL:m.TrustedScriptURL};for(const t of Object.keys(R)){const e=R[t].properties;for(const[t,n]of Object.entries(e))e[t]=k[n]}const F={TrustedHTML:m.isHTML,TrustedScriptURL:m.isScriptURL,TrustedScript:m.isScript},C={TrustedHTML:"createHTML",TrustedScriptURL:"createScriptURL",TrustedScript:"createScript"};class H{constructor(t){if(this.config_=t,this.originalSetters_={},this.windowObject_=t.windowObject||("undefined"!=typeof window?window:null),!this.isValidWindowObject_())throw new Error("The polyfill expects a global `window` object or emulated `window-like` object passed to the enforcer as second argument");var e;this.insertAdjacentObjectPrototype=(e=this.windowObject_,A(M,e.Element.prototype,["insertAdjacentHTML"])?e.Element.prototype:e.HTMLElement.prototype),this.functionConstructorNameGetter=this.windowObject_.document.createElement("div").constructor.name?t=>t.name:t=>(""+t).match(/^\[object (\S+)\]$/)[1]}isValidWindowObject_(){const t=this.windowObject_;return!!t&&"object"==typeof t&&["Element","HTMLElement","Document","Node","document"].every((e=>e in t))}instanceOfDomProperty(t,e){const n=this.windowObject_[e];return!!n&&t instanceof n}convertTagToConstructor(t){return"*"==t?"HTMLElement":this.getConstructorName_(this.windowObject_.document.createElement(t).constructor)}getConstructorName_(t){return this.functionConstructorNameGetter(t)}install(){h(this.config_.allowedPolicyNames,this.config_.allowDuplicates),(this.config_.isEnforcementEnabled||this.config_.isLoggingEnabled)&&("ShadowRoot"in this.windowObject_&&this.wrapSetter_(this.windowObject_.ShadowRoot.prototype,"innerHTML",m.TrustedHTML),P=function(t){if(!t.createRange)return!1;return 0==t.createRange().createContextualFragment({toString:()=>"
"}).childNodes.length}(this.windowObject_.document),this.windowObject_.Range&&this.wrapWithEnforceFunction_(this.windowObject_.Range.prototype,"createContextualFragment",m.TrustedHTML,0),this.insertAdjacentObjectPrototype&&this.wrapWithEnforceFunction_(this.insertAdjacentObjectPrototype,"insertAdjacentHTML",m.TrustedHTML,1),L(this.windowObject_.Document.prototype,"write")?this.wrapWithEnforceFunction_(this.windowObject_.Document.prototype,"write",m.TrustedHTML,0):this.windowObject_.HTMLDocument&&L(this.windowObject_.HTMLDocument.prototype,"write")&&this.wrapWithEnforceFunction_(this.windowObject_.HTMLDocument.prototype,"write",m.TrustedHTML,0),"DOMParser"in this.windowObject_&&this.wrapWithEnforceFunction_(this.windowObject_.DOMParser.prototype,"parseFromString",m.TrustedHTML,0),this.windowObject_.hasOwnProperty("setInterval")&&this.wrapWithEnforceFunction_(this.windowObject_,"setInterval",m.TrustedScript,0),this.windowObject_.hasOwnProperty("setTimeout")&&this.wrapWithEnforceFunction_(this.windowObject_,"setTimeout",m.TrustedScript,0),this.wrapSetAttribute_(),this.installScriptMutatorGuards_(),this.installPropertySetWrappers_())}uninstall(){y(),(this.config_.isEnforcementEnabled||this.config_.isLoggingEnabled)&&("ShadowRoot"in this.windowObject_&&this.restoreSetter_(this.windowObject_.ShadowRoot.prototype,"innerHTML"),this.windowObject_.Range&&this.restoreFunction_(this.windowObject_.Range.prototype,"createContextualFragment"),this.restoreFunction_(this.insertAdjacentObjectPrototype,"insertAdjacentHTML"),this.restoreFunction_(this.windowObject_.Element.prototype,"setAttribute"),this.restoreFunction_(this.windowObject_.Element.prototype,"setAttributeNS"),L(this.windowObject_.Document.prototype,"write")?this.restoreFunction_(this.windowObject_.Document.prototype,"write"):this.windowObject_.HTMLDocument&&L(this.windowObject_.HTMLDocument.prototype,"write")&&this.restoreFunction_(HTMLDocument.prototype,"write"),"DOMParser"in this.windowObject_&&this.restoreFunction_(DOMParser.prototype,"parseFromString"),this.windowObject_.hasOwnProperty("setTimeout")&&this.restoreFunction_(this.windowObject_,"setTimeout"),this.windowObject_.hasOwnProperty("setInterval")&&this.restoreFunction_(this.windowObject_,"setInterval"),this.uninstallPropertySetWrappers_(),this.uninstallScriptMutatorGuards_(),g())}installScriptMutatorGuards_(){const t=this;["appendChild","insertBefore","replaceChild"].forEach((e=>{this.wrapFunction_(this.windowObject_.Node.prototype,e,(function(e,...n){return t.enforceTypeInScriptNodes_.bind(t,this,!1,e).apply(t,n)}))})),this.insertAdjacentObjectPrototype&&this.wrapFunction_(this.insertAdjacentObjectPrototype,"insertAdjacentText",(function(e,...n){return t.insertAdjacentTextWrapper_.bind(t,this,e).apply(t,n)})),["after","before","replaceWith"].forEach((e=>{e in this.windowObject_.Element.prototype&&this.wrapFunction_(this.windowObject_.Element.prototype,e,(function(e,...n){return t.enforceTypeInScriptNodes_.bind(t,this,!0,e).apply(t,n)}))})),["append","prepend"].forEach((e=>{e in this.windowObject_.Element.prototype&&this.wrapFunction_(this.windowObject_.Element.prototype,e,(function(e,...n){return t.enforceTypeInScriptNodes_.bind(t,this,!1,e).apply(t,n)}))}))}uninstallScriptMutatorGuards_(){this.restoreFunction_(this.windowObject_.Node.prototype,"appendChild"),this.restoreFunction_(this.windowObject_.Node.prototype,"insertBefore"),this.restoreFunction_(this.windowObject_.Node.prototype,"replaceChild"),this.restoreFunction_(this.insertAdjacentObjectPrototype,"insertAdjacentText"),["after","before","replaceWith","append","prepend"].forEach((t=>{t in this.windowObject_.Element.prototype&&this.restoreFunction_(this.windowObject_.Element.prototype,t)}))}installPropertySetWrappers_(){for(const t of j(R))for(const e of j(R[t].properties)){const n=this.convertTagToConstructor(t);null!=n&&this.windowObject_[n]&&this.wrapSetter_(this.windowObject_[n].prototype,e,R[t].properties[e])}}uninstallPropertySetWrappers_(){for(const t of j(R))for(const e of j(R[t].properties)){const n=this.convertTagToConstructor(t);null!=n&&this.windowObject_[n]&&this.restoreSetter_(this.windowObject_[n].prototype,e)}}wrapSetAttribute_(){const t=this;this.wrapFunction_(this.windowObject_.Element.prototype,"setAttribute",(function(e,...n){return t.setAttributeWrapper_.bind(t,this,e).apply(t,n)})),this.wrapFunction_(this.windowObject_.Element.prototype,"setAttributeNS",(function(e,...n){return t.setAttributeNSWrapper_.bind(t,this,e).apply(t,n)}))}setAttributeWrapper_(t,e,...n){if(null!==t.constructor&&this.instanceOfDomProperty(t,"Element")){const o=(n[0]=String(n[0])).toLowerCase(),r=m.getAttributeType(t.tagName,o,t.namespaceURI);if(r&&A(M,k,[r]))return this.enforce_(t,"setAttribute",k[r],e,1,n)}return A(e,t,n)}setAttributeNSWrapper_(t,e,...n){if(null!==t.constructor&&this.instanceOfDomProperty(t,"Element")){const o=n[0]?String(n[0]):null;n[0]=o;const r=(n[1]=String(n[1])).toLowerCase(),i=m.getAttributeType(t.tagName,r,t.namespaceURI,o);if(i&&A(M,k,[i]))return this.enforce_(t,"setAttributeNS",k[i],e,2,n)}return A(e,t,n)}enforceTypeInScriptNodes_(t,e,n,...o){const r=e?t.parentNode:t;if(this.instanceOfDomProperty(r,"HTMLScriptElement")&&o.length>0)for(let e=0;e1&&o.includes(n[0])&&!m.isScript(n[1])){n[1]=""+n[1];const e=this.maybeCallDefaultPolicy_("TrustedScript",n[1],"script.text");null==e?this.processViolation_(t,"insertAdjacentText",m.TrustedScript,n[1]):n[1]=e;const r=this.windowObject_.document.createTextNode(""+n[1]),i=this.originalSetters_[this.getKey_(this.windowObject_.Node.prototype,"insertBefore")];switch(n[0]){case o[0]:A(i,t.parentElement,[r,t]);break;case o[1]:A(i,t.parentElement,[r,t.nextSibling])}}else A(e,t,n)}wrapWithEnforceFunction_(t,e,n,o){const r=this;this.wrapFunction_(t,e,(function(t,...i){return r.enforce_.call(r,this,e,n,t,o,i)}))}wrapFunction_(t,e,n){const o=L(t,e),r=o?o.value:null;if(!(r instanceof Function))throw new TypeError("Property "+e+" on object"+t+" is not a function");const i=this.getKey_(t,e);if(this.originalSetters_[i])throw new Error(`TrustedTypesEnforcer: Double installation detected: ${i} ${e}`);E(t,e,(function(...t){return n.bind(this,r).apply(this,t)})),this.originalSetters_[i]=r}wrapSetter_(t,e,n,o){if(o&&!N.call(o,t))throw new Error("Invalid prototype chain");let r,i,s=o||t;const a=x(this.windowObject_.Node.prototype);do{r=L(s,e),i=r?r.set:null,i||(s=x(s)||a)}while(!i&&s!==a&&s);if(!(i instanceof Function))return void(this.config_.isLoggingEnabled&&console.warn("No setter for property "+e+" on object"+t));const c=this.getKey_(t,e);if(this.originalSetters_[c])throw new Error(`TrustedTypesEnforcer: Double installation detected: ${c} ${e}`);const l=this,u=function(t){l.enforce_.call(l,this,e,n,i,0,[t])};s===t?O(t,e,u):S(t,e,u,r.get),this.originalSetters_[c]=i}restoreSetter_(t,e,n){if(n&&!N.call(n,t))throw new Error("Invalid prototype chain");let o,r,i=n||t;const s=x(this.windowObject_.Node.prototype);do{o=L(i,e),r=o?o.set:null,r||(i=x(i)||s)}while(!r&&i!==s&&i);if(!(r instanceof Function))return void(this.config_.isLoggingEnabled&&console.warn("No setter for property "+e+" on object"+t));const a=this.getKey_(t,e);if(!this.originalSetters_[a])throw new Error(`TrustedTypesEnforcer: Cannot restore (double uninstallation?): ${a} ${e}`);n?S(t,e,this.originalSetters_[a],L(n,e).get):O(t,e,this.originalSetters_[a]),delete this.originalSetters_[a]}restoreFunction_(t,e){const n=this.getKey_(t,e);if(!this.originalSetters_[n])throw new Error(`TrustedTypesEnforcer: Cannot restore (double uninstallation?): ${n} ${e}`);E(t,e,this.originalSetters_[n]),delete this.originalSetters_[n]}getKey_(t,e){return""+(t.constructor.name?t.constructor.name:t.constructor)+"-"+e}maybeCallDefaultPolicy_(t,e,n=""){const o=m.defaultPolicy;return o&&F.hasOwnProperty(t)?o[C[t]](e,""+n):null}enforce_(t,e,n,o,r,i){const s=i[r],a=""+n.name;if(F.hasOwnProperty(a)&&F[a](s))return P&&"createContextualFragment"==e&&(i[r]=i[r].toString()),A(o,t,i);if(n===m.TrustedScript){const n="setAttribute"==e||"setAttributeNS"===e||"on"===A(D,e,[0,2]);if(("setInterval"===e||"setTimeout"===e||n)&&"function"==typeof s||n&&null===s)return A(o,t,i)}i[r]=""+s;const c=this.instanceOfDomProperty(t,"Element")?t.localName:this.getConstructorName_(t?t.constructor:window.constructor),l=this.maybeCallDefaultPolicy_(a,s,c+"."+e);return null==l?this.processViolation_(t,e,n,s):i[r]=l,A(o,t,i)}processViolation_(t,e,n,o){const r=this.getConstructorName_(t.constructor)||""+t,i=`Failed to set ${e} on ${r}: This property requires ${n.name}.`;this.config_.isLoggingEnabled&&console.warn(i,e,t,n,o);const s=this.windowObject_.SecurityPolicyViolationEvent||null;if("function"==typeof s){let i="";n===m.TrustedScriptURL&&(i=function(t,e){const n="function"==typeof e.URL?e.URL.prototype.constructor:null;try{return new n(t,e.document.baseURI||void 0)}catch(t){return null}}(o,this.windowObject_)||"",i&&(i=i.href));const a=A(D,""+o,[0,40]),c=new s("securitypolicyviolation",{bubbles:!0,blockedURI:i,disposition:this.config_.isEnforcementEnabled?"enforce":"report",documentURI:this.windowObject_.document.location.href,effectiveDirective:b,originalPolicy:this.config_.cspString,statusCode:0,violatedDirective:b,sample:`${r}.${e} ${a}`});this.instanceOfDomProperty(t,"Node")&&t.isConnected?t.dispatchEvent(c):this.windowObject_.document.dispatchEvent(c)}if(this.config_.isEnforcementEnabled)throw new TypeError(i)}}},824:(t,e,n)=>{t.exports=n}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o=n(824);_dll_dompurify_4ce7410a16ea8d4708eb=o})(); //# sourceMappingURL=https://artifacts.dev.azure.com/office/_apis/symbol/symsrv/dll-dompurify.min.df1eebc.js.map/099c612d113d4d63381f015a3057685143f2da7412d28d32f7f36079ead6ad02/dll-dompurify.min.df1eebc.js.map