Viewing File: /home/rtsgrob/ww3/wp-content/plugins/tutor-pro/addons/tutor-certificate/assets/js/856.js

(self.webpackChunktutor_pro=self.webpackChunktutor_pro||[]).push([[856],{7856:function(e){e.exports=function(){"use strict";function $e(e){"@babel/helpers - typeof";return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(e)}function l(e,t){l=Object.setPrototypeOf||function e(t,r){t.__proto__=r;return t};return l(e,t)}function n(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function a(e,t,r){if(n())a=Reflect.construct;else a=function e(t,r,n){var a=[null];a.push.apply(a,r);var i=Function.bind.apply(t,a);var o=new i;if(n)l(o,n.prototype);return o};return a.apply(null,arguments)}function Ke(e){return t(e)||r(e)||i(e)||p()}function t(e){if(Array.isArray(e))return o(e)}function r(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function i(e,t){if(!e)return;if(typeof e==="string")return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor)r=e.constructor.name;if(r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}function o(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var d=Object.hasOwnProperty,c=Object.setPrototypeOf,h=Object.isFrozen,v=Object.getPrototypeOf,g=Object.getOwnPropertyDescriptor,Ve=Object.freeze,e=Object.seal,y=Object.create,u=typeof Reflect!=="undefined"&&Reflect,f=u.apply,s=u.construct;if(!f)f=function e(t,r,n){return t.apply(r,n)};if(!Ve)Ve=function e(t){return t};if(!e)e=function e(t){return t};if(!s)s=function e(t,r){return a(t,Ke(r))};var vt=m(Array.prototype.forEach),Xe=m(Array.prototype.pop),Ze=m(Array.prototype.push),Je=m(String.prototype.toLowerCase),Qe=m(String.prototype.toString),gt=m(String.prototype.match),et=m(String.prototype.replace),yt=m(String.prototype.indexOf),bt=m(String.prototype.trim),tt=m(RegExp.prototype.test),rt=b(TypeError);function m(a){return function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return f(a,e,r)}}function b(n){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return s(n,t)}}function nt(e,t,r){r=r?r:Je;if(c)c(e,null);var n=t.length;while(n--){var a=t[n];if(typeof a==="string"){var i=r(a);if(i!==a){if(!h(t))t[n]=i;a=i}}e[a]=true}return e}function at(e){var t=y(null);var r;for(r in e)if(f(d,e,[r])===true)t[r]=e[r];return t}function it(e,t){while(e!==null){var r=g(e,t);if(r){if(r.get)return m(r.get);if(typeof r.value==="function")return m(r.value)}e=v(e)}function n(e){console.warn("fallback value for",e);return null}return n}var ot=Ve(["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"]),lt=Ve(["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"]),ct=Ve(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Tt=Ve(["animate","color-profile","cursor","discard","fedropshadow","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"]),ut=Ve(["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"]),Nt=Ve(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ft=Ve(["#text"]),st=Ve(["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","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","xmlns","slot"]),mt=Ve(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),pt=Ve(["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"]),dt=Ve(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Et=e(/\{\{[\w\W]*|[\w\W]*\}\}/gm),At=e(/<%[\w\W]*|[\w\W]*%>/gm),wt=e(/\${[\w\W]*}/gm),St=e(/^data-[\-\w.\u00B7-\uFFFF]/),_t=e(/^aria-[\-\w]+$/),kt=e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),xt=e(/^(?:\w+script|data):/i),Lt=e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ot=e(/^html$/i),Ct=function e(){return typeof window==="undefined"?null:window},Dt=function e(t,r){if($e(t)!=="object"||typeof t.createPolicy!=="function")return null;var n=null;var a="data-tt-policy-suffix";if(r.currentScript&&r.currentScript.hasAttribute(a))n=r.currentScript.getAttribute(a);var i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:function e(t){return t},createScriptURL:function e(t){return t}})}catch(e){console.warn("TrustedTypes policy "+i+" could not be created.");return null}},T;function ht(){var f=arguments.length>0&&arguments[0]!==undefined?arguments[0]:Ct();var m=function e(t){return ht(t)};m.version="2.4.5";m.removed=[];if(!f||!f.document||f.document.nodeType!==9){m.isSupported=false;return m}var s=f.document;var l=f.document;var I=f.DocumentFragment,F=f.HTMLTemplateElement,p=f.Node,U=f.Element,r=f.NodeFilter,H=f.NamedNodeMap,z=H===void 0?f.NamedNodeMap||f.MozNamedAttrMap:H,P=f.HTMLFormElement,B=f.DOMParser,d=f.trustedTypes;var e=U.prototype;var j=it(e,"cloneNode");var G=it(e,"nextSibling");var W=it(e,"childNodes");var c=it(e,"parentNode");if(typeof F==="function"){var q=l.createElement("template");if(q.content&&q.content.ownerDocument)l=q.content.ownerDocument}var h=Dt(d,s);var Y=h?h.createHTML(""):"";var t=l,$=t.implementation,K=t.createNodeIterator,V=t.createDocumentFragment,X=t.getElementsByTagName;var Z=s.importNode;var J={};try{J=at(l).documentMode?l.documentMode:{}}catch(e){}var a={};m.isSupported=typeof c==="function"&&$&&typeof $.createHTMLDocument!=="undefined"&&J!==9;var Q=Et,ee=At,te=wt,re=St,ne=_t,ae=xt,ie=Lt;var oe=kt;var v=null;var le=nt({},[].concat(Ke(ot),Ke(lt),Ke(ct),Ke(ut),Ke(ft)));var g=null;var ce=nt({},[].concat(Ke(st),Ke(mt),Ke(pt),Ke(dt)));var u=Object.seal(Object.create(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}}));var y=null;var ue=null;var fe=true;var se=true;var me=false;var pe=true;var b=false;var T=false;var de=false;var he=false;var N=false;var E=false;var A=false;var ve=true;var ge=false;var ye="user-content-";var be=true;var w=false;var n={};var S=null;var Te=nt({},["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"]);var Ne=null;var Ee=nt({},["audio","video","img","source","image","track"]);var Ae=null;var we=nt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]);var i="http://www.w3.org/1998/Math/MathML";var o="http://www.w3.org/2000/svg";var _="http://www.w3.org/1999/xhtml";var k=_;var Se=false;var _e=null;var ke=nt({},[i,o,_],Qe);var x;var xe=["application/xhtml+xml","text/html"];var Le="text/html";var L;var O=null;var Oe=l.createElement("form");var Ce=function e(t){return t instanceof RegExp||t instanceof Function};var De=function e(t){if(O&&O===t)return;if(!t||$e(t)!=="object")t={};t=at(t);x=xe.indexOf(t.PARSER_MEDIA_TYPE)===-1?x=Le:x=t.PARSER_MEDIA_TYPE;L=x==="application/xhtml+xml"?Qe:Je;v="ALLOWED_TAGS"in t?nt({},t.ALLOWED_TAGS,L):le;g="ALLOWED_ATTR"in t?nt({},t.ALLOWED_ATTR,L):ce;_e="ALLOWED_NAMESPACES"in t?nt({},t.ALLOWED_NAMESPACES,Qe):ke;Ae="ADD_URI_SAFE_ATTR"in t?nt(at(we),t.ADD_URI_SAFE_ATTR,L):we;Ne="ADD_DATA_URI_TAGS"in t?nt(at(Ee),t.ADD_DATA_URI_TAGS,L):Ee;S="FORBID_CONTENTS"in t?nt({},t.FORBID_CONTENTS,L):Te;y="FORBID_TAGS"in t?nt({},t.FORBID_TAGS,L):{};ue="FORBID_ATTR"in t?nt({},t.FORBID_ATTR,L):{};n="USE_PROFILES"in t?t.USE_PROFILES:false;fe=t.ALLOW_ARIA_ATTR!==false;se=t.ALLOW_DATA_ATTR!==false;me=t.ALLOW_UNKNOWN_PROTOCOLS||false;pe=t.ALLOW_SELF_CLOSE_IN_ATTR!==false;b=t.SAFE_FOR_TEMPLATES||false;T=t.WHOLE_DOCUMENT||false;N=t.RETURN_DOM||false;E=t.RETURN_DOM_FRAGMENT||false;A=t.RETURN_TRUSTED_TYPE||false;he=t.FORCE_BODY||false;ve=t.SANITIZE_DOM!==false;ge=t.SANITIZE_NAMED_PROPS||false;be=t.KEEP_CONTENT!==false;w=t.IN_PLACE||false;oe=t.ALLOWED_URI_REGEXP||oe;k=t.NAMESPACE||_;u=t.CUSTOM_ELEMENT_HANDLING||{};if(t.CUSTOM_ELEMENT_HANDLING&&Ce(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck))u.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck;if(t.CUSTOM_ELEMENT_HANDLING&&Ce(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck))u.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;if(t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==="boolean")u.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;if(b)se=false;if(E)N=true;if(n){v=nt({},Ke(ft));g=[];if(n.html===true){nt(v,ot);nt(g,st)}if(n.svg===true){nt(v,lt);nt(g,mt);nt(g,dt)}if(n.svgFilters===true){nt(v,ct);nt(g,mt);nt(g,dt)}if(n.mathMl===true){nt(v,ut);nt(g,pt);nt(g,dt)}}if(t.ADD_TAGS){if(v===le)v=at(v);nt(v,t.ADD_TAGS,L)}if(t.ADD_ATTR){if(g===ce)g=at(g);nt(g,t.ADD_ATTR,L)}if(t.ADD_URI_SAFE_ATTR)nt(Ae,t.ADD_URI_SAFE_ATTR,L);if(t.FORBID_CONTENTS){if(S===Te)S=at(S);nt(S,t.FORBID_CONTENTS,L)}if(be)v["#text"]=true;if(T)nt(v,["html","head","body"]);if(v.table){nt(v,["tbody"]);delete y.tbody}if(Ve)Ve(t);O=t};var Re=nt({},["mi","mo","mn","ms","mtext"]);var Me=nt({},["foreignobject","desc","title","annotation-xml"]);var Ie=nt({},["title","style","font","a","script"]);var C=nt({},lt);nt(C,ct);nt(C,Tt);var Fe=nt({},ut);nt(Fe,Nt);var Ue=function e(t){var r=c(t);if(!r||!r.tagName)r={namespaceURI:k,tagName:"template"};var n=Je(t.tagName);var a=Je(r.tagName);if(!_e[t.namespaceURI])return false;if(t.namespaceURI===o){if(r.namespaceURI===_)return n==="svg";if(r.namespaceURI===i)return n==="svg"&&(a==="annotation-xml"||Re[a]);return Boolean(C[n])}if(t.namespaceURI===i){if(r.namespaceURI===_)return n==="math";if(r.namespaceURI===o)return n==="math"&&Me[a];return Boolean(Fe[n])}if(t.namespaceURI===_){if(r.namespaceURI===o&&!Me[a])return false;if(r.namespaceURI===i&&!Re[a])return false;return!Fe[n]&&(Ie[n]||!C[n])}if(x==="application/xhtml+xml"&&_e[t.namespaceURI])return true;return false};var D=function e(t){Ze(m.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=Y}catch(e){t.remove()}}};var He=function e(t,r){try{Ze(m.removed,{attribute:r.getAttributeNode(t),from:r})}catch(e){Ze(m.removed,{attribute:null,from:r})}r.removeAttribute(t);if(t==="is"&&!g[t])if(N||E)try{D(r)}catch(e){}else try{r.setAttribute(t,"")}catch(e){}};var ze=function e(t){var r;var n;if(he)t="<remove></remove>"+t;else{var a=gt(t,/^[\r\n\t ]+/);n=a&&a[0]}if(x==="application/xhtml+xml"&&k===_)t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>";var i=h?h.createHTML(t):t;if(k===_)try{r=(new B).parseFromString(i,x)}catch(e){}if(!r||!r.documentElement){r=$.createDocument(k,"template",null);try{r.documentElement.innerHTML=Se?Y:i}catch(e){}}var o=r.body||r.documentElement;if(t&&n)o.insertBefore(l.createTextNode(n),o.childNodes[0]||null);if(k===_)return X.call(r,T?"html":"body")[0];return T?r.documentElement:o};var Pe=function e(t){return K.call(t.ownerDocument||t,t,r.SHOW_ELEMENT|r.SHOW_COMMENT|r.SHOW_TEXT,null,false)};var Be=function e(t){return t instanceof P&&(typeof t.nodeName!=="string"||typeof t.textContent!=="string"||typeof t.removeChild!=="function"||!(t.attributes instanceof z)||typeof t.removeAttribute!=="function"||typeof t.setAttribute!=="function"||typeof t.namespaceURI!=="string"||typeof t.insertBefore!=="function"||typeof t.hasChildNodes!=="function")};var R=function e(t){return $e(p)==="object"?t instanceof p:t&&$e(t)==="object"&&typeof t.nodeType==="number"&&typeof t.nodeName==="string"};var M=function e(t,r,n){if(!a[t])return;vt(a[t],function(e){e.call(m,r,n,O)})};var je=function e(t){var r;M("beforeSanitizeElements",t,null);if(Be(t)){D(t);return true}if(tt(/[\u0080-\uFFFF]/,t.nodeName)){D(t);return true}var n=L(t.nodeName);M("uponSanitizeElement",t,{tagName:n,allowedTags:v});if(t.hasChildNodes()&&!R(t.firstElementChild)&&(!R(t.content)||!R(t.content.firstElementChild))&&tt(/<[/\w]/g,t.innerHTML)&&tt(/<[/\w]/g,t.textContent)){D(t);return true}if(n==="select"&&tt(/<template/i,t.innerHTML)){D(t);return true}if(!v[n]||y[n]){if(!y[n]&&We(n)){if(u.tagNameCheck instanceof RegExp&&tt(u.tagNameCheck,n))return false;if(u.tagNameCheck instanceof Function&&u.tagNameCheck(n))return false}if(be&&!S[n]){var a=c(t)||t.parentNode;var i=W(t)||t.childNodes;if(i&&a){var o=i.length;for(var l=o-1;l>=0;--l)a.insertBefore(j(i[l],true),G(t))}}D(t);return true}if(t instanceof U&&!Ue(t)){D(t);return true}if((n==="noscript"||n==="noembed")&&tt(/<\/no(script|embed)/i,t.innerHTML)){D(t);return true}if(b&&t.nodeType===3){r=t.textContent;r=et(r,Q," ");r=et(r,ee," ");r=et(r,te," ");if(t.textContent!==r){Ze(m.removed,{element:t.cloneNode()});t.textContent=r}}M("afterSanitizeElements",t,null);return false};var Ge=function e(t,r,n){if(ve&&(r==="id"||r==="name")&&(n in l||n in Oe))return false;if(se&&!ue[r]&&tt(re,r));else if(fe&&tt(ne,r));else if(!g[r]||ue[r])if(We(t)&&(u.tagNameCheck instanceof RegExp&&tt(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t))&&(u.attributeNameCheck instanceof RegExp&&tt(u.attributeNameCheck,r)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(r))||r==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&tt(u.tagNameCheck,n)||u.tagNameCheck instanceof Function&&u.tagNameCheck(n)));else return false;else if(Ae[r]);else if(tt(oe,et(n,ie,"")));else if((r==="src"||r==="xlink:href"||r==="href")&&t!=="script"&&yt(n,"data:")===0&&Ne[t]);else if(me&&!tt(ae,et(n,ie,"")));else if(!n);else return false;return true};var We=function e(t){return t.indexOf("-")>0};var qe=function e(t){var r;var n;var a;var i;M("beforeSanitizeAttributes",t,null);var o=t.attributes;if(!o)return;var l={attrName:"",attrValue:"",keepAttr:true,allowedAttributes:g};i=o.length;while(i--){r=o[i];var c=r,u=c.name,f=c.namespaceURI;n=u==="value"?r.value:bt(r.value);a=L(u);l.attrName=a;l.attrValue=n;l.keepAttr=true;l.forceKeepAttr=undefined;M("uponSanitizeAttribute",t,l);n=l.attrValue;if(l.forceKeepAttr)continue;He(u,t);if(!l.keepAttr)continue;if(!pe&&tt(/\/>/i,n)){He(u,t);continue}if(b){n=et(n,Q," ");n=et(n,ee," ");n=et(n,te," ")}var s=L(t.nodeName);if(!Ge(s,a,n))continue;if(ge&&(a==="id"||a==="name")){He(u,t);n=ye+n}if(h&&$e(d)==="object"&&typeof d.getAttributeType==="function")if(f);else switch(d.getAttributeType(s,a)){case"TrustedHTML":n=h.createHTML(n);break;case"TrustedScriptURL":n=h.createScriptURL(n);break}try{if(f)t.setAttributeNS(f,u,n);else t.setAttribute(u,n);Xe(m.removed)}catch(e){}}M("afterSanitizeAttributes",t,null)};var Ye=function e(t){var r;var n=Pe(t);M("beforeSanitizeShadowDOM",t,null);while(r=n.nextNode()){M("uponSanitizeShadowNode",r,null);if(je(r))continue;if(r.content instanceof I)e(r.content);qe(r)}M("afterSanitizeShadowDOM",t,null)};m.sanitize=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var r;var n;var a;var i;var o;Se=!e;if(Se)e="\x3c!--\x3e";if(typeof e!=="string"&&!R(e))if(typeof e.toString!=="function")throw rt("toString is not a function");else{e=e.toString();if(typeof e!=="string")throw rt("dirty is not a string, aborting")}if(!m.isSupported){if($e(f.toStaticHTML)==="object"||typeof f.toStaticHTML==="function"){if(typeof e==="string")return f.toStaticHTML(e);if(R(e))return f.toStaticHTML(e.outerHTML)}return e}if(!de)De(t);m.removed=[];if(typeof e==="string")w=false;if(w){if(e.nodeName){var l=L(e.nodeName);if(!v[l]||y[l])throw rt("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof p){r=ze("\x3c!----\x3e");n=r.ownerDocument.importNode(e,true);if(n.nodeType===1&&n.nodeName==="BODY")r=n;else if(n.nodeName==="HTML")r=n;else r.appendChild(n)}else{if(!N&&!b&&!T&&e.indexOf("<")===-1)return h&&A?h.createHTML(e):e;r=ze(e);if(!r)return N?null:A?Y:""}if(r&&he)D(r.firstChild);var c=Pe(w?e:r);while(a=c.nextNode()){if(a.nodeType===3&&a===i)continue;if(je(a))continue;if(a.content instanceof I)Ye(a.content);qe(a);i=a}i=null;if(w)return e;if(N){if(E){o=V.call(r.ownerDocument);while(r.firstChild)o.appendChild(r.firstChild)}else o=r;if(g.shadowroot||g.shadowrootmod)o=Z.call(s,o,true);return o}var u=T?r.outerHTML:r.innerHTML;if(T&&v["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&tt(Ot,r.ownerDocument.doctype.name))u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u;if(b){u=et(u,Q," ");u=et(u,ee," ");u=et(u,te," ")}return h&&A?h.createHTML(u):u};m.setConfig=function(e){De(e);de=true};m.clearConfig=function(){O=null;de=false};m.isValidAttribute=function(e,t,r){if(!O)De({});var n=L(e);var a=L(t);return Ge(n,a,r)};m.addHook=function(e,t){if(typeof t!=="function")return;a[e]=a[e]||[];Ze(a[e],t)};m.removeHook=function(e){if(a[e])return Xe(a[e])};m.removeHooks=function(e){if(a[e])a[e]=[]};m.removeAllHooks=function(){a={}};return m}return ht()}()}}]);
Back to Directory File Manager