diff options
Diffstat (limited to 'gn2/wqflask')
-rw-r--r-- | gn2/wqflask/static/new/javascript/emfed.bundle.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gn2/wqflask/static/new/javascript/emfed.bundle.js b/gn2/wqflask/static/new/javascript/emfed.bundle.js new file mode 100644 index 00000000..e98fc7ad --- /dev/null +++ b/gn2/wqflask/static/new/javascript/emfed.bundle.js @@ -0,0 +1,34 @@ +"use strict";(()=>{var fn=Object.create;var Et=Object.defineProperty;var mn=Object.getOwnPropertyDescriptor;var pn=Object.getOwnPropertyNames;var dn=Object.getPrototypeOf,gn=Object.prototype.hasOwnProperty;var Tn=(o,s)=>()=>(s||o((s={exports:{}}).exports,s),s.exports);var hn=(o,s,_,E)=>{if(s&&typeof s=="object"||typeof s=="function")for(let p of pn(s))!gn.call(o,p)&&p!==_&&Et(o,p,{get:()=>s[p],enumerable:!(E=mn(s,p))||E.enumerable});return o};var _n=(o,s,_)=>(_=o!=null?fn(dn(o)):{},hn(s||!o||!o.__esModule?Et(_,"default",{value:o,enumerable:!0}):_,o));var St=Tn((Pe,ve)=>{(function(o,s){typeof Pe=="object"&&typeof ve<"u"?ve.exports=s():typeof define=="function"&&define.amd?define(s):(o=typeof globalThis<"u"?globalThis:o||self,o.DOMPurify=s())})(Pe,function(){"use strict";let{entries:o,setPrototypeOf:s,isFrozen:_,getPrototypeOf:E,getOwnPropertyDescriptor:p}=Object,{freeze:d,seal:D,create:Y}=Object,{apply:j,construct:V}=typeof Reflect<"u"&&Reflect;d||(d=function(i){return i}),D||(D=function(i){return i}),j||(j=function(i,u,l){return i.apply(u,l)}),V||(V=function(i,u){return new i(...u)});let te=O(Array.prototype.forEach),Fe=O(Array.prototype.pop),X=O(Array.prototype.push),ne=O(String.prototype.toLowerCase),me=O(String.prototype.toString),Dt=O(String.prototype.match),q=O(String.prototype.replace),Nt=O(String.prototype.indexOf),Ot=O(String.prototype.trim),N=O(RegExp.prototype.test),K=wt(TypeError);function O(c){return function(i){for(var u=arguments.length,l=new Array(u>1?u-1:0),R=1;R<u;R++)l[R-1]=arguments[R];return j(c,i,l)}}function wt(c){return function(){for(var i=arguments.length,u=new Array(i),l=0;l<i;l++)u[l]=arguments[l];return V(c,u)}}function r(c,i){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ne;s&&s(c,null);let l=i.length;for(;l--;){let R=i[l];if(typeof R=="string"){let I=u(R);I!==R&&(_(i)||(i[l]=I),R=I)}c[R]=!0}return c}function U(c){let i=Y(null);for(let[u,l]of o(c))p(c,u)!==void 0&&(i[u]=l);return i}function ae(c,i){for(;c!==null;){let l=p(c,i);if(l){if(l.get)return O(l.get);if(typeof l.value=="function")return O(l.value)}c=E(c)}function u(l){return console.warn("fallback value for",l),null}return u}let He=d(["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"]),pe=d(["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"]),de=d(["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"]),It=d(["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"]),ge=d(["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"]),Mt=d(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ze=d(["#text"]),We=d(["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"]),Te=d(["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"]),Ge=d(["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"]),oe=d(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ct=D(/\{\{[\w\W]*|[\w\W]*\}\}/gm),xt=D(/<%[\w\W]*|[\w\W]*%>/gm),kt=D(/\${[\w\W]*}/gm),Pt=D(/^data-[\-\w.\u00B7-\uFFFF]/),vt=D(/^aria-[\-\w]+$/),Be=D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ut=D(/^(?:\w+script|data):/i),Ft=D(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$e=D(/^html$/i);var Ye=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ct,ERB_EXPR:xt,TMPLIT_EXPR:kt,DATA_ATTR:Pt,ARIA_ATTR:vt,IS_ALLOWED_URI:Be,IS_SCRIPT_OR_DATA:Ut,ATTR_WHITESPACE:Ft,DOCTYPE_NAME:$e});let Ht=function(){return typeof window>"u"?null:window},zt=function(i,u){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let l=null,R="data-tt-policy-suffix";u&&u.hasAttribute(R)&&(l=u.getAttribute(R));let I="dompurify"+(l?"#"+l:"");try{return i.createPolicy(I,{createHTML(F){return F},createScriptURL(F){return F}})}catch{return console.warn("TrustedTypes policy "+I+" could not be created."),null}};function je(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ht(),i=a=>je(a);if(i.version="3.0.6",i.removed=[],!c||!c.document||c.document.nodeType!==9)return i.isSupported=!1,i;let{document:u}=c,l=u,R=l.currentScript,{DocumentFragment:I,HTMLTemplateElement:F,Node:he,Element:Ve,NodeFilter:_e,NamedNodeMap:Gt=c.NamedNodeMap||c.MozNamedAttrMap,HTMLFormElement:Bt,DOMParser:$t,trustedTypes:ie}=c,re=Ve.prototype,Yt=ae(re,"cloneNode"),jt=ae(re,"nextSibling"),Vt=ae(re,"childNodes"),Ee=ae(re,"parentNode");if(typeof F=="function"){let a=u.createElement("template");a.content&&a.content.ownerDocument&&(u=a.content.ownerDocument)}let y,Z="",{implementation:Ae,createNodeIterator:Xt,createDocumentFragment:qt,getElementsByTagName:Kt}=u,{importNode:Zt}=l,w={};i.isSupported=typeof o=="function"&&typeof Ee=="function"&&Ae&&Ae.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Se,ERB_EXPR:Re,TMPLIT_EXPR:ye,DATA_ATTR:Jt,ARIA_ATTR:Qt,IS_SCRIPT_OR_DATA:en,ATTR_WHITESPACE:Xe}=Ye,{IS_ALLOWED_URI:qe}=Ye,g=null,Ke=r({},[...He,...pe,...de,...ge,...ze]),T=null,Ze=r({},[...We,...Te,...Ge,...oe]),m=Object.seal(Y(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}})),J=null,Le=null,Je=!0,be=!0,Qe=!1,et=!0,H=!1,x=!1,De=!1,Ne=!1,z=!1,se=!1,le=!1,tt=!0,nt=!1,tn="user-content-",Oe=!0,Q=!1,W={},G=null,at=r({},["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"]),ot=null,it=r({},["audio","video","img","source","image","track"]),we=null,rt=r({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ce="http://www.w3.org/1998/Math/MathML",ue="http://www.w3.org/2000/svg",M="http://www.w3.org/1999/xhtml",B=M,Ie=!1,Me=null,nn=r({},[ce,ue,M],me),k=null,an=["application/xhtml+xml","text/html"],on="text/html",h=null,$=null,rn=u.createElement("form"),st=function(e){return e instanceof RegExp||e instanceof Function},Ce=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!($&&$===e)){if((!e||typeof e!="object")&&(e={}),e=U(e),k=an.indexOf(e.PARSER_MEDIA_TYPE)===-1?k=on:k=e.PARSER_MEDIA_TYPE,h=k==="application/xhtml+xml"?me:ne,g="ALLOWED_TAGS"in e?r({},e.ALLOWED_TAGS,h):Ke,T="ALLOWED_ATTR"in e?r({},e.ALLOWED_ATTR,h):Ze,Me="ALLOWED_NAMESPACES"in e?r({},e.ALLOWED_NAMESPACES,me):nn,we="ADD_URI_SAFE_ATTR"in e?r(U(rt),e.ADD_URI_SAFE_ATTR,h):rt,ot="ADD_DATA_URI_TAGS"in e?r(U(it),e.ADD_DATA_URI_TAGS,h):it,G="FORBID_CONTENTS"in e?r({},e.FORBID_CONTENTS,h):at,J="FORBID_TAGS"in e?r({},e.FORBID_TAGS,h):{},Le="FORBID_ATTR"in e?r({},e.FORBID_ATTR,h):{},W="USE_PROFILES"in e?e.USE_PROFILES:!1,Je=e.ALLOW_ARIA_ATTR!==!1,be=e.ALLOW_DATA_ATTR!==!1,Qe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,et=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,H=e.SAFE_FOR_TEMPLATES||!1,x=e.WHOLE_DOCUMENT||!1,z=e.RETURN_DOM||!1,se=e.RETURN_DOM_FRAGMENT||!1,le=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,tt=e.SANITIZE_DOM!==!1,nt=e.SANITIZE_NAMED_PROPS||!1,Oe=e.KEEP_CONTENT!==!1,Q=e.IN_PLACE||!1,qe=e.ALLOWED_URI_REGEXP||Be,B=e.NAMESPACE||M,m=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&st(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(m.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&st(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(m.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(m.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),H&&(be=!1),se&&(z=!0),W&&(g=r({},[...ze]),T=[],W.html===!0&&(r(g,He),r(T,We)),W.svg===!0&&(r(g,pe),r(T,Te),r(T,oe)),W.svgFilters===!0&&(r(g,de),r(T,Te),r(T,oe)),W.mathMl===!0&&(r(g,ge),r(T,Ge),r(T,oe))),e.ADD_TAGS&&(g===Ke&&(g=U(g)),r(g,e.ADD_TAGS,h)),e.ADD_ATTR&&(T===Ze&&(T=U(T)),r(T,e.ADD_ATTR,h)),e.ADD_URI_SAFE_ATTR&&r(we,e.ADD_URI_SAFE_ATTR,h),e.FORBID_CONTENTS&&(G===at&&(G=U(G)),r(G,e.FORBID_CONTENTS,h)),Oe&&(g["#text"]=!0),x&&r(g,["html","head","body"]),g.table&&(r(g,["tbody"]),delete J.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=e.TRUSTED_TYPES_POLICY,Z=y.createHTML("")}else y===void 0&&(y=zt(ie,R)),y!==null&&typeof Z=="string"&&(Z=y.createHTML(""));d&&d(e),$=e}},lt=r({},["mi","mo","mn","ms","mtext"]),ct=r({},["foreignobject","desc","title","annotation-xml"]),sn=r({},["title","style","font","a","script"]),fe=r({},pe);r(fe,de),r(fe,It);let xe=r({},ge);r(xe,Mt);let ln=function(e){let t=Ee(e);(!t||!t.tagName)&&(t={namespaceURI:B,tagName:"template"});let n=ne(e.tagName),f=ne(t.tagName);return Me[e.namespaceURI]?e.namespaceURI===ue?t.namespaceURI===M?n==="svg":t.namespaceURI===ce?n==="svg"&&(f==="annotation-xml"||lt[f]):!!fe[n]:e.namespaceURI===ce?t.namespaceURI===M?n==="math":t.namespaceURI===ue?n==="math"&&ct[f]:!!xe[n]:e.namespaceURI===M?t.namespaceURI===ue&&!ct[f]||t.namespaceURI===ce&&!lt[f]?!1:!xe[n]&&(sn[n]||!fe[n]):!!(k==="application/xhtml+xml"&&Me[e.namespaceURI]):!1},P=function(e){X(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch{e.remove()}},ke=function(e,t){try{X(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch{X(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is"&&!T[e])if(z||se)try{P(t)}catch{}else try{t.setAttribute(e,"")}catch{}},ut=function(e){let t=null,n=null;if(Ne)e="<remove></remove>"+e;else{let S=Dt(e,/^[\r\n\t ]+/);n=S&&S[0]}k==="application/xhtml+xml"&&B===M&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let f=y?y.createHTML(e):e;if(B===M)try{t=new $t().parseFromString(f,k)}catch{}if(!t||!t.documentElement){t=Ae.createDocument(B,"template",null);try{t.documentElement.innerHTML=Ie?Z:f}catch{}}let A=t.body||t.documentElement;return e&&n&&A.insertBefore(u.createTextNode(n),A.childNodes[0]||null),B===M?Kt.call(t,x?"html":"body")[0]:x?t.documentElement:A},ft=function(e){return Xt.call(e.ownerDocument||e,e,_e.SHOW_ELEMENT|_e.SHOW_COMMENT|_e.SHOW_TEXT,null)},cn=function(e){return e instanceof Bt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Gt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},mt=function(e){return typeof he=="function"&&e instanceof he},C=function(e,t,n){w[e]&&te(w[e],f=>{f.call(i,t,n,$)})},pt=function(e){let t=null;if(C("beforeSanitizeElements",e,null),cn(e))return P(e),!0;let n=h(e.nodeName);if(C("uponSanitizeElement",e,{tagName:n,allowedTags:g}),e.hasChildNodes()&&!mt(e.firstElementChild)&&N(/<[/\w]/g,e.innerHTML)&&N(/<[/\w]/g,e.textContent))return P(e),!0;if(!g[n]||J[n]){if(!J[n]&>(n)&&(m.tagNameCheck instanceof RegExp&&N(m.tagNameCheck,n)||m.tagNameCheck instanceof Function&&m.tagNameCheck(n)))return!1;if(Oe&&!G[n]){let f=Ee(e)||e.parentNode,A=Vt(e)||e.childNodes;if(A&&f){let S=A.length;for(let L=S-1;L>=0;--L)f.insertBefore(Yt(A[L],!0),jt(e))}}return P(e),!0}return e instanceof Ve&&!ln(e)||(n==="noscript"||n==="noembed"||n==="noframes")&&N(/<\/no(script|embed|frames)/i,e.innerHTML)?(P(e),!0):(H&&e.nodeType===3&&(t=e.textContent,te([Se,Re,ye],f=>{t=q(t,f," ")}),e.textContent!==t&&(X(i.removed,{element:e.cloneNode()}),e.textContent=t)),C("afterSanitizeElements",e,null),!1)},dt=function(e,t,n){if(tt&&(t==="id"||t==="name")&&(n in u||n in rn))return!1;if(!(be&&!Le[t]&&N(Jt,t))){if(!(Je&&N(Qt,t))){if(!T[t]||Le[t]){if(!(gt(e)&&(m.tagNameCheck instanceof RegExp&&N(m.tagNameCheck,e)||m.tagNameCheck instanceof Function&&m.tagNameCheck(e))&&(m.attributeNameCheck instanceof RegExp&&N(m.attributeNameCheck,t)||m.attributeNameCheck instanceof Function&&m.attributeNameCheck(t))||t==="is"&&m.allowCustomizedBuiltInElements&&(m.tagNameCheck instanceof RegExp&&N(m.tagNameCheck,n)||m.tagNameCheck instanceof Function&&m.tagNameCheck(n))))return!1}else if(!we[t]){if(!N(qe,q(n,Xe,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Nt(n,"data:")===0&&ot[e])){if(!(Qe&&!N(en,q(n,Xe,"")))){if(n)return!1}}}}}}return!0},gt=function(e){return e.indexOf("-")>0},Tt=function(e){C("beforeSanitizeAttributes",e,null);let{attributes:t}=e;if(!t)return;let n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:T},f=t.length;for(;f--;){let A=t[f],{name:S,namespaceURI:L,value:v}=A,ee=h(S),b=S==="value"?v:Ot(v);if(n.attrName=ee,n.attrValue=b,n.keepAttr=!0,n.forceKeepAttr=void 0,C("uponSanitizeAttribute",e,n),b=n.attrValue,n.forceKeepAttr||(ke(S,e),!n.keepAttr))continue;if(!et&&N(/\/>/i,b)){ke(S,e);continue}H&&te([Se,Re,ye],_t=>{b=q(b,_t," ")});let ht=h(e.nodeName);if(dt(ht,ee,b)){if(nt&&(ee==="id"||ee==="name")&&(ke(S,e),b=tn+b),y&&typeof ie=="object"&&typeof ie.getAttributeType=="function"&&!L)switch(ie.getAttributeType(ht,ee)){case"TrustedHTML":{b=y.createHTML(b);break}case"TrustedScriptURL":{b=y.createScriptURL(b);break}}try{L?e.setAttributeNS(L,S,b):e.setAttribute(S,b),Fe(i.removed)}catch{}}}C("afterSanitizeAttributes",e,null)},un=function a(e){let t=null,n=ft(e);for(C("beforeSanitizeShadowDOM",e,null);t=n.nextNode();)C("uponSanitizeShadowNode",t,null),!pt(t)&&(t.content instanceof I&&a(t.content),Tt(t));C("afterSanitizeShadowDOM",e,null)};return i.sanitize=function(a){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,n=null,f=null,A=null;if(Ie=!a,Ie&&(a="<!-->"),typeof a!="string"&&!mt(a))if(typeof a.toString=="function"){if(a=a.toString(),typeof a!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!i.isSupported)return a;if(De||Ce(e),i.removed=[],typeof a=="string"&&(Q=!1),Q){if(a.nodeName){let v=h(a.nodeName);if(!g[v]||J[v])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(a instanceof he)t=ut("<!---->"),n=t.ownerDocument.importNode(a,!0),n.nodeType===1&&n.nodeName==="BODY"||n.nodeName==="HTML"?t=n:t.appendChild(n);else{if(!z&&!H&&!x&&a.indexOf("<")===-1)return y&&le?y.createHTML(a):a;if(t=ut(a),!t)return z?null:le?Z:""}t&&Ne&&P(t.firstChild);let S=ft(Q?a:t);for(;f=S.nextNode();)pt(f)||(f.content instanceof I&&un(f.content),Tt(f));if(Q)return a;if(z){if(se)for(A=qt.call(t.ownerDocument);t.firstChild;)A.appendChild(t.firstChild);else A=t;return(T.shadowroot||T.shadowrootmode)&&(A=Zt.call(l,A,!0)),A}let L=x?t.outerHTML:t.innerHTML;return x&&g["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&N($e,t.ownerDocument.doctype.name)&&(L="<!DOCTYPE "+t.ownerDocument.doctype.name+`> +`+L),H&&te([Se,Re,ye],v=>{L=q(L,v," ")}),y&&le?y.createHTML(L):L},i.setConfig=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ce(a),De=!0},i.clearConfig=function(){$=null,De=!1},i.isValidAttribute=function(a,e,t){$||Ce({});let n=h(a),f=h(e);return dt(n,f,t)},i.addHook=function(a,e){typeof e=="function"&&(w[a]=w[a]||[],X(w[a],e))},i.removeHook=function(a){if(w[a])return Fe(w[a])},i.removeHooks=function(a){w[a]&&(w[a]=[])},i.removeAllHooks=function(){w={}},i}var Wt=je();return Wt})});async function At(o,s,_,E){let p=new URL(o),d=s??await(async()=>{let Y=/@(\w+)$/.exec(p.pathname);if(!Y)throw"not a Mastodon user URL";let j=Y[1],V=Object.assign(new URL(p),{pathname:"/api/v1/accounts/lookup",search:`?acct=${j}`});return(await(await fetch(V)).json()).id})(),D=Object.assign(new URL(p),{pathname:`/api/v1/accounts/${d}/statuses`,search:`?limit=${_??5}&exclude_replies=${!!E}`});return await(await fetch(D)).json()}var Rt=_n(St(),1);function yt(o){return Object.assign(new String(o),{__safe:null})}function Lt(o){return typeof o>"u"||o===null?"":typeof o=="string"||o instanceof String?o.hasOwnProperty("__safe")?o:o.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'"):o.map(Lt).join("")}function Ue(o,...s){let _=o[0];for(let E=1;E<o.length;++E)_+=Lt(s[E-1]),_+=o[E];return yt(_)}function En(o){let s=null;o.reblog&&(s={avatar:o.account.avatar,username:o.account.username,display_name:o.account.display_name,user_url:o.account.url},o=o.reblog);let _=new Date(o.created_at).toLocaleString(),E=o.media_attachments.filter(p=>p.type==="image");return Ue`<li class="toot"> + <a class="permalink" href="${o.url}"> + <time datetime="${o.created_at}">${_}</time> + </a> + ${s&&Ue` <a class="user boost" href="${s.user_url}"> + <img class="avatar" width="23" height="23" src="${s.avatar}" /> + <span class="display-name">${s.display_name}</span> + <span class="username">@${s.username}</span> + </a>`} + <a class="user" href="${o.account.url}"> + <img class="avatar" width="46" height="46" src="${o.account.avatar}" /> + <span class="display-name">${o.account.display_name}</span> + <span class="username">@${o.account.username}</span> + </a> + <div class="body">${yt(Rt.default.sanitize(o.content))}</div> + ${E.map(p=>Ue` <a + class="attachment" + href="${p.url}" + target="_blank" + rel="noopener noreferrer" + > + <img + class="attachment" + src="${p.preview_url}" + alt="${p.description}" + /> + </a>`)} + </li>`.toString()}async function An(o){let s=o,_=await At(s.href,s.dataset.tootAccountId,Number(s.dataset.tootLimit??5),s.dataset.excludeReplies==="true"),E=document.createElement("ol");E.classList.add("toots"),s.replaceWith(E);for(let p of _){let d=En(p);E.insertAdjacentHTML("beforeend",d)}}function bt(){document.querySelectorAll("a.mastodon-feed").forEach(An)}bt();})(); +/*! Bundled license information: + +dompurify/dist/purify.js: + (*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE *) +*/ |