const nr="modulepreload",rr=function(r,o){return new URL(r,o).href},un={},Eo=function(r,o,c){let l=Promise.resolve();if(o&&o.length>0){let p=function(g){return Promise.all(g.map(i=>Promise.resolve(i).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};const y=document.getElementsByTagName("link"),T=document.querySelector("meta[property=csp-nonce]"),h=T?.nonce||T?.getAttribute("nonce");l=p(o.map(g=>{if(g=rr(g,c),g in un)return;un[g]=!0;const i=g.endsWith(".css"),w=i?'[rel="stylesheet"]':"";if(c)for(let R=y.length-1;R>=0;R--){const S=y[R];if(S.href===g&&(!i||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${w}`))return;const A=document.createElement("link");if(A.rel=i?"stylesheet":nr,i||(A.as="script"),A.crossOrigin="",A.href=g,h&&A.setAttribute("nonce",h),document.head.appendChild(A),i)return new Promise((R,S)=>{A.addEventListener("load",R),A.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${g}`)))})}))}function d(p){const y=new Event("vite:preloadError",{cancelable:!0});if(y.payload=p,window.dispatchEvent(y),!y.defaultPrevented)throw p}return l.then(p=>{for(const y of p||[])y.status==="rejected"&&d(y.reason);return r().catch(d)})},yo=globalThis||void 0||self,{entries:xn,setPrototypeOf:ln,isFrozen:or,getPrototypeOf:ir,getOwnPropertyDescriptor:sr}=Object;let{freeze:q,seal:tt,create:Fe}=Object,{apply:Ge,construct:je}=typeof Reflect<"u"&&Reflect;q||(q=function(r){return r}),tt||(tt=function(r){return r}),Ge||(Ge=function(r,o){for(var c=arguments.length,l=new Array(c>2?c-2:0),d=2;d1?o-1:0),l=1;l1?c-1:0),d=1;d2&&arguments[2]!==void 0?arguments[2]:le;ln&&ln(r,null);let l=o.length;for(;l--;){let d=o[l];if(typeof d=="string"){const p=c(d);p!==d&&(or(o)||(o[l]=p),d=p)}r[d]=!0}return r}function hr(r){for(let o=0;o/gm),Er=tt(/\$\{[\w\W]*/gm),yr=tt(/^data-[\-\w.\u00B7-\uFFFF]+$/),br=tt(/^aria-[\-\w]+$/),Dn=tt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wr=tt(/^(?:\w+script|data):/i),Tr=tt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Bn=tt(/^html$/i),Ir=tt(/^[a-z][.\w]*(-[.\w]+)+$/i);var mn=Object.freeze({__proto__:null,ARIA_ATTR:br,ATTR_WHITESPACE:Tr,CUSTOM_ELEMENT:Ir,DATA_ATTR:yr,DOCTYPE_NAME:Bn,ERB_EXPR:mr,IS_ALLOWED_URI:Dn,IS_SCRIPT_OR_DATA:wr,MUSTACHE_EXPR:gr,TMPLIT_EXPR:Er});const Kt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ar=function(){return typeof window>"u"?null:window},Rr=function(r,o){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let c=null;const l="data-tt-policy-suffix";o&&o.hasAttribute(l)&&(c=o.getAttribute(l));const d="dompurify"+(c?"#"+c:"");try{return r.createPolicy(d,{createHTML(p){return p},createScriptURL(p){return p}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},En=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Mn(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ar();const o=s=>Mn(s);if(o.version="3.3.0",o.removed=[],!r||!r.document||r.document.nodeType!==Kt.document||!r.Element)return o.isSupported=!1,o;let{document:c}=r;const l=c,d=l.currentScript,{DocumentFragment:p,HTMLTemplateElement:y,Node:T,Element:h,NodeFilter:g,NamedNodeMap:i=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:w,DOMParser:A,trustedTypes:R}=r,S=h.prototype,I=qt(S,"cloneNode"),Z=qt(S,"remove"),X=qt(S,"nextSibling"),Q=qt(S,"childNodes"),W=qt(S,"parentNode");if(typeof y=="function"){const s=c.createElement("template");s.content&&s.content.ownerDocument&&(c=s.content.ownerDocument)}let C,Lt="";const{implementation:St,createNodeIterator:ge,createDocumentFragment:ft,getElementsByTagName:Jt}=c,{importNode:te}=l;let j=En();o.isSupported=typeof xn=="function"&&typeof W=="function"&&St&&St.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Ft,ERB_EXPR:Gt,TMPLIT_EXPR:jt,DATA_ATTR:me,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:ee,ATTR_WHITESPACE:zt,CUSTOM_ELEMENT:ye}=mn;let{IS_ALLOWED_URI:ne}=mn,P=null;const re=v({},[...hn,...Re,...ve,...Le,...pn]);let F=null;const M=v({},[...dn,...Ne,...gn,...ue]);let L=Object.seal(Fe(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}})),Tt=null,Ct=null;const ht=Object.seal(Fe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ht=!0,xt=!0,pt=!1,Dt=!0,dt=!1,Bt=!0,it=!1,st=!1,gt=!1,It=!1,Mt=!1,At=!1,oe=!0,ie=!1;const se="user-content-";let Rt=!0,V=!1,at={},vt=null;const et=v({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ae=null;const t=v({},["audio","video","img","source","image","track"]);let e=null;const n=v({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),a="http://www.w3.org/1998/Math/MathML",u="http://www.w3.org/2000/svg",f="http://www.w3.org/1999/xhtml";let m=f,O=!1,U=null;const x=v({},[a,u,f],Ie);let N=v({},["mi","mo","mn","ms","mtext"]),D=v({},["annotation-xml"]);const qn=v({},["title","style","font","a","script"]);let Xt=null;const Kn=["application/xhtml+xml","text/html"],Zn="text/html";let G=null,Ut=null;const Qn=c.createElement("form"),Ze=function(s){return s instanceof RegExp||s instanceof Function},be=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ut&&Ut===s)){if((!s||typeof s!="object")&&(s={}),s=bt(s),Xt=Kn.indexOf(s.PARSER_MEDIA_TYPE)===-1?Zn:s.PARSER_MEDIA_TYPE,G=Xt==="application/xhtml+xml"?Ie:le,P=ot(s,"ALLOWED_TAGS")?v({},s.ALLOWED_TAGS,G):re,F=ot(s,"ALLOWED_ATTR")?v({},s.ALLOWED_ATTR,G):M,U=ot(s,"ALLOWED_NAMESPACES")?v({},s.ALLOWED_NAMESPACES,Ie):x,e=ot(s,"ADD_URI_SAFE_ATTR")?v(bt(n),s.ADD_URI_SAFE_ATTR,G):n,ae=ot(s,"ADD_DATA_URI_TAGS")?v(bt(t),s.ADD_DATA_URI_TAGS,G):t,vt=ot(s,"FORBID_CONTENTS")?v({},s.FORBID_CONTENTS,G):et,Tt=ot(s,"FORBID_TAGS")?v({},s.FORBID_TAGS,G):bt({}),Ct=ot(s,"FORBID_ATTR")?v({},s.FORBID_ATTR,G):bt({}),at=ot(s,"USE_PROFILES")?s.USE_PROFILES:!1,Ht=s.ALLOW_ARIA_ATTR!==!1,xt=s.ALLOW_DATA_ATTR!==!1,pt=s.ALLOW_UNKNOWN_PROTOCOLS||!1,Dt=s.ALLOW_SELF_CLOSE_IN_ATTR!==!1,dt=s.SAFE_FOR_TEMPLATES||!1,Bt=s.SAFE_FOR_XML!==!1,it=s.WHOLE_DOCUMENT||!1,It=s.RETURN_DOM||!1,Mt=s.RETURN_DOM_FRAGMENT||!1,At=s.RETURN_TRUSTED_TYPE||!1,gt=s.FORCE_BODY||!1,oe=s.SANITIZE_DOM!==!1,ie=s.SANITIZE_NAMED_PROPS||!1,Rt=s.KEEP_CONTENT!==!1,V=s.IN_PLACE||!1,ne=s.ALLOWED_URI_REGEXP||Dn,m=s.NAMESPACE||f,N=s.MATHML_TEXT_INTEGRATION_POINTS||N,D=s.HTML_INTEGRATION_POINTS||D,L=s.CUSTOM_ELEMENT_HANDLING||{},s.CUSTOM_ELEMENT_HANDLING&&Ze(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(L.tagNameCheck=s.CUSTOM_ELEMENT_HANDLING.tagNameCheck),s.CUSTOM_ELEMENT_HANDLING&&Ze(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(L.attributeNameCheck=s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),s.CUSTOM_ELEMENT_HANDLING&&typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(L.allowCustomizedBuiltInElements=s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),dt&&(xt=!1),Mt&&(It=!0),at&&(P=v({},pn),F=[],at.html===!0&&(v(P,hn),v(F,dn)),at.svg===!0&&(v(P,Re),v(F,Ne),v(F,ue)),at.svgFilters===!0&&(v(P,ve),v(F,Ne),v(F,ue)),at.mathMl===!0&&(v(P,Le),v(F,gn),v(F,ue))),s.ADD_TAGS&&(typeof s.ADD_TAGS=="function"?ht.tagCheck=s.ADD_TAGS:(P===re&&(P=bt(P)),v(P,s.ADD_TAGS,G))),s.ADD_ATTR&&(typeof s.ADD_ATTR=="function"?ht.attributeCheck=s.ADD_ATTR:(F===M&&(F=bt(F)),v(F,s.ADD_ATTR,G))),s.ADD_URI_SAFE_ATTR&&v(e,s.ADD_URI_SAFE_ATTR,G),s.FORBID_CONTENTS&&(vt===et&&(vt=bt(vt)),v(vt,s.FORBID_CONTENTS,G)),Rt&&(P["#text"]=!0),it&&v(P,["html","head","body"]),P.table&&(v(P,["tbody"]),delete Tt.tbody),s.TRUSTED_TYPES_POLICY){if(typeof s.TRUSTED_TYPES_POLICY.createHTML!="function")throw Yt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof s.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Yt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=s.TRUSTED_TYPES_POLICY,Lt=C.createHTML("")}else C===void 0&&(C=Rr(R,d)),C!==null&&typeof Lt=="string"&&(Lt=C.createHTML(""));q&&q(s),Ut=s}},Qe=v({},[...Re,...ve,...pr]),Je=v({},[...Le,...dr]),Jn=function(s){let b=W(s);(!b||!b.tagName)&&(b={namespaceURI:m,tagName:"template"});const E=le(s.tagName),_=le(b.tagName);return U[s.namespaceURI]?s.namespaceURI===u?b.namespaceURI===f?E==="svg":b.namespaceURI===a?E==="svg"&&(_==="annotation-xml"||N[_]):!!Qe[E]:s.namespaceURI===a?b.namespaceURI===f?E==="math":b.namespaceURI===u?E==="math"&&D[_]:!!Je[E]:s.namespaceURI===f?b.namespaceURI===u&&!D[_]||b.namespaceURI===a&&!N[_]?!1:!Je[E]&&(qn[E]||!Qe[E]):!!(Xt==="application/xhtml+xml"&&U[s.namespaceURI]):!1},Nt=function(s){Wt(o.removed,{element:s});try{W(s).removeChild(s)}catch{Z(s)}},Ot=function(s,b){try{Wt(o.removed,{attribute:b.getAttributeNode(s),from:b})}catch{Wt(o.removed,{attribute:null,from:b})}if(b.removeAttribute(s),s==="is")if(It||Mt)try{Nt(b)}catch{}else try{b.setAttribute(s,"")}catch{}},tn=function(s){let b=null,E=null;if(gt)s=""+s;else{const B=Ae(s,/^[\r\n\t ]+/);E=B&&B[0]}Xt==="application/xhtml+xml"&&m===f&&(s=''+s+"");const _=C?C.createHTML(s):s;if(m===f)try{b=new A().parseFromString(_,Xt)}catch{}if(!b||!b.documentElement){b=St.createDocument(m,"template",null);try{b.documentElement.innerHTML=O?Lt:_}catch{}}const z=b.body||b.documentElement;return s&&E&&z.insertBefore(c.createTextNode(E),z.childNodes[0]||null),m===f?Jt.call(b,it?"html":"body")[0]:it?b.documentElement:z},en=function(s){return ge.call(s.ownerDocument||s,s,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},we=function(s){return s instanceof w&&(typeof s.nodeName!="string"||typeof s.textContent!="string"||typeof s.removeChild!="function"||!(s.attributes instanceof i)||typeof s.removeAttribute!="function"||typeof s.setAttribute!="function"||typeof s.namespaceURI!="string"||typeof s.insertBefore!="function"||typeof s.hasChildNodes!="function")},nn=function(s){return typeof T=="function"&&s instanceof T};function mt(s,b,E){ce(s,_=>{_.call(o,b,E,Ut)})}const rn=function(s){let b=null;if(mt(j.beforeSanitizeElements,s,null),we(s))return Nt(s),!0;const E=G(s.nodeName);if(mt(j.uponSanitizeElement,s,{tagName:E,allowedTags:P}),Bt&&s.hasChildNodes()&&!nn(s.firstElementChild)&&Y(/<[/\w!]/g,s.innerHTML)&&Y(/<[/\w!]/g,s.textContent)||s.nodeType===Kt.progressingInstruction||Bt&&s.nodeType===Kt.comment&&Y(/<[/\w]/g,s.data))return Nt(s),!0;if(!(ht.tagCheck instanceof Function&&ht.tagCheck(E))&&(!P[E]||Tt[E])){if(!Tt[E]&&sn(E)&&(L.tagNameCheck instanceof RegExp&&Y(L.tagNameCheck,E)||L.tagNameCheck instanceof Function&&L.tagNameCheck(E)))return!1;if(Rt&&!vt[E]){const _=W(s)||s.parentNode,z=Q(s)||s.childNodes;if(z&&_){const B=z.length;for(let Et=B-1;Et>=0;--Et){const nt=I(z[Et],!0);nt.__removalCount=(s.__removalCount||0)+1,_.insertBefore(nt,X(s))}}}return Nt(s),!0}return s instanceof h&&!Jn(s)||(E==="noscript"||E==="noembed"||E==="noframes")&&Y(/<\/no(script|embed|frames)/i,s.innerHTML)?(Nt(s),!0):(dt&&s.nodeType===Kt.text&&(b=s.textContent,ce([Ft,Gt,jt],_=>{b=Vt(b,_," ")}),s.textContent!==b&&(Wt(o.removed,{element:s.cloneNode()}),s.textContent=b)),mt(j.afterSanitizeElements,s,null),!1)},on=function(s,b,E){if(oe&&(b==="id"||b==="name")&&(E in c||E in Qn))return!1;if(!(xt&&!Ct[b]&&Y(me,b))&&!(Ht&&Y(Ee,b))&&!(ht.attributeCheck instanceof Function&&ht.attributeCheck(b,s))){if(!F[b]||Ct[b]){if(!(sn(s)&&(L.tagNameCheck instanceof RegExp&&Y(L.tagNameCheck,s)||L.tagNameCheck instanceof Function&&L.tagNameCheck(s))&&(L.attributeNameCheck instanceof RegExp&&Y(L.attributeNameCheck,b)||L.attributeNameCheck instanceof Function&&L.attributeNameCheck(b,s))||b==="is"&&L.allowCustomizedBuiltInElements&&(L.tagNameCheck instanceof RegExp&&Y(L.tagNameCheck,E)||L.tagNameCheck instanceof Function&&L.tagNameCheck(E))))return!1}else if(!e[b]&&!Y(ne,Vt(E,zt,""))&&!((b==="src"||b==="xlink:href"||b==="href")&&s!=="script"&&ur(E,"data:")===0&&ae[s])&&!(pt&&!Y(ee,Vt(E,zt,"")))&&E)return!1}return!0},sn=function(s){return s!=="annotation-xml"&&Ae(s,ye)},an=function(s){mt(j.beforeSanitizeAttributes,s,null);const{attributes:b}=s;if(!b||we(s))return;const E={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let _=b.length;for(;_--;){const z=b[_],{name:B,namespaceURI:Et,value:nt}=z,rt=G(B),Te=nt;let H=B==="value"?Te:lr(Te);if(E.attrName=rt,E.attrValue=H,E.keepAttr=!0,E.forceKeepAttr=void 0,mt(j.uponSanitizeAttribute,s,E),H=E.attrValue,ie&&(rt==="id"||rt==="name")&&(Ot(B,s),H=se+H),Bt&&Y(/((--!?|])>)|<\/(style|title|textarea)/i,H)){Ot(B,s);continue}if(rt==="attributename"&&Ae(H,"href")){Ot(B,s);continue}if(E.forceKeepAttr)continue;if(!E.keepAttr){Ot(B,s);continue}if(!Dt&&Y(/\/>/i,H)){Ot(B,s);continue}dt&&ce([Ft,Gt,jt],er=>{H=Vt(H,er," ")});const cn=G(s.nodeName);if(!on(cn,rt,H)){Ot(B,s);continue}if(C&&typeof R=="object"&&typeof R.getAttributeType=="function"&&!Et)switch(R.getAttributeType(cn,rt)){case"TrustedHTML":{H=C.createHTML(H);break}case"TrustedScriptURL":{H=C.createScriptURL(H);break}}if(H!==Te)try{Et?s.setAttributeNS(Et,B,H):s.setAttribute(B,H),we(s)?Nt(s):fn(o.removed)}catch{Ot(B,s)}}mt(j.afterSanitizeAttributes,s,null)},tr=function s(b){let E=null;const _=en(b);for(mt(j.beforeSanitizeShadowDOM,b,null);E=_.nextNode();)mt(j.uponSanitizeShadowNode,E,null),rn(E),an(E),E.content instanceof p&&s(E.content);mt(j.afterSanitizeShadowDOM,b,null)};return o.sanitize=function(s){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,_=null,z=null,B=null;if(O=!s,O&&(s=""),typeof s!="string"&&!nn(s))if(typeof s.toString=="function"){if(s=s.toString(),typeof s!="string")throw Yt("dirty is not a string, aborting")}else throw Yt("toString is not a function");if(!o.isSupported)return s;if(st||be(b),o.removed=[],typeof s=="string"&&(V=!1),V){if(s.nodeName){const rt=G(s.nodeName);if(!P[rt]||Tt[rt])throw Yt("root node is forbidden and cannot be sanitized in-place")}}else if(s instanceof T)E=tn(""),_=E.ownerDocument.importNode(s,!0),_.nodeType===Kt.element&&_.nodeName==="BODY"||_.nodeName==="HTML"?E=_:E.appendChild(_);else{if(!It&&!dt&&!it&&s.indexOf("<")===-1)return C&&At?C.createHTML(s):s;if(E=tn(s),!E)return It?null:At?Lt:""}E&>&&Nt(E.firstChild);const Et=en(V?s:E);for(;z=Et.nextNode();)rn(z),an(z),z.content instanceof p&&tr(z.content);if(V)return s;if(It){if(Mt)for(B=ft.call(E.ownerDocument);E.firstChild;)B.appendChild(E.firstChild);else B=E;return(F.shadowroot||F.shadowrootmode)&&(B=te.call(l,B,!0)),B}let nt=it?E.outerHTML:E.innerHTML;return it&&P["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&Y(Bn,E.ownerDocument.doctype.name)&&(nt=" `+nt),dt&&ce([Ft,Gt,jt],rt=>{nt=Vt(nt,rt," ")}),C&&At?C.createHTML(nt):nt},o.setConfig=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};be(s),st=!0},o.clearConfig=function(){Ut=null,st=!1},o.isValidAttribute=function(s,b,E){Ut||be({});const _=G(s),z=G(b);return on(_,z,E)},o.addHook=function(s,b){typeof b=="function"&&Wt(j[s],b)},o.removeHook=function(s,b){if(b!==void 0){const E=ar(j[s],b);return E===-1?void 0:cr(j[s],E,1)[0]}return fn(j[s])},o.removeHooks=function(s){j[s]=[]},o.removeAllHooks=function(){j=En()},o}var vr=Mn();const Lr=r=>"/remote.php/"+r,Nr=(r,o)=>Ye()+Lr(r),Or=(r,o,c)=>{const l=Object.assign({ocsVersion:2},c||{}).ocsVersion===1?1:2;return(c?.baseURL??Ye())+"/ocs/v"+l+".php"+ze(r,o,c)},ze=(r,o,c)=>{const l=Object.assign({escape:!0},c||{}),d=function(p,y){return y=y||{},p.replace(/{([^{}]*)}/g,function(T,h){const g=y[h];return l.escape?encodeURIComponent(typeof g=="string"||typeof g=="number"?g.toString():T):typeof g=="string"||typeof g=="number"?g.toString():T})};return r.charAt(0)!=="/"&&(r="/"+r),d(r,o||{})},_r=(r,o,c)=>{const l=Object.assign({noRewrite:!1},c||{}),d=c?.baseURL??de();return window?.OC?.config?.modRewriteWorking===!0&&!l.noRewrite?d+ze(r,o,c):d+"/index.php"+ze(r,o,c)},Sr=(r,o)=>o.includes(".")?He(r,"img",o):He(r,"img",`${o}.svg`),He=(r,o,c)=>{const l=window?.OC?.coreApps?.includes(r)??!1,d=c.slice(-3)==="php";let p=de();return d&&!l?(p+=`/index.php/apps/${r}`,p+=`/${encodeURI(o)}`,c!=="index.php"&&(p+=`/${c}`)):!d&&!l?(p=Un(r),p+=`/${o}/`,p.at(-1)!=="/"&&(p+="/"),p+=c):(p+=`/${r}`,p+=`/${o}`,p+=`/${c}`),p},Ye=()=>window.location.protocol+"//"+window.location.host+de();function de(){let r=window._oc_webroot;if(typeof r>"u"){r=location.pathname;const o=r.indexOf("/index.php/");if(o!==-1)r=r.slice(0,o);else{const c=r.indexOf("/",1);r=r.slice(0,c>0?c:void 0)}}return r}function Un(r){return(window._oc_appswebroots??{})[r]??""}const bo=Object.freeze(Object.defineProperty({__proto__:null,generateFilePath:He,generateOcsUrl:Or,generateRemoteUrl:Nr,generateUrl:_r,getAppRootUrl:Un,getBaseUrl:Ye,getRootUrl:de,imagePath:Sr},Symbol.toStringTag,{value:"Module"}));function qe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Oe,yn;function Cr(){if(yn)return Oe;yn=1;var r=/["'&<>]/;Oe=o;function o(c){var l=""+c,d=r.exec(l);if(!d)return l;var p,y="",T=0,h=0;for(T=d.index;To)}}globalThis._oc_l10n_registry_translations??={},globalThis._oc_l10n_registry_plural_functions??={};function _e(r,o,c,l,d){const p=typeof c=="object"?c:void 0,y=typeof l=="number"?l:typeof c=="number"?c:void 0,T={escape:!0,sanitize:!0,...typeof d=="object"?d:typeof l=="object"?l:{}},h=S=>S,g=(T.sanitize?vr.sanitize:h)||h,i=T.escape?bn:h,w=S=>typeof S=="string"||typeof S=="number",A=(S,I,Z)=>S.replace(/%n/g,""+Z).replace(/{([^{}]*)}/g,(X,Q)=>{if(I===void 0||!(Q in I))return i(X);const W=I[Q];return w(W)?i(`${W}`):typeof W=="object"&&w(W.value)?(W.escape!==!1?bn:h)(`${W.value}`):i(X)});let R=(d?.bundle??Pn(r)).translations[o]||o;return R=Array.isArray(R)?R[0]:R,g(typeof p=="object"||y!==void 0?A(R,p,y):R)}function Io(r,o,c,l,d,p){const y="_"+o+"_::_"+c+"_",T=p?.bundle??Pn(r),h=T.translations[y];if(typeof h<"u"){const g=h;if(Array.isArray(g)){const i=T.pluralFunction(l);return _e(r,g[i],d,l,p)}}return l===1?_e(r,o,d,l,p):_e(r,c,d,l,p)}function Ao(r,o=kn()){switch(o==="pt-BR"&&(o="xbr"),o.length>3&&(o=o.substring(0,o.lastIndexOf("-"))),o){case"az":case"bo":case"dz":case"id":case"ja":case"jv":case"ka":case"km":case"kn":case"ko":case"ms":case"th":case"tr":case"vi":case"zh":return 0;case"af":case"bn":case"bg":case"ca":case"da":case"de":case"el":case"en":case"eo":case"es":case"et":case"eu":case"fa":case"fi":case"fo":case"fur":case"fy":case"gl":case"gu":case"ha":case"he":case"hu":case"is":case"it":case"ku":case"lb":case"ml":case"mn":case"mr":case"nah":case"nb":case"ne":case"nl":case"nn":case"no":case"oc":case"om":case"or":case"pa":case"pap":case"ps":case"pt":case"so":case"sq":case"sv":case"sw":case"ta":case"te":case"tk":case"ur":case"zu":return r===1?0:1;case"am":case"bh":case"fil":case"fr":case"gun":case"hi":case"hy":case"ln":case"mg":case"nso":case"xbr":case"ti":case"wa":return r===0||r===1?0:1;case"be":case"bs":case"hr":case"ru":case"sh":case"sr":case"uk":return r%10===1&&r%100!==11?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2;case"cs":case"sk":return r===1?0:r>=2&&r<=4?1:2;case"ga":return r===1?0:r===2?1:2;case"lt":return r%10===1&&r%100!==11?0:r%10>=2&&(r%100<10||r%100>=20)?1:2;case"sl":return r%100===1?0:r%100===2?1:r%100===3||r%100===4?2:3;case"mk":return r%10===1?0:1;case"mt":return r===1?0:r===0||r%100>1&&r%100<11?1:r%100>10&&r%100<20?2:3;case"lv":return r===0?0:r%10===1&&r%100!==11?1:2;case"pl":return r===1?0:r%10>=2&&r%10<=4&&(r%100<12||r%100>14)?1:2;case"cy":return r===1?0:r===2?1:r===8||r===11?2:3;case"ro":return r===1?0:r===0||r%100>0&&r%100<20?1:2;case"ar":return r===0?0:r===1?1:r===2?2:r%100>=3&&r%100<=10?3:r%100>=11&&r%100<=99?4:5;default:return 0}}function Br(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var $n={exports:{}},k=$n.exports={},ct,ut;function Xe(){throw new Error("setTimeout has not been defined")}function We(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ct=setTimeout:ct=Xe}catch{ct=Xe}try{typeof clearTimeout=="function"?ut=clearTimeout:ut=We}catch{ut=We}})();function Fn(r){if(ct===setTimeout)return setTimeout(r,0);if((ct===Xe||!ct)&&setTimeout)return ct=setTimeout,setTimeout(r,0);try{return ct(r,0)}catch{try{return ct.call(null,r,0)}catch{return ct.call(this,r,0)}}}function Mr(r){if(ut===clearTimeout)return clearTimeout(r);if((ut===We||!ut)&&clearTimeout)return ut=clearTimeout,clearTimeout(r);try{return ut(r)}catch{try{return ut.call(null,r)}catch{return ut.call(this,r)}}}var wt=[],$t=!1,_t,fe=-1;function Ur(){!$t||!_t||($t=!1,_t.length?wt=_t.concat(wt):fe=-1,wt.length&&Gn())}function Gn(){if(!$t){var r=Fn(Ur);$t=!0;for(var o=wt.length;o;){for(_t=wt,wt=[];++fe1)for(var c=1;cconsole.error("SEMVER",...o):()=>{},Se}var Ce,Tn;function Hn(){if(Tn)return Ce;Tn=1;const r="2.0.0",o=256,c=Number.MAX_SAFE_INTEGER||9007199254740991,l=16,d=o-6;return Ce={MAX_LENGTH:o,MAX_SAFE_COMPONENT_LENGTH:l,MAX_SAFE_BUILD_LENGTH:d,MAX_SAFE_INTEGER:c,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Ce}var xe={exports:{}},In;function $r(){return In||(In=1,(function(r,o){const{MAX_SAFE_COMPONENT_LENGTH:c,MAX_SAFE_BUILD_LENGTH:l,MAX_LENGTH:d}=Hn(),p=zn();o=r.exports={};const y=o.re=[],T=o.safeRe=[],h=o.src=[],g=o.safeSrc=[],i=o.t={};let w=0;const A="[a-zA-Z0-9-]",R=[["\\s",1],["\\d",d],[A,l]],S=Z=>{for(const[X,Q]of R)Z=Z.split(`${X}*`).join(`${X}{0,${Q}}`).split(`${X}+`).join(`${X}{1,${Q}}`);return Z},I=(Z,X,Q)=>{const W=S(X),C=w++;p(Z,C,X),i[Z]=C,h[C]=X,g[C]=W,y[C]=new RegExp(X,Q?"g":void 0),T[C]=new RegExp(W,Q?"g":void 0)};I("NUMERICIDENTIFIER","0|[1-9]\\d*"),I("NUMERICIDENTIFIERLOOSE","\\d+"),I("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${A}*`),I("MAINVERSION",`(${h[i.NUMERICIDENTIFIER]})\\.(${h[i.NUMERICIDENTIFIER]})\\.(${h[i.NUMERICIDENTIFIER]})`),I("MAINVERSIONLOOSE",`(${h[i.NUMERICIDENTIFIERLOOSE]})\\.(${h[i.NUMERICIDENTIFIERLOOSE]})\\.(${h[i.NUMERICIDENTIFIERLOOSE]})`),I("PRERELEASEIDENTIFIER",`(?:${h[i.NONNUMERICIDENTIFIER]}|${h[i.NUMERICIDENTIFIER]})`),I("PRERELEASEIDENTIFIERLOOSE",`(?:${h[i.NONNUMERICIDENTIFIER]}|${h[i.NUMERICIDENTIFIERLOOSE]})`),I("PRERELEASE",`(?:-(${h[i.PRERELEASEIDENTIFIER]}(?:\\.${h[i.PRERELEASEIDENTIFIER]})*))`),I("PRERELEASELOOSE",`(?:-?(${h[i.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${h[i.PRERELEASEIDENTIFIERLOOSE]})*))`),I("BUILDIDENTIFIER",`${A}+`),I("BUILD",`(?:\\+(${h[i.BUILDIDENTIFIER]}(?:\\.${h[i.BUILDIDENTIFIER]})*))`),I("FULLPLAIN",`v?${h[i.MAINVERSION]}${h[i.PRERELEASE]}?${h[i.BUILD]}?`),I("FULL",`^${h[i.FULLPLAIN]}$`),I("LOOSEPLAIN",`[v=\\s]*${h[i.MAINVERSIONLOOSE]}${h[i.PRERELEASELOOSE]}?${h[i.BUILD]}?`),I("LOOSE",`^${h[i.LOOSEPLAIN]}$`),I("GTLT","((?:<|>)?=?)"),I("XRANGEIDENTIFIERLOOSE",`${h[i.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),I("XRANGEIDENTIFIER",`${h[i.NUMERICIDENTIFIER]}|x|X|\\*`),I("XRANGEPLAIN",`[v=\\s]*(${h[i.XRANGEIDENTIFIER]})(?:\\.(${h[i.XRANGEIDENTIFIER]})(?:\\.(${h[i.XRANGEIDENTIFIER]})(?:${h[i.PRERELEASE]})?${h[i.BUILD]}?)?)?`),I("XRANGEPLAINLOOSE",`[v=\\s]*(${h[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${h[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${h[i.XRANGEIDENTIFIERLOOSE]})(?:${h[i.PRERELEASELOOSE]})?${h[i.BUILD]}?)?)?`),I("XRANGE",`^${h[i.GTLT]}\\s*${h[i.XRANGEPLAIN]}$`),I("XRANGELOOSE",`^${h[i.GTLT]}\\s*${h[i.XRANGEPLAINLOOSE]}$`),I("COERCEPLAIN",`(^|[^\\d])(\\d{1,${c}})(?:\\.(\\d{1,${c}}))?(?:\\.(\\d{1,${c}}))?`),I("COERCE",`${h[i.COERCEPLAIN]}(?:$|[^\\d])`),I("COERCEFULL",h[i.COERCEPLAIN]+`(?:${h[i.PRERELEASE]})?(?:${h[i.BUILD]})?(?:$|[^\\d])`),I("COERCERTL",h[i.COERCE],!0),I("COERCERTLFULL",h[i.COERCEFULL],!0),I("LONETILDE","(?:~>?)"),I("TILDETRIM",`(\\s*)${h[i.LONETILDE]}\\s+`,!0),o.tildeTrimReplace="$1~",I("TILDE",`^${h[i.LONETILDE]}${h[i.XRANGEPLAIN]}$`),I("TILDELOOSE",`^${h[i.LONETILDE]}${h[i.XRANGEPLAINLOOSE]}$`),I("LONECARET","(?:\\^)"),I("CARETTRIM",`(\\s*)${h[i.LONECARET]}\\s+`,!0),o.caretTrimReplace="$1^",I("CARET",`^${h[i.LONECARET]}${h[i.XRANGEPLAIN]}$`),I("CARETLOOSE",`^${h[i.LONECARET]}${h[i.XRANGEPLAINLOOSE]}$`),I("COMPARATORLOOSE",`^${h[i.GTLT]}\\s*(${h[i.LOOSEPLAIN]})$|^$`),I("COMPARATOR",`^${h[i.GTLT]}\\s*(${h[i.FULLPLAIN]})$|^$`),I("COMPARATORTRIM",`(\\s*)${h[i.GTLT]}\\s*(${h[i.LOOSEPLAIN]}|${h[i.XRANGEPLAIN]})`,!0),o.comparatorTrimReplace="$1$2$3",I("HYPHENRANGE",`^\\s*(${h[i.XRANGEPLAIN]})\\s+-\\s+(${h[i.XRANGEPLAIN]})\\s*$`),I("HYPHENRANGELOOSE",`^\\s*(${h[i.XRANGEPLAINLOOSE]})\\s+-\\s+(${h[i.XRANGEPLAINLOOSE]})\\s*$`),I("STAR","(<|>)?=?\\s*\\*"),I("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),I("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(xe,xe.exports)),xe.exports}var De,An;function Fr(){if(An)return De;An=1;const r=Object.freeze({loose:!0}),o=Object.freeze({});return De=c=>c?typeof c!="object"?r:c:o,De}var Be,Rn;function Gr(){if(Rn)return Be;Rn=1;const r=/^[0-9]+$/,o=(c,l)=>{if(typeof c=="number"&&typeof l=="number")return c===l?0:co(l,c)},Be}var Me,vn;function Xn(){if(vn)return Me;vn=1;const r=zn(),{MAX_LENGTH:o,MAX_SAFE_INTEGER:c}=Hn(),{safeRe:l,t:d}=$r(),p=Fr(),{compareIdentifiers:y}=Gr();class T{constructor(g,i){if(i=p(i),g instanceof T){if(g.loose===!!i.loose&&g.includePrerelease===!!i.includePrerelease)return g;g=g.version}else if(typeof g!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof g}".`);if(g.length>o)throw new TypeError(`version is longer than ${o} characters`);r("SemVer",g,i),this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease;const w=g.trim().match(i.loose?l[d.LOOSE]:l[d.FULL]);if(!w)throw new TypeError(`Invalid Version: ${g}`);if(this.raw=g,this.major=+w[1],this.minor=+w[2],this.patch=+w[3],this.major>c||this.major<0)throw new TypeError("Invalid major version");if(this.minor>c||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>c||this.patch<0)throw new TypeError("Invalid patch version");w[4]?this.prerelease=w[4].split(".").map(A=>{if(/^[0-9]+$/.test(A)){const R=+A;if(R>=0&&Rg.major?1:this.minorg.minor?1:this.patchg.patch?1:0}comparePre(g){if(g instanceof T||(g=new T(g,this.options)),this.prerelease.length&&!g.prerelease.length)return-1;if(!this.prerelease.length&&g.prerelease.length)return 1;if(!this.prerelease.length&&!g.prerelease.length)return 0;let i=0;do{const w=this.prerelease[i],A=g.prerelease[i];if(r("prerelease compare",i,w,A),w===void 0&&A===void 0)return 0;if(A===void 0)return 1;if(w===void 0)return-1;if(w!==A)return y(w,A)}while(++i)}compareBuild(g){g instanceof T||(g=new T(g,this.options));let i=0;do{const w=this.build[i],A=g.build[i];if(r("build compare",i,w,A),w===void 0&&A===void 0)return 0;if(A===void 0)return 1;if(w===void 0)return-1;if(w!==A)return y(w,A)}while(++i)}inc(g,i,w){if(g.startsWith("pre")){if(!i&&w===!1)throw new Error("invalid increment argument: identifier is empty");if(i){const A=`-${i}`.match(this.options.loose?l[d.PRERELEASELOOSE]:l[d.PRERELEASE]);if(!A||A[1]!==i)throw new Error(`invalid identifier: ${i}`)}}switch(g){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",i,w);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",i,w);break;case"prepatch":this.prerelease.length=0,this.inc("patch",i,w),this.inc("pre",i,w);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",i,w),this.inc("pre",i,w);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const A=Number(w)?1:0;if(this.prerelease.length===0)this.prerelease=[A];else{let R=this.prerelease.length;for(;--R>=0;)typeof this.prerelease[R]=="number"&&(this.prerelease[R]++,R=-2);if(R===-1){if(i===this.prerelease.join(".")&&w===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(A)}}if(i){let R=[i,A];w===!1&&(R=[i]),y(this.prerelease[0],i)===0?isNaN(this.prerelease[1])&&(this.prerelease=R):this.prerelease=R}break}default:throw new Error(`invalid increment argument: ${g}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Me=T,Me}var Ue,Ln;function jr(){if(Ln)return Ue;Ln=1;const r=Xn();return Ue=(o,c)=>new r(o,c).major,Ue}var zr=jr();const Nn=qe(zr);var ke,On;function Hr(){if(On)return ke;On=1;const r=Xn();return ke=(o,c,l=!1)=>{if(o instanceof r)return o;try{return new r(o,c)}catch(d){if(!l)return null;throw d}},ke}var Pe,_n;function Xr(){if(_n)return Pe;_n=1;const r=Hr();return Pe=(o,c)=>{const l=r(o,c);return l?l.version:null},Pe}var Wr=Xr();const Vr=qe(Wr);class Yr{bus;constructor(o){typeof o.getVersion!="function"||!Vr(o.getVersion())?console.warn("Proxying an event bus with an unknown or invalid version"):Nn(o.getVersion())!==Nn(this.getVersion())&&console.warn("Proxying an event bus of version "+o.getVersion()+" with "+this.getVersion()),this.bus=o}getVersion(){return"3.3.3"}subscribe(o,c){this.bus.subscribe(o,c)}unsubscribe(o,c){this.bus.unsubscribe(o,c)}emit(o,...c){this.bus.emit(o,...c)}}class qr{handlers=new Map;getVersion(){return"3.3.3"}subscribe(o,c){this.handlers.set(o,(this.handlers.get(o)||[]).concat(c))}unsubscribe(o,c){this.handlers.set(o,(this.handlers.get(o)||[]).filter(l=>l!==c))}emit(o,...c){(this.handlers.get(o)||[]).forEach(l=>{try{l(c[0])}catch(d){console.error("could not invoke event listener",d)}})}}let Zt=null;function Ke(){return Zt!==null?Zt:typeof window>"u"?new Proxy({},{get:()=>()=>console.error("Window not available, EventBus can not be established!")}):(window.OC?._eventBus&&typeof window._nc_event_bus>"u"&&(console.warn("found old event bus instance at OC._eventBus. Update your version!"),window._nc_event_bus=window.OC._eventBus),typeof window?._nc_event_bus<"u"?Zt=new Yr(window._nc_event_bus):Zt=window._nc_event_bus=new qr,Zt)}function Kr(r,o){Ke().subscribe(r,o)}function Ro(r,o){Ke().unsubscribe(r,o)}function vo(r,...o){Ke().emit(r,...o)}class pe{static GLOBAL_SCOPE_VOLATILE="nextcloud_vol";static GLOBAL_SCOPE_PERSISTENT="nextcloud_per";scope;wrapped;constructor(o,c,l){this.scope=`${l?pe.GLOBAL_SCOPE_PERSISTENT:pe.GLOBAL_SCOPE_VOLATILE}_${btoa(o)}_`,this.wrapped=c}scopeKey(o){return`${this.scope}${o}`}setItem(o,c){this.wrapped.setItem(this.scopeKey(o),c)}getItem(o){return this.wrapped.getItem(this.scopeKey(o))}removeItem(o){this.wrapped.removeItem(this.scopeKey(o))}clear(){Object.keys(this.wrapped).filter(o=>o.startsWith(this.scope)).map(this.wrapped.removeItem.bind(this.wrapped))}}class Zr{appId;persisted=!1;clearedOnLogout=!1;constructor(o){this.appId=o}persist(o=!0){return this.persisted=o,this}clearOnLogout(o=!0){return this.clearedOnLogout=o,this}build(){return new pe(this.appId,this.persisted?window.localStorage:window.sessionStorage,!this.clearedOnLogout)}}function Qr(r){return new Zr(r)}let Qt;const Wn=[];function Lo(){return Qt===void 0&&(Qt=document.head.dataset.requesttoken??null),Qt}function No(r){Wn.push(r)}Kr("csrf-token-update",r=>{Qt=r.token,Wn.forEach(o=>{try{o(Qt)}catch(c){console.error("Error updating CSRF token observer",c)}})});Qr("public").persist().build();let kt;function Sn(r,o){return r?r.getAttribute(o):null}function Jr(){if(kt!==void 0)return kt;const r=document?.getElementsByTagName("head")[0];if(!r)return null;const o=Sn(r,"data-user");return o===null?(kt=null,kt):(kt={uid:o,displayName:Sn(r,"data-user-displayname"),isAdmin:!!window._oc_isadmin},kt)}var Vn={},he={};he.byteLength=no,he.toByteArray=oo,he.fromByteArray=ao;for(var lt=[],J=[],to=typeof Uint8Array<"u"?Uint8Array:Array,$e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pt=0,eo=$e.length;Pt0)throw new Error("Invalid string. Length must be a multiple of 4");var c=r.indexOf("=");c===-1&&(c=o);var l=c===o?0:4-c%4;return[c,l]}function no(r){var o=Yn(r),c=o[0],l=o[1];return(c+l)*3/4-l}function ro(r,o,c){return(o+c)*3/4-c}function oo(r){var o,c=Yn(r),l=c[0],d=c[1],p=new to(ro(r,l,d)),y=0,T=d>0?l-4:l,h;for(h=0;h>16&255,p[y++]=o>>8&255,p[y++]=o&255;return d===2&&(o=J[r.charCodeAt(h)]<<2|J[r.charCodeAt(h+1)]>>4,p[y++]=o&255),d===1&&(o=J[r.charCodeAt(h)]<<10|J[r.charCodeAt(h+1)]<<4|J[r.charCodeAt(h+2)]>>2,p[y++]=o>>8&255,p[y++]=o&255),p}function io(r){return lt[r>>18&63]+lt[r>>12&63]+lt[r>>6&63]+lt[r&63]}function so(r,o,c){for(var l,d=[],p=o;pT?T:y+p));return l===1?(o=r[c-1],d.push(lt[o>>2]+lt[o<<4&63]+"==")):l===2&&(o=(r[c-2]<<8)+r[c-1],d.push(lt[o>>10]+lt[o>>4&63]+lt[o<<2&63]+"=")),d.join("")}var Ve={};Ve.read=function(r,o,c,l,d){var p,y,T=d*8-l-1,h=(1<>1,i=-7,w=c?d-1:0,A=c?-1:1,R=r[o+w];for(w+=A,p=R&(1<<-i)-1,R>>=-i,i+=T;i>0;p=p*256+r[o+w],w+=A,i-=8);for(y=p&(1<<-i)-1,p>>=-i,i+=l;i>0;y=y*256+r[o+w],w+=A,i-=8);if(p===0)p=1-g;else{if(p===h)return y?NaN:(R?-1:1)*(1/0);y=y+Math.pow(2,l),p=p-g}return(R?-1:1)*y*Math.pow(2,p-l)},Ve.write=function(r,o,c,l,d,p){var y,T,h,g=p*8-d-1,i=(1<>1,A=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=l?0:p-1,S=l?1:-1,I=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(T=isNaN(o)?1:0,y=i):(y=Math.floor(Math.log(o)/Math.LN2),o*(h=Math.pow(2,-y))<1&&(y--,h*=2),y+w>=1?o+=A/h:o+=A*Math.pow(2,1-w),o*h>=2&&(y++,h/=2),y+w>=i?(T=0,y=i):y+w>=1?(T=(o*h-1)*Math.pow(2,d),y=y+w):(T=o*Math.pow(2,w-1)*Math.pow(2,d),y=0));d>=8;r[c+R]=T&255,R+=S,T/=256,d-=8);for(y=y<0;r[c+R]=y&255,R+=S,y/=256,g-=8);r[c+R-S]|=I*128};(function(r){const o=he,c=Ve,l=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=i,r.SlowBuffer=Lt,r.INSPECT_MAX_BYTES=50;const d=2147483647;r.kMaxLength=d;const{Uint8Array:p,ArrayBuffer:y,SharedArrayBuffer:T}=globalThis;i.TYPED_ARRAY_SUPPORT=h(),!i.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function h(){try{const t=new p(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,p.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function g(t){if(t>d)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new p(t);return Object.setPrototypeOf(e,i.prototype),e}function i(t,e,n){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return S(t)}return w(t,e,n)}i.poolSize=8192;function w(t,e,n){if(typeof t=="string")return I(t,e);if(y.isView(t))return X(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(V(t,y)||t&&V(t.buffer,y)||typeof T<"u"&&(V(t,T)||t&&V(t.buffer,T)))return Q(t,e,n);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const a=t.valueOf&&t.valueOf();if(a!=null&&a!==t)return i.from(a,e,n);const u=W(t);if(u)return u;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return i.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}i.from=function(t,e,n){return w(t,e,n)},Object.setPrototypeOf(i.prototype,p.prototype),Object.setPrototypeOf(i,p);function A(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function R(t,e,n){return A(t),t<=0?g(t):e!==void 0?typeof n=="string"?g(t).fill(e,n):g(t).fill(e):g(t)}i.alloc=function(t,e,n){return R(t,e,n)};function S(t){return A(t),g(t<0?0:C(t)|0)}i.allocUnsafe=function(t){return S(t)},i.allocUnsafeSlow=function(t){return S(t)};function I(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!i.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=St(t,e)|0;let a=g(n);const u=a.write(t,e);return u!==n&&(a=a.slice(0,u)),a}function Z(t){const e=t.length<0?0:C(t.length)|0,n=g(e);for(let a=0;a=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return t|0}function Lt(t){return+t!=t&&(t=0),i.alloc(+t)}i.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==i.prototype},i.compare=function(t,e){if(V(t,p)&&(t=i.from(t,t.offset,t.byteLength)),V(e,p)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,a=e.length;for(let u=0,f=Math.min(n,a);ua.length?(i.isBuffer(f)||(f=i.from(f)),f.copy(a,u)):p.prototype.set.call(a,f,u);else if(i.isBuffer(f))f.copy(a,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=f.length}return a};function St(t,e){if(i.isBuffer(t))return t.length;if(y.isView(t)||V(t,y))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,a=arguments.length>2&&arguments[2]===!0;if(!a&&n===0)return 0;let u=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return At(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return se(t).length;default:if(u)return a?-1:At(t).length;e=(""+e).toLowerCase(),u=!0}}i.byteLength=St;function ge(t,e,n){let a=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,e>>>=0,n<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return re(this,e,n);case"utf8":case"utf-8":return ee(this,e,n);case"ascii":return ne(this,e,n);case"latin1":case"binary":return P(this,e,n);case"base64":return Ee(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,n);default:if(a)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),a=!0}}i.prototype._isBuffer=!0;function ft(t,e,n){const a=t[e];t[e]=t[n],t[n]=a}i.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;ee&&(t+=" ... "),""},l&&(i.prototype[l]=i.prototype.inspect),i.prototype.compare=function(t,e,n,a,u){if(V(t,p)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),a===void 0&&(a=0),u===void 0&&(u=this.length),e<0||n>t.length||a<0||u>this.length)throw new RangeError("out of range index");if(a>=u&&e>=n)return 0;if(a>=u)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,a>>>=0,u>>>=0,this===t)return 0;let f=u-a,m=n-e;const O=Math.min(f,m),U=this.slice(a,u),x=t.slice(e,n);for(let N=0;N2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,at(n)&&(n=u?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(u)return-1;n=t.length-1}else if(n<0)if(u)n=0;else return-1;if(typeof e=="string"&&(e=i.from(e,a)),i.isBuffer(e))return e.length===0?-1:te(t,e,n,a,u);if(typeof e=="number")return e=e&255,typeof p.prototype.indexOf=="function"?u?p.prototype.indexOf.call(t,e,n):p.prototype.lastIndexOf.call(t,e,n):te(t,[e],n,a,u);throw new TypeError("val must be string, number or Buffer")}function te(t,e,n,a,u){let f=1,m=t.length,O=e.length;if(a!==void 0&&(a=String(a).toLowerCase(),a==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le")){if(t.length<2||e.length<2)return-1;f=2,m/=2,O/=2,n/=2}function U(N,D){return f===1?N[D]:N.readUInt16BE(D*f)}let x;if(u){let N=-1;for(x=n;xm&&(n=m-O),x=n;x>=0;x--){let N=!0;for(let D=0;Du&&(a=u)):a=u;const f=e.length;a>f/2&&(a=f/2);let m;for(m=0;m>>0,isFinite(n)?(n=n>>>0,a===void 0&&(a="utf8")):(a=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const u=this.length-e;if((n===void 0||n>u)&&(n=u),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");let f=!1;for(;;)switch(a){case"hex":return j(this,t,e,n);case"utf8":case"utf-8":return Ft(this,t,e,n);case"ascii":case"latin1":case"binary":return Gt(this,t,e,n);case"base64":return jt(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,t,e,n);default:if(f)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),f=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ee(t,e,n){return e===0&&n===t.length?o.fromByteArray(t):o.fromByteArray(t.slice(e,n))}function ee(t,e,n){n=Math.min(t.length,n);const a=[];let u=e;for(;u239?4:f>223?3:f>191?2:1;if(u+O<=n){let U,x,N,D;switch(O){case 1:f<128&&(m=f);break;case 2:U=t[u+1],(U&192)===128&&(D=(f&31)<<6|U&63,D>127&&(m=D));break;case 3:U=t[u+1],x=t[u+2],(U&192)===128&&(x&192)===128&&(D=(f&15)<<12|(U&63)<<6|x&63,D>2047&&(D<55296||D>57343)&&(m=D));break;case 4:U=t[u+1],x=t[u+2],N=t[u+3],(U&192)===128&&(x&192)===128&&(N&192)===128&&(D=(f&15)<<18|(U&63)<<12|(x&63)<<6|N&63,D>65535&&D<1114112&&(m=D))}}m===null?(m=65533,O=1):m>65535&&(m-=65536,a.push(m>>>10&1023|55296),m=56320|m&1023),a.push(m),u+=O}return ye(a)}const zt=4096;function ye(t){const e=t.length;if(e<=zt)return String.fromCharCode.apply(String,t);let n="",a=0;for(;aa)&&(n=a);let u="";for(let f=e;fn&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),en)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUintLE=i.prototype.readUIntLE=function(t,e,n){t=t>>>0,e=e>>>0,n||M(t,e,this.length);let a=this[t],u=1,f=0;for(;++f>>0,e=e>>>0,n||M(t,e,this.length);let a=this[t+--e],u=1;for(;e>0&&(u*=256);)a+=this[t+--e]*u;return a},i.prototype.readUint8=i.prototype.readUInt8=function(t,e){return t=t>>>0,e||M(t,1,this.length),this[t]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(t,e){return t=t>>>0,e||M(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(t,e){return t=t>>>0,e||M(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(t,e){return t=t>>>0,e||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(t,e){return t=t>>>0,e||M(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readBigUInt64LE=et(function(t){t=t>>>0,st(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&>(t,this.length-8);const a=e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,u=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(a)+(BigInt(u)<>>0,st(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&>(t,this.length-8);const a=e*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],u=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(a)<>>0,e=e>>>0,n||M(t,e,this.length);let a=this[t],u=1,f=0;for(;++f=u&&(a-=Math.pow(2,8*e)),a},i.prototype.readIntBE=function(t,e,n){t=t>>>0,e=e>>>0,n||M(t,e,this.length);let a=e,u=1,f=this[t+--a];for(;a>0&&(u*=256);)f+=this[t+--a]*u;return u*=128,f>=u&&(f-=Math.pow(2,8*e)),f},i.prototype.readInt8=function(t,e){return t=t>>>0,e||M(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},i.prototype.readInt16LE=function(t,e){t=t>>>0,e||M(t,2,this.length);const n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n},i.prototype.readInt16BE=function(t,e){t=t>>>0,e||M(t,2,this.length);const n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n},i.prototype.readInt32LE=function(t,e){return t=t>>>0,e||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return t=t>>>0,e||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readBigInt64LE=et(function(t){t=t>>>0,st(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&>(t,this.length-8);const a=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(a)<>>0,st(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&>(t,this.length-8);const a=(e<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(a)<>>0,e||M(t,4,this.length),c.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return t=t>>>0,e||M(t,4,this.length),c.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return t=t>>>0,e||M(t,8,this.length),c.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return t=t>>>0,e||M(t,8,this.length),c.read(this,t,!1,52,8)};function L(t,e,n,a,u,f){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>u||et.length)throw new RangeError("Index out of range")}i.prototype.writeUintLE=i.prototype.writeUIntLE=function(t,e,n,a){if(t=+t,e=e>>>0,n=n>>>0,!a){const m=Math.pow(2,8*n)-1;L(this,t,e,n,m,0)}let u=1,f=0;for(this[e]=t&255;++f>>0,n=n>>>0,!a){const m=Math.pow(2,8*n)-1;L(this,t,e,n,m,0)}let u=n-1,f=1;for(this[e+u]=t&255;--u>=0&&(f*=256);)this[e+u]=t/f&255;return e+n},i.prototype.writeUint8=i.prototype.writeUInt8=function(t,e,n){return t=+t,e=e>>>0,n||L(this,t,e,1,255,0),this[e]=t&255,e+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||L(this,t,e,2,65535,0),this[e]=t&255,this[e+1]=t>>>8,e+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=t&255,e+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255,e+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};function Tt(t,e,n,a,u){it(e,a,u,t,n,7);let f=Number(e&BigInt(4294967295));t[n++]=f,f=f>>8,t[n++]=f,f=f>>8,t[n++]=f,f=f>>8,t[n++]=f;let m=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=m,m=m>>8,t[n++]=m,m=m>>8,t[n++]=m,m=m>>8,t[n++]=m,n}function Ct(t,e,n,a,u){it(e,a,u,t,n,7);let f=Number(e&BigInt(4294967295));t[n+7]=f,f=f>>8,t[n+6]=f,f=f>>8,t[n+5]=f,f=f>>8,t[n+4]=f;let m=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=m,m=m>>8,t[n+2]=m,m=m>>8,t[n+1]=m,m=m>>8,t[n]=m,n+8}i.prototype.writeBigUInt64LE=et(function(t,e=0){return Tt(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeBigUInt64BE=et(function(t,e=0){return Ct(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeIntLE=function(t,e,n,a){if(t=+t,e=e>>>0,!a){const O=Math.pow(2,8*n-1);L(this,t,e,n,O-1,-O)}let u=0,f=1,m=0;for(this[e]=t&255;++u>0)-m&255;return e+n},i.prototype.writeIntBE=function(t,e,n,a){if(t=+t,e=e>>>0,!a){const O=Math.pow(2,8*n-1);L(this,t,e,n,O-1,-O)}let u=n-1,f=1,m=0;for(this[e+u]=t&255;--u>=0&&(f*=256);)t<0&&m===0&&this[e+u+1]!==0&&(m=1),this[e+u]=(t/f>>0)-m&255;return e+n},i.prototype.writeInt8=function(t,e,n){return t=+t,e=e>>>0,n||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=t&255,e+1},i.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||L(this,t,e,2,32767,-32768),this[e]=t&255,this[e+1]=t>>>8,e+2},i.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=t&255,e+2},i.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||L(this,t,e,4,2147483647,-2147483648),this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},i.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4},i.prototype.writeBigInt64LE=et(function(t,e=0){return Tt(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeBigInt64BE=et(function(t,e=0){return Ct(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ht(t,e,n,a,u,f){if(n+a>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Ht(t,e,n,a,u){return e=+e,n=n>>>0,u||ht(t,e,n,4),c.write(t,e,n,a,23,4),n+4}i.prototype.writeFloatLE=function(t,e,n){return Ht(this,t,e,!0,n)},i.prototype.writeFloatBE=function(t,e,n){return Ht(this,t,e,!1,n)};function xt(t,e,n,a,u){return e=+e,n=n>>>0,u||ht(t,e,n,8),c.write(t,e,n,a,52,8),n+8}i.prototype.writeDoubleLE=function(t,e,n){return xt(this,t,e,!0,n)},i.prototype.writeDoubleBE=function(t,e,n){return xt(this,t,e,!1,n)},i.prototype.copy=function(t,e,n,a){if(!i.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!a&&a!==0&&(a=this.length),e>=t.length&&(e=t.length),e||(e=0),a>0&&a=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),t.length-e>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let u;if(typeof t=="number")for(u=e;u2**32?u=dt(String(n)):typeof n=="bigint"&&(u=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(u=dt(u)),u+="n"),a+=` It must be ${e}. Received ${u}`,a},RangeError);function dt(t){let e="",n=t.length;const a=t[0]==="-"?1:0;for(;n>=a+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function Bt(t,e,n){st(e,"offset"),(t[e]===void 0||t[e+n]===void 0)&>(e,t.length-(n+1))}function it(t,e,n,a,u,f){if(t>n||t= 0${m} and < 2${m} ** ${(f+1)*8}${m}`:O=`>= -(2${m} ** ${(f+1)*8-1}${m}) and < 2 ** ${(f+1)*8-1}${m}`,new pt.ERR_OUT_OF_RANGE("value",O,t)}Bt(a,u,f)}function st(t,e){if(typeof t!="number")throw new pt.ERR_INVALID_ARG_TYPE(e,"number",t)}function gt(t,e,n){throw Math.floor(t)!==t?(st(t,n),new pt.ERR_OUT_OF_RANGE("offset","an integer",t)):e<0?new pt.ERR_BUFFER_OUT_OF_BOUNDS:new pt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${e}`,t)}const It=/[^+/0-9A-Za-z-_]/g;function Mt(t){if(t=t.split("=")[0],t=t.trim().replace(It,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function At(t,e){e=e||1/0;let n;const a=t.length;let u=null;const f=[];for(let m=0;m55295&&n<57344){if(!u){if(n>56319){(e-=3)>-1&&f.push(239,191,189);continue}else if(m+1===a){(e-=3)>-1&&f.push(239,191,189);continue}u=n;continue}if(n<56320){(e-=3)>-1&&f.push(239,191,189),u=n;continue}n=(u-55296<<10|n-56320)+65536}else u&&(e-=3)>-1&&f.push(239,191,189);if(u=null,n<128){if((e-=1)<0)break;f.push(n)}else if(n<2048){if((e-=2)<0)break;f.push(n>>6|192,n&63|128)}else if(n<65536){if((e-=3)<0)break;f.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((e-=4)<0)break;f.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return f}function oe(t){const e=[];for(let n=0;n>8,u=n%256,f.push(u),f.push(a);return f}function se(t){return o.toByteArray(Mt(t))}function Rt(t,e,n,a){let u;for(u=0;u=e.length||u>=t.length);++u)e[u+n]=t[u];return u}function V(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function at(t){return t!==t}const vt=(function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const a=n*16;for(let u=0;u<16;++u)e[a+u]=t[n]+t[u]}return e})();function et(t){return typeof BigInt>"u"?ae:t}function ae(){throw new Error("BigInt not supported")}})(Vn);const Oo=Vn.Buffer;var $=(r=>(r[r.Debug=0]="Debug",r[r.Info=1]="Info",r[r.Warn=2]="Warn",r[r.Error=3]="Error",r[r.Fatal=4]="Fatal",r))($||{}),co=Object.defineProperty,uo=(r,o,c)=>o in r?co(r,o,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[o]=c,lo=(r,o,c)=>(uo(r,o+"",c),c);class fo{constructor(o){lo(this,"context"),this.context=o||{}}formatMessage(o,c,l){let d="["+$[c].toUpperCase()+"] ";return l&&l.app&&(d+=l.app+": "),typeof o=="string"?d+o:(d+="Unexpected ".concat(o.name),o.message&&(d+=' "'.concat(o.message,'"')),c===$.Debug&&o.stack&&(d+=` Stack trace: `.concat(o.stack)),d)}log(o,c,l){var d,p;if(!(typeof((d=this.context)==null?void 0:d.level)=="number"&&o<((p=this.context)==null?void 0:p.level)))switch(typeof c=="object"&&l?.error===void 0&&(l.error=c),o){case $.Debug:console.debug(this.formatMessage(c,$.Debug,l),l);break;case $.Info:console.info(this.formatMessage(c,$.Info,l),l);break;case $.Warn:console.warn(this.formatMessage(c,$.Warn,l),l);break;case $.Error:console.error(this.formatMessage(c,$.Error,l),l);break;case $.Fatal:default:console.error(this.formatMessage(c,$.Fatal,l),l);break}}debug(o,c){this.log($.Debug,o,Object.assign({},this.context,c))}info(o,c){this.log($.Info,o,Object.assign({},this.context,c))}warn(o,c){this.log($.Warn,o,Object.assign({},this.context,c))}error(o,c){this.log($.Error,o,Object.assign({},this.context,c))}fatal(o,c){this.log($.Fatal,o,Object.assign({},this.context,c))}}function ho(r){return new fo(r)}var po=Object.defineProperty,go=(r,o,c)=>o in r?po(r,o,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[o]=c,Cn=(r,o,c)=>(go(r,typeof o!="symbol"?o+"":o,c),c);class mo{constructor(o){Cn(this,"context"),Cn(this,"factory"),this.context={},this.factory=o}setApp(o){return this.context.app=o,this}setLogLevel(o){return this.context.level=o,this}setUid(o){return this.context.uid=o,this}detectUser(){const o=Jr();return o!==null&&(this.context.uid=o.uid),this}detectLogLevel(){const o=this,c=()=>{var l,d;document.readyState==="complete"||document.readyState==="interactive"?(o.context.level=(d=(l=window._oc_config)==null?void 0:l.loglevel)!=null?d:$.Warn,window._oc_debug&&(o.context.level=$.Debug),document.removeEventListener("readystatechange",c)):document.addEventListener("readystatechange",c)};return c(),this}build(){return this.context.level===void 0&&this.detectLogLevel(),this.factory(this.context)}}function _o(){return new mo(ho)}export{Oo as B,Eo as _,_r as a,yo as b,Jr as c,_o as d,vo as e,Nr as f,Or as g,Lo as h,qe as i,kn as j,wo as k,vr as l,Ao as m,Io as n,No as o,Pr as p,To as q,Ye as r,Kr as s,_e as t,Ro as u,de as v,Sr as w,Qr as x,bn as y,bo as z}; //# sourceMappingURL=index-D953jVe0.chunk.mjs.map