|
2
|
+(()=>{"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function e(e,n){return function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,a,i,l=[],c=!0,s=!1;try{if(a=(n=n.call(t)).next,0===e);else for(;!(c=(o=a.call(n)).done)&&(l.push(o.value),l.length!==e);c=!0);}catch(t){s=!0,r=t}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return l}}(e,n)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const n=Object.entries,o=Object.setPrototypeOf,r=Object.isFrozen,a=Object.getPrototypeOf,i=Object.getOwnPropertyDescriptor;let l=Object.freeze,c=Object.seal,s=Object.create,u="undefined"!=typeof Reflect&&Reflect,f=u.apply,p=u.construct;l||(l=function(t){return t}),c||(c=function(t){return t}),f||(f=function(t,e){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return t.apply(e,o)}),p||(p=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return new t(...n)});const m=L(Array.prototype.forEach),d=L(Array.prototype.lastIndexOf),h=L(Array.prototype.pop),g=L(Array.prototype.push),y=L(Array.prototype.splice),b=Array.isArray,_=L(String.prototype.toLowerCase),T=L(String.prototype.toString),S=L(String.prototype.match),A=L(String.prototype.replace),E=L(String.prototype.indexOf),N=L(String.prototype.trim),w=L(Number.prototype.toString),v=L(Boolean.prototype.toString),O="undefined"==typeof BigInt?null:L(BigInt.prototype.toString),C="undefined"==typeof Symbol?null:L(Symbol.prototype.toString),D=L(Object.prototype.hasOwnProperty),R=L(Object.prototype.toString),k=L(RegExp.prototype.test),x=(I=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return p(I,e)});var I;function L(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return f(t,e,o)}}function M(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_;if(o&&o(t,null),!b(e))return t;let a=e.length;for(;a--;){let o=e[a];if("string"==typeof o){const t=n(o);t!==o&&(r(e)||(e[a]=t),o=t)}t[o]=!0}return t}function z(t){for(let e=0;e<t.length;e++){D(t,e)||(t[e]=null)}return t}function P(t){const o=s(null);for(const a of n(t)){var r=e(a,2);const n=r[0],i=r[1];D(t,n)&&(b(i)?o[n]=z(i):i&&"object"==typeof i&&i.constructor===Object?o[n]=P(i):o[n]=i)}return o}function U(t,e){for(;null!==t;){const n=i(t,e);if(n){if(n.get)return L(n.get);if("function"==typeof n.value)return L(n.value)}t=a(t)}return function(){return null}}const F=l(["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","search","section","select","shadow","slot","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"]),H=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=l(["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"]),B=l(["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"]),G=l(["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"]),W=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=l(["#text"]),q=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),X=l(["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","dominant-baseline","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","mask-type","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-orientation","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"]),$=l(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),J=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),K=c(/{{[\w\W]*|^[\w\W]*}}/g),Z=c(/<%[\w\W]*|^[\w\W]*%>/g),V=c(/\${[\w\W]*/g),Q=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),tt=c(/^aria-[\-\w]+$/),et=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nt=c(/^(?:\w+script|data):/i),ot=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),rt=c(/^html$/i),at=c(/^[a-z][.\w]*(-[.\w]+)+$/i),it=c(/<[/\w!]/g),lt=c(/<[/\w]/g),ct=c(/<\/no(script|embed|frames)/i),st=c(/\/>/i),ut=1,ft=3,pt=7,mt=8,dt=9,ht=11,gt=function(){return"undefined"==typeof window?null:window},yt=function(t,e,n,o){return D(t,e)&&b(t[e])?M(o.base?P(o.base):{},t[e],o.transform):n};var bt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gt();const o=e=>t(e);if(o.version="3.4.12",o.removed=[],!e||!e.document||e.document.nodeType!==dt||!e.Element)return o.isSupported=!1,o;let r=e.document;const a=r,i=a.currentScript;e.DocumentFragment;const u=e.HTMLTemplateElement,f=e.Node,p=e.Element,I=e.NodeFilter,L=e.NamedNodeMap;void 0===L&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const z=e.DOMParser,bt=e.trustedTypes,_t=p.prototype,Tt=U(_t,"cloneNode"),St=U(_t,"remove"),At=U(_t,"nextSibling"),Et=U(_t,"childNodes"),Nt=U(_t,"parentNode"),wt=U(_t,"shadowRoot"),vt=U(_t,"attributes"),Ot=f&&f.prototype?U(f.prototype,"nodeType"):null,Ct=f&&f.prototype?U(f.prototype,"nodeName"):null;if("function"==typeof u){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let Dt,Rt,kt="",xt=!1,It=0;const Lt=function(){if(It>0)throw x('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Mt=function(t){Lt(),It++;try{return Dt.createHTML(t)}finally{It--}},zt=function(){return xt||(Rt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";e&&e.hasAttribute(o)&&(n=e.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(bt,i),xt=!0),Rt},Pt=r,Ut=Pt.implementation,Ft=Pt.createNodeIterator,Ht=Pt.createDocumentFragment,jt=Pt.getElementsByTagName,Bt=a.importNode;let Gt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof n&&"function"==typeof Nt&&Ut&&void 0!==Ut.createHTMLDocument;const Wt=K,Yt=Z,qt=V,Xt=Q,$t=tt,Jt=nt,Kt=ot,Zt=at;let Vt=et,Qt=null;const te=M({},[...F,...H,...j,...G,...Y]);let ee=null;const ne=M({},[...q,...X,...$,...J]);let oe=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),re=null,ae=null;const ie=Object.seal(s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let le=!0,ce=!0,se=!1,ue=!0,fe=!1,pe=!0,me=!1,de=!1,he=null,ge=null,ye=!1,be=!1,_e=!1,Te=!1,Se=!0,Ae=!1;const Ee="user-content-";let Ne=!0,we=!1,ve={},Oe=null;const Ce=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let De=null;const Re=M({},["audio","video","img","source","image","track"]);let ke=null;const xe=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ie="http://www.w3.org/1998/Math/MathML",Le="http://www.w3.org/2000/svg",Me="http://www.w3.org/1999/xhtml";let ze=Me,Pe=!1,Ue=null;const Fe=M({},[Ie,Le,Me],T),He=l(["mi","mo","mn","ms","mtext"]);let je=M({},He);const Be=l(["annotation-xml"]);let Ge=M({},Be);const We=M({},["title","style","font","a","script"]);let Ye=null;const qe=["application/xhtml+xml","text/html"];let Xe=null,$e=null;const Je=r.createElement("form"),Ke=function(t){return t instanceof RegExp||t instanceof Function},Ze=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if($e&&$e===t)return;t&&"object"==typeof t||(t={}),t=P(t),Ye=-1===qe.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Xe="application/xhtml+xml"===Ye?T:_,Qt=yt(t,"ALLOWED_TAGS",te,{transform:Xe}),ee=yt(t,"ALLOWED_ATTR",ne,{transform:Xe}),Ue=yt(t,"ALLOWED_NAMESPACES",Fe,{transform:T}),ke=yt(t,"ADD_URI_SAFE_ATTR",xe,{transform:Xe,base:xe}),De=yt(t,"ADD_DATA_URI_TAGS",Re,{transform:Xe,base:Re}),Oe=yt(t,"FORBID_CONTENTS",Ce,{transform:Xe}),re=yt(t,"FORBID_TAGS",P({}),{transform:Xe}),ae=yt(t,"FORBID_ATTR",P({}),{transform:Xe}),ve=!!D(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?P(t.USE_PROFILES):t.USE_PROFILES),le=!1!==t.ALLOW_ARIA_ATTR,ce=!1!==t.ALLOW_DATA_ATTR,se=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ue=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,fe=t.SAFE_FOR_TEMPLATES||!1,pe=!1!==t.SAFE_FOR_XML,me=t.WHOLE_DOCUMENT||!1,be=t.RETURN_DOM||!1,_e=t.RETURN_DOM_FRAGMENT||!1,Te=t.RETURN_TRUSTED_TYPE||!1,ye=t.FORCE_BODY||!1,Se=!1!==t.SANITIZE_DOM,Ae=t.SANITIZE_NAMED_PROPS||!1,Ne=!1!==t.KEEP_CONTENT,we=t.IN_PLACE||!1,Vt=function(t){try{return k(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:et,ze="string"==typeof t.NAMESPACE?t.NAMESPACE:Me,je=D(t,"MATHML_TEXT_INTEGRATION_POINTS")&&t.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof t.MATHML_TEXT_INTEGRATION_POINTS?P(t.MATHML_TEXT_INTEGRATION_POINTS):M({},He),Ge=D(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&"object"==typeof t.HTML_INTEGRATION_POINTS?P(t.HTML_INTEGRATION_POINTS):M({},Be);const e=D(t,"CUSTOM_ELEMENT_HANDLING")&&t.CUSTOM_ELEMENT_HANDLING&&"object"==typeof t.CUSTOM_ELEMENT_HANDLING?P(t.CUSTOM_ELEMENT_HANDLING):s(null);if(oe=s(null),D(e,"tagNameCheck")&&Ke(e.tagNameCheck)&&(oe.tagNameCheck=e.tagNameCheck),D(e,"attributeNameCheck")&&Ke(e.attributeNameCheck)&&(oe.attributeNameCheck=e.attributeNameCheck),D(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(oe.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),c(oe),fe&&(ce=!1),_e&&(be=!0),ve&&(Qt=M({},Y),ee=s(null),!0===ve.html&&(M(Qt,F),M(ee,q)),!0===ve.svg&&(M(Qt,H),M(ee,X),M(ee,J)),!0===ve.svgFilters&&(M(Qt,j),M(ee,X),M(ee,J)),!0===ve.mathMl&&(M(Qt,G),M(ee,$),M(ee,J))),ie.tagCheck=null,ie.attributeCheck=null,D(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?ie.tagCheck=t.ADD_TAGS:b(t.ADD_TAGS)&&(Qt===te&&(Qt=P(Qt)),M(Qt,t.ADD_TAGS,Xe))),D(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?ie.attributeCheck=t.ADD_ATTR:b(t.ADD_ATTR)&&(ee===ne&&(ee=P(ee)),M(ee,t.ADD_ATTR,Xe))),D(t,"ADD_URI_SAFE_ATTR")&&b(t.ADD_URI_SAFE_ATTR)&&M(ke,t.ADD_URI_SAFE_ATTR,Xe),D(t,"FORBID_CONTENTS")&&b(t.FORBID_CONTENTS)&&(Oe===Ce&&(Oe=P(Oe)),M(Oe,t.FORBID_CONTENTS,Xe)),D(t,"ADD_FORBID_CONTENTS")&&b(t.ADD_FORBID_CONTENTS)&&(Oe===Ce&&(Oe=P(Oe)),M(Oe,t.ADD_FORBID_CONTENTS,Xe)),Ne&&(Qt["#text"]=!0),me&&M(Qt,["html","head","body"]),Qt.table&&(M(Qt,["tbody"]),delete re.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const e=Dt;Dt=t.TRUSTED_TYPES_POLICY;try{kt=Mt("")}catch(t){throw Dt=e,t}}else null===t.TRUSTED_TYPES_POLICY?(Dt=void 0,kt=""):(void 0===Dt&&(Dt=zt()),Dt&&"string"==typeof kt&&(kt=Mt("")));l&&l(t),$e=t},Ve=M({},[...H,...j,...B]),Qe=M({},[...G,...W]),tn=function(t){let e=Nt(t);e&&e.tagName||(e={namespaceURI:ze,tagName:"template"});const n=_(t.tagName),o=_(e.tagName);return!!Ue[t.namespaceURI]&&(t.namespaceURI===Le?function(t,e,n){return e.namespaceURI===Me?"svg"===t:e.namespaceURI===Ie?"svg"===t&&("annotation-xml"===n||je[n]):Boolean(Ve[t])}(n,e,o):t.namespaceURI===Ie?function(t,e,n){return e.namespaceURI===Me?"math"===t:e.namespaceURI===Le?"math"===t&&Ge[n]:Boolean(Qe[t])}(n,e,o):t.namespaceURI===Me?function(t,e,n){return!(e.namespaceURI===Le&&!Ge[n])&&!(e.namespaceURI===Ie&&!je[n])&&!Qe[t]&&(We[t]||!Ve[t])}(n,e,o):!("application/xhtml+xml"!==Ye||!Ue[t.namespaceURI]))},en=function(t){g(o.removed,{element:t});try{Nt(t).removeChild(t)}catch(e){if(St(t),!Nt(t))throw x("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},nn=function(t){an(t);const e=Et(t);if(e){const t=[];m(e,e=>{g(t,e)}),m(t,t=>{try{St(t)}catch(t){}})}const n=vt(t);if(n)for(let e=n.length-1;e>=0;--e){const o=n[e],r=o&&o.name;if("string"==typeof r)try{t.removeAttribute(r)}catch(t){}}},on=function(t,e){try{g(o.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){g(o.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(be||_e)try{en(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},rn=function(t){const e=vt(t);if(e)for(let n=e.length-1;n>=0;--n){const o=e[n],r=o&&o.name;if("string"==typeof r&&!ee[Xe(r)])try{t.removeAttribute(r)}catch(t){}}},an=function(t){const e=[t];for(;e.length>0;){const t=e.pop();(Ot?Ot(t):t.nodeType)===ut&&rn(t);const n=Et(t);if(n)for(let t=n.length-1;t>=0;--t)e.push(n[t])}},ln=function(t){let e=null,n=null;if(ye)t="<remove></remove>"+t;else{const e=S(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Ye&&ze===Me&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=Dt?Mt(t):t;if(ze===Me)try{e=(new z).parseFromString(o,Ye)}catch(t){}if(!e||!e.documentElement){e=Ut.createDocument(ze,"template",null);try{e.documentElement.innerHTML=Pe?kt:o}catch(t){}}const a=e.body||e.documentElement;return t&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),ze===Me?jt.call(e,me?"html":"body")[0]:me?e.documentElement:a},cn=function(t){return Ft.call(t.ownerDocument||t,t,I.SHOW_ELEMENT|I.SHOW_COMMENT|I.SHOW_TEXT|I.SHOW_PROCESSING_INSTRUCTION|I.SHOW_CDATA_SECTION,null)},sn=function(t){return t=A(t,Wt," "),t=A(t,Yt," "),t=A(t,qt," ")},un=function(t){var e;t.normalize();const n=Ft.call(t.ownerDocument||t,t,I.SHOW_TEXT|I.SHOW_COMMENT|I.SHOW_CDATA_SECTION|I.SHOW_PROCESSING_INSTRUCTION,null);let o=n.nextNode();for(;o;)o.data=sn(o.data),o=n.nextNode();const r=null===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,"template");r&&m(r,t=>{pn(t.content)&&un(t.content)})},fn=function(t){const e=Ct?Ct(t):null;return"string"==typeof e&&("form"===Xe(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==vt(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==Ot(t)||t.childNodes!==Et(t)))},pn=function(t){if(!Ot||"object"!=typeof t||null===t)return!1;try{return Ot(t)===ht}catch(t){return!1}},mn=function(t){if(!Ot||"object"!=typeof t||null===t)return!1;try{return"number"==typeof Ot(t)}catch(t){return!1}};function dn(t,e,n){0!==t.length&&m(t,t=>{t.call(o,e,n,$e)})}const hn=function(t,e){if(dn(Gt.beforeSanitizeElements,t,null),t!==e&&null===Nt(t))return!0;if(fn(t))return en(t),!0;const n=Xe(Ct?Ct(t):t.nodeName);if(dn(Gt.uponSanitizeElement,t,{tagName:n,allowedTags:Qt}),t!==e&&null===Nt(t))return!0;if(function(t,e){return!!(pe&&t.hasChildNodes()&&!mn(t.firstElementChild)&&k(it,t.textContent)&&k(it,t.innerHTML))||!(!pe||t.namespaceURI!==Me||"style"!==e||!mn(t.firstElementChild))||t.nodeType===pt||!(!pe||t.nodeType!==mt||!k(lt,t.data))}(t,n))return en(t),!0;if(re[n]||!(ie.tagCheck instanceof Function&&ie.tagCheck(n))&&!Qt[n]){const e=function(t,e){if(!re[e]&&bn(e)){if(oe.tagNameCheck instanceof RegExp&&k(oe.tagNameCheck,e))return!1;if(oe.tagNameCheck instanceof Function&&oe.tagNameCheck(e))return!1}if(Ne&&!Oe[e]){const e=Nt(t),n=Et(t);if(n&&e)for(let o=n.length-1;o>=0;--o){const r=we?n[o]:Tt(n[o],!0);e.insertBefore(r,At(t))}}return en(t),!0}(t,n);return!1===e&&dn(Gt.afterSanitizeElements,t,null),e}if((Ot?Ot(t):t.nodeType)===ut&&!tn(t))return en(t),!0;if(("noscript"===n||"noembed"===n||"noframes"===n)&&k(ct,t.innerHTML))return en(t),!0;if(fe&&t.nodeType===ft){const e=sn(t.textContent);t.textContent!==e&&(g(o.removed,{element:t.cloneNode()}),t.textContent=e)}return dn(Gt.afterSanitizeElements,t,null),!1},gn=function(t,e,n){if(ae[e])return!1;if(pe&&"patchsrc"===e)return!1;if(pe&&"for"===e&&"label"!==t&&"output"!==t)return!1;if(Se&&("id"===e||"name"===e)&&(n in r||n in Je))return!1;const o=ee[e]||ie.attributeCheck instanceof Function&&ie.attributeCheck(e,t);if(ce&&k(Xt,e));else if(le&&k($t,e));else if(o)if(ke[e]);else if(k(Vt,A(n,Kt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==E(n,"data:")||!De[t]){if(se&&!k(Jt,A(n,Kt,"")));else if(n)return!1}else;else if(!(bn(t)&&(oe.tagNameCheck instanceof RegExp&&k(oe.tagNameCheck,t)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(t))&&(oe.attributeNameCheck instanceof RegExp&&k(oe.attributeNameCheck,e)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(e,t))||"is"===e&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&k(oe.tagNameCheck,n)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(n))))return!1;return!0},yn=M({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),bn=function(t){return!yn[_(t)]&&k(Zt,t)},_n=function(t,e,n,o){if(Dt&&"object"==typeof bt&&"function"==typeof bt.getAttributeType&&!n)switch(bt.getAttributeType(t,e)){case"TrustedHTML":return Mt(o);case"TrustedScriptURL":return function(t){Lt(),It++;try{return Dt.createScriptURL(t)}finally{It--}}(o)}return o},Tn=function(t,e,n,r){try{n?t.setAttributeNS(n,e,r):t.setAttribute(e,r),fn(t)?en(t):h(o.removed)}catch(n){on(e,t)}},Sn=function(t){dn(Gt.beforeSanitizeAttributes,t,null);const e=t.attributes;if(!e||fn(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ee,forceKeepAttr:void 0};let o=e.length;const r=Xe(t.nodeName);for(;o--;){const a=e[o],i=a.name,l=a.namespaceURI,c=a.value,s=Xe(i),u=c;let f="value"===i?u:N(u);n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,dn(Gt.uponSanitizeAttribute,t,n),f=n.attrValue,!Ae||"id"!==s&&"name"!==s||0===E(f,Ee)||(on(i,t),f=Ee+f),pe&&k(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)?on(i,t):"attributename"===s&&S(f,"href")?on(i,t):n.forceKeepAttr||(n.keepAttr&&(ue||!k(st,f))?(fe&&(f=sn(f)),gn(r,s,f)?(f=_n(r,s,l,f),f!==u&&Tn(t,i,l,f)):on(i,t)):on(i,t))}dn(Gt.afterSanitizeAttributes,t,null)},An=function(t){let e=null;const n=cn(t);for(dn(Gt.beforeSanitizeShadowDOM,t,null);e=n.nextNode();){dn(Gt.uponSanitizeShadowNode,e,null),hn(e,t),Sn(e),pn(e.content)&&An(e.content);if((Ot?Ot(e):e.nodeType)===ut){const t=wt(e);pn(t)&&(En(t),An(t))}}dn(Gt.afterSanitizeShadowDOM,t,null)},En=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const t=e.pop();if(t.shadow){An(t.shadow);continue}const n=t.node,o=(Ot?Ot(n):n.nodeType)===ut,r=Et(n);if(r)for(let t=r.length-1;t>=0;--t)e.push({node:r[t],shadow:null});if(o){const t=Ct?Ct(n):null;if("string"==typeof t&&"template"===Xe(t)){const t=n.content;pn(t)&&e.push({node:t,shadow:null})}}if(o){const t=wt(n);pn(t)&&e.push({node:null,shadow:t},{node:t,shadow:null})}}};return o.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(Pe=!t,Pe&&(t="\x3c!--\x3e"),"string"!=typeof t&&!mn(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return w(t);case"boolean":return v(t);case"bigint":return O?O(t):"0";case"symbol":return C?C(t):"Symbol()";case"undefined":default:return R(t);case"function":case"object":{if(null===t)return R(t);const e=t,n=U(e,"toString");if("function"==typeof n){const t=n(e);return"string"==typeof t?t:R(t)}return R(t)}}}(t)))throw x("dirty is not a string, aborting");if(!o.isSupported)return t;de?(Qt=he,ee=ge):Ze(e),(Gt.uponSanitizeElement.length>0||Gt.uponSanitizeAttribute.length>0)&&(Qt=P(Qt)),Gt.uponSanitizeAttribute.length>0&&(ee=P(ee)),o.removed=[];const c=we&&"string"!=typeof t&&mn(t);if(c){!function(t){if(!pe)return;const e=[t];for(;e.length>0;){const t=e.pop(),n=Ot?Ot(t):t.nodeType;if(n===pt||n===mt&&k(lt,t.data)){try{St(t)}catch(t){}continue}if(n===ut){const e=t,n=Xe(Ct?Ct(t):t.nodeName);try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&"label"!==n&&"output"!==n&&e.removeAttribute("for")}catch(t){}}const o=Et(t);if(o)for(let t=o.length-1;t>=0;--t)e.push(o[t])}}(t);const e=Ct?Ct(t):t.nodeName;if("string"==typeof e){const n=Xe(e);if(!Qt[n]||re[n])throw nn(t),x("root node is forbidden and cannot be sanitized in-place")}if(fn(t))throw nn(t),x("root node is clobbered and cannot be sanitized in-place");try{En(t)}catch(e){throw nn(t),e}}else if(mn(t))n=ln("\x3c!----\x3e"),r=n.ownerDocument.importNode(t,!0),r.nodeType===ut&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r),En(r);else{if(!be&&!fe&&!me&&-1===t.indexOf("<"))return Dt&&Te?Mt(t):t;if(n=ln(t),!n)return be?null:Te?kt:""}n&&ye&&en(n.firstChild);const s=c?t:n,u=cn(s);try{for(;i=u.nextNode();)hn(i,s),Sn(i),pn(i.content)&&An(i.content)}catch(e){throw c&&(nn(t),m(o.removed,t=>{t.element&&an(t.element)})),e}if(c)return m(o.removed,t=>{t.element&&an(t.element)}),fe&&un(t),t;if(be){if(fe&&un(n),_e)for(l=Ht.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(ee.shadowroot||ee.shadowrootmode)&&(l=Bt.call(a,l,!0)),l}let f=me?n.outerHTML:n.innerHTML;return me&&Qt["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&k(rt,n.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+f),fe&&(f=sn(f)),Dt&&Te?Mt(f):f},o.setConfig=function(){Ze(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),de=!0,he=Qt,ge=ee},o.clearConfig=function(){$e=null,de=!1,he=null,ge=null,Dt=Rt,kt=""},o.isValidAttribute=function(t,e,n){$e||Ze({});const o=Xe(t),r=Xe(e);return gn(o,r,n)},o.addHook=function(t,e){"function"==typeof e&&D(Gt,t)&&g(Gt[t],e)},o.removeHook=function(t,e){if(D(Gt,t)){if(void 0!==e){const n=d(Gt[t],e);return-1===n?void 0:y(Gt[t],n,1)[0]}return h(Gt[t])}},o.removeHooks=function(t){D(Gt,t)&&(Gt[t]=[])},o.removeAllHooks=function(){Gt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}(),_t=["_blank","_self","_parent","_top"],Tt=["_self","_top","_parent"],St=/^[A-Za-z][A-Za-z0-9_.-]*$/,At=/^[A-Za-z][A-Za-z-]*$/,Et=["noopener"];function Nt(t){var e=t&&"string"==typeof t.tagName?t.tagName.toUpperCase():"";return"A"===e||"AREA"===e}var wt,vt=bt(window);vt.addHook("uponSanitizeAttribute",function(t,e){var n,o;"target"===e.attrName&&Nt(t)&&(n=e.attrValue,o=String(n||"").trim(),(_t.includes(o.toLowerCase())||St.test(o))&&(e.forceKeepAttr=!0))}),vt.addHook("afterSanitizeAttributes",function(t){if(Nt(t)&&"function"==typeof t.getAttribute&&"function"==typeof t.setAttribute){var e=t.getAttribute("target");if(e&&!Tt.includes(e.trim().toLowerCase())){var n=(t.getAttribute("rel")||"").split(/\s+/).filter(function(t){return At.test(t)});Et.forEach(function(t){n.includes(t)||n.push(t)}),t.setAttribute("rel",n.join(" "))}}}),jQuery(document).ready(((wt=jQuery)(".ff_show_payments").on("click",function(t){t.preventDefault(),wt(".ff_sub_cancel_confirmation").hide();var e=wt(this),n=e.data("subscription_id"),o=e.closest(".ff_subscription").find(".ff_subscription_payments");if(e.attr("data-got_payments"))return e.attr("data-got_payments",""),void o.removeClass("ff_has_payments").html("");o.html("Fetching Payments..."),function(t,e,n){e.addClass("ff_payments_fetching").prop("disabled",!0),jQuery.get(window.ff_transactions_vars.ajax_url,{subscription_id:t,action:"fluentform_user_payment_endpoints",route:"get_subscription_transactions",_nonce:window.ff_transactions_vars.nonce}).then(function(t){n(t.data.html,"success")}).catch(function(t){t.responseJSON?t.responseJSON.data?n(t.responseJSON.data.message):n("Could not fetch the payments. Please try again"):n(t.responseText)}).always(function(){e.removeClass("ff_payments_fetching").prop("disabled",!1)})}(n,e,function(t,n){var r;n?e.attr("data-got_payments","yes"):e.attr("data-got_payments",""),o.addClass("ff_has_payments").html(null==(r=t)?"":vt.sanitize(String(r)))})}),wt(".ff_cancel_subscription").on("click",function(t){t.preventDefault(),wt(".ff_subscription_payments").html("").removeClass("ff_has_payments");var e=wt(this),n=e.data("subscription_id"),o=e.closest(".ff_subscription").find(".ff_sub_cancel_confirmation");o.find(".ff_confirm_subscription_cancel").attr("data-subscription_id",n),o.show()}),wt(".ff_confirm_subscription_cancel").on("click",function(){var t=wt(this),e=t.data("subscription_id");t.prop("disabled",!0);var n=t.closest(".ff_sub_cancel_confirmation").find(".ff_sub_message_notices");n.html("Sending Request Please wait..."),jQuery.post(window.ff_transactions_vars.ajax_url,{subscription_id:e,action:"fluentform_user_payment_endpoints",route:"cancel_transaction",_nonce:window.ff_transactions_vars.nonce}).then(function(t){n.text(t.message),setTimeout(function(){window.location.reload()},1e3)}).catch(function(t){var e="Request failed. Please try again";t.responseJSON?t.responseJSON.data&&(e=t.responseJSON.data.message):e=t.responseText,n.text(e)}).always(function(){t.prop("disabled",!1)})}),void wt(".ff_cancel_close").on("click",function(){wt(".ff_sub_cancel_confirmation").hide()})))})(); |