@d1g1tal/transportr 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,19 @@
1
1
  (() => {
2
- var zr=Object.defineProperty;var qr=(n,e)=>()=>(n&&(e=n(n=0)),e);var Wr=(n,e)=>{for(var t in e)zr(n,t,{get:e[t],enumerable:!0})};var hr={};Wr(hr,{default:()=>An});function Vt(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,a=Array(e);t<e;t++)a[t]=n[t];return a}function $r(n){if(Array.isArray(n))return n}function Yr(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var a,o,i,s,l=[],d=!0,c=!1;try{if(i=(t=t.call(n)).next,e!==0)for(;!(d=(a=i.call(t)).done)&&(l.push(a.value),l.length!==e);d=!0);}catch(m){c=!0,o=m}finally{try{if(!d&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(c)throw o}}return l}}function Xr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vr(n,e){return $r(n)||Yr(n,e)||Jr(n,e)||Xr()}function Jr(n,e){if(n){if(typeof n=="string")return Vt(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Vt(n,e):void 0}}function N(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,a=new Array(t>1?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];return mt(n,e,a)}}function on(n){return function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return pt(n,t)}}function y(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Se;if(Jt&&Jt(n,null),!P(e))return n;let a=e.length;for(;a--;){let o=e[a];if(typeof o=="string"){let i=t(o);i!==o&&(Kr(e)||(e[a]=i),o=i)}n[o]=!0}return n}function sn(n){for(let e=0;e<n.length;e++)S(n,e)||(n[e]=null);return n}function F(n){let e=me(null);for(let a of lr(n)){var t=Vr(a,2);let o=t[0],i=t[1];S(n,o)&&(P(i)?e[o]=sn(i):i&&typeof i=="object"&&i.constructor===Object?e[o]=F(i):e[o]=i)}return e}function ln(n){switch(typeof n){case"string":return n;case"number":return nn(n);case"boolean":return an(n);case"bigint":return er?er(n):"0";case"symbol":return tr?tr(n):"Symbol()";case"undefined":return we(n);case"function":case"object":{if(n===null)return we(n);let e=n,t=re(e,"toString");if(typeof t=="function"){let a=t(e);return typeof a=="string"?a:we(a)}return we(n)}default:return we(n)}}function re(n,e){for(;n!==null;){let a=Qr(n,e);if(a){if(a.get)return N(a.get);if(typeof a.value=="function")return N(a.value)}n=Zr(n)}function t(){return null}return t}function cn(n){try{return x(n,""),!0}catch{return!1}}function ur(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wn(),e=r=>ur(r);if(e.version="3.4.5",e.removed=[],!n||!n.document||n.document.nodeType!==fe.document||!n.Element)return e.isSupported=!1,e;let t=n.document,a=t,o=a.currentScript,i=n.DocumentFragment,s=n.HTMLTemplateElement,l=n.Node,d=n.Element,c=n.NodeFilter,m=n.NamedNodeMap,p=m===void 0?n.NamedNodeMap||n.MozNamedAttrMap:m,T=n.HTMLFormElement,E=n.DOMParser,b=n.trustedTypes,v=d.prototype,ne=re(v,"cloneNode"),ae=re(v,"remove"),ge=re(v,"nextSibling"),ve=re(v,"childNodes"),H=re(v,"parentNode"),V=l&&l.prototype?re(l.prototype,"nodeType"):null;if(typeof s=="function"){let r=t.createElement("template");r.content&&r.content.ownerDocument&&(t=r.content.ownerDocument)}let A,Z="",Ne=t,Ve=Ne.implementation,Rt=Ne.createNodeIterator,Cr=Ne.createDocumentFragment,Ir=Ne.getElementsByTagName,Dr=a.importNode,M=sr();e.isSupported=typeof lr=="function"&&typeof H=="function"&&Ve&&Ve.createHTMLDocument!==void 0;let Ce=dn,Ie=fn,De=mn,Lr=pn,xr=gn,kr=yn,Ot=bn,Mr=En,vt=ir,I=null,Nt=y({},[...rr,...ut,...ht,...dt,...nr]),L=null,Ct=y({},[...ar,...ft,...or,...Fe]),R=Object.seal(me(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}})),ye=null,Le=null,J=Object.seal(me(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),It=!0,Je=!0,Dt=!1,Lt=!0,K=!1,be=!0,Q=!1,Ke=!1,Ze=!1,oe=!1,xe=!1,ke=!1,xt=!0,kt=!1,Mt="user-content-",Qe=!0,Te=!1,ie={},z=null,et=y({},["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"]),Pt=null,Ut=y({},["audio","video","img","source","image","track"]),tt=null,_t=y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Me="http://www.w3.org/1998/Math/MathML",Pe="http://www.w3.org/2000/svg",q="http://www.w3.org/1999/xhtml",se=q,rt=!1,nt=null,Pr=y({},[Me,Pe,q],ct),at=y({},["mi","mo","mn","ms","mtext"]),ot=y({},["annotation-xml"]),Ur=y({},["title","style","font","a","script"]),Ee=null,_r=["application/xhtml+xml","text/html"],Hr="text/html",C=null,le=null,Fr=t.createElement("form"),Ht=function(r){return r instanceof RegExp||r instanceof Function},it=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(le&&le===r)return;(!r||typeof r!="object")&&(r={}),r=F(r),Ee=_r.indexOf(r.PARSER_MEDIA_TYPE)===-1?Hr:r.PARSER_MEDIA_TYPE,C=Ee==="application/xhtml+xml"?ct:Se,I=S(r,"ALLOWED_TAGS")&&P(r.ALLOWED_TAGS)?y({},r.ALLOWED_TAGS,C):Nt,L=S(r,"ALLOWED_ATTR")&&P(r.ALLOWED_ATTR)?y({},r.ALLOWED_ATTR,C):Ct,nt=S(r,"ALLOWED_NAMESPACES")&&P(r.ALLOWED_NAMESPACES)?y({},r.ALLOWED_NAMESPACES,ct):Pr,tt=S(r,"ADD_URI_SAFE_ATTR")&&P(r.ADD_URI_SAFE_ATTR)?y(F(_t),r.ADD_URI_SAFE_ATTR,C):_t,Pt=S(r,"ADD_DATA_URI_TAGS")&&P(r.ADD_DATA_URI_TAGS)?y(F(Ut),r.ADD_DATA_URI_TAGS,C):Ut,z=S(r,"FORBID_CONTENTS")&&P(r.FORBID_CONTENTS)?y({},r.FORBID_CONTENTS,C):et,ye=S(r,"FORBID_TAGS")&&P(r.FORBID_TAGS)?y({},r.FORBID_TAGS,C):F({}),Le=S(r,"FORBID_ATTR")&&P(r.FORBID_ATTR)?y({},r.FORBID_ATTR,C):F({}),ie=S(r,"USE_PROFILES")?r.USE_PROFILES&&typeof r.USE_PROFILES=="object"?F(r.USE_PROFILES):r.USE_PROFILES:!1,It=r.ALLOW_ARIA_ATTR!==!1,Je=r.ALLOW_DATA_ATTR!==!1,Dt=r.ALLOW_UNKNOWN_PROTOCOLS||!1,Lt=r.ALLOW_SELF_CLOSE_IN_ATTR!==!1,K=r.SAFE_FOR_TEMPLATES||!1,be=r.SAFE_FOR_XML!==!1,Q=r.WHOLE_DOCUMENT||!1,oe=r.RETURN_DOM||!1,xe=r.RETURN_DOM_FRAGMENT||!1,ke=r.RETURN_TRUSTED_TYPE||!1,Ze=r.FORCE_BODY||!1,xt=r.SANITIZE_DOM!==!1,kt=r.SANITIZE_NAMED_PROPS||!1,Qe=r.KEEP_CONTENT!==!1,Te=r.IN_PLACE||!1,vt=cn(r.ALLOWED_URI_REGEXP)?r.ALLOWED_URI_REGEXP:ir,se=typeof r.NAMESPACE=="string"?r.NAMESPACE:q,at=S(r,"MATHML_TEXT_INTEGRATION_POINTS")&&r.MATHML_TEXT_INTEGRATION_POINTS&&typeof r.MATHML_TEXT_INTEGRATION_POINTS=="object"?F(r.MATHML_TEXT_INTEGRATION_POINTS):y({},["mi","mo","mn","ms","mtext"]),ot=S(r,"HTML_INTEGRATION_POINTS")&&r.HTML_INTEGRATION_POINTS&&typeof r.HTML_INTEGRATION_POINTS=="object"?F(r.HTML_INTEGRATION_POINTS):y({},["annotation-xml"]);let h=S(r,"CUSTOM_ELEMENT_HANDLING")&&r.CUSTOM_ELEMENT_HANDLING&&typeof r.CUSTOM_ELEMENT_HANDLING=="object"?F(r.CUSTOM_ELEMENT_HANDLING):me(null);if(R=me(null),S(h,"tagNameCheck")&&Ht(h.tagNameCheck)&&(R.tagNameCheck=h.tagNameCheck),S(h,"attributeNameCheck")&&Ht(h.attributeNameCheck)&&(R.attributeNameCheck=h.attributeNameCheck),S(h,"allowCustomizedBuiltInElements")&&typeof h.allowCustomizedBuiltInElements=="boolean"&&(R.allowCustomizedBuiltInElements=h.allowCustomizedBuiltInElements),K&&(Je=!1),xe&&(oe=!0),ie&&(I=y({},nr),L=me(null),ie.html===!0&&(y(I,rr),y(L,ar)),ie.svg===!0&&(y(I,ut),y(L,ft),y(L,Fe)),ie.svgFilters===!0&&(y(I,ht),y(L,ft),y(L,Fe)),ie.mathMl===!0&&(y(I,dt),y(L,or),y(L,Fe))),J.tagCheck=null,J.attributeCheck=null,S(r,"ADD_TAGS")&&(typeof r.ADD_TAGS=="function"?J.tagCheck=r.ADD_TAGS:P(r.ADD_TAGS)&&(I===Nt&&(I=F(I)),y(I,r.ADD_TAGS,C))),S(r,"ADD_ATTR")&&(typeof r.ADD_ATTR=="function"?J.attributeCheck=r.ADD_ATTR:P(r.ADD_ATTR)&&(L===Ct&&(L=F(L)),y(L,r.ADD_ATTR,C))),S(r,"ADD_URI_SAFE_ATTR")&&P(r.ADD_URI_SAFE_ATTR)&&y(tt,r.ADD_URI_SAFE_ATTR,C),S(r,"FORBID_CONTENTS")&&P(r.FORBID_CONTENTS)&&(z===et&&(z=F(z)),y(z,r.FORBID_CONTENTS,C)),S(r,"ADD_FORBID_CONTENTS")&&P(r.ADD_FORBID_CONTENTS)&&(z===et&&(z=F(z)),y(z,r.ADD_FORBID_CONTENTS,C)),Qe&&(I["#text"]=!0),Q&&y(I,["html","head","body"]),I.table&&(y(I,["tbody"]),delete ye.tbody),r.TRUSTED_TYPES_POLICY){if(typeof r.TRUSTED_TYPES_POLICY.createHTML!="function")throw He('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof r.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw He('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=r.TRUSTED_TYPES_POLICY,Z=A.createHTML("")}else A===void 0&&(A=Sn(b,o)),A!==null&&typeof Z=="string"&&(Z=A.createHTML(""));U&&U(r),le=r},Ft=y({},[...ut,...ht,...un]),jt=y({},[...dt,...hn]),jr=function(r){let h=H(r);(!h||!h.tagName)&&(h={namespaceURI:se,tagName:"template"});let f=Se(r.tagName),g=Se(h.tagName);return nt[r.namespaceURI]?r.namespaceURI===Pe?h.namespaceURI===q?f==="svg":h.namespaceURI===Me?f==="svg"&&(g==="annotation-xml"||at[g]):!!Ft[f]:r.namespaceURI===Me?h.namespaceURI===q?f==="math":h.namespaceURI===Pe?f==="math"&&ot[g]:!!jt[f]:r.namespaceURI===q?h.namespaceURI===Pe&&!ot[g]||h.namespaceURI===Me&&!at[g]?!1:!jt[f]&&(Ur[f]||!Ft[f]):!!(Ee==="application/xhtml+xml"&&nt[r.namespaceURI]):!1},ee=function(r){he(e.removed,{element:r});try{H(r).removeChild(r)}catch{ae(r)}},te=function(r,h){try{he(e.removed,{attribute:h.getAttributeNode(r),from:h})}catch{he(e.removed,{attribute:null,from:h})}if(h.removeAttribute(r),r==="is")if(oe||xe)try{ee(h)}catch{}else try{h.setAttribute(r,"")}catch{}},Gt=function(r){let h=null,f=null;if(Ze)r="<remove></remove>"+r;else{let w=Zt(r,/^[\r\n\t ]+/);f=w&&w[0]}Ee==="application/xhtml+xml"&&se===q&&(r='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+r+"</body></html>");let g=A?A.createHTML(r):r;if(se===q)try{h=new E().parseFromString(g,Ee)}catch{}if(!h||!h.documentElement){h=Ve.createDocument(se,"template",null);try{h.documentElement.innerHTML=rt?Z:g}catch{}}let O=h.body||h.documentElement;return r&&f&&O.insertBefore(t.createTextNode(f),O.childNodes[0]||null),se===q?Ir.call(h,Q?"html":"body")[0]:Q?h.documentElement:O},Bt=function(r){return Rt.call(r.ownerDocument||r,r,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},zt=function(r){r.normalize();let h=Rt.call(r.ownerDocument||r,r,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),f=h.nextNode();for(;f;){let g=f.data;ue([Ce,Ie,De],O=>{g=de(g,O," ")}),f.data=g,f=h.nextNode()}},st=function(r){return r instanceof T&&(typeof r.nodeName!="string"||typeof r.textContent!="string"||typeof r.removeChild!="function"||!(r.attributes instanceof p)||typeof r.removeAttribute!="function"||typeof r.setAttribute!="function"||typeof r.namespaceURI!="string"||typeof r.insertBefore!="function"||typeof r.hasChildNodes!="function")},Ue=function(r){if(!V||typeof r!="object"||r===null)return!1;try{return typeof V(r)=="number"}catch{return!1}};function Y(r,h,f){ue(r,g=>{g.call(e,h,f,le)})}let qt=function(r){let h=null;if(Y(M.beforeSanitizeElements,r,null),st(r))return ee(r),!0;let f=C(r.nodeName);if(Y(M.uponSanitizeElement,r,{tagName:f,allowedTags:I}),be&&r.hasChildNodes()&&!Ue(r.firstElementChild)&&x(/<[/\w!]/g,r.innerHTML)&&x(/<[/\w!]/g,r.textContent)||be&&r.namespaceURI===q&&f==="style"&&Ue(r.firstElementChild)||r.nodeType===fe.progressingInstruction||be&&r.nodeType===fe.comment&&x(/<[/\w]/g,r.data))return ee(r),!0;if(ye[f]||!(J.tagCheck instanceof Function&&J.tagCheck(f))&&!I[f]){if(!ye[f]&&$t(f)&&(R.tagNameCheck instanceof RegExp&&x(R.tagNameCheck,f)||R.tagNameCheck instanceof Function&&R.tagNameCheck(f)))return!1;if(Qe&&!z[f]){let g=H(r)||r.parentNode,O=ve(r)||r.childNodes;if(O&&g){let w=O.length;for(let X=w-1;X>=0;--X){let W=ne(O[X],!0);g.insertBefore(W,ge(r))}}}return ee(r),!0}return r instanceof d&&!jr(r)||(f==="noscript"||f==="noembed"||f==="noframes")&&x(/<\/no(script|embed|frames)/i,r.innerHTML)?(ee(r),!0):(K&&r.nodeType===fe.text&&(h=r.textContent,ue([Ce,Ie,De],g=>{h=de(h,g," ")}),r.textContent!==h&&(he(e.removed,{element:r.cloneNode()}),r.textContent=h)),Y(M.afterSanitizeElements,r,null),!1)},Wt=function(r,h,f){if(Le[h]||xt&&(h==="id"||h==="name")&&(f in t||f in Fr))return!1;let g=L[h]||J.attributeCheck instanceof Function&&J.attributeCheck(h,r);if(!(Je&&!Le[h]&&x(Lr,h))&&!(It&&x(xr,h))){if(!g||Le[h]){if(!($t(r)&&(R.tagNameCheck instanceof RegExp&&x(R.tagNameCheck,r)||R.tagNameCheck instanceof Function&&R.tagNameCheck(r))&&(R.attributeNameCheck instanceof RegExp&&x(R.attributeNameCheck,h)||R.attributeNameCheck instanceof Function&&R.attributeNameCheck(h,r))||h==="is"&&R.allowCustomizedBuiltInElements&&(R.tagNameCheck instanceof RegExp&&x(R.tagNameCheck,f)||R.tagNameCheck instanceof Function&&R.tagNameCheck(f))))return!1}else if(!tt[h]&&!x(vt,de(f,Ot,""))&&!((h==="src"||h==="xlink:href"||h==="href")&&r!=="script"&&Qt(f,"data:")===0&&Pt[r])&&!(Dt&&!x(kr,de(f,Ot,"")))&&f)return!1}return!0},Gr=y({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),$t=function(r){return!Gr[Se(r)]&&x(Mr,r)},Yt=function(r){Y(M.beforeSanitizeAttributes,r,null);let h=r.attributes;if(!h||st(r))return;let f={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0},g=h.length;for(;g--;){let O=h[g],w=O.name,X=O.namespaceURI,W=O.value,B=C(w),ce=W,D=w==="value"?ce:rn(ce);if(f.attrName=B,f.attrValue=D,f.keepAttr=!0,f.forceKeepAttr=void 0,Y(M.uponSanitizeAttribute,r,f),D=f.attrValue,kt&&(B==="id"||B==="name")&&Qt(D,Mt)!==0&&(te(w,r),D=Mt+D),be&&x(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,D)){te(w,r);continue}if(B==="attributename"&&Zt(D,"href")){te(w,r);continue}if(f.forceKeepAttr)continue;if(!f.keepAttr){te(w,r);continue}if(!Lt&&x(/\/>/i,D)){te(w,r);continue}K&&ue([Ce,Ie,De],Br=>{D=de(D,Br," ")});let Xt=C(r.nodeName);if(!Wt(Xt,B,D)){te(w,r);continue}if(A&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!X)switch(b.getAttributeType(Xt,B)){case"TrustedHTML":{D=A.createHTML(D);break}case"TrustedScriptURL":{D=A.createScriptURL(D);break}}if(D!==ce)try{X?r.setAttributeNS(X,w,D):r.setAttribute(w,D),st(r)?ee(r):Kt(e.removed)}catch{te(w,r)}}Y(M.afterSanitizeAttributes,r,null)},lt=function(r){let h=null,f=Bt(r);for(Y(M.beforeSanitizeShadowDOM,r,null);h=f.nextNode();)Y(M.uponSanitizeShadowNode,h,null),qt(h),Yt(h),h.content instanceof i&&lt(h.content);Y(M.afterSanitizeShadowDOM,r,null)},_e=function(r){if(r.nodeType===fe.element&&r.shadowRoot instanceof i){let g=r.shadowRoot;_e(g),lt(g)}let h=r.childNodes;if(!h)return;let f=[];ue(h,g=>{he(f,g)});for(let g of f)_e(g)};return e.sanitize=function(r){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=null,g=null,O=null,w=null;if(rt=!r,rt&&(r="<!-->"),typeof r!="string"&&!Ue(r)&&(r=ln(r),typeof r!="string"))throw He("dirty is not a string, aborting");if(!e.isSupported)return r;if(Ke||it(h),e.removed=[],typeof r=="string"&&(Te=!1),Te){let B=r.nodeName;if(typeof B=="string"){let ce=C(B);if(!I[ce]||ye[ce])throw He("root node is forbidden and cannot be sanitized in-place")}_e(r)}else if(Ue(r))f=Gt("<!---->"),g=f.ownerDocument.importNode(r,!0),g.nodeType===fe.element&&g.nodeName==="BODY"||g.nodeName==="HTML"?f=g:f.appendChild(g),_e(g);else{if(!oe&&!K&&!Q&&r.indexOf("<")===-1)return A&&ke?A.createHTML(r):r;if(f=Gt(r),!f)return oe?null:ke?Z:""}f&&Ze&&ee(f.firstChild);let X=Bt(Te?r:f);for(;O=X.nextNode();)qt(O),Yt(O),O.content instanceof i&&lt(O.content);if(Te)return K&&zt(r),r;if(oe){if(K&&zt(f),xe)for(w=Cr.call(f.ownerDocument);f.firstChild;)w.appendChild(f.firstChild);else w=f;return(L.shadowroot||L.shadowrootmode)&&(w=Dr.call(a,w,!0)),w}let W=Q?f.outerHTML:f.innerHTML;return Q&&I["!doctype"]&&f.ownerDocument&&f.ownerDocument.doctype&&f.ownerDocument.doctype.name&&x(Tn,f.ownerDocument.doctype.name)&&(W="<!DOCTYPE "+f.ownerDocument.doctype.name+`>
4
- `+W),K&&ue([Ce,Ie,De],B=>{W=de(W,B," ")}),A&&ke?A.createHTML(W):W},e.setConfig=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};it(r),Ke=!0},e.clearConfig=function(){le=null,Ke=!1},e.isValidAttribute=function(r,h,f){le||it({});let g=C(r),O=C(h);return Wt(g,O,f)},e.addHook=function(r,h){typeof h=="function"&&he(M[r],h)},e.removeHook=function(r,h){if(h!==void 0){let f=en(M[r],h);return f===-1?void 0:tn(M[r],f,1)[0]}return Kt(M[r])},e.removeHooks=function(r){M[r]=[]},e.removeAllHooks=function(){M=sr()},e}var lr,Jt,Kr,Zr,Qr,U,G,me,cr,mt,pt,ue,en,Kt,he,tn,P,Se,ct,Zt,de,Qt,rn,nn,an,er,tr,S,we,x,He,rr,ut,ht,un,dt,hn,nr,ar,ft,or,Fe,dn,fn,mn,pn,gn,ir,yn,bn,Tn,En,fe,wn,Sn,sr,An,dr=qr(()=>{lr=Object.entries,Jt=Object.setPrototypeOf,Kr=Object.isFrozen,Zr=Object.getPrototypeOf,Qr=Object.getOwnPropertyDescriptor,U=Object.freeze,G=Object.seal,me=Object.create,cr=typeof Reflect<"u"&&Reflect,mt=cr.apply,pt=cr.construct;U||(U=function(n){return n});G||(G=function(n){return n});mt||(mt=function(n,e){for(var t=arguments.length,a=new Array(t>2?t-2:0),o=2;o<t;o++)a[o-2]=arguments[o];return n.apply(e,a)});pt||(pt=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),a=1;a<e;a++)t[a-1]=arguments[a];return new n(...t)});ue=N(Array.prototype.forEach),en=N(Array.prototype.lastIndexOf),Kt=N(Array.prototype.pop),he=N(Array.prototype.push),tn=N(Array.prototype.splice),P=Array.isArray,Se=N(String.prototype.toLowerCase),ct=N(String.prototype.toString),Zt=N(String.prototype.match),de=N(String.prototype.replace),Qt=N(String.prototype.indexOf),rn=N(String.prototype.trim),nn=N(Number.prototype.toString),an=N(Boolean.prototype.toString),er=typeof BigInt>"u"?null:N(BigInt.prototype.toString),tr=typeof Symbol>"u"?null:N(Symbol.prototype.toString),S=N(Object.prototype.hasOwnProperty),we=N(Object.prototype.toString),x=N(RegExp.prototype.test),He=on(TypeError);rr=U(["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"]),ut=U(["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"]),ht=U(["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"]),un=U(["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"]),dt=U(["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"]),hn=U(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),nr=U(["#text"]),ar=U(["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"]),ft=U(["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","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-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"]),or=U(["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"]),Fe=U(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),dn=G(/{{[\w\W]*|^[\w\W]*}}/g),fn=G(/<%[\w\W]*|^[\w\W]*%>/g),mn=G(/\${[\w\W]*/g),pn=G(/^data-[\-\w.\u00B7-\uFFFF]+$/),gn=G(/^aria-[\-\w]+$/),ir=G(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yn=G(/^(?:\w+script|data):/i),bn=G(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Tn=G(/^html$/i),En=G(/^[a-z][.\w]*(-[.\w]+)+$/i),fe={element:1,text:3,progressingInstruction:7,comment:8,document:9},wn=function(){return typeof window>"u"?null:window},Sn=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let t=null,a="data-tt-policy-suffix";e&&e.hasAttribute(a)&&(t=e.getAttribute(a));let o="dompurify"+(t?"#"+t:"");try{return n.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},sr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};An=ur();});var We=/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u,Rn=/(["\\])/ug,On=/^[\t\u0020-\u007E\u0080-\u00FF]*$/u,je=n=>{for(let e=0,t=n.length;e<t;e++){let a=n.charCodeAt(e);if(a>=65&&a<=90)return n.toLowerCase()}return n},fr=class Sr extends Map{constructor(e=[]){super(e)}static isValid(e,t){return We.test(e)&&On.test(t)}get(e){return super.get(je(e))}has(e){return super.has(je(e))}set(e,t){if(!Sr.isValid(e,t))throw new Error(`Invalid media type parameter name/value: ${e}/${t}`);return super.set(je(e),t),this}delete(e){return super.delete(je(e))}toString(){let e="";for(let[t,a]of this)e+=";",e+=t,e+="=",a.length===0||!We.test(a)?(e+='"',e+=a.replace(Rn,"\\$1"),e+='"'):e+=a;return e}get[Symbol.toStringTag](){return"MediaTypeParameters"}},Ae=n=>n===32||n===9||n===10||n===13,vn=Map.prototype.set,Nn=Map.prototype.has,Cn=class ${constructor(){}static parse(e){let t=0,a=e.length;for(;t<a&&Ae(e.charCodeAt(t));)t++;for(;a>t&&Ae(e.charCodeAt(a-1));)a--;(t!==0||a!==e.length)&&(e=e.slice(t,a));let o=e.length,i=0;for(;i<o&&e.charCodeAt(i)!==47;)i++;if(i===0||i>=o)throw new TypeError($.#n("type",e.slice(0,i)));let s=e.slice(0,i);if(!We.test(s))throw new TypeError($.#n("type",s));s=s.toLowerCase(),i++;let l=i;for(;i<o&&e.charCodeAt(i)!==59;)i++;let d=i;for(;d>l&&Ae(e.charCodeAt(d-1));)d--;if(d===l)throw new TypeError($.#n("subtype",""));let c=e.slice(l,d);if(!We.test(c))throw new TypeError($.#n("subtype",c));c=c.toLowerCase();let m=new fr;for(;i<o;){for(i++;i<o&&Ae(e.charCodeAt(i));)i++;let p=i;for(;i<o;){let b=e.charCodeAt(i);if(b===59||b===61)break;i++}let T=p===i?"":e.slice(p,i);if(i>=o||e.charCodeAt(i)===59)continue;i++;let E;if(i<o&&e.charCodeAt(i)===34){i=$.#t(e,i,o),E=$.#e;let b=e.indexOf(";",i);i=b===-1?o:b}else{let b=i;for(;i<o&&e.charCodeAt(i)!==59;)i++;let v=i;for(;v>b&&Ae(e.charCodeAt(v-1));)v--;if(v===b)continue;E=e.slice(b,v)}if(T.length!==0&&fr.isValid(T,E)){let b=T.toLowerCase();Nn.call(m,b)||vn.call(m,b,E)}}return{type:s,subtype:c,parameters:m}}static#e="";static#t(e,t,a){t++;let o=t;for(;t<a;){let s=e.charCodeAt(t);if(s===34||s===92)break;t++}if(t>=a)return $.#e=e.slice(o,t),t;if(e.charCodeAt(t)===34)return $.#e=e.slice(o,t),t+1;let i=e.slice(o,t);for(;t<a;){let s=e.charCodeAt(t);if(s===34){t++;break}s===92&&t+1<a&&t++,i+=e[t],t++}return $.#e=i,t}static#n(e,t){return`Invalid ${e} "${t}": only HTTP token code points are valid.`}},Ar=class Rr{#e;#t;#n;#r;constructor(e,t){if({type:this.#e,subtype:this.#t,parameters:this.#r}=Cn.parse(e),this.#n=this.#e+"/"+this.#t,t!==void 0){if(t===null||typeof t!="object"||Array.isArray(t))throw new TypeError("The parameters argument must be an object");for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&this.#r.set(a,t[a])}}static parse(e){try{return new Rr(e)}catch{}return null}get type(){return this.#e}get subtype(){return this.#t}get essence(){return this.#n}get parameters(){return this.#r}matches(e){return typeof e=="string"?this.#n===e:this.#e===e.#e&&this.#t===e.#t}toString(){return this.#n+this.#r.toString()}get[Symbol.toStringTag](){return"MediaType"}},In=class extends Map{set(n,e){return super.set(n,e instanceof Set?e:(super.get(n)??new Set).add(e)),this}getOrInsert(n,e){return this.has(n)?super.get(n):(super.set(n,e instanceof Set?e:(super.get(n)??new Set).add(e)),e)}getOrInsertComputed(n,e){if(this.has(n))return super.get(n);let t=e(n);return super.set(n,t instanceof Set?t:(super.get(n)??new Set).add(t)),t}find(n,e){let t=this.get(n);if(t!==void 0)return Array.from(t).find(e)}hasValue(n,e){let t=super.get(n);return t?t.has(e):!1}deleteValue(n,e){if(e===void 0)return this.delete(n);let t=super.get(n);if(t){let a=t.delete(e);return t.size===0&&super.delete(n),a}return!1}get[Symbol.toStringTag](){return"SetMultiMap"}},Dn=class{#e;#t;constructor(n,e){this.#e=n,this.#t=e}handle(n,e){this.#t.call(this.#e,n,e)}get[Symbol.toStringTag](){return"ContextEventHandler"}},Ln=class{#e;#t;constructor(n,e){this.#e=n,this.#t=e}get eventName(){return this.#e}get contextEventHandler(){return this.#t}get[Symbol.toStringTag](){return"Subscription"}},gt=class{#e=new In;#t;setErrorHandler(n){this.#t=n}subscribe(n,e,t=e,a){if(this.#n(n),a?.once){let s=e;e=(l,d)=>{s.call(t,l,d),this.unsubscribe(i)}}let o=new Dn(t,e);this.#e.set(n,o);let i=new Ln(n,o);return i}unsubscribe({eventName:n,contextEventHandler:e}){let t=this.#e.get(n);if(!t)return!1;let a=t.delete(e);return a&&t.size===0&&this.#e.delete(n),a}publish(n,e=new CustomEvent(n),t){this.#n(n),this.#e.get(n)?.forEach(a=>{try{a.handle(e,t)}catch(o){this.#t?this.#t(o,n,e,t):console.error(`Error in event handler for '${n}':`,o)}})}isSubscribed({eventName:n,contextEventHandler:e}){return this.#e.get(n)?.has(e)??!1}#n(n){if(!n||typeof n!="string")throw new TypeError("Event name must be a non-empty string");if(n.trim()!==n)throw new Error("Event name cannot have leading or trailing whitespace")}destroy(){this.#e.clear()}get[Symbol.toStringTag](){return"Subscribr"}},Re=class extends Error{#e;#t;#n;#r;#o;constructor(n,{message:e,cause:t,entity:a,url:o,method:i,timing:s}={}){super(e,{cause:t}),this.#e=a,this.#t=n,this.#n=o,this.#r=i,this.#o=s}get entity(){return this.#e}get statusCode(){return this.#t.code}get statusText(){return this.#t?.text}get url(){return this.#n}get method(){return this.#r}get timing(){return this.#o}get name(){return"HttpError"}get[Symbol.toStringTag](){return this.name}},$e=class{#e;#t;constructor(n,e){this.#e=n,this.#t=e}get code(){return this.#e}get text(){return this.#t}get[Symbol.toStringTag](){return"ResponseStatus"}toString(){return`${this.#e} ${this.#t}`}},xn="XSRF-TOKEN",kn="X-XSRF-TOKEN",k={PNG:"image/png",TEXT:"text/plain",JSON:"application/json",HTML:"text/html",JAVA_SCRIPT:"text/javascript",CSS:"text/css",XML:"application/xml",BIN:"application/octet-stream",EVENT_STREAM:"text/event-stream",NDJSON:"application/x-ndjson"},Mn={charset:"utf-8"},Ge=new Ar(k.JSON,Mn),mr=globalThis.location?.origin??"http://localhost",Pn={DEFAULT:"default",FORCE_CACHE:"force-cache",NO_CACHE:"no-cache",NO_STORE:"no-store",ONLY_IF_CACHED:"only-if-cached",RELOAD:"reload"},j={CONFIGURED:"configured",SUCCESS:"success",ERROR:"error",ABORTED:"aborted",TIMEOUT:"timeout",RETRY:"retry",COMPLETE:"complete",ALL_COMPLETE:"all-complete"},pe={ABORT:"abort",TIMEOUT:"timeout"},Oe={ABORT:"AbortError",TIMEOUT:"TimeoutError"},Be={once:!0,passive:!0},Or=()=>new CustomEvent(pe.ABORT,{detail:{cause:Oe.ABORT}}),Un=()=>new CustomEvent(pe.TIMEOUT,{detail:{cause:Oe.TIMEOUT}}),_n=["POST","PUT","PATCH","DELETE"],Hn=new $e(500,"Internal Server Error"),Fn=new $e(499,"Aborted"),jn=new $e(504,"Request Timeout"),pr=[408,413,429,500,502,503,504],gr=["GET","PUT","HEAD","DELETE","OPTIONS"],yt=300,bt=2,Gn=class{#e;#t=new AbortController;#n;#r;constructor({signal:n,timeout:e=1/0}={}){if(e<0)throw new RangeError("The timeout cannot be negative");let t=n!=null,a=e!==1/0;if(!t&&!a){this.#e=this.#t.signal,this.#r=!1;return}let o=[this.#t.signal];t&&o.push(n),a&&o.push(AbortSignal.timeout(e)),this.#e=AbortSignal.any(o),this.#r=!0,a&&this.#e.addEventListener(pe.ABORT,this,Be)}handleEvent({target:{reason:n}}){this.#t.signal.aborted||n instanceof DOMException&&n.name===Oe.TIMEOUT&&this.#e.dispatchEvent(Un())}get signal(){return this.#e}onAbort(n){return this.#o(pe.ABORT,n)}onTimeout(n){return this.#o(pe.TIMEOUT,n)}abort(n=Or()){this.#t.abort(n.detail?.cause)}destroy(){this.#r&&this.#e.removeEventListener(pe.ABORT,this,Be);let n=this.#n;if(n!==void 0){for(let[e,t]of n)this.#e.removeEventListener(t,e,Be);n.clear()}return this}#o(n,e){return this.#e.addEventListener(n,e,Be),(this.#n??=new Map).set(e,n),this}get[Symbol.toStringTag](){return"SignalController"}},Tt,Ye,Xe=()=>Tt||(Tt=(typeof document>"u"||typeof DOMParser>"u"||typeof DocumentFragment>"u"?import("jsdom").then(({JSDOM:n})=>{let{window:e}=new n("<!DOCTYPE html><html><head></head><body></body></html>",{url:"http://localhost"});globalThis.window=e,Object.assign(globalThis,{document:e.document,DOMParser:e.DOMParser,DocumentFragment:e.DocumentFragment})}).catch(()=>{throw Tt=void 0,new Error("jsdom is required for HTML/XML/DOM features in Node.js environments. Install it with: npm install jsdom")}):Promise.resolve()).then(()=>Promise.resolve().then(()=>(dr(),hr))).then(({default:n})=>{Ye=n})),vr=async(n,e)=>(await Xe(),new DOMParser().parseFromString(Ye.sanitize(await n.text()),e)),At=async(n,e)=>{await Xe();let t=URL.createObjectURL(await n.blob());try{return new Promise((a,o)=>e(t,a,o))}finally{URL.revokeObjectURL(t)}},Bn=n=>n.text(),yr=n=>At(n,(e,t,a)=>{let o=Object.assign(document.createElement("script"),{src:e,type:"text/javascript",async:!0});o.onload=()=>{document.head.removeChild(o),t()},o.onerror=()=>{document.head.removeChild(o),a(new Error("Script failed to load"))},document.head.appendChild(o)}),br=n=>At(n,(e,t,a)=>{let o=Object.assign(document.createElement("link"),{href:e,type:"text/css",rel:"stylesheet"});o.onload=()=>t(),o.onerror=()=>{document.head.removeChild(o),a(new Error("Stylesheet load failed"))},document.head.appendChild(o)}),ze=n=>n.json(),zn=n=>n.blob(),Tr=n=>At(n,(e,t,a)=>{let o=new Image;o.onload=()=>t(o),o.onerror=()=>a(new Error("Image failed to load")),o.src=e}),qn=n=>n.arrayBuffer(),Er=n=>Promise.resolve(n.body),qe=async n=>vr(n,"application/xml"),wr=async n=>vr(n,"text/html"),Wn=async n=>(await Xe(),document.createRange().createContextualFragment(Ye.sanitize(await n.text()))),$n=async n=>(await Xe(),document.createRange().createContextualFragment(Ye.sanitize(await n.text(),{ADD_TAGS:["script"]})));async function*Nr(n,e,t){let a=n.getReader(),o=new TextDecoder,i=e.length,s="",l=0;try{for(;;){let d;for(;(d=s.indexOf(e,l))!==-1;)yield s.slice(l,d),l=d+i;l>0&&l>=s.length-l&&(s=l<s.length?s.slice(l):"",l=0);let{done:c,value:m}=await a.read();if(c)break;s+=o.decode(m,{stream:!0})}if(t){let d=((l<s.length?s.slice(l):"")+o.decode()).trim();d&&(yield d)}}finally{await a.cancel()}}var Yn=n=>{let e="message",t="",a,o,i,s=n.split(`
5
- `);for(let d=0,c,m=s.length;d<m;d++){if(c=s[d],c.charCodeAt(0)===58)continue;let p=c.indexOf(":"),T,E;switch(p===-1?(T=c,E=""):(T=c.slice(0,p),E=c.charCodeAt(p+1)===32?c.slice(p+2):c.slice(p+1)),T){case"event":{e=E;break}case"data":{o===void 0?o=E:(i??=[]).push(E);break}case"id":{t=E;break}case"retry":{let b=parseInt(E,10);isNaN(b)||(a=b);break}}}if(o===void 0&&e==="message")return;let l=i===void 0?o??"":`${o}
2
+ var $r=Object.defineProperty;var Yr=(n,e)=>()=>(n&&(e=n(n=0)),e);var Xr=(n,e)=>{for(var t in e)$r(n,t,{get:e[t],enumerable:!0})};var mr={};Xr(mr,{default:()=>vn});function Zt(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,a=Array(e);t<e;t++)a[t]=n[t];return a}function Vr(n){if(Array.isArray(n))return n}function Jr(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var a,o,i,s,l=[],u=!0,d=!1;try{if(i=(t=t.call(n)).next,e!==0)for(;!(u=(a=i.call(t)).done)&&(l.push(a.value),l.length!==e);u=!0);}catch(m){d=!0,o=m}finally{try{if(!u&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(d)throw o}}return l}}function Kr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zr(n,e){return Vr(n)||Jr(n,e)||Qr(n,e)||Kr()}function Qr(n,e){if(n){if(typeof n=="string")return Zt(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Zt(n,e):void 0}}function I(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,a=new Array(t>1?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];return Et(n,e,a)}}function cn(n){return function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return St(n,t)}}function b(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ve;if(Qt&&Qt(n,null),!F(e))return n;let a=e.length;for(;a--;){let o=e[a];if(typeof o=="string"){let i=t(o);i!==o&&(en(e)||(e[a]=i),o=i)}n[o]=!0}return n}function un(n){for(let e=0;e<n.length;e++)A(n,e)||(n[e]=null);return n}function _(n){let e=Te(null);for(let a of hr(n)){var t=Zr(a,2);let o=t[0],i=t[1];A(n,o)&&(F(i)?e[o]=un(i):i&&typeof i=="object"&&i.constructor===Object?e[o]=_(i):e[o]=i)}return e}function hn(n){switch(typeof n){case"string":return n;case"number":return sn(n);case"boolean":return ln(n);case"bigint":return nr?nr(n):"0";case"symbol":return ar?ar(n):"Symbol()";case"undefined":return Oe(n);case"function":case"object":{if(n===null)return Oe(n);let e=n,t=V(e,"toString");if(typeof t=="function"){let a=t(e);return typeof a=="string"?a:Oe(a)}return Oe(n)}default:return Oe(n)}}function V(n,e){for(;n!==null;){let a=rn(n,e);if(a){if(a.get)return I(a.get);if(typeof a.value=="function")return I(a.value)}n=tn(n)}function t(){return null}return t}function fn(n){try{return k(n,""),!0}catch{return!1}}function dr(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rn(),e=r=>dr(r);if(e.version="3.4.8",e.removed=[],!n||!n.document||n.document.nodeType!==X.document||!n.Element)return e.isSupported=!1,e;let t=n.document,a=t,o=a.currentScript;n.DocumentFragment;let i=n.HTMLTemplateElement,s=n.Node,l=n.Element,u=n.NodeFilter;n.NamedNodeMap===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;let m=n.DOMParser,p=n.trustedTypes,g=l.prototype,S=V(g,"cloneNode"),T=V(g,"remove"),M=V(g,"nextSibling"),K=V(g,"childNodes"),Z=V(g,"parentNode"),ee=V(g,"shadowRoot"),De=V(g,"attributes"),R=s&&s.prototype?V(s.prototype,"nodeType"):null,G=s&&s.prototype?V(s.prototype,"nodeName"):null;if(typeof i=="function"){let r=t.createElement("template");r.content&&r.content.ownerDocument&&(t=r.content.ownerDocument)}let D,ne="",Qe=0,le=function(r){if(Qe>0)throw be('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');Qe++;try{return D.createHTML(r)}finally{Qe--}},Le=t,et=Le.implementation,Dt=Le.createNodeIterator,Lr=Le.createDocumentFragment,xr=Le.getElementsByTagName,kr=a.importNode,L=ur();e.isSupported=typeof hr=="function"&&typeof Z=="function"&&et&&et.createHTMLDocument!==void 0;let xe=pn,ke=gn,Pe=yn,Pr=bn,Mr=Tn,Ur=En,Lt=Sn,_r=An,xt=cr,O=null,tt=b({},[...or,...gt,...yt,...bt,...ir]),C=null,rt=b({},[...sr,...Tt,...lr,...Be]),v=Object.seal(Te(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}})),Se=null,Me=null,te=Object.seal(Te(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),kt=!0,nt=!0,Pt=!1,Mt=!0,re=!1,we=!0,ae=!1,at=!1,ot=!1,ce=!1,Ue=!1,_e=!1,Ut=!0,_t=!1,Ft="user-content-",it=!0,Ae=!1,ue={},$=null,st=b({},["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"]),Ht=null,jt=b({},["audio","video","img","source","image","track"]),lt=null,Gt=b({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Fe="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",Y="http://www.w3.org/1999/xhtml",he=Y,ct=!1,ut=null,Fr=b({},[Fe,He,Y],pt),ht=b({},["mi","mo","mn","ms","mtext"]),ft=b({},["annotation-xml"]),Hr=b({},["title","style","font","a","script"]),Re=null,jr=["application/xhtml+xml","text/html"],Gr="text/html",N=null,fe=null,zr=t.createElement("form"),zt=function(r){return r instanceof RegExp||r instanceof Function},dt=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(fe&&fe===r)return;(!r||typeof r!="object")&&(r={}),r=_(r),Re=jr.indexOf(r.PARSER_MEDIA_TYPE)===-1?Gr:r.PARSER_MEDIA_TYPE,N=Re==="application/xhtml+xml"?pt:ve,O=A(r,"ALLOWED_TAGS")&&F(r.ALLOWED_TAGS)?b({},r.ALLOWED_TAGS,N):tt,C=A(r,"ALLOWED_ATTR")&&F(r.ALLOWED_ATTR)?b({},r.ALLOWED_ATTR,N):rt,ut=A(r,"ALLOWED_NAMESPACES")&&F(r.ALLOWED_NAMESPACES)?b({},r.ALLOWED_NAMESPACES,pt):Fr,lt=A(r,"ADD_URI_SAFE_ATTR")&&F(r.ADD_URI_SAFE_ATTR)?b(_(Gt),r.ADD_URI_SAFE_ATTR,N):Gt,Ht=A(r,"ADD_DATA_URI_TAGS")&&F(r.ADD_DATA_URI_TAGS)?b(_(jt),r.ADD_DATA_URI_TAGS,N):jt,$=A(r,"FORBID_CONTENTS")&&F(r.FORBID_CONTENTS)?b({},r.FORBID_CONTENTS,N):st,Se=A(r,"FORBID_TAGS")&&F(r.FORBID_TAGS)?b({},r.FORBID_TAGS,N):_({}),Me=A(r,"FORBID_ATTR")&&F(r.FORBID_ATTR)?b({},r.FORBID_ATTR,N):_({}),ue=A(r,"USE_PROFILES")?r.USE_PROFILES&&typeof r.USE_PROFILES=="object"?_(r.USE_PROFILES):r.USE_PROFILES:!1,kt=r.ALLOW_ARIA_ATTR!==!1,nt=r.ALLOW_DATA_ATTR!==!1,Pt=r.ALLOW_UNKNOWN_PROTOCOLS||!1,Mt=r.ALLOW_SELF_CLOSE_IN_ATTR!==!1,re=r.SAFE_FOR_TEMPLATES||!1,we=r.SAFE_FOR_XML!==!1,ae=r.WHOLE_DOCUMENT||!1,ce=r.RETURN_DOM||!1,Ue=r.RETURN_DOM_FRAGMENT||!1,_e=r.RETURN_TRUSTED_TYPE||!1,ot=r.FORCE_BODY||!1,Ut=r.SANITIZE_DOM!==!1,_t=r.SANITIZE_NAMED_PROPS||!1,it=r.KEEP_CONTENT!==!1,Ae=r.IN_PLACE||!1,xt=fn(r.ALLOWED_URI_REGEXP)?r.ALLOWED_URI_REGEXP:cr,he=typeof r.NAMESPACE=="string"?r.NAMESPACE:Y,ht=A(r,"MATHML_TEXT_INTEGRATION_POINTS")&&r.MATHML_TEXT_INTEGRATION_POINTS&&typeof r.MATHML_TEXT_INTEGRATION_POINTS=="object"?_(r.MATHML_TEXT_INTEGRATION_POINTS):b({},["mi","mo","mn","ms","mtext"]),ft=A(r,"HTML_INTEGRATION_POINTS")&&r.HTML_INTEGRATION_POINTS&&typeof r.HTML_INTEGRATION_POINTS=="object"?_(r.HTML_INTEGRATION_POINTS):b({},["annotation-xml"]);let c=A(r,"CUSTOM_ELEMENT_HANDLING")&&r.CUSTOM_ELEMENT_HANDLING&&typeof r.CUSTOM_ELEMENT_HANDLING=="object"?_(r.CUSTOM_ELEMENT_HANDLING):Te(null);if(v=Te(null),A(c,"tagNameCheck")&&zt(c.tagNameCheck)&&(v.tagNameCheck=c.tagNameCheck),A(c,"attributeNameCheck")&&zt(c.attributeNameCheck)&&(v.attributeNameCheck=c.attributeNameCheck),A(c,"allowCustomizedBuiltInElements")&&typeof c.allowCustomizedBuiltInElements=="boolean"&&(v.allowCustomizedBuiltInElements=c.allowCustomizedBuiltInElements),re&&(nt=!1),Ue&&(ce=!0),ue&&(O=b({},ir),C=Te(null),ue.html===!0&&(b(O,or),b(C,sr)),ue.svg===!0&&(b(O,gt),b(C,Tt),b(C,Be)),ue.svgFilters===!0&&(b(O,yt),b(C,Tt),b(C,Be)),ue.mathMl===!0&&(b(O,bt),b(C,lr),b(C,Be))),te.tagCheck=null,te.attributeCheck=null,A(r,"ADD_TAGS")&&(typeof r.ADD_TAGS=="function"?te.tagCheck=r.ADD_TAGS:F(r.ADD_TAGS)&&(O===tt&&(O=_(O)),b(O,r.ADD_TAGS,N))),A(r,"ADD_ATTR")&&(typeof r.ADD_ATTR=="function"?te.attributeCheck=r.ADD_ATTR:F(r.ADD_ATTR)&&(C===rt&&(C=_(C)),b(C,r.ADD_ATTR,N))),A(r,"ADD_URI_SAFE_ATTR")&&F(r.ADD_URI_SAFE_ATTR)&&b(lt,r.ADD_URI_SAFE_ATTR,N),A(r,"FORBID_CONTENTS")&&F(r.FORBID_CONTENTS)&&($===st&&($=_($)),b($,r.FORBID_CONTENTS,N)),A(r,"ADD_FORBID_CONTENTS")&&F(r.ADD_FORBID_CONTENTS)&&($===st&&($=_($)),b($,r.ADD_FORBID_CONTENTS,N)),it&&(O["#text"]=!0),ae&&b(O,["html","head","body"]),O.table&&(b(O,["tbody"]),delete Se.tbody),r.TRUSTED_TYPES_POLICY){if(typeof r.TRUSTED_TYPES_POLICY.createHTML!="function")throw be('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof r.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw be('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let f=D;D=r.TRUSTED_TYPES_POLICY;try{ne=le("")}catch(y){throw D=f,y}}else D===void 0&&r.TRUSTED_TYPES_POLICY!==null&&(D=On(p,o)),D&&typeof ne=="string"&&(ne=le(""));(L.uponSanitizeElement.length>0||L.uponSanitizeAttribute.length>0)&&O===tt&&(O=_(O)),L.uponSanitizeAttribute.length>0&&C===rt&&(C=_(C)),H&&H(r),fe=r},Bt=b({},[...gt,...yt,...dn]),qt=b({},[...bt,...mn]),Br=function(r){let c=Z(r);(!c||!c.tagName)&&(c={namespaceURI:he,tagName:"template"});let f=ve(r.tagName),y=ve(c.tagName);return ut[r.namespaceURI]?r.namespaceURI===He?c.namespaceURI===Y?f==="svg":c.namespaceURI===Fe?f==="svg"&&(y==="annotation-xml"||ht[y]):!!Bt[f]:r.namespaceURI===Fe?c.namespaceURI===Y?f==="math":c.namespaceURI===He?f==="math"&&ft[y]:!!qt[f]:r.namespaceURI===Y?c.namespaceURI===He&&!ft[y]||c.namespaceURI===Fe&&!ht[y]?!1:!qt[f]&&(Hr[f]||!Bt[f]):!!(Re==="application/xhtml+xml"&&ut[r.namespaceURI]):!1},oe=function(r){ge(e.removed,{element:r});try{Z(r).removeChild(r)}catch{T(r)}},ie=function(r,c){try{ge(e.removed,{attribute:c.getAttributeNode(r),from:c})}catch{ge(e.removed,{attribute:null,from:c})}if(c.removeAttribute(r),r==="is")if(ce||Ue)try{oe(c)}catch{}else try{c.setAttribute(r,"")}catch{}},Wt=function(r){let c=null,f=null;if(ot)r="<remove></remove>"+r;else{let w=tr(r,/^[\r\n\t ]+/);f=w&&w[0]}Re==="application/xhtml+xml"&&he===Y&&(r='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+r+"</body></html>");let y=D?le(r):r;if(he===Y)try{c=new m().parseFromString(y,Re)}catch{}if(!c||!c.documentElement){c=et.createDocument(he,"template",null);try{c.documentElement.innerHTML=ct?ne:y}catch{}}let E=c.body||c.documentElement;return r&&f&&E.insertBefore(t.createTextNode(f),E.childNodes[0]||null),he===Y?xr.call(c,ae?"html":"body")[0]:ae?c.documentElement:E},$t=function(r){return Dt.call(r.ownerDocument||r,r,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},mt=function(r){var c,f;r.normalize();let y=Dt.call(r.ownerDocument||r,r,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null),E=y.nextNode();for(;E;){let U=E.data;se([xe,ke,Pe],B=>{U=ye(U,B," ")}),E.data=U,E=y.nextNode()}let w=(c=(f=r.querySelectorAll)===null||f===void 0?void 0:f.call(r,"template"))!==null&&c!==void 0?c:[];se(Array.from(w),U=>{de(U.content)&&mt(U.content)})},je=function(r){let c=G?G(r):null;return typeof c!="string"||N(c)!=="form"?!1:typeof r.nodeName!="string"||typeof r.textContent!="string"||typeof r.removeChild!="function"||r.attributes!==De(r)||typeof r.removeAttribute!="function"||typeof r.setAttribute!="function"||typeof r.namespaceURI!="string"||typeof r.insertBefore!="function"||typeof r.hasChildNodes!="function"||r.nodeType!==R(r)||r.childNodes!==K(r)},de=function(r){if(!R||typeof r!="object"||r===null)return!1;try{return R(r)===X.documentFragment}catch{return!1}},Ge=function(r){if(!R||typeof r!="object"||r===null)return!1;try{return typeof R(r)=="number"}catch{return!1}};function Q(r,c,f){se(r,y=>{y.call(e,c,f,fe)})}let Yt=function(r){let c=null;if(Q(L.beforeSanitizeElements,r,null),je(r))return oe(r),!0;let f=N(G?G(r):r.nodeName);if(Q(L.uponSanitizeElement,r,{tagName:f,allowedTags:O}),we&&r.hasChildNodes()&&!Ge(r.firstElementChild)&&k(/<[/\w!]/g,r.innerHTML)&&k(/<[/\w!]/g,r.textContent)||we&&r.namespaceURI===Y&&f==="style"&&Ge(r.firstElementChild)||r.nodeType===X.progressingInstruction||we&&r.nodeType===X.comment&&k(/<[/\w]/g,r.data))return oe(r),!0;if(Se[f]||!(te.tagCheck instanceof Function&&te.tagCheck(f))&&!O[f]){if(!Se[f]&&Vt(f)&&(v.tagNameCheck instanceof RegExp&&k(v.tagNameCheck,f)||v.tagNameCheck instanceof Function&&v.tagNameCheck(f)))return!1;if(it&&!$[f]){let y=Z(r),E=K(r);if(E&&y){let w=E.length;for(let U=w-1;U>=0;--U){let B=S(E[U],!0);y.insertBefore(B,M(r))}}}return oe(r),!0}return(R?R(r):r.nodeType)===X.element&&!Br(r)||(f==="noscript"||f==="noembed"||f==="noframes")&&k(/<\/no(script|embed|frames)/i,r.innerHTML)?(oe(r),!0):(re&&r.nodeType===X.text&&(c=r.textContent,se([xe,ke,Pe],y=>{c=ye(c,y," ")}),r.textContent!==c&&(ge(e.removed,{element:r.cloneNode()}),r.textContent=c)),Q(L.afterSanitizeElements,r,null),!1)},Xt=function(r,c,f){if(Me[c]||Ut&&(c==="id"||c==="name")&&(f in t||f in zr))return!1;let y=C[c]||te.attributeCheck instanceof Function&&te.attributeCheck(c,r);if(!(nt&&!Me[c]&&k(Pr,c))&&!(kt&&k(Mr,c))){if(!y||Me[c]){if(!(Vt(r)&&(v.tagNameCheck instanceof RegExp&&k(v.tagNameCheck,r)||v.tagNameCheck instanceof Function&&v.tagNameCheck(r))&&(v.attributeNameCheck instanceof RegExp&&k(v.attributeNameCheck,c)||v.attributeNameCheck instanceof Function&&v.attributeNameCheck(c,r))||c==="is"&&v.allowCustomizedBuiltInElements&&(v.tagNameCheck instanceof RegExp&&k(v.tagNameCheck,f)||v.tagNameCheck instanceof Function&&v.tagNameCheck(f))))return!1}else if(!lt[c]&&!k(xt,ye(f,Lt,""))&&!((c==="src"||c==="xlink:href"||c==="href")&&r!=="script"&&rr(f,"data:")===0&&Ht[r])&&!(Pt&&!k(Ur,ye(f,Lt,"")))&&f)return!1}return!0},qr=b({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Vt=function(r){return!qr[ve(r)]&&k(_r,r)},Jt=function(r){Q(L.beforeSanitizeAttributes,r,null);let c=r.attributes;if(!c||je(r))return;let f={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:C,forceKeepAttr:void 0},y=c.length;for(;y--;){let E=c[y],w=E.name,U=E.namespaceURI,B=E.value,W=N(w),pe=B,x=w==="value"?pe:on(pe);if(f.attrName=W,f.attrValue=x,f.keepAttr=!0,f.forceKeepAttr=void 0,Q(L.uponSanitizeAttribute,r,f),x=f.attrValue,_t&&(W==="id"||W==="name")&&rr(x,Ft)!==0&&(ie(w,r),x=Ft+x),we&&k(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,x)){ie(w,r);continue}if(W==="attributename"&&tr(x,"href")){ie(w,r);continue}if(f.forceKeepAttr)continue;if(!f.keepAttr){ie(w,r);continue}if(!Mt&&k(/\/>/i,x)){ie(w,r);continue}re&&se([xe,ke,Pe],Wr=>{x=ye(x,Wr," ")});let Kt=N(r.nodeName);if(!Xt(Kt,W,x)){ie(w,r);continue}if(D&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!U)switch(p.getAttributeType(Kt,W)){case"TrustedHTML":{x=le(x);break}case"TrustedScriptURL":{x=D.createScriptURL(x);break}}if(x!==pe)try{U?r.setAttributeNS(U,w,x):r.setAttribute(w,x),je(r)?oe(r):er(e.removed)}catch{ie(w,r)}}Q(L.afterSanitizeAttributes,r,null)},ze=function(r){let c=null,f=$t(r);for(Q(L.beforeSanitizeShadowDOM,r,null);c=f.nextNode();)if(Q(L.uponSanitizeShadowNode,c,null),Yt(c),Jt(c),de(c.content)&&ze(c.content),(R?R(c):c.nodeType)===X.element){let y=ee?ee(c):c.shadowRoot;de(y)&&(me(y),ze(y))}Q(L.afterSanitizeShadowDOM,r,null)},me=function(r){let c=R?R(r):r.nodeType;if(c===X.element){let E=ee?ee(r):r.shadowRoot;de(E)&&(me(E),ze(E))}let f=K?K(r):r.childNodes;if(!f)return;let y=[];se(f,E=>{ge(y,E)});for(let E of y)me(E);if(c===X.element){let E=G?G(r):null;if(typeof E=="string"&&N(E)==="template"){let w=r.content;de(w)&&me(w)}}};return e.sanitize=function(r){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=null,y=null,E=null,w=null;if(ct=!r,ct&&(r="<!-->"),typeof r!="string"&&!Ge(r)&&(r=hn(r),typeof r!="string"))throw be("dirty is not a string, aborting");if(!e.isSupported)return r;if(at||dt(c),e.removed=[],typeof r=="string"&&(Ae=!1),Ae){let W=G?G(r):r.nodeName;if(typeof W=="string"){let pe=N(W);if(!O[pe]||Se[pe])throw be("root node is forbidden and cannot be sanitized in-place")}if(je(r))throw be("root node is clobbered and cannot be sanitized in-place");me(r)}else if(Ge(r))f=Wt("<!---->"),y=f.ownerDocument.importNode(r,!0),y.nodeType===X.element&&y.nodeName==="BODY"||y.nodeName==="HTML"?f=y:f.appendChild(y),me(y);else{if(!ce&&!re&&!ae&&r.indexOf("<")===-1)return D&&_e?le(r):r;if(f=Wt(r),!f)return ce?null:_e?ne:""}f&&ot&&oe(f.firstChild);let U=$t(Ae?r:f);for(;E=U.nextNode();)Yt(E),Jt(E),de(E.content)&&ze(E.content);if(Ae)return re&&mt(r),r;if(ce){if(re&&mt(f),Ue)for(w=Lr.call(f.ownerDocument);f.firstChild;)w.appendChild(f.firstChild);else w=f;return(C.shadowroot||C.shadowrootmode)&&(w=kr.call(a,w,!0)),w}let B=ae?f.outerHTML:f.innerHTML;return ae&&O["!doctype"]&&f.ownerDocument&&f.ownerDocument.doctype&&f.ownerDocument.doctype.name&&k(wn,f.ownerDocument.doctype.name)&&(B="<!DOCTYPE "+f.ownerDocument.doctype.name+`>
4
+ `+B),re&&se([xe,ke,Pe],W=>{B=ye(B,W," ")}),D&&_e?le(B):B},e.setConfig=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dt(r),at=!0},e.clearConfig=function(){fe=null,at=!1},e.isValidAttribute=function(r,c,f){fe||dt({});let y=N(r),E=N(c);return Xt(y,E,f)},e.addHook=function(r,c){typeof c=="function"&&ge(L[r],c)},e.removeHook=function(r,c){if(c!==void 0){let f=nn(L[r],c);return f===-1?void 0:an(L[r],f,1)[0]}return er(L[r])},e.removeHooks=function(r){L[r]=[]},e.removeAllHooks=function(){L=ur()},e}var hr,Qt,en,tn,rn,H,q,Te,fr,Et,St,se,nn,er,ge,an,F,ve,pt,tr,ye,rr,on,sn,ln,nr,ar,A,Oe,k,be,or,gt,yt,dn,bt,mn,ir,sr,Tt,lr,Be,pn,gn,yn,bn,Tn,cr,En,Sn,wn,An,X,Rn,On,ur,vn,pr=Yr(()=>{hr=Object.entries,Qt=Object.setPrototypeOf,en=Object.isFrozen,tn=Object.getPrototypeOf,rn=Object.getOwnPropertyDescriptor,H=Object.freeze,q=Object.seal,Te=Object.create,fr=typeof Reflect<"u"&&Reflect,Et=fr.apply,St=fr.construct;H||(H=function(n){return n});q||(q=function(n){return n});Et||(Et=function(n,e){for(var t=arguments.length,a=new Array(t>2?t-2:0),o=2;o<t;o++)a[o-2]=arguments[o];return n.apply(e,a)});St||(St=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),a=1;a<e;a++)t[a-1]=arguments[a];return new n(...t)});se=I(Array.prototype.forEach),nn=I(Array.prototype.lastIndexOf),er=I(Array.prototype.pop),ge=I(Array.prototype.push),an=I(Array.prototype.splice),F=Array.isArray,ve=I(String.prototype.toLowerCase),pt=I(String.prototype.toString),tr=I(String.prototype.match),ye=I(String.prototype.replace),rr=I(String.prototype.indexOf),on=I(String.prototype.trim),sn=I(Number.prototype.toString),ln=I(Boolean.prototype.toString),nr=typeof BigInt>"u"?null:I(BigInt.prototype.toString),ar=typeof Symbol>"u"?null:I(Symbol.prototype.toString),A=I(Object.prototype.hasOwnProperty),Oe=I(Object.prototype.toString),k=I(RegExp.prototype.test),be=cn(TypeError);or=H(["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"]),gt=H(["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"]),yt=H(["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"]),dn=H(["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"]),bt=H(["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"]),mn=H(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ir=H(["#text"]),sr=H(["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"]),Tt=H(["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","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-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"]),lr=H(["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"]),Be=H(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pn=q(/{{[\w\W]*|^[\w\W]*}}/g),gn=q(/<%[\w\W]*|^[\w\W]*%>/g),yn=q(/\${[\w\W]*/g),bn=q(/^data-[\-\w.\u00B7-\uFFFF]+$/),Tn=q(/^aria-[\-\w]+$/),cr=q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),En=q(/^(?:\w+script|data):/i),Sn=q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wn=q(/^html$/i),An=q(/^[a-z][.\w]*(-[.\w]+)+$/i),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},Rn=function(){return typeof window>"u"?null:window},On=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let t=null,a="data-tt-policy-suffix";e&&e.hasAttribute(a)&&(t=e.getAttribute(a));let o="dompurify"+(t?"#"+t:"");try{return n.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},ur=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};vn=dr();});var Ve=/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u,Nn=/(["\\])/ug,Cn=/^[\t\u0020-\u007E\u0080-\u00FF]*$/u,qe=n=>{for(let e=0,t=n.length;e<t;e++){let a=n.charCodeAt(e);if(a>=65&&a<=90)return n.toLowerCase()}return n},gr=class Or extends Map{constructor(e=[]){super(e)}static isValid(e,t){return Ve.test(e)&&Cn.test(t)}get(e){return super.get(qe(e))}has(e){return super.has(qe(e))}set(e,t){if(!Or.isValid(e,t))throw new Error(`Invalid media type parameter name/value: ${e}/${t}`);return super.set(qe(e),t),this}delete(e){return super.delete(qe(e))}toString(){let e="";for(let[t,a]of this)e+=";",e+=t,e+="=",a.length===0||!Ve.test(a)?(e+='"',e+=a.replace(Nn,"\\$1"),e+='"'):e+=a;return e}get[Symbol.toStringTag](){return"MediaTypeParameters"}},Ne=n=>n===32||n===9||n===10||n===13,In=Map.prototype.set,Dn=Map.prototype.has,Ln=class J{constructor(){}static parse(e){let t=0,a=e.length;for(;t<a&&Ne(e.charCodeAt(t));)t++;for(;a>t&&Ne(e.charCodeAt(a-1));)a--;(t!==0||a!==e.length)&&(e=e.slice(t,a));let o=e.length,i=0;for(;i<o&&e.charCodeAt(i)!==47;)i++;if(i===0||i>=o)throw new TypeError(J.#n("type",e.slice(0,i)));let s=e.slice(0,i);if(!Ve.test(s))throw new TypeError(J.#n("type",s));s=s.toLowerCase(),i++;let l=i;for(;i<o&&e.charCodeAt(i)!==59;)i++;let u=i;for(;u>l&&Ne(e.charCodeAt(u-1));)u--;if(u===l)throw new TypeError(J.#n("subtype",""));let d=e.slice(l,u);if(!Ve.test(d))throw new TypeError(J.#n("subtype",d));d=d.toLowerCase();let m=new gr;for(;i<o;){for(i++;i<o&&Ne(e.charCodeAt(i));)i++;let p=i;for(;i<o;){let T=e.charCodeAt(i);if(T===59||T===61)break;i++}let g=p===i?"":e.slice(p,i);if(i>=o||e.charCodeAt(i)===59)continue;i++;let S;if(i<o&&e.charCodeAt(i)===34){i=J.#t(e,i,o),S=J.#e;let T=e.indexOf(";",i);i=T===-1?o:T}else{let T=i;for(;i<o&&e.charCodeAt(i)!==59;)i++;let M=i;for(;M>T&&Ne(e.charCodeAt(M-1));)M--;if(M===T)continue;S=e.slice(T,M)}if(g.length!==0&&gr.isValid(g,S)){let T=g.toLowerCase();Dn.call(m,T)||In.call(m,T,S)}}return{type:s,subtype:d,parameters:m}}static#e="";static#t(e,t,a){t++;let o=t;for(;t<a;){let s=e.charCodeAt(t);if(s===34||s===92)break;t++}if(t>=a)return J.#e=e.slice(o,t),t;if(e.charCodeAt(t)===34)return J.#e=e.slice(o,t),t+1;let i=e.slice(o,t);for(;t<a;){let s=e.charCodeAt(t);if(s===34){t++;break}s===92&&t+1<a&&t++,i+=e[t],t++}return J.#e=i,t}static#n(e,t){return`Invalid ${e} "${t}": only HTTP token code points are valid.`}},vr=class Nr{#e;#t;#n;#r;constructor(e,t){if({type:this.#e,subtype:this.#t,parameters:this.#r}=Ln.parse(e),this.#n=this.#e+"/"+this.#t,t!==void 0){if(t===null||typeof t!="object"||Array.isArray(t))throw new TypeError("The parameters argument must be an object");for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&this.#r.set(a,t[a])}}static parse(e){try{return new Nr(e)}catch{}return null}get type(){return this.#e}get subtype(){return this.#t}get essence(){return this.#n}get parameters(){return this.#r}matches(e){return typeof e=="string"?this.#n===e:this.#e===e.#e&&this.#t===e.#t}toString(){return this.#n+this.#r.toString()}get[Symbol.toStringTag](){return"MediaType"}},xn=class extends Map{set(n,e){return super.set(n,e instanceof Set?e:(super.get(n)??new Set).add(e)),this}getOrInsert(n,e){return this.has(n)?super.get(n):(super.set(n,e instanceof Set?e:(super.get(n)??new Set).add(e)),e)}getOrInsertComputed(n,e){if(this.has(n))return super.get(n);let t=e(n);return super.set(n,t instanceof Set?t:(super.get(n)??new Set).add(t)),t}find(n,e){let t=this.get(n);if(t!==void 0)return Array.from(t).find(e)}hasValue(n,e){let t=super.get(n);return t?t.has(e):!1}deleteValue(n,e){if(e===void 0)return this.delete(n);let t=super.get(n);if(t){let a=t.delete(e);return t.size===0&&super.delete(n),a}return!1}get[Symbol.toStringTag](){return"SetMultiMap"}},kn=class{#e;#t;constructor(n,e){this.#e=n,this.#t=e}handle(n,e){this.#t.call(this.#e,n,e)}get[Symbol.toStringTag](){return"ContextEventHandler"}},Pn=class{#e;#t;constructor(n,e){this.#e=n,this.#t=e}get eventName(){return this.#e}get contextEventHandler(){return this.#t}get[Symbol.toStringTag](){return"Subscription"}},wt=class{#e=new xn;#t;setErrorHandler(n){this.#t=n}subscribe(n,e,t=e,a){if(this.#n(n),a?.once){let s=e;e=(l,u)=>{s.call(t,l,u),this.unsubscribe(i)}}let o=new kn(t,e);this.#e.set(n,o);let i=new Pn(n,o);return i}unsubscribe({eventName:n,contextEventHandler:e}){let t=this.#e.get(n);if(!t)return!1;let a=t.delete(e);return a&&t.size===0&&this.#e.delete(n),a}publish(n,e=new CustomEvent(n),t){this.#n(n),this.#e.get(n)?.forEach(a=>{try{a.handle(e,t)}catch(o){this.#t?this.#t(o,n,e,t):console.error(`Error in event handler for '${n}':`,o)}})}isSubscribed({eventName:n,contextEventHandler:e}){return this.#e.get(n)?.has(e)??!1}#n(n){if(!n||typeof n!="string")throw new TypeError("Event name must be a non-empty string");if(n.trim()!==n)throw new Error("Event name cannot have leading or trailing whitespace")}destroy(){this.#e.clear()}get[Symbol.toStringTag](){return"Subscribr"}},Ce=class extends Error{#e;#t;#n;#r;#o;constructor(n,{message:e,cause:t,entity:a,url:o,method:i,timing:s}={}){super(e,{cause:t}),this.#e=a,this.#t=n,this.#n=o,this.#r=i,this.#o=s}get entity(){return this.#e}get statusCode(){return this.#t.code}get statusText(){return this.#t?.text}get url(){return this.#n}get method(){return this.#r}get timing(){return this.#o}get name(){return"HttpError"}get[Symbol.toStringTag](){return this.name}},Je=class{#e;#t;constructor(n,e){this.#e=n,this.#t=e}get code(){return this.#e}get text(){return this.#t}get[Symbol.toStringTag](){return"ResponseStatus"}toString(){return`${this.#e} ${this.#t}`}},Mn="XSRF-TOKEN",Un="X-XSRF-TOKEN",P={PNG:"image/png",TEXT:"text/plain",JSON:"application/json",HTML:"text/html",JAVA_SCRIPT:"text/javascript",CSS:"text/css",XML:"application/xml",BIN:"application/octet-stream",EVENT_STREAM:"text/event-stream",NDJSON:"application/x-ndjson"},_n={charset:"utf-8"},We=new vr(P.JSON,_n),yr=globalThis.location?.origin??"http://localhost",Fn={DEFAULT:"default",FORCE_CACHE:"force-cache",NO_CACHE:"no-cache",NO_STORE:"no-store",ONLY_IF_CACHED:"only-if-cached",RELOAD:"reload"},z={CONFIGURED:"configured",SUCCESS:"success",ERROR:"error",ABORTED:"aborted",TIMEOUT:"timeout",RETRY:"retry",COMPLETE:"complete",ALL_COMPLETE:"all-complete"},Ee={ABORT:"abort",TIMEOUT:"timeout"},Ie={ABORT:"AbortError",TIMEOUT:"TimeoutError"},$e={once:!0,passive:!0},Cr=()=>new CustomEvent(Ee.ABORT,{detail:{cause:Ie.ABORT}}),Hn=()=>new CustomEvent(Ee.TIMEOUT,{detail:{cause:Ie.TIMEOUT}}),jn=["POST","PUT","PATCH","DELETE"],Gn=new Je(500,"Internal Server Error"),zn=new Je(499,"Aborted"),Bn=new Je(504,"Request Timeout"),br=[408,413,429,500,502,503,504],Tr=["GET","PUT","HEAD","DELETE","OPTIONS"],At=300,Rt=2,qn=class{#e;#t=new AbortController;#n;#r;constructor({signal:n,timeout:e=1/0}={}){if(e<0)throw new RangeError("The timeout cannot be negative");let t=n!=null,a=e!==1/0;if(!t&&!a){this.#e=this.#t.signal,this.#r=!1;return}let o=[this.#t.signal];t&&o.push(n),a&&o.push(AbortSignal.timeout(e)),this.#e=AbortSignal.any(o),this.#r=!0,a&&this.#e.addEventListener(Ee.ABORT,this,$e)}handleEvent({target:{reason:n}}){this.#t.signal.aborted||n instanceof DOMException&&n.name===Ie.TIMEOUT&&this.#e.dispatchEvent(Hn())}get signal(){return this.#e}onAbort(n){return this.#o(Ee.ABORT,n)}onTimeout(n){return this.#o(Ee.TIMEOUT,n)}abort(n=Cr()){this.#t.abort(n.detail?.cause)}destroy(){this.#r&&this.#e.removeEventListener(Ee.ABORT,this,$e);let n=this.#n;if(n!==void 0){for(let[e,t]of n)this.#e.removeEventListener(t,e,$e);n.clear()}return this}#o(n,e){return this.#e.addEventListener(n,e,$e),(this.#n??=new Map).set(e,n),this}get[Symbol.toStringTag](){return"SignalController"}},Ot,Ke,Ze=()=>Ot||(Ot=(typeof document>"u"||typeof DOMParser>"u"||typeof DocumentFragment>"u"?import("jsdom").then(({JSDOM:n})=>{let{window:e}=new n("<!DOCTYPE html><html><head></head><body></body></html>",{url:"http://localhost"});globalThis.window=e,Object.assign(globalThis,{document:e.document,DOMParser:e.DOMParser,DocumentFragment:e.DocumentFragment})}).catch(()=>{throw Ot=void 0,new Error("jsdom is required for HTML/XML/DOM features in Node.js environments. Install it with: npm install jsdom")}):Promise.resolve()).then(()=>Promise.resolve().then(()=>(pr(),mr))).then(({default:n})=>{Ke=n})),Ir=async(n,e)=>(await Ze(),new DOMParser().parseFromString(Ke.sanitize(await n.text()),e)),It=async(n,e)=>{await Ze();let t=URL.createObjectURL(await n.blob());try{return new Promise((a,o)=>e(t,a,o))}finally{URL.revokeObjectURL(t)}},Wn=n=>n.text(),Er=n=>It(n,(e,t,a)=>{let o=Object.assign(document.createElement("script"),{src:e,type:"text/javascript",async:!0});o.onload=()=>{document.head.removeChild(o),t()},o.onerror=()=>{document.head.removeChild(o),a(new Error("Script failed to load"))},document.head.appendChild(o)}),Sr=n=>It(n,(e,t,a)=>{let o=Object.assign(document.createElement("link"),{href:e,type:"text/css",rel:"stylesheet"});o.onload=()=>t(),o.onerror=()=>{document.head.removeChild(o),a(new Error("Stylesheet load failed"))},document.head.appendChild(o)}),Ye=n=>n.json(),$n=n=>n.blob(),wr=n=>It(n,(e,t,a)=>{let o=new Image;o.onload=()=>t(o),o.onerror=()=>a(new Error("Image failed to load")),o.src=e}),Yn=n=>n.arrayBuffer(),Ar=n=>Promise.resolve(n.body),Xe=async n=>Ir(n,"application/xml"),Rr=async n=>Ir(n,"text/html"),Xn=async n=>(await Ze(),document.createRange().createContextualFragment(Ke.sanitize(await n.text()))),Vn=async n=>(await Ze(),document.createRange().createContextualFragment(Ke.sanitize(await n.text(),{ADD_TAGS:["script"]})));async function*Dr(n,e,t){let a=n.getReader(),o=new TextDecoder,i=e.length,s="",l=0;try{for(;;){let u;for(;(u=s.indexOf(e,l))!==-1;)yield s.slice(l,u),l=u+i;l>0&&l>=s.length-l&&(s=l<s.length?s.slice(l):"",l=0);let{done:d,value:m}=await a.read();if(d)break;s+=o.decode(m,{stream:!0})}if(t){let u=((l<s.length?s.slice(l):"")+o.decode()).trim();u&&(yield u)}}finally{await a.cancel()}}var Jn=n=>{let e="message",t="",a,o,i,s=n.split(`
5
+ `);for(let u=0,d,m=s.length;u<m;u++){if(d=s[u],d.charCodeAt(0)===58)continue;let p=d.indexOf(":"),g,S;switch(p===-1?(g=d,S=""):(g=d.slice(0,p),S=d.charCodeAt(p+1)===32?d.slice(p+2):d.slice(p+1)),g){case"event":{e=S;break}case"data":{o===void 0?o=S:(i??=[]).push(S);break}case"id":{t=S;break}case"retry":{let T=parseInt(S,10);isNaN(T)||(a=T);break}}}if(o===void 0&&e==="message")return;let l=i===void 0?o??"":`${o}
6
6
  ${i.join(`
7
- `)}`;return{event:e,data:l,id:t,retry:a}},Xn=n=>({async*[Symbol.asyncIterator](){for await(let e of Nr(n.body,`
7
+ `)}`;return{event:e,data:l,id:t,retry:a}},Kn=n=>({async*[Symbol.asyncIterator](){for await(let e of Dr(n.body,`
8
8
 
9
- `,!1)){if(!e)continue;let t=Yn(e);t&&(yield t)}}}),Vn=n=>({async*[Symbol.asyncIterator](){for await(let e of Nr(n.body,`
10
- `,!0)){let t=e.trim();t&&(yield JSON.parse(t))}}}),Jn=n=>n!==void 0&&_n.includes(n),Kn=n=>n instanceof FormData||n instanceof Blob||n instanceof ArrayBuffer||n instanceof ReadableStream||n instanceof URLSearchParams||ArrayBuffer.isView(n),Zn=n=>{if(typeof document>"u")return;let e=document.cookie;if(!e)return;let t=`${n}=`,a=t.length,o=e.length,i=0;for(;i<o;){for(;i<o&&e.charCodeAt(i)===32;)i++;let s=e.indexOf(";",i);if(s===-1&&(s=o),s-i>=a&&e.startsWith(t,i))return decodeURIComponent(e.slice(i+a,s));i=s+1}},Qn=n=>JSON.stringify(n),Et=n=>n!==null&&typeof n=="string",ea=n=>n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]",_=n=>n!==null&&typeof n=="object"&&!Array.isArray(n)&&Object.getPrototypeOf(n)===Object.prototype,wt=(...n)=>{let e=n.length;if(e===0)return;if(e===1){let[a]=n;return _(a)?St(a):a}let t={};for(let a=0,o=n.length;a<o;a++){let i=n[a];if(!_(i))return;let s=Object.keys(i);for(let l=0,d=s.length;l<d;l++){let c=s[l],m=i[c],p=t[c];if(Array.isArray(m))if(Array.isArray(p)){let T=m.slice();for(let E=0,b=p.length;E<b;E++){let v=p[E];m.includes(v)||T.push(v)}t[c]=T}else t[c]=m.slice();else _(m)?t[c]=_(p)?wt(p,m):St(m):t[c]=m}}return t};function St(n){if(_(n)){let e={},t=Object.keys(n);for(let a=0,o=t.length,i;a<o;a++)i=t[a],e[i]=St(n[i]);return e}return n}var ra=class u{#e;#t;#n;#r;#o;#p;#s={beforeRequest:[],afterResponse:[],beforeError:[]};#f={beforeRequest:0,afterResponse:0,beforeError:0};#l=Object.create(null);static#w=new gt;static#h={beforeRequest:[],afterResponse:[],beforeError:[]};static#m={beforeRequest:0,afterResponse:0,beforeError:0};static#d=Object.create(null);static#g=new Set;static#S=new Map;static#M={limit:0,statusCodes:[],methods:[],delay:yt,backoffFactor:bt};static#L=new WeakMap;static#y=new Map([[Ge.toString(),Ge]]);static#c=new Map;static#A=[[k.TEXT,Bn],[k.JSON,ze],[k.BIN,Er],[k.HTML,wr],[k.XML,qe],[k.PNG,Tr],[k.JAVA_SCRIPT,yr],[k.CSS,br]];constructor(e=mr,t={}){_(e)&&([e,t]=[mr,e]),this.#e=u.#G(e),this.#t=this.#e.origin;let a=this.#e.pathname;this.#n=a.length>0&&a.charCodeAt(a.length-1)===47?a.slice(0,-1):a,this.#r=u.#j(t,u.#P),this.#o=new Headers(this.#r.headers),this.#o.delete("content-type"),this.#p=new gt}static CredentialsPolicy={INCLUDE:"include",OMIT:"omit",SAME_ORIGIN:"same-origin"};static RequestMode={CORS:"cors",NAVIGATE:"navigate",NO_CORS:"no-cors",SAME_ORIGIN:"same-origin"};static RequestPriority={HIGH:"high",LOW:"low",AUTO:"auto"};static RedirectPolicy={ERROR:"error",FOLLOW:"follow",MANUAL:"manual"};static ReferrerPolicy={NO_REFERRER:"no-referrer",NO_REFERRER_WHEN_DOWNGRADE:"no-referrer-when-downgrade",ORIGIN:"origin",ORIGIN_WHEN_CROSS_ORIGIN:"origin-when-cross-origin",SAME_ORIGIN:"same-origin",STRICT_ORIGIN:"strict-origin",STRICT_ORIGIN_WHEN_CROSS_ORIGIN:"strict-origin-when-cross-origin",UNSAFE_URL:"unsafe-url"};static RequestEvent=j;static#P={body:void 0,cache:Pn.NO_STORE,credentials:u.CredentialsPolicy.SAME_ORIGIN,headers:new Headers({"content-type":Ge.toString(),accept:Ge.toString()}),searchParams:void 0,integrity:void 0,keepalive:void 0,method:"GET",mode:u.RequestMode.CORS,priority:u.RequestPriority.AUTO,redirect:u.RedirectPolicy.FOLLOW,referrer:"about:client",referrerPolicy:u.ReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN,signal:void 0,timeout:3e4,global:!0};static register(e,t,a){let o=u.#w.subscribe(e,t,a);return u.#d[e]=(u.#d[e]??0)+1,o}static unregister(e){let t=u.#w.unsubscribe(e);if(t){let a=e.eventName,o=(u.#d[a]??1)-1;o<=0?delete u.#d[a]:u.#d[a]=o}return t}static abortAll(){for(let e of this.#g)e.abort(Or());this.#g.clear()}static all(e){return Promise.all(e)}static async race(e){let t=[],a=new Array(e.length);for(let o=0;o<e.length;o++){let i=new AbortController;t.push(i),a[o]=e[o](i.signal)}try{return await Promise.race(a)}finally{for(let o of t)o.abort()}}static registerContentTypeHandler(e,t){u.#A.unshift([e,t]),u.#c.clear()}static unregisterContentTypeHandler(e){let t=u.#A.findIndex(([a])=>a===e);return t===-1?!1:(u.#A.splice(t,1),u.#c.clear(),!0)}static addHooks(e){let{beforeRequest:t,afterResponse:a,beforeError:o}=e;t&&(u.#h.beforeRequest.push(...t),u.#m.beforeRequest+=t.length),a&&(u.#h.afterResponse.push(...a),u.#m.afterResponse+=a.length),o&&(u.#h.beforeError.push(...o),u.#m.beforeError+=o.length)}static clearHooks(){u.#h={beforeRequest:[],afterResponse:[],beforeError:[]},u.#m.beforeRequest=0,u.#m.afterResponse=0,u.#m.beforeError=0}static unregisterAll(){u.abortAll(),u.#w=new gt,u.#d=Object.create(null),u.clearHooks(),u.#S.clear()}get baseUrl(){return this.#e}register(e,t,a){let o=this.#p.subscribe(e,t,a);return this.#l[e]=(this.#l[e]??0)+1,o}unregister(e){let t=this.#p.unsubscribe(e);if(t){let a=e.eventName,o=(this.#l[a]??1)-1;o<=0?delete this.#l[a]:this.#l[a]=o}return t}addHooks(e){let{beforeRequest:t,afterResponse:a,beforeError:o}=e;return t&&(this.#s.beforeRequest.push(...t),this.#f.beforeRequest+=t.length),a&&(this.#s.afterResponse.push(...a),this.#f.afterResponse+=a.length),o&&(this.#s.beforeError.push(...o),this.#f.beforeError+=o.length),this}clearHooks(){return this.#s.beforeRequest.length=0,this.#s.afterResponse.length=0,this.#s.beforeError.length=0,this.#f.beforeRequest=0,this.#f.afterResponse=0,this.#f.beforeError=0,this}configure({headers:e,searchParams:t,hooks:a,...o}){return e&&(u.#I(this.#r.headers,e),this.#o=new Headers(this.#r.headers),this.#o.delete("content-type")),t&&u.#T(this.#r.searchParams,t),Object.assign(this.#r,o),a&&this.addHooks(a),this}destroy(){this.clearHooks(),this.#p.destroy();for(let e in this.#l)delete this.#l[e]}async get(e,t){return this.#i(e,t)}async post(e,t,a){return this.#O("POST",e,t,a)}async put(e,t,a){return this.#O("PUT",e,t,a)}async patch(e,t,a){return this.#O("PATCH",e,t,a)}async delete(e,t,a){return this.#O("DELETE",e,t,a)}async head(e,t){return this.#C(e,t,{method:"HEAD"})}async options(e,t={}){_(e)&&([e,t]=[void 0,e]);let a=this.#E(t,{method:"OPTIONS"}),{requestOptions:o}=a,i=o.unwrap!==!1,s=o.hooks;try{let l=u.#u(this,e,o.searchParams);await this.#v(o,l,e,s?.beforeRequest);let d=await this.#b(e,a);d=await this.#N(d,o,s?.afterResponse);let c=d.headers.get("allow"),m;if(c){let p=c.split(",");m=new Array(p.length);for(let T=0,E=p.length;T<E;T++)m[T]=p[T].trim()}return this.#a({name:j.SUCCESS,data:m,global:t.global}),i?m:[!0,m]}catch(l){if(!i)return[!1,l];throw l}}async request(e,t={}){_(e)&&([e,t]=[void 0,e]);let a=this.#E(t,{}),o=a.requestOptions.unwrap!==!1;try{let i=await this.#b(e,a);return this.#a({name:j.SUCCESS,data:i,global:t.global}),o?i:[!0,i]}catch(i){if(!o)return[!1,i];throw i}}async getJson(e,t){return this.#i(e,t,{headers:{accept:`${k.JSON}`}},ze)}async getXml(e,t){return this.#i(e,t,{headers:{accept:`${k.XML}`}},qe)}async getHtml(e,t,a){let o=await this.#i(e,t,{headers:{accept:`${k.HTML}`}},wr);return Array.isArray(o)?o:a&&o?o.querySelector(a):o}async getHtmlFragment(e,t,a){let o=(_(e)?e:t)?.allowScripts===!0,i=await this.#i(e,t,{headers:{accept:`${k.HTML}`}},o?$n:Wn);return Array.isArray(i)?i:a&&i?i.querySelector(a):i}async getScript(e,t){return this.#i(e,t,{headers:{accept:`${k.JAVA_SCRIPT}`}},yr)}async getStylesheet(e,t){return this.#i(e,t,{headers:{accept:`${k.CSS}`}},br)}async getBlob(e,t){return this.#i(e,t,{headers:{accept:"application/octet-stream"}},zn)}async getImage(e,t){return this.#i(e,t,{headers:{accept:"image/*"}},Tr)}async getBuffer(e,t){return this.#i(e,t,{headers:{accept:"application/octet-stream"}},qn)}async getStream(e,t){return this.#i(e,t,{headers:{accept:"application/octet-stream"}},Er)}async getEventStream(e,t){_(e)&&([e,t]=[void 0,e]);let a=this.#E(t??{},{method:t?.body?"POST":"GET",headers:{accept:`${k.EVENT_STREAM}`}}),{requestOptions:o}=a,i=o.unwrap!==!1,s=o.hooks;try{let l=u.#u(this,e,o.searchParams);await this.#v(o,l,e,s?.beforeRequest);let d=await this.#b(e,a),c=await this.#N(d,o,s?.afterResponse);this.#a({name:j.SUCCESS,data:c,global:a.global});let m=Xn(c);return i?m:[!0,m]}catch(l){if(!i)return[!1,l];throw l}}async getJsonStream(e,t){_(e)&&([e,t]=[void 0,e]);let a=this.#E(t??{},{method:"GET",headers:{accept:`${k.NDJSON}`}}),{requestOptions:o}=a,i=o.unwrap!==!1,s=o.hooks;try{let l=u.#u(this,e,o.searchParams);await this.#v(o,l,e,s?.beforeRequest);let d=await this.#b(e,a),c=await this.#N(d,o,s?.afterResponse);this.#a({name:j.SUCCESS,data:c,global:a.global});let m=Vn(c);return i?m:[!0,m]}catch(l){if(!i)return[!1,l];throw l}}async#i(e,t,a={},o){return a.method="GET",a.body=void 0,this.#C(e,t,a,o)}async#b(e,t){let{signalController:a,requestOptions:o,global:i}=t;u.#g.add(a);let s=u.#H(o.retry),l=o.method??"GET",d=s.limit>0&&s.methods.includes(l),c=o.dedupe===!0&&(l==="GET"||l==="HEAD"),m=performance.now();try{let p=u.#u(this,e,o.searchParams),T;if(c){T=`${l}:${p.href}`;let ne=u.#S.get(T);if(ne)return(await ne).clone()}let E=o.onUploadProgress,b=o.body;E&&b!=null&&(o.duplex="half");let v=this.#U(p,o,e,l,d,s,b,E,m,i);if(c){u.#S.set(T,v);try{return u.#x(await v,o)}finally{u.#S.delete(T)}}return u.#x(await v,o)}finally{if(u.#g.delete(a.destroy()),!o.signal?.aborted){let p=performance.now();this.#a({name:j.COMPLETE,data:{timing:{start:m,end:p,duration:p-m}},global:i}),u.#g.size===0&&this.#a({name:j.ALL_COMPLETE,global:i})}}}async#U(e,t,a,o,i,s,l,d,c,m){let p=0;for(;;)try{d&&await u.#_(t,l,d);let T=await fetch(e,t);if(!T.ok){if(i&&p<s.limit&&s.statusCodes.includes(T.status)){p++,this.#a({name:j.RETRY,data:{attempt:p,status:T.status,method:o,path:a,timing:u.#R(c)},global:m}),await u.#k(s,p);continue}let E;if(t.captureErrorBody!==!1)try{E=await T.text()}catch{}throw await this.#D(a,T,{entity:E,url:e,method:o,timing:u.#R(c)},t)}return T}catch(T){if(T instanceof Re)throw T;if(i&&p<s.limit){p++,this.#a({name:j.RETRY,data:{attempt:p,error:T.message,method:o,path:a,timing:u.#R(c)},global:m}),await u.#k(s,p);continue}throw await this.#D(a,void 0,{cause:T,url:e,method:o,timing:u.#R(c)},t)}}static async#_(e,t,a){if(t==null)return;let o=null;if(typeof t=="string")o=new TextEncoder().encode(t);else if(t instanceof Blob)o=new Uint8Array(await t.arrayBuffer());else if(ea(t))o=new Uint8Array(t);else if(ArrayBuffer.isView(t))o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);else if(!(t instanceof ReadableStream))return;let i=o?o.byteLength:null,s=o?new ReadableStream({start(c){c.enqueue(o),c.close()}}):t,l=0,d=new TransformStream({transform(c,m){l+=c.byteLength,a({loaded:l,total:i,percentage:i!==null&&i>0?Math.round(l/i*100):null}),m.enqueue(c)}});e.body=s.pipeThrough(d)}static#x(e,t){let a=t.onDownloadProgress;if(!a||!e.body)return e;let o=e.headers.get("content-length"),i=o?parseInt(o,10):null,s=0,l=new TransformStream({transform(d,c){s+=d.byteLength,a({loaded:s,total:i,percentage:i!==null&&i>0?Math.round(s/i*100):null}),c.enqueue(d)}});return new Response(e.body.pipeThrough(l),{status:e.status,statusText:e.statusText,headers:e.headers})}static#R(e){let t=performance.now();return{start:e,end:t,duration:t-e}}static#H(e){if(e===void 0)return u.#M;if(typeof e=="number")return{limit:e,statusCodes:pr,methods:gr,delay:yt,backoffFactor:bt};let t=u.#L.get(e);if(t!==void 0)return t;let a={limit:e.limit??0,statusCodes:e.statusCodes??pr,methods:e.methods??gr,delay:e.delay??yt,backoffFactor:e.backoffFactor??bt};return u.#L.set(e,a),a}static#k(e,t){let a=typeof e.delay=="function"?e.delay(t):e.delay*e.backoffFactor**(t-1);return new Promise(o=>setTimeout(o,a))}#O(e,t,a,o,i){let[s,l,d]=Et(t)?[t,a,o]:[void 0,t,a],c=d!==void 0?Object.assign({},d,{body:l,method:e}):{body:l,method:e};return this.#C(s,c,{},i)}async#v(e,t,a,o){let i=u.#h.beforeRequest,s=this.#s.beforeRequest,l=o===void 0?0:o.length;if(i.length===0&&s.length===0&&l===0)return t;for(let d=0,c=i.length;d<c;d++){let m=await i[d](e,t);m&&(Object.assign(e,m),m.searchParams!==void 0&&(t=u.#u(this,a,e.searchParams)))}for(let d=0,c=s.length;d<c;d++){let m=await s[d](e,t);m&&(Object.assign(e,m),m.searchParams!==void 0&&(t=u.#u(this,a,e.searchParams)))}for(let d=0;d<l;d++){let c=await o[d](e,t);c&&(Object.assign(e,c),c.searchParams!==void 0&&(t=u.#u(this,a,e.searchParams)))}return t}async#N(e,t,a){let o=u.#h.afterResponse,i=this.#s.afterResponse,s=a===void 0?0:a.length;if(o.length===0&&i.length===0&&s===0)return e;for(let l=0,d=o.length;l<d;l++){let c=await o[l](e,t);c&&(e=c)}for(let l=0,d=i.length;l<d;l++){let c=await i[l](e,t);c&&(e=c)}for(let l=0;l<s;l++){let d=await a[l](e,t);d&&(e=d)}return e}async#F(e,t){let a=u.#h.beforeError,o=this.#s.beforeError,i=t===void 0?0:t.length;if(a.length===0&&o.length===0&&i===0)return e;for(let s=0,l=a.length;s<l;s++){let d=await a[s](e);d instanceof Re&&(e=d)}for(let s=0,l=o.length;s<l;s++){let d=await o[s](e);d instanceof Re&&(e=d)}for(let s=0;s<i;s++){let l=await t[s](e);l instanceof Re&&(e=l)}return e}async#C(e,t={},a={},o){_(e)&&([e,t]=[void 0,e]);let i=this.#E(t,a),{requestOptions:s}=i,l=s.unwrap!==!1,d=s.hooks;try{let c=u.#u(this,e,s.searchParams);await this.#v(s,c,e,d?.beforeRequest);let m=await this.#b(e,i);m=await this.#N(m,s,d?.afterResponse);try{!o&&m.status!==204&&(o=this.#q(m.headers.get("content-type")));let p=await o?.(m);return this.#a({name:j.SUCCESS,data:p,global:i.global}),l?p:[!0,p]}catch(p){throw await this.#D(e,m,{cause:p},s)}}catch(c){if(!l)return[!1,c];throw c}}static#j({headers:e,searchParams:t,...a},{headers:o,searchParams:i,...s}){return o=u.#I(new Headers,e,o),i=u.#T(new URLSearchParams,t,i),{...wt(s,a),headers:o,searchParams:i}}static#I(e,...t){for(let a of t)if(a!==void 0)if(a instanceof Headers)a.forEach((o,i)=>e.set(i,o));else if(Array.isArray(a))for(let[o,i]of a)e.set(o,i);else{let o=Object.keys(a);for(let i=0,s=o.length;i<s;i++){let l=o[i],d=a[l];d!==void 0&&e.set(l,d)}}return e}static#T(e,...t){for(let a of t)if(a!==void 0)if(a instanceof URLSearchParams)a.forEach((o,i)=>e.set(i,o));else if(Et(a)||Array.isArray(a))for(let[o,i]of new URLSearchParams(a))e.set(o,i);else{let o=Object.keys(a);for(let i=0;i<o.length;i++){let s=o[i],l=a[s];l!==void 0&&e.set(s,typeof l=="string"?l:String(l))}}return e}#E(e,t){let a=e.headers,o=e.searchParams,i=e.body,s=t.headers,l=t.searchParams,d=t.method??e.method??this.#r.method??"GET",c=Jn(d),m;!c&&a===void 0&&s===void 0?m=new Headers(this.#o):(m=new Headers(this.#r.headers),(a!==void 0||s!==void 0)&&u.#I(m,a,s));let p=this.#r.searchParams,T=p!==void 0&&p.size>0,E;!T&&o===void 0&&l===void 0?E=new URLSearchParams:(E=new URLSearchParams(p),(o!==void 0||l!==void 0)&&u.#T(E,o,l));let b=Object.assign({},this.#r,e,t);if(b.headers=m,b.searchParams=E,c)if(Kn(i))b.body=i,m.delete("content-type");else{let H=this.#r.body,V=_(H)&&_(i)?wt(H,i):i!==void 0?i:H,A=m.get("content-type"),Z=A!==null&&A.includes("json");b.body=Z&&_(V)?Qn(V):V}else b.body instanceof URLSearchParams&&u.#T(E,b.body),b.body=void 0,(a!==void 0||s!==void 0)&&m.delete("content-type");let v=b.signal,ne=b.timeout,ae=b.global??!1,ge=b.xsrf;if(ge){let{cookieName:H,headerName:V}=typeof ge=="object"?ge:{},A=Zn(H??xn);A&&m.set(V??kn,A)}let ve=new Gn({signal:v,timeout:ne}).onAbort(H=>this.#a({name:j.ABORTED,event:H,global:ae})).onTimeout(H=>this.#a({name:j.TIMEOUT,event:H,global:ae}));return b.signal=ve.signal,this.#a({name:j.CONFIGURED,data:b,global:ae}),{signalController:ve,requestOptions:b,global:ae}}static#G(e){if(e instanceof URL)return e;if(!Et(e))throw new TypeError("Invalid URL");return new URL(e,e.startsWith("/")?globalThis.location.origin:void 0)}static#B(e){if(e===null)return;let t=u.#y.get(e);return t!==void 0||(t=Ar.parse(e)??void 0,t!==void 0&&(u.#y.size>=100&&u.#y.delete(u.#y.keys().next().value),u.#y.set(e,t))),t}static#u(e,t,a){let o;if(e instanceof URL){let i=e.pathname,s=i.charCodeAt(i.length-1)===47?i.slice(0,-1):i;o=t?new URL(`${s}${t}`,e.origin):new URL(e)}else o=t?new URL(`${e.#n}${t}`,e.#t):new URL(e.#e);return a&&u.#T(o.searchParams,a),o}static#z(e,{status:t,statusText:a}=new Response){switch(e){case Oe.ABORT:return Fn;case Oe.TIMEOUT:return jn;default:return t>=400?new $e(t,a):Hn}}async#D(e,t,{cause:a,entity:o,url:i,method:s,timing:l}={},d){let c=s&&i?`${s} ${i.href} failed${t?` with status ${t.status}`:""}`:`An error has occurred with your request to: '${e}'`,m=new Re(u.#z(a?.name,t),{message:c,cause:a,entity:o,url:i,method:s,timing:l});return m=await this.#F(m,d?.hooks?.beforeError),this.#a({name:j.ERROR,data:m}),m}#a({name:e,event:t,data:a,global:o=!0}){let i=o&&(u.#d[e]??0)>0,s=(this.#l[e]??0)>0;if(!i&&!s)return;let l=t??new CustomEvent(e);i&&u.#w.publish(e,l,a),s&&this.#p.publish(e,l,a)}#q(e){if(!e)return;let t=u.#c.get(e);if(t!==void 0)return t===null?void 0:t;let a=u.#B(e);if(!a){u.#c.set(e,null);return}let o=u.#A;for(let s=0,l=o.length;s<l;s++){let d=o[s];if(a.matches(d[0])){let c=d[1];return u.#c.set(e,c),c}}let i=a.subtype;if(i.endsWith("+json"))return u.#c.set(e,ze),ze;if(i.endsWith("+xml"))return u.#c.set(e,qe),qe;u.#c.set(e,null)}get[Symbol.toStringTag](){return"Transportr"}};
11
- Object.assign(globalThis, { Transportr: ra });
9
+ `,!1)){if(!e)continue;let t=Jn(e);t&&(yield t)}}}),Zn=n=>({async*[Symbol.asyncIterator](){for await(let e of Dr(n.body,`
10
+ `,!0)){let t=e.trim();t&&(yield JSON.parse(t))}}}),Qn=n=>n!==void 0&&jn.includes(n),ea=n=>n instanceof FormData||n instanceof Blob||n instanceof ArrayBuffer||n instanceof ReadableStream||n instanceof URLSearchParams||ArrayBuffer.isView(n),ta=n=>{if(typeof document>"u")return;let e=document.cookie;if(!e)return;let t=`${n}=`,a=t.length,o=e.length,i=0;for(;i<o;){for(;i<o&&e.charCodeAt(i)===32;)i++;let s=e.indexOf(";",i);if(s===-1&&(s=o),s-i>=a&&e.startsWith(t,i))return decodeURIComponent(e.slice(i+a,s));i=s+1}},ra=n=>JSON.stringify(n),vt=n=>n!==null&&typeof n=="string",na=n=>n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]",j=n=>n!==null&&typeof n=="object"&&!Array.isArray(n)&&Object.getPrototypeOf(n)===Object.prototype,Nt=(...n)=>{let e=n.length;if(e===0)return;if(e===1){let[a]=n;return j(a)?Ct(a):a}let t={};for(let a=0,o=n.length;a<o;a++){let i=n[a];if(!j(i))return;let s=Object.keys(i);for(let l=0,u=s.length;l<u;l++){let d=s[l],m=i[d],p=t[d];if(Array.isArray(m))if(Array.isArray(p)){let g=m.slice();for(let S=0,T=p.length;S<T;S++){let M=p[S];m.includes(M)||g.push(M)}t[d]=g}else t[d]=m.slice();else j(m)?t[d]=j(p)?Nt(p,m):Ct(m):t[d]=m}}return t};function Ct(n){if(j(n)){let e={},t=Object.keys(n);for(let a=0,o=t.length,i;a<o;a++)i=t[a],e[i]=Ct(n[i]);return e}return n}var oa=class h{#e;#t;#n;#r;#o;#p;#s={beforeRequest:[],afterResponse:[],beforeError:[]};#d={beforeRequest:0,afterResponse:0,beforeError:0};#l=Object.create(null);static#S=new wt;static#h={beforeRequest:[],afterResponse:[],beforeError:[]};static#m={beforeRequest:0,afterResponse:0,beforeError:0};static#f=Object.create(null);static#g=new Set;static#w=new Map;static#P={limit:0,statusCodes:[],methods:[],delay:At,backoffFactor:Rt};static#L=new WeakMap;static#y=new Map([[We.toString(),We]]);static#c=new Map;static#A=[[P.TEXT,Wn],[P.JSON,Ye],[P.BIN,Ar],[P.HTML,Rr],[P.XML,Xe],[P.PNG,wr],[P.JAVA_SCRIPT,Er],[P.CSS,Sr]];constructor(e=yr,t={}){j(e)&&([e,t]=[yr,e]),this.#e=h.#G(e),this.#t=this.#e.origin;let a=this.#e.pathname;this.#n=a.length>0&&a.charCodeAt(a.length-1)===47?a.slice(0,-1):a,this.#r=h.#j(t,h.#M),this.#o=new Headers(this.#r.headers),this.#o.delete("content-type"),this.#p=new wt}static CredentialsPolicy={INCLUDE:"include",OMIT:"omit",SAME_ORIGIN:"same-origin"};static RequestMode={CORS:"cors",NAVIGATE:"navigate",NO_CORS:"no-cors",SAME_ORIGIN:"same-origin"};static RequestPriority={HIGH:"high",LOW:"low",AUTO:"auto"};static RedirectPolicy={ERROR:"error",FOLLOW:"follow",MANUAL:"manual"};static ReferrerPolicy={NO_REFERRER:"no-referrer",NO_REFERRER_WHEN_DOWNGRADE:"no-referrer-when-downgrade",ORIGIN:"origin",ORIGIN_WHEN_CROSS_ORIGIN:"origin-when-cross-origin",SAME_ORIGIN:"same-origin",STRICT_ORIGIN:"strict-origin",STRICT_ORIGIN_WHEN_CROSS_ORIGIN:"strict-origin-when-cross-origin",UNSAFE_URL:"unsafe-url"};static RequestEvent=z;static#M={body:void 0,cache:Fn.NO_STORE,credentials:h.CredentialsPolicy.SAME_ORIGIN,headers:new Headers({"content-type":We.toString(),accept:We.toString()}),searchParams:void 0,integrity:void 0,keepalive:void 0,method:"GET",mode:h.RequestMode.CORS,priority:h.RequestPriority.AUTO,redirect:h.RedirectPolicy.FOLLOW,referrer:"about:client",referrerPolicy:h.ReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN,signal:void 0,timeout:3e4,global:!0};static register(e,t,a){let o=h.#S.subscribe(e,t,a);return h.#f[e]=(h.#f[e]??0)+1,o}static unregister(e){let t=h.#S.unsubscribe(e);if(t){let a=e.eventName,o=(h.#f[a]??1)-1;o<=0?delete h.#f[a]:h.#f[a]=o}return t}static abortAll(){for(let e of this.#g)e.abort(Cr());this.#g.clear()}static all(e){return Promise.all(e)}static async race(e){let t=[],a=new Array(e.length);for(let o=0;o<e.length;o++){let i=new AbortController;t.push(i),a[o]=e[o](i.signal)}try{return await Promise.race(a)}finally{for(let o of t)o.abort()}}static registerContentTypeHandler(e,t){h.#A.unshift([e,t]),h.#c.clear()}static unregisterContentTypeHandler(e){let t=h.#A.findIndex(([a])=>a===e);return t===-1?!1:(h.#A.splice(t,1),h.#c.clear(),!0)}static addHooks(e){let{beforeRequest:t,afterResponse:a,beforeError:o}=e;t&&(h.#h.beforeRequest.push(...t),h.#m.beforeRequest+=t.length),a&&(h.#h.afterResponse.push(...a),h.#m.afterResponse+=a.length),o&&(h.#h.beforeError.push(...o),h.#m.beforeError+=o.length)}static clearHooks(){h.#h={beforeRequest:[],afterResponse:[],beforeError:[]},h.#m.beforeRequest=0,h.#m.afterResponse=0,h.#m.beforeError=0}static unregisterAll(){h.abortAll(),h.#S=new wt,h.#f=Object.create(null),h.clearHooks(),h.#w.clear()}get baseUrl(){return this.#e}register(e,t,a){let o=this.#p.subscribe(e,t,a);return this.#l[e]=(this.#l[e]??0)+1,o}unregister(e){let t=this.#p.unsubscribe(e);if(t){let a=e.eventName,o=(this.#l[a]??1)-1;o<=0?delete this.#l[a]:this.#l[a]=o}return t}addHooks(e){let{beforeRequest:t,afterResponse:a,beforeError:o}=e;return t&&(this.#s.beforeRequest.push(...t),this.#d.beforeRequest+=t.length),a&&(this.#s.afterResponse.push(...a),this.#d.afterResponse+=a.length),o&&(this.#s.beforeError.push(...o),this.#d.beforeError+=o.length),this}clearHooks(){return this.#s.beforeRequest.length=0,this.#s.afterResponse.length=0,this.#s.beforeError.length=0,this.#d.beforeRequest=0,this.#d.afterResponse=0,this.#d.beforeError=0,this}configure({headers:e,searchParams:t,hooks:a,...o}){return e&&(h.#I(this.#r.headers,e),this.#o=new Headers(this.#r.headers),this.#o.delete("content-type")),t&&h.#T(this.#r.searchParams,t),Object.assign(this.#r,o),a&&this.addHooks(a),this}destroy(){this.clearHooks(),this.#p.destroy();for(let e in this.#l)delete this.#l[e]}async get(e,t){return this.#i(e,t)}async post(e,t,a){return this.#O("POST",e,t,a)}async put(e,t,a){return this.#O("PUT",e,t,a)}async patch(e,t,a){return this.#O("PATCH",e,t,a)}async delete(e,t,a){return this.#O("DELETE",e,t,a)}async head(e,t){return this.#C(e,t,{method:"HEAD"})}async options(e,t={}){j(e)&&([e,t]=[void 0,e]);let a=this.#E(t,{method:"OPTIONS"}),{requestOptions:o}=a,i=o.unwrap!==!1,s=o.hooks;try{let l=h.#u(this,e,o.searchParams);await this.#v(o,l,e,s?.beforeRequest);let u=await this.#b(e,a);u=await this.#N(u,o,s?.afterResponse);let d=u.headers.get("allow"),m;if(d){let p=d.split(",");m=new Array(p.length);for(let g=0,S=p.length;g<S;g++)m[g]=p[g].trim()}return this.#a({name:z.SUCCESS,data:m,global:t.global}),i?m:[!0,m]}catch(l){if(!i)return[!1,l];throw l}}async request(e,t={}){j(e)&&([e,t]=[void 0,e]);let a=this.#E(t,{}),o=a.requestOptions.unwrap!==!1;try{let i=await this.#b(e,a);return this.#a({name:z.SUCCESS,data:i,global:t.global}),o?i:[!0,i]}catch(i){if(!o)return[!1,i];throw i}}async getJson(e,t){return this.#i(e,t,{headers:{accept:`${P.JSON}`}},Ye)}async getXml(e,t){return this.#i(e,t,{headers:{accept:`${P.XML}`}},Xe)}async getHtml(e,t,a){let o=await this.#i(e,t,{headers:{accept:`${P.HTML}`}},Rr);return Array.isArray(o)?o:a&&o?o.querySelector(a):o}async getHtmlFragment(e,t,a){let o=((j(e)?e:t)?.allowScripts??this.#r.allowScripts)===!0,i=await this.#i(e,t,{headers:{accept:`${P.HTML}`}},o?Vn:Xn);return Array.isArray(i)?i:a&&i?i.querySelector(a):i}async getScript(e,t){return this.#i(e,t,{headers:{accept:`${P.JAVA_SCRIPT}`}},Er)}async getStylesheet(e,t){return this.#i(e,t,{headers:{accept:`${P.CSS}`}},Sr)}async getBlob(e,t){return this.#i(e,t,{headers:{accept:"application/octet-stream"}},$n)}async getImage(e,t){return this.#i(e,t,{headers:{accept:"image/*"}},wr)}async getBuffer(e,t){return this.#i(e,t,{headers:{accept:"application/octet-stream"}},Yn)}async getStream(e,t){return this.#i(e,t,{headers:{accept:"application/octet-stream"}},Ar)}async getEventStream(e,t){j(e)&&([e,t]=[void 0,e]);let a=this.#E(t??{},{method:t?.body?"POST":"GET",headers:{accept:`${P.EVENT_STREAM}`}}),{requestOptions:o}=a,i=o.unwrap!==!1,s=o.hooks;try{let l=h.#u(this,e,o.searchParams);await this.#v(o,l,e,s?.beforeRequest);let u=await this.#b(e,a),d=await this.#N(u,o,s?.afterResponse);this.#a({name:z.SUCCESS,data:d,global:a.global});let m=Kn(d);return i?m:[!0,m]}catch(l){if(!i)return[!1,l];throw l}}async getJsonStream(e,t){j(e)&&([e,t]=[void 0,e]);let a=this.#E(t??{},{method:"GET",headers:{accept:`${P.NDJSON}`}}),{requestOptions:o}=a,i=o.unwrap!==!1,s=o.hooks;try{let l=h.#u(this,e,o.searchParams);await this.#v(o,l,e,s?.beforeRequest);let u=await this.#b(e,a),d=await this.#N(u,o,s?.afterResponse);this.#a({name:z.SUCCESS,data:d,global:a.global});let m=Zn(d);return i?m:[!0,m]}catch(l){if(!i)return[!1,l];throw l}}async#i(e,t,a={},o){return a.method="GET",a.body=void 0,this.#C(e,t,a,o)}async#b(e,t){let{signalController:a,requestOptions:o,global:i}=t;h.#g.add(a);let s=h.#F(o.retry),l=o.method??"GET",u=s.limit>0&&s.methods.includes(l),d=o.dedupe===!0&&(l==="GET"||l==="HEAD"),m=performance.now();try{let p=h.#u(this,e,o.searchParams),g;if(d){g=`${l}:${p.href}`;let K=h.#w.get(g);if(K)return(await K).clone()}let S=o.onUploadProgress,T=o.body;S&&T!=null&&(o.duplex="half");let M=this.#U(p,o,e,l,u,s,T,S,m,i);if(d){h.#w.set(g,M);try{return h.#x(await M,o)}finally{h.#w.delete(g)}}return h.#x(await M,o)}finally{if(h.#g.delete(a.destroy()),!o.signal?.aborted){let p=performance.now();this.#a({name:z.COMPLETE,data:{timing:{start:m,end:p,duration:p-m}},global:i}),h.#g.size===0&&this.#a({name:z.ALL_COMPLETE,global:i})}}}async#U(e,t,a,o,i,s,l,u,d,m){let p=0;for(;;)try{u&&await h.#_(t,l,u);let g=await fetch(e,t);if(!g.ok){if(i&&p<s.limit&&s.statusCodes.includes(g.status)){p++,this.#a({name:z.RETRY,data:{attempt:p,status:g.status,method:o,path:a,timing:h.#R(d)},global:m}),await h.#k(s,p);continue}let S;if(t.captureErrorBody!==!1)try{S=await g.text()}catch{}throw await this.#D(a,g,{entity:S,url:e,method:o,timing:h.#R(d)},t)}return g}catch(g){if(g instanceof Ce)throw g;if(i&&p<s.limit){p++,this.#a({name:z.RETRY,data:{attempt:p,error:g.message,method:o,path:a,timing:h.#R(d)},global:m}),await h.#k(s,p);continue}throw await this.#D(a,void 0,{cause:g,url:e,method:o,timing:h.#R(d)},t)}}static async#_(e,t,a){if(t==null)return;let o=null;if(typeof t=="string")o=new TextEncoder().encode(t);else if(t instanceof Blob)o=new Uint8Array(await t.arrayBuffer());else if(na(t))o=new Uint8Array(t);else if(ArrayBuffer.isView(t))o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);else if(!(t instanceof ReadableStream))return;let i=o?o.byteLength:null,s=o?new ReadableStream({start(d){d.enqueue(o),d.close()}}):t,l=0,u=new TransformStream({transform(d,m){l+=d.byteLength,a({loaded:l,total:i,percentage:i!==null&&i>0?Math.round(l/i*100):null}),m.enqueue(d)}});e.body=s.pipeThrough(u)}static#x(e,t){let a=t.onDownloadProgress;if(!a||!e.body)return e;let o=e.headers.get("content-length"),i=o?parseInt(o,10):null,s=0,l=new TransformStream({transform(u,d){s+=u.byteLength,a({loaded:s,total:i,percentage:i!==null&&i>0?Math.round(s/i*100):null}),d.enqueue(u)}});return new Response(e.body.pipeThrough(l),{status:e.status,statusText:e.statusText,headers:e.headers})}static#R(e){let t=performance.now();return{start:e,end:t,duration:t-e}}static#F(e){if(e===void 0)return h.#P;if(typeof e=="number")return{limit:e,statusCodes:br,methods:Tr,delay:At,backoffFactor:Rt};let t=h.#L.get(e);if(t!==void 0)return t;let a={limit:e.limit??0,statusCodes:e.statusCodes??br,methods:e.methods??Tr,delay:e.delay??At,backoffFactor:e.backoffFactor??Rt};return h.#L.set(e,a),a}static#k(e,t){let a=typeof e.delay=="function"?e.delay(t):e.delay*e.backoffFactor**(t-1);return new Promise(o=>setTimeout(o,a))}#O(e,t,a,o,i){let[s,l,u]=vt(t)?[t,a,o]:[void 0,t,a],d=u!==void 0?Object.assign({},u,{body:l,method:e}):{body:l,method:e};return this.#C(s,d,{},i)}async#v(e,t,a,o){let i=h.#h.beforeRequest,s=this.#s.beforeRequest,l=o===void 0?0:o.length;if(i.length===0&&s.length===0&&l===0)return t;for(let u=0,d=i.length;u<d;u++){let m=await i[u](e,t);m&&(Object.assign(e,m),m.searchParams!==void 0&&(t=h.#u(this,a,e.searchParams)))}for(let u=0,d=s.length;u<d;u++){let m=await s[u](e,t);m&&(Object.assign(e,m),m.searchParams!==void 0&&(t=h.#u(this,a,e.searchParams)))}for(let u=0;u<l;u++){let d=await o[u](e,t);d&&(Object.assign(e,d),d.searchParams!==void 0&&(t=h.#u(this,a,e.searchParams)))}return t}async#N(e,t,a){let o=h.#h.afterResponse,i=this.#s.afterResponse,s=a===void 0?0:a.length;if(o.length===0&&i.length===0&&s===0)return e;for(let l=0,u=o.length;l<u;l++){let d=await o[l](e,t);d&&(e=d)}for(let l=0,u=i.length;l<u;l++){let d=await i[l](e,t);d&&(e=d)}for(let l=0;l<s;l++){let u=await a[l](e,t);u&&(e=u)}return e}async#H(e,t){let a=h.#h.beforeError,o=this.#s.beforeError,i=t===void 0?0:t.length;if(a.length===0&&o.length===0&&i===0)return e;for(let s=0,l=a.length;s<l;s++){let u=await a[s](e);u instanceof Ce&&(e=u)}for(let s=0,l=o.length;s<l;s++){let u=await o[s](e);u instanceof Ce&&(e=u)}for(let s=0;s<i;s++){let l=await t[s](e);l instanceof Ce&&(e=l)}return e}async#C(e,t={},a={},o){j(e)&&([e,t]=[void 0,e]);let i=this.#E(t,a),{requestOptions:s}=i,l=s.unwrap!==!1,u=s.hooks;try{let d=h.#u(this,e,s.searchParams);await this.#v(s,d,e,u?.beforeRequest);let m=await this.#b(e,i);m=await this.#N(m,s,u?.afterResponse);try{!o&&m.status!==204&&(o=this.#q(m.headers.get("content-type")));let p=await o?.(m);return this.#a({name:z.SUCCESS,data:p,global:i.global}),l?p:[!0,p]}catch(p){throw await this.#D(e,m,{cause:p},s)}}catch(d){if(!l)return[!1,d];throw d}}static#j({headers:e,searchParams:t,...a},{headers:o,searchParams:i,...s}){return o=h.#I(new Headers,e,o),i=h.#T(new URLSearchParams,t,i),{...Nt(s,a),headers:o,searchParams:i}}static#I(e,...t){for(let a of t)if(a!==void 0)if(a instanceof Headers)a.forEach((o,i)=>e.set(i,o));else if(Array.isArray(a))for(let[o,i]of a)e.set(o,i);else{let o=Object.keys(a);for(let i=0,s=o.length;i<s;i++){let l=o[i],u=a[l];u!==void 0&&e.set(l,u)}}return e}static#T(e,...t){for(let a of t)if(a!==void 0)if(a instanceof URLSearchParams)a.forEach((o,i)=>e.set(i,o));else if(vt(a)||Array.isArray(a))for(let[o,i]of new URLSearchParams(a))e.set(o,i);else{let o=Object.keys(a);for(let i=0;i<o.length;i++){let s=o[i],l=a[s];l!==void 0&&e.set(s,typeof l=="string"?l:String(l))}}return e}#E(e,t){let a=e.headers,o=e.searchParams,i=e.body,s=t.headers,l=t.searchParams,u=t.method??e.method??this.#r.method??"GET",d=Qn(u),m;!d&&a===void 0&&s===void 0?m=new Headers(this.#o):(m=new Headers(this.#r.headers),(a!==void 0||s!==void 0)&&h.#I(m,a,s));let p=this.#r.searchParams,g=p!==void 0&&p.size>0,S;!g&&o===void 0&&l===void 0?S=new URLSearchParams:(S=new URLSearchParams(p),(o!==void 0||l!==void 0)&&h.#T(S,o,l));let T=Object.assign({},this.#r,e,t);if(T.headers=m,T.searchParams=S,d)if(ea(i))T.body=i,m.delete("content-type");else{let R=this.#r.body,G=j(R)&&j(i)?Nt(R,i):i!==void 0?i:R,D=m.get("content-type"),ne=D!==null&&D.includes("json");T.body=ne&&j(G)?ra(G):G}else T.body instanceof URLSearchParams&&h.#T(S,T.body),T.body=void 0,(a!==void 0||s!==void 0)&&m.delete("content-type");let M=T.signal,K=T.timeout,Z=T.global??!1,ee=T.xsrf;if(ee){let{cookieName:R,headerName:G}=typeof ee=="object"?ee:{},D=ta(R??Mn);D&&m.set(G??Un,D)}let De=new qn({signal:M,timeout:K}).onAbort(R=>this.#a({name:z.ABORTED,event:R,global:Z})).onTimeout(R=>this.#a({name:z.TIMEOUT,event:R,global:Z}));return T.signal=De.signal,this.#a({name:z.CONFIGURED,data:T,global:Z}),{signalController:De,requestOptions:T,global:Z}}static#G(e){if(e instanceof URL)return e;if(!vt(e))throw new TypeError("Invalid URL");return new URL(e,e.startsWith("/")?globalThis.location.origin:void 0)}static#z(e){if(e===null)return;let t=h.#y.get(e);return t!==void 0||(t=vr.parse(e)??void 0,t!==void 0&&(h.#y.size>=100&&h.#y.delete(h.#y.keys().next().value),h.#y.set(e,t))),t}static#u(e,t,a){let o;if(e instanceof URL){let i=e.pathname,s=i.charCodeAt(i.length-1)===47?i.slice(0,-1):i;o=t?new URL(`${s}${t}`,e.origin):new URL(e)}else o=t?new URL(`${e.#n}${t}`,e.#t):new URL(e.#e);return a&&h.#T(o.searchParams,a),o}static#B(e,{status:t,statusText:a}=new Response){switch(e){case Ie.ABORT:return zn;case Ie.TIMEOUT:return Bn;default:return t>=400?new Je(t,a):Gn}}async#D(e,t,{cause:a,entity:o,url:i,method:s,timing:l}={},u){let d=s&&i?`${s} ${i.href} failed${t?` with status ${t.status}`:""}`:`An error has occurred with your request to: '${e}'`,m=new Ce(h.#B(a?.name,t),{message:d,cause:a,entity:o,url:i,method:s,timing:l});return m=await this.#H(m,u?.hooks?.beforeError),this.#a({name:z.ERROR,data:m}),m}#a({name:e,event:t,data:a,global:o=!0}){let i=o&&(h.#f[e]??0)>0,s=(this.#l[e]??0)>0;if(!i&&!s)return;let l=t??new CustomEvent(e);i&&h.#S.publish(e,l,a),s&&this.#p.publish(e,l,a)}#q(e){if(!e)return;let t=h.#c.get(e);if(t!==void 0)return t===null?void 0:t;let a=h.#z(e);if(!a){h.#c.set(e,null);return}let o=h.#A;for(let s=0,l=o.length;s<l;s++){let u=o[s];if(a.matches(u[0])){let d=u[1];return h.#c.set(e,d),d}}let i=a.subtype;if(i.endsWith("+json"))return h.#c.set(e,Ye),Ye;if(i.endsWith("+xml"))return h.#c.set(e,Xe),Xe;h.#c.set(e,null)}get[Symbol.toStringTag](){return"Transportr"}};
11
+ Object.assign(globalThis, { Transportr: oa });
12
12
  })();
13
13
  /*! Bundled license information:
14
14
 
15
15
  dompurify/dist/purify.es.mjs:
16
- (*! @license DOMPurify 3.4.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.4.5/LICENSE *)
16
+ (*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE *)
17
17
  */
18
18
 
19
19
  //# sourceMappingURL=transportr.js.map