Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Bump `dompurify` to 3.2.5

Damian Legawiecd1c688e41ba0
diff --git a/admin/config/importmap.rb b/admin/config/importmap.rb
index e17b1fa1a1..67eeefdf69 100644
--- a/admin/config/importmap.rb
+++ b/admin/config/importmap.rb
@@ -15,8 +15,8 @@ pin 'Chart.bundle', to: 'Chart.bundle.js', preload: ['application-spree-admin']
pin 'local-time', preload: ['application-spree-admin'] # @3.0.2
pin 'mapkick/bundle', to: 'mapkick.bundle.js', preload: ['application-spree-admin']
pin "jquery", to: 'jquery.min.js', preload: ['application-spree-admin'] # @3.7.1
-pin 'dompurify', preload: ['application-spree-admin'] # @3.2.3
pin 'bootstrap', to: 'bootstrap--dist--js--bootstrap.bundle.min.js.js', preload: ['application-spree-admin'] # @4.6.2
+pin 'dompurify', preload: ['application-spree-admin'] # @3.2.5
# Stimulus components
pin '@stimulus-components/rails-nested-form', to: '@stimulus-components--rails-nested-form.js', preload: ['application-spree-admin'] # @5.0.0
diff --git a/admin/vendor/javascript/dompurify.js b/admin/vendor/javascript/dompurify.js
index c39c15188f..1864fa558d 100644
--- a/admin/vendor/javascript/dompurify.js
+++ b/admin/vendor/javascript/dompurify.js
@@ -1,19 +1,19 @@
-// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/purify.es.mjs
+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/purify.es.mjs
-/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */
-const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:a}=Object;let{freeze:r,seal:i,create:l}=Object;let{apply:c,construct:s}=typeof Reflect!=="undefined"&&Reflect;r||(r=function freeze(e){return e});i||(i=function seal(e){return e});c||(c=function apply(e,t,n){return e.apply(t,n)});s||(s=function construct(e,t){return new e(...t)});const u=unapply(Array.prototype.forEach);const d=unapply(Array.prototype.pop);const f=unapply(Array.prototype.push);const m=unapply(String.prototype.toLowerCase);const p=unapply(String.prototype.toString);const h=unapply(String.prototype.match);const T=unapply(String.prototype.replace);const g=unapply(String.prototype.indexOf);const y=unapply(String.prototype.trim);const _=unapply(Object.prototype.hasOwnProperty);const S=unapply(RegExp.prototype.test);const E=unconstruct(TypeError);
+/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */
+const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:a}=Object;let{freeze:r,seal:i,create:l}=Object;let{apply:s,construct:c}=typeof Reflect!=="undefined"&&Reflect;r||(r=function freeze(e){return e});i||(i=function seal(e){return e});s||(s=function apply(e,t,n){return e.apply(t,n)});c||(c=function construct(e,t){return new e(...t)});const u=unapply(Array.prototype.forEach);const p=unapply(Array.prototype.lastIndexOf);const d=unapply(Array.prototype.pop);const f=unapply(Array.prototype.push);const m=unapply(Array.prototype.splice);const h=unapply(String.prototype.toLowerCase);const T=unapply(String.prototype.toString);const g=unapply(String.prototype.match);const y=unapply(String.prototype.replace);const _=unapply(String.prototype.indexOf);const S=unapply(String.prototype.trim);const E=unapply(Object.prototype.hasOwnProperty);const A=unapply(RegExp.prototype.test);const N=unconstruct(TypeError);
/**
* Creates a new function that calls the given function with a specified thisArg and arguments.
*
* @param func - The function to be wrapped and called.
* @returns A new function that calls the given function with a specified thisArg and arguments.
- */function unapply(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return c(e,t,o)}}
+ */function unapply(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return s(e,t,o)}}
/**
* Creates a new function that constructs an instance of the given constructor function with the provided arguments.
*
* @param func - The constructor function to be wrapped and called.
* @returns A new function that constructs an instance of the given constructor function with the provided arguments.
- */function unconstruct(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return s(e,n)}}
+ */function unconstruct(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return c(e,n)}}
/**
* Add properties to a lookup table
*
@@ -21,27 +21,27 @@ const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescr
* @param array - The array containing elements to be added to the set.
* @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
* @returns The modified set with added elements.
- */function addToSet(e,o){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;t&&t(e,null);let r=o.length;while(r--){let t=o[r];if(typeof t==="string"){const e=a(t);if(e!==t){n(o)||(o[r]=e);t=e}}e[t]=true}return e}
+ */function addToSet(e,o){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h;t&&t(e,null);let r=o.length;while(r--){let t=o[r];if(typeof t==="string"){const e=a(t);if(e!==t){n(o)||(o[r]=e);t=e}}e[t]=true}return e}
/**
* Clean up an array to harden against CSPP
*
* @param array - The array to be cleaned.
* @returns The cleaned version of the array
- */function cleanArray(e){for(let t=0;t<e.length;t++){const n=_(e,t);n||(e[t]=null)}return e}
+ */function cleanArray(e){for(let t=0;t<e.length;t++){const n=E(e,t);n||(e[t]=null)}return e}
/**
* Shallow clone an object
*
* @param object - The object to be cloned.
* @returns A new object that copies the original.
- */function clone(t){const n=l(null);for(const[o,a]of e(t)){const e=_(t,o);e&&(Array.isArray(a)?n[o]=cleanArray(a):a&&typeof a==="object"&&a.constructor===Object?n[o]=clone(a):n[o]=a)}return n}
+ */function clone(t){const n=l(null);for(const[o,a]of e(t)){const e=E(t,o);e&&(Array.isArray(a)?n[o]=cleanArray(a):a&&typeof a==="object"&&a.constructor===Object?n[o]=clone(a):n[o]=a)}return n}
/**
* This method automatically checks if the prop is function or getter and behaves accordingly.
*
* @param object - The object to look up the getter function in its prototype chain.
* @param prop - The property name for which to find the getter function.
* @returns The getter function found in the prototype chain or a fallback function.
- */function lookupGetter(e,t){while(e!==null){const n=a(e,t);if(n){if(n.get)return unapply(n.get);if(typeof n.value==="function")return unapply(n.value)}e=o(e)}function fallbackValue(){return null}return fallbackValue}const A=r(["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","section","select","shadow","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"]);const N=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]);const b=r(["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"]);const w=r(["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"]);const R=r(["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"]);const k=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]);const x=r(["#text"]);const O=r(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]);const D=r(["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","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"]);const C=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]);const L=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]);const v=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm);const M=i(/<%[\w\W]*|[\w\W]*%>/gm);const I=i(/\$\{[\w\W]*}/gm);const P=i(/^data-[\-\w.\u00B7-\uFFFF]+$/);const U=i(/^aria-[\-\w]+$/);const H=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);const z=i(/^(?:\w+script|data):/i);const F=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);const G=i(/^html$/i);const B=i(/^[a-z][.\w]*(-[.\w]+)+$/i);var W=Object.freeze({__proto__:null,ARIA_ATTR:U,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:B,DATA_ATTR:P,DOCTYPE_NAME:G,ERB_EXPR:M,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:z,MUSTACHE_EXPR:v,TMPLIT_EXPR:I});
-/* eslint-disable @typescript-eslint/indent */const Y={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12};const j=function getGlobal(){return typeof window==="undefined"?null:window};
+ */function lookupGetter(e,t){while(e!==null){const n=a(e,t);if(n){if(n.get)return unapply(n.get);if(typeof n.value==="function")return unapply(n.value)}e=o(e)}function fallbackValue(){return null}return fallbackValue}const b=r(["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","section","select","shadow","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"]);const w=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]);const R=r(["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"]);const k=r(["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"]);const x=r(["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"]);const O=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]);const D=r(["#text"]);const v=r(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]);const C=r(["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","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"]);const L=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]);const I=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]);const M=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm);const P=i(/<%[\w\W]*|[\w\W]*%>/gm);const U=i(/\$\{[\w\W]*/gm);const H=i(/^data-[\-\w.\u00B7-\uFFFF]+$/);const z=i(/^aria-[\-\w]+$/);const F=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);const G=i(/^(?:\w+script|data):/i);const B=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);const W=i(/^html$/i);const Y=i(/^[a-z][.\w]*(-[.\w]+)+$/i);var j=Object.freeze({__proto__:null,ARIA_ATTR:z,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:Y,DATA_ATTR:H,DOCTYPE_NAME:W,ERB_EXPR:P,IS_ALLOWED_URI:F,IS_SCRIPT_OR_DATA:G,MUSTACHE_EXPR:M,TMPLIT_EXPR:U});
+/* eslint-disable @typescript-eslint/indent */const X={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12};const q=function getGlobal(){return typeof window==="undefined"?null:window};
/**
* Creates a no-op policy for internal use only.
* Don't export this function outside this module!
@@ -49,53 +49,53 @@ const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescr
* @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
* @return The policy created (or null, if Trusted Types
* are not supported or creating the policy failed).
- */const X=function _createTrustedTypesPolicy(e,t){if(typeof e!=="object"||typeof e.createPolicy!=="function")return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){console.warn("TrustedTypes policy "+a+" could not be created.");return null}};const q=function _createHooksMap(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function createDOMPurify(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:j();const DOMPurify=e=>createDOMPurify(e);DOMPurify.version="3.2.3";DOMPurify.removed=[];if(!t||!t.document||t.document.nodeType!==Y.document){DOMPurify.isSupported=false;return DOMPurify}let{document:n}=t;const o=n;const a=o.currentScript;const{DocumentFragment:i,HTMLTemplateElement:c,Node:s,Element:v,NodeFilter:M,NamedNodeMap:I=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:P,DOMParser:U,trustedTypes:z}=t;const F=v.prototype;const B=lookupGetter(F,"cloneNode");const V=lookupGetter(F,"remove");const $=lookupGetter(F,"nextSibling");const K=lookupGetter(F,"childNodes");const Z=lookupGetter(F,"parentNode");if(typeof c==="function"){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let J;let Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=n;const{importNode:ae}=o;let re=q();DOMPurify.isSupported=typeof e==="function"&&typeof Z==="function"&&ee&&ee.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ie,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:fe,CUSTOM_ELEMENT:me}=W;let{IS_ALLOWED_URI:pe}=W;let he=null;const Te=addToSet({},[...A,...N,...b,...R,...x]);let ge=null;const ye=addToSet({},[...O,...D,...C,...L]);let _e=Object.seal(l(null,{tagNameCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeNameCheck:{writable:true,configurable:false,enumerable:true,value:null},allowCustomizedBuiltInElements:{writable:true,configurable:false,enumerable:true,value:false}}));let Se=null;let Ee=null;let Ae=true;let Ne=true;let be=false;let we=true;let Re=false;let ke=true;let xe=false;let Oe=false;let De=false;let Ce=false;let Le=false;let ve=false;let Me=true;let Ie=false;const Pe="user-content-";let Ue=true;let He=false;let ze={};let Fe=null;const Ge=addToSet({},["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 Be=null;const We=addToSet({},["audio","video","img","source","image","track"]);let Ye=null;const je=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]);const Xe="http://www.w3.org/1998/Math/MathML";const qe="http://www.w3.org/2000/svg";const Ve="http://www.w3.org/1999/xhtml";let $e=Ve;let Ke=false;let Ze=null;const Je=addToSet({},[Xe,qe,Ve],p);let Qe=addToSet({},["mi","mo","mn","ms","mtext"]);let et=addToSet({},["annotation-xml"]);const tt=addToSet({},["title","style","font","a","script"]);let nt=null;const ot=["application/xhtml+xml","text/html"];const at="text/html";let rt=null;let it=null;const lt=n.createElement("form");const ct=function isRegexOrFunction(e){return e instanceof RegExp||e instanceof Function};
+ */const V=function _createTrustedTypesPolicy(e,t){if(typeof e!=="object"||typeof e.createPolicy!=="function")return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){console.warn("TrustedTypes policy "+a+" could not be created.");return null}};const $=function _createHooksMap(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function createDOMPurify(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:q();const DOMPurify=e=>createDOMPurify(e);DOMPurify.version="3.2.5";DOMPurify.removed=[];if(!t||!t.document||t.document.nodeType!==X.document||!t.Element){DOMPurify.isSupported=false;return DOMPurify}let{document:n}=t;const o=n;const a=o.currentScript;const{DocumentFragment:i,HTMLTemplateElement:s,Node:c,Element:M,NodeFilter:P,NamedNodeMap:U=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:G}=t;const B=M.prototype;const Y=lookupGetter(B,"cloneNode");const K=lookupGetter(B,"remove");const Z=lookupGetter(B,"nextSibling");const J=lookupGetter(B,"childNodes");const Q=lookupGetter(B,"parentNode");if(typeof s==="function"){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let ee;let te="";const{implementation:ne,createNodeIterator:oe,createDocumentFragment:ae,getElementsByTagName:re}=n;const{importNode:ie}=o;let le=$();DOMPurify.isSupported=typeof e==="function"&&typeof Q==="function"&&ne&&ne.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:se,ERB_EXPR:ce,TMPLIT_EXPR:ue,DATA_ATTR:pe,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:me,CUSTOM_ELEMENT:he}=j;let{IS_ALLOWED_URI:Te}=j;let ge=null;const ye=addToSet({},[...b,...w,...R,...x,...D]);let _e=null;const Se=addToSet({},[...v,...C,...L,...I]);let Ee=Object.seal(l(null,{tagNameCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeNameCheck:{writable:true,configurable:false,enumerable:true,value:null},allowCustomizedBuiltInElements:{writable:true,configurable:false,enumerable:true,value:false}}));let Ae=null;let Ne=null;let be=true;let we=true;let Re=false;let ke=true;let xe=false;let Oe=true;let De=false;let ve=false;let Ce=false;let Le=false;let Ie=false;let Me=false;let Pe=true;let Ue=false;const He="user-content-";let ze=true;let Fe=false;let Ge={};let Be=null;const We=addToSet({},["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 Ye=null;const je=addToSet({},["audio","video","img","source","image","track"]);let Xe=null;const qe=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]);const Ve="http://www.w3.org/1998/Math/MathML";const $e="http://www.w3.org/2000/svg";const Ke="http://www.w3.org/1999/xhtml";let Ze=Ke;let Je=false;let Qe=null;const et=addToSet({},[Ve,$e,Ke],T);let tt=addToSet({},["mi","mo","mn","ms","mtext"]);let nt=addToSet({},["annotation-xml"]);const ot=addToSet({},["title","style","font","a","script"]);let at=null;const rt=["application/xhtml+xml","text/html"];const it="text/html";let lt=null;let st=null;const ct=n.createElement("form");const ut=function isRegexOrFunction(e){return e instanceof RegExp||e instanceof Function};
/**
* _parseConfig
*
* @param cfg optional config literal
- */const st=function _parseConfig(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!it||it!==e){e&&typeof e==="object"||(e={});e=clone(e);nt=ot.indexOf(e.PARSER_MEDIA_TYPE)===-1?at:e.PARSER_MEDIA_TYPE;rt=nt==="application/xhtml+xml"?p:m;he=_(e,"ALLOWED_TAGS")?addToSet({},e.ALLOWED_TAGS,rt):Te;ge=_(e,"ALLOWED_ATTR")?addToSet({},e.ALLOWED_ATTR,rt):ye;Ze=_(e,"ALLOWED_NAMESPACES")?addToSet({},e.ALLOWED_NAMESPACES,p):Je;Ye=_(e,"ADD_URI_SAFE_ATTR")?addToSet(clone(je),e.ADD_URI_SAFE_ATTR,rt):je;Be=_(e,"ADD_DATA_URI_TAGS")?addToSet(clone(We),e.ADD_DATA_URI_TAGS,rt):We;Fe=_(e,"FORBID_CONTENTS")?addToSet({},e.FORBID_CONTENTS,rt):Ge;Se=_(e,"FORBID_TAGS")?addToSet({},e.FORBID_TAGS,rt):{};Ee=_(e,"FORBID_ATTR")?addToSet({},e.FORBID_ATTR,rt):{};ze=!!_(e,"USE_PROFILES")&&e.USE_PROFILES;Ae=e.ALLOW_ARIA_ATTR!==false;Ne=e.ALLOW_DATA_ATTR!==false;be=e.ALLOW_UNKNOWN_PROTOCOLS||false;we=e.ALLOW_SELF_CLOSE_IN_ATTR!==false;Re=e.SAFE_FOR_TEMPLATES||false;ke=e.SAFE_FOR_XML!==false;xe=e.WHOLE_DOCUMENT||false;Ce=e.RETURN_DOM||false;Le=e.RETURN_DOM_FRAGMENT||false;ve=e.RETURN_TRUSTED_TYPE||false;De=e.FORCE_BODY||false;Me=e.SANITIZE_DOM!==false;Ie=e.SANITIZE_NAMED_PROPS||false;Ue=e.KEEP_CONTENT!==false;He=e.IN_PLACE||false;pe=e.ALLOWED_URI_REGEXP||H;$e=e.NAMESPACE||Ve;Qe=e.MATHML_TEXT_INTEGRATION_POINTS||Qe;et=e.HTML_INTEGRATION_POINTS||et;_e=e.CUSTOM_ELEMENT_HANDLING||{};e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck);e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck);e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==="boolean"&&(_e.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements);Re&&(Ne=false);Le&&(Ce=true);if(ze){he=addToSet({},x);ge=[];if(ze.html===true){addToSet(he,A);addToSet(ge,O)}if(ze.svg===true){addToSet(he,N);addToSet(ge,D);addToSet(ge,L)}if(ze.svgFilters===true){addToSet(he,b);addToSet(ge,D);addToSet(ge,L)}if(ze.mathMl===true){addToSet(he,R);addToSet(ge,C);addToSet(ge,L)}}if(e.ADD_TAGS){he===Te&&(he=clone(he));addToSet(he,e.ADD_TAGS,rt)}if(e.ADD_ATTR){ge===ye&&(ge=clone(ge));addToSet(ge,e.ADD_ATTR,rt)}e.ADD_URI_SAFE_ATTR&&addToSet(Ye,e.ADD_URI_SAFE_ATTR,rt);if(e.FORBID_CONTENTS){Fe===Ge&&(Fe=clone(Fe));addToSet(Fe,e.FORBID_CONTENTS,rt)}Ue&&(he["#text"]=true);xe&&addToSet(he,["html","head","body"]);if(he.table){addToSet(he,["tbody"]);delete Se.tbody}if(e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=="function")throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=="function")throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY;Q=J.createHTML("")}else{J===void 0&&(J=X(z,a));J!==null&&typeof Q==="string"&&(Q=J.createHTML(""))}r&&r(e);it=e}};const ut=addToSet({},[...N,...b,...w]);const dt=addToSet({},[...R,...k]);
+ */const pt=function _parseConfig(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!st||st!==e){e&&typeof e==="object"||(e={});e=clone(e);at=rt.indexOf(e.PARSER_MEDIA_TYPE)===-1?it:e.PARSER_MEDIA_TYPE;lt=at==="application/xhtml+xml"?T:h;ge=E(e,"ALLOWED_TAGS")?addToSet({},e.ALLOWED_TAGS,lt):ye;_e=E(e,"ALLOWED_ATTR")?addToSet({},e.ALLOWED_ATTR,lt):Se;Qe=E(e,"ALLOWED_NAMESPACES")?addToSet({},e.ALLOWED_NAMESPACES,T):et;Xe=E(e,"ADD_URI_SAFE_ATTR")?addToSet(clone(qe),e.ADD_URI_SAFE_ATTR,lt):qe;Ye=E(e,"ADD_DATA_URI_TAGS")?addToSet(clone(je),e.ADD_DATA_URI_TAGS,lt):je;Be=E(e,"FORBID_CONTENTS")?addToSet({},e.FORBID_CONTENTS,lt):We;Ae=E(e,"FORBID_TAGS")?addToSet({},e.FORBID_TAGS,lt):{};Ne=E(e,"FORBID_ATTR")?addToSet({},e.FORBID_ATTR,lt):{};Ge=!!E(e,"USE_PROFILES")&&e.USE_PROFILES;be=e.ALLOW_ARIA_ATTR!==false;we=e.ALLOW_DATA_ATTR!==false;Re=e.ALLOW_UNKNOWN_PROTOCOLS||false;ke=e.ALLOW_SELF_CLOSE_IN_ATTR!==false;xe=e.SAFE_FOR_TEMPLATES||false;Oe=e.SAFE_FOR_XML!==false;De=e.WHOLE_DOCUMENT||false;Le=e.RETURN_DOM||false;Ie=e.RETURN_DOM_FRAGMENT||false;Me=e.RETURN_TRUSTED_TYPE||false;Ce=e.FORCE_BODY||false;Pe=e.SANITIZE_DOM!==false;Ue=e.SANITIZE_NAMED_PROPS||false;ze=e.KEEP_CONTENT!==false;Fe=e.IN_PLACE||false;Te=e.ALLOWED_URI_REGEXP||F;Ze=e.NAMESPACE||Ke;tt=e.MATHML_TEXT_INTEGRATION_POINTS||tt;nt=e.HTML_INTEGRATION_POINTS||nt;Ee=e.CUSTOM_ELEMENT_HANDLING||{};e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck);e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck);e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==="boolean"&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements);xe&&(we=false);Ie&&(Le=true);if(Ge){ge=addToSet({},D);_e=[];if(Ge.html===true){addToSet(ge,b);addToSet(_e,v)}if(Ge.svg===true){addToSet(ge,w);addToSet(_e,C);addToSet(_e,I)}if(Ge.svgFilters===true){addToSet(ge,R);addToSet(_e,C);addToSet(_e,I)}if(Ge.mathMl===true){addToSet(ge,x);addToSet(_e,L);addToSet(_e,I)}}if(e.ADD_TAGS){ge===ye&&(ge=clone(ge));addToSet(ge,e.ADD_TAGS,lt)}if(e.ADD_ATTR){_e===Se&&(_e=clone(_e));addToSet(_e,e.ADD_ATTR,lt)}e.ADD_URI_SAFE_ATTR&&addToSet(Xe,e.ADD_URI_SAFE_ATTR,lt);if(e.FORBID_CONTENTS){Be===We&&(Be=clone(Be));addToSet(Be,e.FORBID_CONTENTS,lt)}ze&&(ge["#text"]=true);De&&addToSet(ge,["html","head","body"]);if(ge.table){addToSet(ge,["tbody"]);delete Ae.tbody}if(e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=="function")throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=="function")throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ee=e.TRUSTED_TYPES_POLICY;te=ee.createHTML("")}else{ee===void 0&&(ee=V(G,a));ee!==null&&typeof te==="string"&&(te=ee.createHTML(""))}r&&r(e);st=e}};const dt=addToSet({},[...w,...R,...k]);const ft=addToSet({},[...x,...O]);
/**
* @param element a DOM element whose namespace is being checked
* @returns Return false if the element has a
* namespace that a spec-compliant parser would never
* return. Return true otherwise.
- */const ft=function _checkValidNamespace(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});const n=m(e.tagName);const o=m(t.tagName);return!!Ze[e.namespaceURI]&&(e.namespaceURI===qe?t.namespaceURI===Ve?n==="svg":t.namespaceURI===Xe?n==="svg"&&(o==="annotation-xml"||Qe[o]):Boolean(ut[n]):e.namespaceURI===Xe?t.namespaceURI===Ve?n==="math":t.namespaceURI===qe?n==="math"&&et[o]:Boolean(dt[n]):e.namespaceURI===Ve?!(t.namespaceURI===qe&&!et[o])&&(!(t.namespaceURI===Xe&&!Qe[o])&&(!dt[n]&&(tt[n]||!ut[n]))):!(nt!=="application/xhtml+xml"||!Ze[e.namespaceURI]))};
+ */const mt=function _checkValidNamespace(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:Ze,tagName:"template"});const n=h(e.tagName);const o=h(t.tagName);return!!Qe[e.namespaceURI]&&(e.namespaceURI===$e?t.namespaceURI===Ke?n==="svg":t.namespaceURI===Ve?n==="svg"&&(o==="annotation-xml"||tt[o]):Boolean(dt[n]):e.namespaceURI===Ve?t.namespaceURI===Ke?n==="math":t.namespaceURI===$e?n==="math"&&nt[o]:Boolean(ft[n]):e.namespaceURI===Ke?!(t.namespaceURI===$e&&!nt[o])&&(!(t.namespaceURI===Ve&&!tt[o])&&(!ft[n]&&(ot[n]||!dt[n]))):!(at!=="application/xhtml+xml"||!Qe[e.namespaceURI]))};
/**
* _forceRemove
*
* @param node a DOM node
- */const mt=function _forceRemove(e){f(DOMPurify.removed,{element:e});try{Z(e).removeChild(e)}catch(t){V(e)}};
+ */const ht=function _forceRemove(e){f(DOMPurify.removed,{element:e});try{Q(e).removeChild(e)}catch(t){K(e)}};
/**
* _removeAttribute
*
* @param name an Attribute name
* @param element a DOM node
- */const pt=function _removeAttribute(e,t){try{f(DOMPurify.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(DOMPurify.removed,{attribute:null,from:t})}t.removeAttribute(e);if(e==="is")if(Ce||Le)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}};
+ */const Tt=function _removeAttribute(e,t){try{f(DOMPurify.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(DOMPurify.removed,{attribute:null,from:t})}t.removeAttribute(e);if(e==="is")if(Le||Ie)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}};
/**
* _initDocument
*
* @param dirty - a string of dirty markup
* @return a DOM, filled with the dirty markup
- */const ht=function _initDocument(e){let t=null;let o=null;if(De)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);o=t&&t[0]}nt==="application/xhtml+xml"&&$e===Ve&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=J?J.createHTML(e):e;if($e===Ve)try{t=(new U).parseFromString(a,nt)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument($e,"template",null);try{t.documentElement.innerHTML=Ke?Q:a}catch(e){}}const r=t.body||t.documentElement;e&&o&&r.insertBefore(n.createTextNode(o),r.childNodes[0]||null);return $e===Ve?oe.call(t,xe?"html":"body")[0]:xe?t.documentElement:r};
+ */const gt=function _initDocument(e){let t=null;let o=null;if(Ce)e="<remove></remove>"+e;else{const t=g(e,/^[\r\n\t ]+/);o=t&&t[0]}at==="application/xhtml+xml"&&Ze===Ke&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=ee?ee.createHTML(e):e;if(Ze===Ke)try{t=(new z).parseFromString(a,at)}catch(e){}if(!t||!t.documentElement){t=ne.createDocument(Ze,"template",null);try{t.documentElement.innerHTML=Je?te:a}catch(e){}}const r=t.body||t.documentElement;e&&o&&r.insertBefore(n.createTextNode(o),r.childNodes[0]||null);return Ze===Ke?re.call(t,De?"html":"body")[0]:De?t.documentElement:r};
/**
* Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
*
* @param root The root element or node to start traversing on.
* @return The created NodeIterator
- */const Tt=function _createNodeIterator(e){return te.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT|M.SHOW_PROCESSING_INSTRUCTION|M.SHOW_CDATA_SECTION,null)};
+ */const yt=function _createNodeIterator(e){return oe.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT|P.SHOW_PROCESSING_INSTRUCTION|P.SHOW_CDATA_SECTION,null)};
/**
* _isClobbered
*
* @param element element to check for clobbering attacks
* @return true if clobbered, false if safe
- */const gt=function _isClobbered(e){return e instanceof P&&(typeof e.nodeName!=="string"||typeof e.textContent!=="string"||typeof e.removeChild!=="function"||!(e.attributes instanceof I)||typeof e.removeAttribute!=="function"||typeof e.setAttribute!=="function"||typeof e.namespaceURI!=="string"||typeof e.insertBefore!=="function"||typeof e.hasChildNodes!=="function")};
+ */const _t=function _isClobbered(e){return e instanceof H&&(typeof e.nodeName!=="string"||typeof e.textContent!=="string"||typeof e.removeChild!=="function"||!(e.attributes instanceof U)||typeof e.removeAttribute!=="function"||typeof e.setAttribute!=="function"||typeof e.namespaceURI!=="string"||typeof e.insertBefore!=="function"||typeof e.hasChildNodes!=="function")};
/**
* Checks whether the given object is a DOM node.
*
* @param value object to check whether it's a DOM node
* @return true is object is a DOM node
- */const yt=function _isNode(e){return typeof s==="function"&&e instanceof s};function _executeHooks(e,t,n){u(e,(e=>{e.call(DOMPurify,t,n,it)}))}
+ */const St=function _isNode(e){return typeof c==="function"&&e instanceof c};function _executeHooks(e,t,n){u(e,(e=>{e.call(DOMPurify,t,n,st)}))}
/**
* _sanitizeElements
*
@@ -104,7 +104,7 @@ const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescr
* @protect removeChild
* @param currentNode to check for permission to exist
* @return true if node was killed, false if left alive
- */const _t=function _sanitizeElements(e){let t=null;_executeHooks(re.beforeSanitizeElements,e,null);if(gt(e)){mt(e);return true}const n=rt(e.nodeName);_executeHooks(re.uponSanitizeElement,e,{tagName:n,allowedTags:he});if(e.hasChildNodes()&&!yt(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent)){mt(e);return true}if(e.nodeType===Y.progressingInstruction){mt(e);return true}if(ke&&e.nodeType===Y.comment&&S(/<[/\w]/g,e.data)){mt(e);return true}if(!he[n]||Se[n]){if(!Se[n]&&Et(n)){if(_e.tagNameCheck instanceof RegExp&&S(_e.tagNameCheck,n))return false;if(_e.tagNameCheck instanceof Function&&_e.tagNameCheck(n))return false}if(Ue&&!Fe[n]){const t=Z(e)||e.parentNode;const n=K(e)||e.childNodes;if(n&&t){const o=n.length;for(let a=o-1;a>=0;--a){const o=B(n[a],true);o.__removalCount=(e.__removalCount||0)+1;t.insertBefore(o,$(e))}}}mt(e);return true}if(e instanceof v&&!ft(e)){mt(e);return true}if((n==="noscript"||n==="noembed"||n==="noframes")&&S(/<\/no(script|embed|frames)/i,e.innerHTML)){mt(e);return true}if(Re&&e.nodeType===Y.text){t=e.textContent;u([ie,le,ce],(e=>{t=T(t,e," ")}));if(e.textContent!==t){f(DOMPurify.removed,{element:e.cloneNode()});e.textContent=t}}_executeHooks(re.afterSanitizeElements,e,null);return false};
+ */const Et=function _sanitizeElements(e){let t=null;_executeHooks(le.beforeSanitizeElements,e,null);if(_t(e)){ht(e);return true}const n=lt(e.nodeName);_executeHooks(le.uponSanitizeElement,e,{tagName:n,allowedTags:ge});if(e.hasChildNodes()&&!St(e.firstElementChild)&&A(/<[/\w!]/g,e.innerHTML)&&A(/<[/\w!]/g,e.textContent)){ht(e);return true}if(e.nodeType===X.progressingInstruction){ht(e);return true}if(Oe&&e.nodeType===X.comment&&A(/<[/\w]/g,e.data)){ht(e);return true}if(!ge[n]||Ae[n]){if(!Ae[n]&&Nt(n)){if(Ee.tagNameCheck instanceof RegExp&&A(Ee.tagNameCheck,n))return false;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))return false}if(ze&&!Be[n]){const t=Q(e)||e.parentNode;const n=J(e)||e.childNodes;if(n&&t){const o=n.length;for(let a=o-1;a>=0;--a){const o=Y(n[a],true);o.__removalCount=(e.__removalCount||0)+1;t.insertBefore(o,Z(e))}}}ht(e);return true}if(e instanceof M&&!mt(e)){ht(e);return true}if((n==="noscript"||n==="noembed"||n==="noframes")&&A(/<\/no(script|embed|frames)/i,e.innerHTML)){ht(e);return true}if(xe&&e.nodeType===X.text){t=e.textContent;u([se,ce,ue],(e=>{t=y(t,e," ")}));if(e.textContent!==t){f(DOMPurify.removed,{element:e.cloneNode()});e.textContent=t}}_executeHooks(le.afterSanitizeElements,e,null);return false};
/**
* _isValidAttribute
*
@@ -112,7 +112,7 @@ const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescr
* @param lcName Lowercase attribute name.
* @param value Attribute value.
* @return Returns true if `value` is valid, otherwise false.
- */const St=function _isValidAttribute(e,t,o){if(Me&&(t==="id"||t==="name")&&(o in n||o in lt))return false;if(Ne&&!Ee[t]&&S(se,t));else if(Ae&&S(ue,t));else if(!ge[t]||Ee[t]){if(!(Et(e)&&(_e.tagNameCheck instanceof RegExp&&S(_e.tagNameCheck,e)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(e))&&(_e.attributeNameCheck instanceof RegExp&&S(_e.attributeNameCheck,t)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(t))||t==="is"&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&S(_e.tagNameCheck,o)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(o))))return false}else if(Ye[t]);else if(S(pe,T(o,fe,"")));else if(t!=="src"&&t!=="xlink:href"&&t!=="href"||e==="script"||g(o,"data:")!==0||!Be[e]){if(be&&!S(de,T(o,fe,"")));else if(o)return false}else;return true};
+ */const At=function _isValidAttribute(e,t,o){if(Pe&&(t==="id"||t==="name")&&(o in n||o in ct))return false;if(we&&!Ne[t]&&A(pe,t));else if(be&&A(de,t));else if(!_e[t]||Ne[t]){if(!(Nt(e)&&(Ee.tagNameCheck instanceof RegExp&&A(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&A(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||t==="is"&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&A(Ee.tagNameCheck,o)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(o))))return false}else if(Xe[t]);else if(A(Te,y(o,me,"")));else if(t!=="src"&&t!=="xlink:href"&&t!=="href"||e==="script"||_(o,"data:")!==0||!Ye[e]){if(Re&&!A(fe,y(o,me,"")));else if(o)return false}else;return true};
/**
* _isBasicCustomElement
* checks if at least one dash is included in tagName, and it's not the first char
@@ -120,7 +120,7 @@ const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescr
*
* @param tagName name of the tag of the node to sanitize
* @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
- */const Et=function _isBasicCustomElement(e){return e!=="annotation-xml"&&h(e,me)};
+ */const Nt=function _isBasicCustomElement(e){return e!=="annotation-xml"&&g(e,he)};
/**
* _sanitizeAttributes
*
@@ -130,10 +130,10 @@ const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescr
* @protect setAttribute
*
* @param currentNode to sanitize
- */const At=function _sanitizeAttributes(e){_executeHooks(re.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||gt(e))return;const n={attrName:"",attrValue:"",keepAttr:true,allowedAttributes:ge,forceKeepAttr:void 0};let o=t.length;while(o--){const a=t[o];const{name:r,namespaceURI:i,value:l}=a;const c=rt(r);let s=r==="value"?l:y(l);n.attrName=c;n.attrValue=s;n.keepAttr=true;n.forceKeepAttr=void 0;_executeHooks(re.uponSanitizeAttribute,e,n);s=n.attrValue;if(Ie&&(c==="id"||c==="name")){pt(r,e);s=Pe+s}if(ke&&S(/((--!?|])>)|<\/(style|title)/i,s)){pt(r,e);continue}if(n.forceKeepAttr)continue;pt(r,e);if(!n.keepAttr)continue;if(!we&&S(/\/>/i,s)){pt(r,e);continue}Re&&u([ie,le,ce],(e=>{s=T(s,e," ")}));const f=rt(e.nodeName);if(St(f,c,s)){if(J&&typeof z==="object"&&typeof z.getAttributeType==="function")if(i);else switch(z.getAttributeType(f,c)){case"TrustedHTML":s=J.createHTML(s);break;case"TrustedScriptURL":s=J.createScriptURL(s);break}try{i?e.setAttributeNS(i,r,s):e.setAttribute(r,s);gt(e)?mt(e):d(DOMPurify.removed)}catch(e){}}}_executeHooks(re.afterSanitizeAttributes,e,null)};
+ */const bt=function _sanitizeAttributes(e){_executeHooks(le.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||_t(e))return;const n={attrName:"",attrValue:"",keepAttr:true,allowedAttributes:_e,forceKeepAttr:void 0};let o=t.length;while(o--){const a=t[o];const{name:r,namespaceURI:i,value:l}=a;const s=lt(r);let c=r==="value"?l:S(l);n.attrName=s;n.attrValue=c;n.keepAttr=true;n.forceKeepAttr=void 0;_executeHooks(le.uponSanitizeAttribute,e,n);c=n.attrValue;if(Ue&&(s==="id"||s==="name")){Tt(r,e);c=He+c}if(Oe&&A(/((--!?|])>)|<\/(style|title)/i,c)){Tt(r,e);continue}if(n.forceKeepAttr)continue;Tt(r,e);if(!n.keepAttr)continue;if(!ke&&A(/\/>/i,c)){Tt(r,e);continue}xe&&u([se,ce,ue],(e=>{c=y(c,e," ")}));const p=lt(e.nodeName);if(At(p,s,c)){if(ee&&typeof G==="object"&&typeof G.getAttributeType==="function")if(i);else switch(G.getAttributeType(p,s)){case"TrustedHTML":c=ee.createHTML(c);break;case"TrustedScriptURL":c=ee.createScriptURL(c);break}try{i?e.setAttributeNS(i,r,c):e.setAttribute(r,c);_t(e)?ht(e):d(DOMPurify.removed)}catch(e){}}}_executeHooks(le.afterSanitizeAttributes,e,null)};
/**
* _sanitizeShadowDOM
*
* @param fragment to iterate over recursively
- */const Nt=function _sanitizeShadowDOM(e){let t=null;const n=Tt(e);_executeHooks(re.beforeSanitizeShadowDOM,e,null);while(t=n.nextNode()){_executeHooks(re.uponSanitizeShadowNode,t,null);_t(t);At(t);t.content instanceof i&&_sanitizeShadowDOM(t.content)}_executeHooks(re.afterSanitizeShadowDOM,e,null)};DOMPurify.sanitize=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};let n=null;let a=null;let r=null;let l=null;Ke=!e;Ke&&(e="\x3c!--\x3e");if(typeof e!=="string"&&!yt(e)){if(typeof e.toString!=="function")throw E("toString is not a function");e=e.toString();if(typeof e!=="string")throw E("dirty is not a string, aborting")}if(!DOMPurify.isSupported)return e;Oe||st(t);DOMPurify.removed=[];typeof e==="string"&&(He=false);if(He){if(e.nodeName){const t=rt(e.nodeName);if(!he[t]||Se[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s){n=ht("\x3c!----\x3e");a=n.ownerDocument.importNode(e,true);a.nodeType===Y.element&&a.nodeName==="BODY"||a.nodeName==="HTML"?n=a:n.appendChild(a)}else{if(!Ce&&!Re&&!xe&&e.indexOf("<")===-1)return J&&ve?J.createHTML(e):e;n=ht(e);if(!n)return Ce?null:ve?Q:""}n&&De&&mt(n.firstChild);const c=Tt(He?e:n);while(r=c.nextNode()){_t(r);At(r);r.content instanceof i&&Nt(r.content)}if(He)return e;if(Ce){if(Le){l=ne.call(n.ownerDocument);while(n.firstChild)l.appendChild(n.firstChild)}else l=n;(ge.shadowroot||ge.shadowrootmode)&&(l=ae.call(o,l,true));return l}let d=xe?n.outerHTML:n.innerHTML;xe&&he["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(G,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d);Re&&u([ie,le,ce],(e=>{d=T(d,e," ")}));return J&&ve?J.createHTML(d):d};DOMPurify.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};st(e);Oe=true};DOMPurify.clearConfig=function(){it=null;Oe=false};DOMPurify.isValidAttribute=function(e,t,n){it||st({});const o=rt(e);const a=rt(t);return St(o,a,n)};DOMPurify.addHook=function(e,t){typeof t==="function"&&f(re[e],t)};DOMPurify.removeHook=function(e){return d(re[e])};DOMPurify.removeHooks=function(e){re[e]=[]};DOMPurify.removeAllHooks=function(){re=q()};return DOMPurify}var V=createDOMPurify();export{V as default};
+ */const wt=function _sanitizeShadowDOM(e){let t=null;const n=yt(e);_executeHooks(le.beforeSanitizeShadowDOM,e,null);while(t=n.nextNode()){_executeHooks(le.uponSanitizeShadowNode,t,null);Et(t);bt(t);t.content instanceof i&&_sanitizeShadowDOM(t.content)}_executeHooks(le.afterSanitizeShadowDOM,e,null)};DOMPurify.sanitize=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};let n=null;let a=null;let r=null;let l=null;Je=!e;Je&&(e="\x3c!--\x3e");if(typeof e!=="string"&&!St(e)){if(typeof e.toString!=="function")throw N("toString is not a function");e=e.toString();if(typeof e!=="string")throw N("dirty is not a string, aborting")}if(!DOMPurify.isSupported)return e;ve||pt(t);DOMPurify.removed=[];typeof e==="string"&&(Fe=false);if(Fe){if(e.nodeName){const t=lt(e.nodeName);if(!ge[t]||Ae[t])throw N("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c){n=gt("\x3c!----\x3e");a=n.ownerDocument.importNode(e,true);a.nodeType===X.element&&a.nodeName==="BODY"||a.nodeName==="HTML"?n=a:n.appendChild(a)}else{if(!Le&&!xe&&!De&&e.indexOf("<")===-1)return ee&&Me?ee.createHTML(e):e;n=gt(e);if(!n)return Le?null:Me?te:""}n&&Ce&&ht(n.firstChild);const s=yt(Fe?e:n);while(r=s.nextNode()){Et(r);bt(r);r.content instanceof i&&wt(r.content)}if(Fe)return e;if(Le){if(Ie){l=ae.call(n.ownerDocument);while(n.firstChild)l.appendChild(n.firstChild)}else l=n;(_e.shadowroot||_e.shadowrootmode)&&(l=ie.call(o,l,true));return l}let p=De?n.outerHTML:n.innerHTML;De&&ge["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(W,n.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+p);xe&&u([se,ce,ue],(e=>{p=y(p,e," ")}));return ee&&Me?ee.createHTML(p):p};DOMPurify.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pt(e);ve=true};DOMPurify.clearConfig=function(){st=null;ve=false};DOMPurify.isValidAttribute=function(e,t,n){st||pt({});const o=lt(e);const a=lt(t);return At(o,a,n)};DOMPurify.addHook=function(e,t){typeof t==="function"&&f(le[e],t)};DOMPurify.removeHook=function(e,t){if(t!==void 0){const n=p(le[e],t);return n===-1?void 0:m(le[e],n,1)[0]}return d(le[e])};DOMPurify.removeHooks=function(e){le[e]=[]};DOMPurify.removeAllHooks=function(){le=$()};return DOMPurify}var K=createDOMPurify();export{K as default};