const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('notifications', '', 'js/index-COufUJ40.chunk.mjs'),window.OC.filePath('notifications', '', 'js/_plugin-vue_export-helper-DW41pV1w.chunk.mjs'),window.OC.filePath('notifications', '', 'js/style-Cs_h5sE5.chunk.mjs'),window.OC.filePath('notifications', '', 'css/style-OAP_8hhg.chunk.css'),window.OC.filePath('notifications', '', 'css/_plugin-vue_export-helper-CxjGokpW.chunk.css'),window.OC.filePath('notifications', '', 'js/vite-preload-helper-DxYC2qmj.chunk.mjs'),window.OC.filePath('notifications', '', 'js/BrowserStorage-CMzlsepb.chunk.mjs')])))=>i.map(i=>d[i]); import{h as ki,i as sc,n as ac,j as lc,k as Ao,m as cc,o as uc,p as ni,u as fc,q as dc,v as Qs,w as pc,x as hc,y as mc,z as gc,A as To,B as Jt,C as yc,e as Ge,D as tn,E as ri,F as _c,G as vc,H as bc,I as wc,J as Vt,_ as xt,l as Nt,K as xc,L as kc,M as ea,O as bt,P as Eo,Q as Sc,r as Je,R as Cc,S as Ic,T as Ac,U as Tc,f as de,V as Ec,W as ta,X as Oc,Y as na,Z as Pc,$ as Nc,a0 as Mc,a1 as Rc,a2 as Lc,a3 as Dc,a4 as Fc,a as jc,a5 as Si,a6 as xn,c as tt,g as _t,t as ft,a7 as Uc,a8 as ra,a9 as zc,aa as Bc,ab as Hc,ac as sr,ad as qc,ae as Vc,af as $c,ag as nn,ah as rn,ai as Wc,aj as Gc,ak as Xc,s as ii,al as nr,am as Zc,an as Oo,ao as Kc}from"./_plugin-vue_export-helper-DW41pV1w.chunk.mjs";import{l as kt,i as Jc,p as kn,q as ve,k as oe,u as Ne,j as Pt,s as an,v as Yc,x as ia,f as z,o as M,g as ae,m as je,h as Mt,t as ne,y as yn,z as oi,a as ce,w as pe,e as Le,A as si,B as Qc,b as se,C as Po,D as ze,E as Sn,n as Rt,G as No,H as eu,I as vt,r as ge,F as Tn,J as ar,K as ai,L as oa,M as tu,N as li,O as nu,T as ru,P as iu}from"./style-Cs_h5sE5.chunk.mjs";import{_ as ou}from"./vite-preload-helper-DxYC2qmj.chunk.mjs";import{B as Ae}from"./BrowserStorage-CMzlsepb.chunk.mjs";function Mo(e){const n=kn(ki),t=kn(sc),r=oe(()=>{const c=Ne(e.to);return n.resolve(c)}),i=oe(()=>{const{matched:c}=r.value,{length:d}=c,m=c[d-1],s=t.matched;if(!m||!s.length)return-1;const l=s.findIndex(Ao.bind(null,m));if(l>-1)return l;const u=Ro(c[d-2]);return d>1&&Ro(m)===u&&s[s.length-1].path!==u?s.findIndex(Ao.bind(null,c[d-2])):l}),o=oe(()=>i.value>-1&&cu(t.params,r.value.params)),a=oe(()=>i.value>-1&&i.value===t.matched.length-1&&lc(t.params,r.value.params));function f(c={}){if(lu(c)){const d=n[Ne(e.replace)?"replace":"push"](Ne(e.to)).catch(ac);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:r,href:oe(()=>r.value.href),isActive:o,isExactActive:a,navigate:f}}function su(e){return e.length===1?e[0]:e}const au=kt({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Mo,setup(e,{slots:n}){const t=Jc(Mo(e)),{options:r}=kn(ki),i=oe(()=>({[Lo(e.activeClass,r.linkActiveClass,"router-link-active")]:t.isActive,[Lo(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const o=n.default&&su(n.default(t));return e.custom?o:ve("a",{"aria-current":t.isExactActive?e.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:i.value},o)}}}),Ci=au;function lu(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const n=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(n))return}return e.preventDefault&&e.preventDefault(),!0}}function cu(e,n){for(const t in n){const r=n[t],i=e[t];if(typeof r=="string"){if(r!==i)return!1}else if(!cc(i)||i.length!==r.length||r.some((o,a)=>o.valueOf()!==i[a].valueOf()))return!1}return!0}function Ro(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Lo=(e,n,t)=>e??n??t;var sa="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",uu="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",fu="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z";const du=Symbol.for("nc:theme:enforced");function pu(e){const n=oe(()=>ia(e)??document.body),t=Pt(ni(n.value)),r=dc();function i(){t.value=ni(n.value)}return fc(n,i,{attributes:!0}),an(n,i),an(r,i,{immediate:!0}),Yc(t)}const hu=uc(()=>pu());function mu(){const e=hu(),n=kn(du,void 0);return oe(()=>n?.value?n.value==="dark":e.value)}var zt={},Do={};const gu=Qs(pc);var Fo;function yu(){return Fo||(Fo=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=gu;function t(){try{return n.loadState("core","capabilities")}catch{return console.debug("Could not find capabilities initial state fall back to _oc_capabilities"),"_oc_capabilities"in window?window._oc_capabilities:{}}}e.getCapabilities=t}(Do)),Do}var jo={},Uo={},zo={},Bo;function aa(){return Bo||(Bo=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=hc(),t=mc(),r=u=>u&&u.__esModule?u:{default:u},i=r(n),o=r(t);class a{bus;constructor(h){typeof h.getVersion!="function"||!o.default(h.getVersion())?console.warn("Proxying an event bus with an unknown or invalid version"):i.default(h.getVersion())!==i.default(this.getVersion())&&console.warn("Proxying an event bus of version "+h.getVersion()+" with "+this.getVersion()),this.bus=h}getVersion(){return"3.3.3"}subscribe(h,y){this.bus.subscribe(h,y)}unsubscribe(h,y){this.bus.unsubscribe(h,y)}emit(h,...y){this.bus.emit(h,...y)}}class f{handlers=new Map;getVersion(){return"3.3.3"}subscribe(h,y){this.handlers.set(h,(this.handlers.get(h)||[]).concat(y))}unsubscribe(h,y){this.handlers.set(h,(this.handlers.get(h)||[]).filter(w=>w!==y))}emit(h,...y){(this.handlers.get(h)||[]).forEach(w=>{try{w(y[0])}catch(_){console.error("could not invoke event listener",_)}})}}let c=null;function d(){return c!==null?c: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"?c=new a(window._nc_event_bus):c=window._nc_event_bus=new f,c)}function m(u,h){d().subscribe(u,h)}function s(u,h){d().unsubscribe(u,h)}function l(u,...h){d().emit(u,...h)}e.ProxyBus=a,e.SimpleBus=f,e.emit=l,e.subscribe=m,e.unsubscribe=s}(zo)),zo}const _u=Qs(gc);var Ho;function vu(){return Ho||(Ho=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=aa(),t=_u;let r;const i=[];function o(){return r===void 0&&(r=document.head.dataset.requesttoken??null),r}function a(k){i.push(k)}n.subscribe("csrf-token-update",k=>{r=k.token,i.forEach(T=>{try{T(r)}catch(R){console.error("Error updating CSRF token observer",R)}})});function f(){const k=document?.querySelector('meta[name="csp-nonce"]');if(!k){const T=o();return T?btoa(T):void 0}return k.nonce}const c=t.getBuilder("public").persist().build();class d{_displayName;uid;isAdmin;constructor(){c.getItem("guestUid")||c.setItem("guestUid",h()),this._displayName=c.getItem("guestNickname")||"",this.uid=c.getItem("guestUid")||h(),this.isAdmin=!1,n.subscribe("user:info:changed",T=>{this._displayName=T.displayName,c.setItem("guestNickname",T.displayName||"")})}get displayName(){return this._displayName}set displayName(T){this._displayName=T,c.setItem("guestNickname",T),n.emit("user:info:changed",this)}}let m;function s(){return m||(m=new d),m}function l(){return s()?.displayName||null}function u(k){if(!k||k.trim().length===0)throw new Error("Nickname cannot be empty");s().displayName=k}function h(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,k=>{const T=Math.random()*16|0;return(k==="x"?T:T&3|8).toString(16)})}let y;function w(k,T){return k?k.getAttribute(T):null}function _(){if(y!==void 0)return y;const k=document?.getElementsByTagName("head")[0];if(!k)return null;const T=w(k,"data-user");return T===null?(y=null,y):(y={uid:T,displayName:w(k,"data-user-displayname"),isAdmin:!!window._oc_isadmin},y)}e.getCSPNonce=f,e.getCurrentUser=_,e.getGuestNickname=l,e.getGuestUser=s,e.getRequestToken=o,e.onRequestTokenUpdate=a,e.setGuestNickname=u}(Uo)),Uo}var Rr,qo;function bu(){if(qo)return Rr;qo=1;function e(p,g){return function(){return p.apply(g,arguments)}}const{toString:n}=Object.prototype,{getPrototypeOf:t}=Object,{iterator:r,toStringTag:i}=Symbol,o=(p=>g=>{const v=n.call(g);return p[v]||(p[v]=v.slice(8,-1).toLowerCase())})(Object.create(null)),a=p=>(p=p.toLowerCase(),g=>o(g)===p),f=p=>g=>typeof g===p,{isArray:c}=Array,d=f("undefined");function m(p){return p!==null&&!d(p)&&p.constructor!==null&&!d(p.constructor)&&h(p.constructor.isBuffer)&&p.constructor.isBuffer(p)}const s=a("ArrayBuffer");function l(p){let g;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?g=ArrayBuffer.isView(p):g=p&&p.buffer&&s(p.buffer),g}const u=f("string"),h=f("function"),y=f("number"),w=p=>p!==null&&typeof p=="object",_=p=>p===!0||p===!1,k=p=>{if(o(p)!=="object")return!1;const g=t(p);return(g===null||g===Object.prototype||Object.getPrototypeOf(g)===null)&&!(i in p)&&!(r in p)},T=p=>{if(!w(p)||m(p))return!1;try{return Object.keys(p).length===0&&Object.getPrototypeOf(p)===Object.prototype}catch{return!1}},R=a("Date"),$=a("File"),N=a("Blob"),J=a("FileList"),G=p=>w(p)&&h(p.pipe),H=p=>{let g;return p&&(typeof FormData=="function"&&p instanceof FormData||h(p.append)&&((g=o(p))==="formdata"||g==="object"&&h(p.toString)&&p.toString()==="[object FormData]"))},P=a("URLSearchParams"),[X,Z,K,q]=["ReadableStream","Request","Response","Headers"].map(a),Y=p=>p.trim?p.trim():p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(p,g,{allOwnKeys:v=!1}={}){if(p===null||typeof p>"u")return;let b,S;if(typeof p!="object"&&(p=[p]),c(p))for(b=0,S=p.length;b0;)if(S=v[b],g===S.toLowerCase())return S;return null}const Se=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Jt,Xe=p=>!d(p)&&p!==Se;function x(){const{caseless:p,skipUndefined:g}=Xe(this)&&this||{},v={},b=(S,I)=>{const A=p&&be(v,I)||I;k(v[A])&&k(S)?v[A]=x(v[A],S):k(S)?v[A]=x({},S):c(S)?v[A]=S.slice():(!g||!d(S))&&(v[A]=S)};for(let S=0,I=arguments.length;S(_e(g,(S,I)=>{v&&h(S)?p[I]=e(S,v):p[I]=S},{allOwnKeys:b}),p),Ye=p=>(p.charCodeAt(0)===65279&&(p=p.slice(1)),p),C=(p,g,v,b)=>{p.prototype=Object.create(g.prototype,b),p.prototype.constructor=p,Object.defineProperty(p,"super",{value:g.prototype}),v&&Object.assign(p.prototype,v)},qe=(p,g,v,b)=>{let S,I,A;const L={};if(g=g||{},p==null)return g;do{for(S=Object.getOwnPropertyNames(p),I=S.length;I-- >0;)A=S[I],(!b||b(A,p,g))&&!L[A]&&(g[A]=p[A],L[A]=!0);p=v!==!1&&t(p)}while(p&&(!v||v(p,g))&&p!==Object.prototype);return g},pt=(p,g,v)=>{p=String(p),(v===void 0||v>p.length)&&(v=p.length),v-=g.length;const b=p.indexOf(g,v);return b!==-1&&b===v},Ce=p=>{if(!p)return null;if(c(p))return p;let g=p.length;if(!y(g))return null;const v=new Array(g);for(;g-- >0;)v[g]=p[g];return v},Dt=(p=>g=>p&&g instanceof p)(typeof Uint8Array<"u"&&t(Uint8Array)),nt=(p,g)=>{const v=(p&&p[r]).call(p);let b;for(;(b=v.next())&&!b.done;){const S=b.value;g.call(p,S[0],S[1])}},St=(p,g)=>{let v;const b=[];for(;(v=p.exec(g))!==null;)b.push(v);return b},Ct=a("HTMLFormElement"),Wt=p=>p.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(g,v,b){return v.toUpperCase()+b}),Pn=(({hasOwnProperty:p})=>(g,v)=>p.call(g,v))(Object.prototype),gr=a("RegExp"),Nn=(p,g)=>{const v=Object.getOwnPropertyDescriptors(p),b={};_e(v,(S,I)=>{let A;(A=g(S,I,p))!==!1&&(b[I]=A||S)}),Object.defineProperties(p,b)},Mn=p=>{Nn(p,(g,v)=>{if(h(p)&&["arguments","caller","callee"].indexOf(v)!==-1)return!1;const b=p[v];if(h(b)){if(g.enumerable=!1,"writable"in g){g.writable=!1;return}g.set||(g.set=()=>{throw Error("Can not rewrite read-only method '"+v+"'")})}})},Rn=(p,g)=>{const v={},b=S=>{S.forEach(I=>{v[I]=!0})};return c(p)?b(p):b(String(p).split(g)),v},Ln=()=>{},yr=(p,g)=>p!=null&&Number.isFinite(p=+p)?p:g;function Dn(p){return!!(p&&h(p.append)&&p[i]==="FormData"&&p[r])}const Fn=p=>{const g=new Array(10),v=(b,S)=>{if(w(b)){if(g.indexOf(b)>=0)return;if(m(b))return b;if(!("toJSON"in b)){g[S]=b;const I=c(b)?[]:{};return _e(b,(A,L)=>{const V=v(A,S+1);!d(V)&&(I[L]=V)}),g[S]=void 0,I}}return b};return v(p,0)},_r=a("AsyncFunction"),vr=p=>p&&(w(p)||h(p))&&h(p.then)&&h(p.catch),jn=((p,g)=>p?setImmediate:g?((v,b)=>(Se.addEventListener("message",({source:S,data:I})=>{S===Se&&I===v&&b.length&&b.shift()()},!1),S=>{b.push(S),Se.postMessage(v,"*")}))(`axios@${Math.random()}`,[]):v=>setTimeout(v))(typeof setImmediate=="function",h(Se.postMessage)),br=typeof queueMicrotask<"u"?queueMicrotask.bind(Se):typeof To<"u"&&To.nextTick||jn;var O={isArray:c,isArrayBuffer:s,isBuffer:m,isFormData:H,isArrayBufferView:l,isString:u,isNumber:y,isBoolean:_,isObject:w,isPlainObject:k,isEmptyObject:T,isReadableStream:X,isRequest:Z,isResponse:K,isHeaders:q,isUndefined:d,isDate:R,isFile:$,isBlob:N,isRegExp:gr,isFunction:h,isStream:G,isURLSearchParams:P,isTypedArray:Dt,isFileList:J,forEach:_e,merge:x,extend:He,trim:Y,stripBOM:Ye,inherits:C,toFlatObject:qe,kindOf:o,kindOfTest:a,endsWith:pt,toArray:Ce,forEachEntry:nt,matchAll:St,isHTMLForm:Ct,hasOwnProperty:Pn,hasOwnProp:Pn,reduceDescriptors:Nn,freezeMethods:Mn,toObjectSet:Rn,toCamelCase:Wt,noop:Ln,toFiniteNumber:yr,findKey:be,global:Se,isContextDefined:Xe,isSpecCompliantForm:Dn,toJSONObject:Fn,isAsyncFn:_r,isThenable:vr,setImmediate:jn,asap:br,isIterable:p=>p!=null&&h(p[r])};function E(p,g,v,b,S){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=p,this.name="AxiosError",g&&(this.code=g),v&&(this.config=v),b&&(this.request=b),S&&(this.response=S,this.status=S.status?S.status:null)}O.inherits(E,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.status}}});const F=E.prototype,Q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(p=>{Q[p]={value:p}}),Object.defineProperties(E,Q),Object.defineProperty(F,"isAxiosError",{value:!0}),E.from=(p,g,v,b,S,I)=>{const A=Object.create(F);O.toFlatObject(p,A,function(j){return j!==Error.prototype},j=>j!=="isAxiosError");const L=p&&p.message?p.message:"Error",V=g==null&&p?p.code:g;return E.call(A,L,V,v,b,S),p&&A.cause==null&&Object.defineProperty(A,"cause",{value:p,configurable:!0}),A.name=p&&p.name||"Error",I&&Object.assign(A,I),A};var ue=null;function fe(p){return O.isPlainObject(p)||O.isArray(p)}function Ve(p){return O.endsWith(p,"[]")?p.slice(0,-2):p}function ht(p,g,v){return p?p.concat(g).map(function(b,S){return b=Ve(b),!v&&S?"["+b+"]":b}).join(v?".":""):g}function Qe(p){return O.isArray(p)&&!p.some(fe)}const Ft=O.toFlatObject(O,{},null,function(p){return/^is[A-Z]/.test(p)});function rt(p,g,v){if(!O.isObject(p))throw new TypeError("target must be an object");g=g||new FormData,v=O.toFlatObject(v,{metaTokens:!0,dots:!1,indexes:!1},!1,function(ie,U){return!O.isUndefined(U[ie])});const b=v.metaTokens,S=v.visitor||j,I=v.dots,A=v.indexes,L=(v.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(g);if(!O.isFunction(S))throw new TypeError("visitor must be a function");function V(ie){if(ie===null)return"";if(O.isDate(ie))return ie.toISOString();if(O.isBoolean(ie))return ie.toString();if(!L&&O.isBlob(ie))throw new E("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(ie)||O.isTypedArray(ie)?L&&typeof Blob=="function"?new Blob([ie]):yc.from(ie):ie}function j(ie,U,W){let xe=ie;if(ie&&!W&&typeof ie=="object"){if(O.endsWith(U,"{}"))U=b?U:U.slice(0,-2),ie=JSON.stringify(ie);else if(O.isArray(ie)&&Qe(ie)||(O.isFileList(ie)||O.endsWith(U,"[]"))&&(xe=O.toArray(ie)))return U=Ve(U),xe.forEach(function(Oe,Ie){!(O.isUndefined(Oe)||Oe===null)&&g.append(A===!0?ht([U],Ie,I):A===null?U:U+"[]",V(Oe))}),!1}return fe(ie)?!0:(g.append(ht(W,U,I),V(ie)),!1)}const B=[],te=Object.assign(Ft,{defaultVisitor:j,convertValue:V,isVisitable:fe});function he(ie,U){if(!O.isUndefined(ie)){if(B.indexOf(ie)!==-1)throw Error("Circular reference detected in "+U.join("."));B.push(ie),O.forEach(ie,function(W,xe){(!(O.isUndefined(W)||W===null)&&S.call(g,W,O.isString(xe)?xe.trim():xe,U,te))===!0&&he(W,U?U.concat(xe):[xe])}),B.pop()}}if(!O.isObject(p))throw new TypeError("data must be an object");return he(p),g}function Te(p){const g={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(p).replace(/[!'()~]|%20|%00/g,function(v){return g[v]})}function it(p,g){this._pairs=[],p&&rt(p,this,g)}const Ze=it.prototype;Ze.append=function(p,g){this._pairs.push([p,g])},Ze.toString=function(p){const g=p?function(v){return p.call(this,v,Te)}:Te;return this._pairs.map(function(v){return g(v[0])+"="+g(v[1])},"").join("&")};function _l(p){return encodeURIComponent(p).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Zi(p,g,v){if(!g)return p;const b=v&&v.encode||_l;O.isFunction(v)&&(v={serialize:v});const S=v&&v.serialize;let I;if(S?I=S(g,v):I=O.isURLSearchParams(g)?g.toString():new it(g,v).toString(b),I){const A=p.indexOf("#");A!==-1&&(p=p.slice(0,A)),p+=(p.indexOf("?")===-1?"?":"&")+I}return p}class vl{constructor(){this.handlers=[]}use(g,v,b){return this.handlers.push({fulfilled:g,rejected:v,synchronous:b?b.synchronous:!1,runWhen:b?b.runWhen:null}),this.handlers.length-1}eject(g){this.handlers[g]&&(this.handlers[g]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(g){O.forEach(this.handlers,function(v){v!==null&&g(v)})}}var Ki=vl,Ji={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bl=typeof URLSearchParams<"u"?URLSearchParams:it,wl=typeof FormData<"u"?FormData:null,xl=typeof Blob<"u"?Blob:null,kl={isBrowser:!0,classes:{URLSearchParams:bl,FormData:wl,Blob:xl},protocols:["http","https","file","blob","url","data"]};const wr=typeof window<"u"&&typeof document<"u",xr=typeof navigator=="object"&&navigator||void 0,Sl=wr&&(!xr||["ReactNative","NativeScript","NS"].indexOf(xr.product)<0),Cl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Il=wr&&window.location.href||"http://localhost";var Al=Object.freeze({__proto__:null,hasBrowserEnv:wr,hasStandardBrowserWebWorkerEnv:Cl,hasStandardBrowserEnv:Sl,navigator:xr,origin:Il}),Ee={...Al,...kl};function Tl(p,g){return rt(p,new Ee.classes.URLSearchParams,{visitor:function(v,b,S,I){return Ee.isNode&&O.isBuffer(v)?(this.append(b,v.toString("base64")),!1):I.defaultVisitor.apply(this,arguments)},...g})}function El(p){return O.matchAll(/\w+|\[(\w*)]/g,p).map(g=>g[0]==="[]"?"":g[1]||g[0])}function Ol(p){const g={},v=Object.keys(p);let b;const S=v.length;let I;for(b=0;b=v.length;return A=!A&&O.isArray(S)?S.length:A,V?(O.hasOwnProp(S,A)?S[A]=[S[A],b]:S[A]=b,!L):((!S[A]||!O.isObject(S[A]))&&(S[A]=[]),g(v,b,S[A],I)&&O.isArray(S[A])&&(S[A]=Ol(S[A])),!L)}if(O.isFormData(p)&&O.isFunction(p.entries)){const v={};return O.forEachEntry(p,(b,S)=>{g(El(b),S,v,0)}),v}return null}function Pl(p,g,v){if(O.isString(p))try{return(g||JSON.parse)(p),O.trim(p)}catch(b){if(b.name!=="SyntaxError")throw b}return(v||JSON.stringify)(p)}const kr={transitional:Ji,adapter:["xhr","http","fetch"],transformRequest:[function(p,g){const v=g.getContentType()||"",b=v.indexOf("application/json")>-1,S=O.isObject(p);if(S&&O.isHTMLForm(p)&&(p=new FormData(p)),O.isFormData(p))return b?JSON.stringify(Yi(p)):p;if(O.isArrayBuffer(p)||O.isBuffer(p)||O.isStream(p)||O.isFile(p)||O.isBlob(p)||O.isReadableStream(p))return p;if(O.isArrayBufferView(p))return p.buffer;if(O.isURLSearchParams(p))return g.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),p.toString();let I;if(S){if(v.indexOf("application/x-www-form-urlencoded")>-1)return Tl(p,this.formSerializer).toString();if((I=O.isFileList(p))||v.indexOf("multipart/form-data")>-1){const A=this.env&&this.env.FormData;return rt(I?{"files[]":p}:p,A&&new A,this.formSerializer)}}return S||b?(g.setContentType("application/json",!1),Pl(p)):p}],transformResponse:[function(p){const g=this.transitional||kr.transitional,v=g&&g.forcedJSONParsing,b=this.responseType==="json";if(O.isResponse(p)||O.isReadableStream(p))return p;if(p&&O.isString(p)&&(v&&!this.responseType||b)){const S=!(g&&g.silentJSONParsing)&&b;try{return JSON.parse(p,this.parseReviver)}catch(I){if(S)throw I.name==="SyntaxError"?E.from(I,E.ERR_BAD_RESPONSE,this,null,this.response):I}}return p}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ee.classes.FormData,Blob:Ee.classes.Blob},validateStatus:function(p){return p>=200&&p<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],p=>{kr.headers[p]={}});var Sr=kr;const Nl=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Ml=p=>{const g={};let v,b,S;return p&&p.split(` `).forEach(function(I){S=I.indexOf(":"),v=I.substring(0,S).trim().toLowerCase(),b=I.substring(S+1).trim(),!(!v||g[v]&&Nl[v])&&(v==="set-cookie"?g[v]?g[v].push(b):g[v]=[b]:g[v]=g[v]?g[v]+", "+b:b)}),g};const Qi=Symbol("internals");function un(p){return p&&String(p).trim().toLowerCase()}function Un(p){return p===!1||p==null?p:O.isArray(p)?p.map(Un):String(p)}function Rl(p){const g=Object.create(null),v=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let b;for(;b=v.exec(p);)g[b[1]]=b[2];return g}const Ll=p=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(p.trim());function Cr(p,g,v,b,S){if(O.isFunction(b))return b.call(this,g,v);if(S&&(g=v),!!O.isString(g)){if(O.isString(b))return g.indexOf(b)!==-1;if(O.isRegExp(b))return b.test(g)}}function Dl(p){return p.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(g,v,b)=>v.toUpperCase()+b)}function Fl(p,g){const v=O.toCamelCase(" "+g);["get","set","has"].forEach(b=>{Object.defineProperty(p,b+v,{value:function(S,I,A){return this[b].call(this,g,S,I,A)},configurable:!0})})}class zn{constructor(g){g&&this.set(g)}set(g,v,b){const S=this;function I(L,V,j){const B=un(V);if(!B)throw new Error("header name must be a non-empty string");const te=O.findKey(S,B);(!te||S[te]===void 0||j===!0||j===void 0&&S[te]!==!1)&&(S[te||V]=Un(L))}const A=(L,V)=>O.forEach(L,(j,B)=>I(j,B,V));if(O.isPlainObject(g)||g instanceof this.constructor)A(g,v);else if(O.isString(g)&&(g=g.trim())&&!Ll(g))A(Ml(g),v);else if(O.isObject(g)&&O.isIterable(g)){let L={},V,j;for(const B of g){if(!O.isArray(B))throw TypeError("Object iterator must return a key-value pair");L[j=B[0]]=(V=L[j])?O.isArray(V)?[...V,B[1]]:[V,B[1]]:B[1]}A(L,v)}else g!=null&&I(v,g,b);return this}get(g,v){if(g=un(g),g){const b=O.findKey(this,g);if(b){const S=this[b];if(!v)return S;if(v===!0)return Rl(S);if(O.isFunction(v))return v.call(this,S,b);if(O.isRegExp(v))return v.exec(S);throw new TypeError("parser must be boolean|regexp|function")}}}has(g,v){if(g=un(g),g){const b=O.findKey(this,g);return!!(b&&this[b]!==void 0&&(!v||Cr(this,this[b],b,v)))}return!1}delete(g,v){const b=this;let S=!1;function I(A){if(A=un(A),A){const L=O.findKey(b,A);L&&(!v||Cr(b,b[L],L,v))&&(delete b[L],S=!0)}}return O.isArray(g)?g.forEach(I):I(g),S}clear(g){const v=Object.keys(this);let b=v.length,S=!1;for(;b--;){const I=v[b];(!g||Cr(this,this[I],I,g,!0))&&(delete this[I],S=!0)}return S}normalize(g){const v=this,b={};return O.forEach(this,(S,I)=>{const A=O.findKey(b,I);if(A){v[A]=Un(S),delete v[I];return}const L=g?Dl(I):String(I).trim();L!==I&&delete v[I],v[L]=Un(S),b[L]=!0}),this}concat(...g){return this.constructor.concat(this,...g)}toJSON(g){const v=Object.create(null);return O.forEach(this,(b,S)=>{b!=null&&b!==!1&&(v[S]=g&&O.isArray(b)?b.join(", "):b)}),v}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([g,v])=>g+": "+v).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(g){return g instanceof this?g:new this(g)}static concat(g,...v){const b=new this(g);return v.forEach(S=>b.set(S)),b}static accessor(g){const v=(this[Qi]=this[Qi]={accessors:{}}).accessors,b=this.prototype;function S(I){const A=un(I);v[A]||(Fl(b,I),v[A]=!0)}return O.isArray(g)?g.forEach(S):S(g),this}}zn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),O.reduceDescriptors(zn.prototype,({value:p},g)=>{let v=g[0].toUpperCase()+g.slice(1);return{get:()=>p,set(b){this[v]=b}}}),O.freezeMethods(zn);var et=zn;function Ir(p,g){const v=this||Sr,b=g||v,S=et.from(b.headers);let I=b.data;return O.forEach(p,function(A){I=A.call(v,I,S.normalize(),g?g.status:void 0)}),S.normalize(),I}function eo(p){return!!(p&&p.__CANCEL__)}function Gt(p,g,v){E.call(this,p??"canceled",E.ERR_CANCELED,g,v),this.name="CanceledError"}O.inherits(Gt,E,{__CANCEL__:!0});function to(p,g,v){const b=v.config.validateStatus;!v.status||!b||b(v.status)?p(v):g(new E("Request failed with status code "+v.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(v.status/100)-4],v.config,v.request,v))}function jl(p){const g=/^([-+\w]{1,25})(:?\/\/|:)/.exec(p);return g&&g[1]||""}function Ul(p,g){p=p||10;const v=new Array(p),b=new Array(p);let S=0,I=0,A;return g=g!==void 0?g:1e3,function(L){const V=Date.now(),j=b[I];A||(A=V),v[S]=L,b[S]=V;let B=I,te=0;for(;B!==S;)te+=v[B++],B=B%p;if(S=(S+1)%p,S===I&&(I=(I+1)%p),V-A{v=V,S=null,I&&(clearTimeout(I),I=null),p(...L)};return[(...L)=>{const V=Date.now(),j=V-v;j>=b?A(L,V):(S=L,I||(I=setTimeout(()=>{I=null,A(S)},b-j)))},()=>S&&A(S)]}const Bn=(p,g,v=3)=>{let b=0;const S=Ul(50,250);return zl(I=>{const A=I.loaded,L=I.lengthComputable?I.total:void 0,V=A-b,j=S(V),B=A<=L;b=A;const te={loaded:A,total:L,progress:L?A/L:void 0,bytes:V,rate:j||void 0,estimated:j&&L&&B?(L-A)/j:void 0,event:I,lengthComputable:L!=null,[g?"download":"upload"]:!0};p(te)},v)},no=(p,g)=>{const v=p!=null;return[b=>g[0]({lengthComputable:v,total:p,loaded:b}),g[1]]},ro=p=>(...g)=>O.asap(()=>p(...g));var Bl=Ee.hasStandardBrowserEnv?((p,g)=>v=>(v=new URL(v,Ee.origin),p.protocol===v.protocol&&p.host===v.host&&(g||p.port===v.port)))(new URL(Ee.origin),Ee.navigator&&/(msie|trident)/i.test(Ee.navigator.userAgent)):()=>!0,Hl=Ee.hasStandardBrowserEnv?{write(p,g,v,b,S,I){const A=[p+"="+encodeURIComponent(g)];O.isNumber(v)&&A.push("expires="+new Date(v).toGMTString()),O.isString(b)&&A.push("path="+b),O.isString(S)&&A.push("domain="+S),I===!0&&A.push("secure"),document.cookie=A.join("; ")},read(p){const g=document.cookie.match(new RegExp("(^|;\\s*)("+p+")=([^;]*)"));return g?decodeURIComponent(g[3]):null},remove(p){this.write(p,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ql(p){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(p)}function Vl(p,g){return g?p.replace(/\/?\/$/,"")+"/"+g.replace(/^\/+/,""):p}function io(p,g,v){let b=!ql(g);return p&&(b||v==!1)?Vl(p,g):g}const oo=p=>p instanceof et?{...p}:p;function jt(p,g){g=g||{};const v={};function b(j,B,te,he){return O.isPlainObject(j)&&O.isPlainObject(B)?O.merge.call({caseless:he},j,B):O.isPlainObject(B)?O.merge({},B):O.isArray(B)?B.slice():B}function S(j,B,te,he){if(O.isUndefined(B)){if(!O.isUndefined(j))return b(void 0,j,te,he)}else return b(j,B,te,he)}function I(j,B){if(!O.isUndefined(B))return b(void 0,B)}function A(j,B){if(O.isUndefined(B)){if(!O.isUndefined(j))return b(void 0,j)}else return b(void 0,B)}function L(j,B,te){if(te in g)return b(j,B);if(te in p)return b(void 0,j)}const V={url:I,method:I,data:I,baseURL:A,transformRequest:A,transformResponse:A,paramsSerializer:A,timeout:A,timeoutMessage:A,withCredentials:A,withXSRFToken:A,adapter:A,responseType:A,xsrfCookieName:A,xsrfHeaderName:A,onUploadProgress:A,onDownloadProgress:A,decompress:A,maxContentLength:A,maxBodyLength:A,beforeRedirect:A,transport:A,httpAgent:A,httpsAgent:A,cancelToken:A,socketPath:A,responseEncoding:A,validateStatus:L,headers:(j,B,te)=>S(oo(j),oo(B),te,!0)};return O.forEach(Object.keys({...p,...g}),function(j){const B=V[j]||S,te=B(p[j],g[j],j);O.isUndefined(te)&&B!==L||(v[j]=te)}),v}var so=p=>{const g=jt({},p);let{data:v,withXSRFToken:b,xsrfHeaderName:S,xsrfCookieName:I,headers:A,auth:L}=g;if(g.headers=A=et.from(A),g.url=Zi(io(g.baseURL,g.url,g.allowAbsoluteUrls),p.params,p.paramsSerializer),L&&A.set("Authorization","Basic "+btoa((L.username||"")+":"+(L.password?unescape(encodeURIComponent(L.password)):""))),O.isFormData(v)){if(Ee.hasStandardBrowserEnv||Ee.hasStandardBrowserWebWorkerEnv)A.setContentType(void 0);else if(O.isFunction(v.getHeaders)){const V=v.getHeaders(),j=["content-type","content-length"];Object.entries(V).forEach(([B,te])=>{j.includes(B.toLowerCase())&&A.set(B,te)})}}if(Ee.hasStandardBrowserEnv&&(b&&O.isFunction(b)&&(b=b(g)),b||b!==!1&&Bl(g.url))){const V=S&&I&&Hl.read(I);V&&A.set(S,V)}return g},$l=typeof XMLHttpRequest<"u"&&function(p){return new Promise(function(g,v){const b=so(p);let S=b.data;const I=et.from(b.headers).normalize();let{responseType:A,onUploadProgress:L,onDownloadProgress:V}=b,j,B,te,he,ie;function U(){he&&he(),ie&&ie(),b.cancelToken&&b.cancelToken.unsubscribe(j),b.signal&&b.signal.removeEventListener("abort",j)}let W=new XMLHttpRequest;W.open(b.method.toUpperCase(),b.url,!0),W.timeout=b.timeout;function xe(){if(!W)return;const Ie=et.from("getAllResponseHeaders"in W&&W.getAllResponseHeaders()),st={data:!A||A==="text"||A==="json"?W.responseText:W.response,status:W.status,statusText:W.statusText,headers:Ie,config:p,request:W};to(function(It){g(It),U()},function(It){v(It),U()},st),W=null}"onloadend"in W?W.onloadend=xe:W.onreadystatechange=function(){!W||W.readyState!==4||W.status===0&&!(W.responseURL&&W.responseURL.indexOf("file:")===0)||setTimeout(xe)},W.onabort=function(){W&&(v(new E("Request aborted",E.ECONNABORTED,p,W)),W=null)},W.onerror=function(Ie){const st=Ie&&Ie.message?Ie.message:"Network Error",It=new E(st,E.ERR_NETWORK,p,W);It.event=Ie||null,v(It),W=null},W.ontimeout=function(){let Ie=b.timeout?"timeout of "+b.timeout+"ms exceeded":"timeout exceeded";const st=b.transitional||Ji;b.timeoutErrorMessage&&(Ie=b.timeoutErrorMessage),v(new E(Ie,st.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,p,W)),W=null},S===void 0&&I.setContentType(null),"setRequestHeader"in W&&O.forEach(I.toJSON(),function(Ie,st){W.setRequestHeader(st,Ie)}),O.isUndefined(b.withCredentials)||(W.withCredentials=!!b.withCredentials),A&&A!=="json"&&(W.responseType=b.responseType),V&&([te,ie]=Bn(V,!0),W.addEventListener("progress",te)),L&&W.upload&&([B,he]=Bn(L),W.upload.addEventListener("progress",B),W.upload.addEventListener("loadend",he)),(b.cancelToken||b.signal)&&(j=Ie=>{W&&(v(!Ie||Ie.type?new Gt(null,p,W):Ie),W.abort(),W=null)},b.cancelToken&&b.cancelToken.subscribe(j),b.signal&&(b.signal.aborted?j():b.signal.addEventListener("abort",j)));const Oe=jl(b.url);if(Oe&&Ee.protocols.indexOf(Oe)===-1){v(new E("Unsupported protocol "+Oe+":",E.ERR_BAD_REQUEST,p));return}W.send(S||null)})},Wl=(p,g)=>{const{length:v}=p=p?p.filter(Boolean):[];if(g||v){let b=new AbortController,S;const I=function(j){if(!S){S=!0,L();const B=j instanceof Error?j:this.reason;b.abort(B instanceof E?B:new Gt(B instanceof Error?B.message:B))}};let A=g&&setTimeout(()=>{A=null,I(new E(`timeout ${g} of ms exceeded`,E.ETIMEDOUT))},g);const L=()=>{p&&(A&&clearTimeout(A),A=null,p.forEach(j=>{j.unsubscribe?j.unsubscribe(I):j.removeEventListener("abort",I)}),p=null)};p.forEach(j=>j.addEventListener("abort",I));const{signal:V}=b;return V.unsubscribe=()=>O.asap(L),V}};const Gl=function*(p,g){let v=p.byteLength;if(v{const S=Xl(p,g);let I=0,A,L=V=>{A||(A=!0,b&&b(V))};return new ReadableStream({async pull(V){try{const{done:j,value:B}=await S.next();if(j){L(),V.close();return}let te=B.byteLength;if(v){let he=I+=te;v(he)}V.enqueue(new Uint8Array(B))}catch(j){throw L(j),j}},cancel(V){return L(V),S.return()}},{highWaterMark:2})},lo=64*1024,{isFunction:Hn}=O,Kl=(({Request:p,Response:g})=>({Request:p,Response:g}))(O.global),{ReadableStream:co,TextEncoder:uo}=O.global,fo=(p,...g)=>{try{return!!p(...g)}catch{return!1}},Jl=p=>{p=O.merge.call({skipUndefined:!0},Kl,p);const{fetch:g,Request:v,Response:b}=p,S=g?Hn(g):typeof fetch=="function",I=Hn(v),A=Hn(b);if(!S)return!1;const L=S&&Hn(co),V=S&&(typeof uo=="function"?(U=>W=>U.encode(W))(new uo):async U=>new Uint8Array(await new v(U).arrayBuffer())),j=I&&L&&fo(()=>{let U=!1;const W=new v(Ee.origin,{body:new co,method:"POST",get duplex(){return U=!0,"half"}}).headers.has("Content-Type");return U&&!W}),B=A&&L&&fo(()=>O.isReadableStream(new b("").body)),te={stream:B&&(U=>U.body)};S&&["text","arrayBuffer","blob","formData","stream"].forEach(U=>{!te[U]&&(te[U]=(W,xe)=>{let Oe=W&&W[U];if(Oe)return Oe.call(W);throw new E(`Response type '${U}' is not supported`,E.ERR_NOT_SUPPORT,xe)})});const he=async U=>{if(U==null)return 0;if(O.isBlob(U))return U.size;if(O.isSpecCompliantForm(U))return(await new v(Ee.origin,{method:"POST",body:U}).arrayBuffer()).byteLength;if(O.isArrayBufferView(U)||O.isArrayBuffer(U))return U.byteLength;if(O.isURLSearchParams(U)&&(U=U+""),O.isString(U))return(await V(U)).byteLength},ie=async(U,W)=>O.toFiniteNumber(U.getContentLength())??he(W);return async U=>{let{url:W,method:xe,data:Oe,signal:Ie,cancelToken:st,timeout:It,onDownloadProgress:Pr,onUploadProgress:bo,responseType:At,headers:Nr,withCredentials:Gn="same-origin",fetchOptions:wo}=so(U),xo=g||fetch;At=At?(At+"").toLowerCase():"text";let Xn=Wl([Ie,st&&st.toAbortSignal()],It),fn=null;const Ut=Xn&&Xn.unsubscribe&&(()=>{Xn.unsubscribe()});let ko;try{if(bo&&j&&xe!=="get"&&xe!=="head"&&(ko=await ie(Nr,Oe))!==0){let Et=new v(W,{method:"POST",body:Oe,duplex:"half"}),Xt;if(O.isFormData(Oe)&&(Xt=Et.headers.get("content-type"))&&Nr.setContentType(Xt),Et.body){const[Mr,Zn]=no(ko,Bn(ro(bo)));Oe=ao(Et.body,lo,Mr,Zn)}}O.isString(Gn)||(Gn=Gn?"include":"omit");const at=I&&"credentials"in v.prototype,So={...wo,signal:Xn,method:xe.toUpperCase(),headers:Nr.normalize().toJSON(),body:Oe,duplex:"half",credentials:at?Gn:void 0};fn=I&&new v(W,So);let Tt=await(I?xo(fn,wo):xo(W,So));const Co=B&&(At==="stream"||At==="response");if(B&&(Pr||Co&&Ut)){const Et={};["status","statusText","headers"].forEach(Io=>{Et[Io]=Tt[Io]});const Xt=O.toFiniteNumber(Tt.headers.get("content-length")),[Mr,Zn]=Pr&&no(Xt,Bn(ro(Pr),!0))||[];Tt=new b(ao(Tt.body,lo,Mr,()=>{Zn&&Zn(),Ut&&Ut()}),Et)}At=At||"text";let oc=await te[O.findKey(te,At)||"text"](Tt,U);return!Co&&Ut&&Ut(),await new Promise((Et,Xt)=>{to(Et,Xt,{data:oc,headers:et.from(Tt.headers),status:Tt.status,statusText:Tt.statusText,config:U,request:fn})})}catch(at){throw Ut&&Ut(),at&&at.name==="TypeError"&&/Load failed|fetch/i.test(at.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,U,fn),{cause:at.cause||at}):E.from(at,at&&at.code,U,fn)}}},Yl=new Map,po=p=>{let g=p?p.env:{};const{fetch:v,Request:b,Response:S}=g,I=[b,S,v];let A=I.length,L=A,V,j,B=Yl;for(;L--;)V=I[L],j=B.get(V),j===void 0&&B.set(V,j=L?new Map:Jl(g)),B=j;return j};po();const Ar={http:ue,xhr:$l,fetch:{get:po}};O.forEach(Ar,(p,g)=>{if(p){try{Object.defineProperty(p,"name",{value:g})}catch{}Object.defineProperty(p,"adapterName",{value:g})}});const ho=p=>`- ${p}`,Ql=p=>O.isFunction(p)||p===null||p===!1;var mo={getAdapter:(p,g)=>{p=O.isArray(p)?p:[p];const{length:v}=p;let b,S;const I={};for(let A=0;A`adapter ${V} `+(j===!1?"is not supported by the environment":"is not available in the build"));let L=v?A.length>1?`since : `+A.map(ho).join(` `):" "+ho(A[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+L,"ERR_NOT_SUPPORT")}return S},adapters:Ar};function Tr(p){if(p.cancelToken&&p.cancelToken.throwIfRequested(),p.signal&&p.signal.aborted)throw new Gt(null,p)}function go(p){return Tr(p),p.headers=et.from(p.headers),p.data=Ir.call(p,p.transformRequest),["post","put","patch"].indexOf(p.method)!==-1&&p.headers.setContentType("application/x-www-form-urlencoded",!1),mo.getAdapter(p.adapter||Sr.adapter,p)(p).then(function(g){return Tr(p),g.data=Ir.call(p,p.transformResponse,g),g.headers=et.from(g.headers),g},function(g){return eo(g)||(Tr(p),g&&g.response&&(g.response.data=Ir.call(p,p.transformResponse,g.response),g.response.headers=et.from(g.response.headers))),Promise.reject(g)})}const yo="1.12.2",qn={};["object","boolean","number","function","string","symbol"].forEach((p,g)=>{qn[p]=function(v){return typeof v===p||"a"+(g<1?"n ":" ")+p}});const _o={};qn.transitional=function(p,g,v){function b(S,I){return"[Axios v"+yo+"] Transitional option '"+S+"'"+I+(v?". "+v:"")}return(S,I,A)=>{if(p===!1)throw new E(b(I," has been removed"+(g?" in "+g:"")),E.ERR_DEPRECATED);return g&&!_o[I]&&(_o[I]=!0,console.warn(b(I," has been deprecated since v"+g+" and will be removed in the near future"))),p?p(S,I,A):!0}},qn.spelling=function(p){return(g,v)=>(console.warn(`${v} is likely a misspelling of ${p}`),!0)};function ec(p,g,v){if(typeof p!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);const b=Object.keys(p);let S=b.length;for(;S-- >0;){const I=b[S],A=g[I];if(A){const L=p[I],V=L===void 0||A(L,I,p);if(V!==!0)throw new E("option "+I+" must be "+V,E.ERR_BAD_OPTION_VALUE);continue}if(v!==!0)throw new E("Unknown option "+I,E.ERR_BAD_OPTION)}}var Vn={assertOptions:ec,validators:qn};const ot=Vn.validators;class $n{constructor(g){this.defaults=g||{},this.interceptors={request:new Ki,response:new Ki}}async request(g,v){try{return await this._request(g,v)}catch(b){if(b instanceof Error){let S={};Error.captureStackTrace?Error.captureStackTrace(S):S=new Error;const I=S.stack?S.stack.replace(/^.+\n/,""):"";try{b.stack?I&&!String(b.stack).endsWith(I.replace(/^.+\n.+\n/,""))&&(b.stack+=` `+I):b.stack=I}catch{}}throw b}}_request(g,v){typeof g=="string"?(v=v||{},v.url=g):v=g||{},v=jt(this.defaults,v);const{transitional:b,paramsSerializer:S,headers:I}=v;b!==void 0&&Vn.assertOptions(b,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean)},!1),S!=null&&(O.isFunction(S)?v.paramsSerializer={serialize:S}:Vn.assertOptions(S,{encode:ot.function,serialize:ot.function},!0)),v.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?v.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:v.allowAbsoluteUrls=!0),Vn.assertOptions(v,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),v.method=(v.method||this.defaults.method||"get").toLowerCase();let A=I&&O.merge(I.common,I[v.method]);I&&O.forEach(["delete","get","head","post","put","patch","common"],U=>{delete I[U]}),v.headers=et.concat(A,I);const L=[];let V=!0;this.interceptors.request.forEach(function(U){typeof U.runWhen=="function"&&U.runWhen(v)===!1||(V=V&&U.synchronous,L.unshift(U.fulfilled,U.rejected))});const j=[];this.interceptors.response.forEach(function(U){j.push(U.fulfilled,U.rejected)});let B,te=0,he;if(!V){const U=[go.bind(this),void 0];for(U.unshift(...L),U.push(...j),he=U.length,B=Promise.resolve(v);te{if(!b._listeners)return;let I=b._listeners.length;for(;I-- >0;)b._listeners[I](S);b._listeners=null}),this.promise.then=S=>{let I;const A=new Promise(L=>{b.subscribe(L),I=L}).then(S);return A.cancel=function(){b.unsubscribe(I)},A},g(function(S,I,A){b.reason||(b.reason=new Gt(S,I,A),v(b.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(g){if(this.reason){g(this.reason);return}this._listeners?this._listeners.push(g):this._listeners=[g]}unsubscribe(g){if(!this._listeners)return;const v=this._listeners.indexOf(g);v!==-1&&this._listeners.splice(v,1)}toAbortSignal(){const g=new AbortController,v=b=>{g.abort(b)};return this.subscribe(v),g.signal.unsubscribe=()=>this.unsubscribe(v),g.signal}static source(){let g;return{token:new Er(function(v){g=v}),cancel:g}}}var tc=Er;function nc(p){return function(g){return p.apply(null,g)}}function rc(p){return O.isObject(p)&&p.isAxiosError===!0}const Or={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Or).forEach(([p,g])=>{Or[g]=p});var ic=Or;function vo(p){const g=new Wn(p),v=e(Wn.prototype.request,g);return O.extend(v,Wn.prototype,g,{allOwnKeys:!0}),O.extend(v,g,null,{allOwnKeys:!0}),v.create=function(b){return vo(jt(p,b))},v}const we=vo(Sr);return we.Axios=Wn,we.CanceledError=Gt,we.CancelToken=tc,we.isCancel=eo,we.VERSION=yo,we.toFormData=rt,we.AxiosError=E,we.Cancel=we.CanceledError,we.all=function(p){return Promise.all(p)},we.spread=nc,we.isAxiosError=rc,we.mergeConfig=jt,we.AxiosHeaders=et,we.formToJSON=p=>Yi(O.isHTMLForm(p)?new FormData(p):p),we.getAdapter=mo.getAdapter,we.HttpStatusCode=ic,we.default=we,Rr=we,Rr}var Vo={},$o;function wu(){return $o||($o=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(u,h){return c(u,"",h)}const t=u=>"/remote.php/"+u,r=(u,h)=>(h?.baseURL??d())+t(u),i=(u,h,y)=>{const w=Object.assign({ocsVersion:2},y||{}).ocsVersion===1?1:2;return(y?.baseURL??d())+"/ocs/v"+w+".php"+o(u,h,y)},o=(u,h,y)=>{const w=Object.assign({escape:!0},y||{}),_=function(k,T){return T=T||{},k.replace(/{([^{}]*)}/g,function(R,$){const N=T[$];return w.escape?encodeURIComponent(typeof N=="string"||typeof N=="number"?N.toString():R):typeof N=="string"||typeof N=="number"?N.toString():R})};return u.charAt(0)!=="/"&&(u="/"+u),_(u,h||{})},a=(u,h,y)=>{const w=Object.assign({noRewrite:!1},y||{}),_=y?.baseURL??m();return window?.OC?.config?.modRewriteWorking===!0&&!w.noRewrite?_+o(u,h,y):_+"/index.php"+o(u,h,y)},f=(u,h)=>h.includes(".")?c(u,"img",h):c(u,"img",`${h}.svg`),c=(u,h,y)=>{const w=window?.OC?.coreApps?.includes(u)??!1,_=y.slice(-3)==="php";let k=m();return _&&!w?(k+=`/index.php/apps/${u}`,h&&(k+=`/${encodeURI(h)}`),y!=="index.php"&&(k+=`/${y}`)):!_&&!w?(k=s(u),h&&(k+=`/${h}/`),k.at(-1)!=="/"&&(k+="/"),k+=y):((u==="settings"||u==="core"||u==="search")&&h==="ajax"&&(k+="/index.php"),u&&(k+=`/${u}`),h&&(k+=`/${h}`),k+=`/${y}`),k},d=()=>window.location.protocol+"//"+window.location.host+m();function m(){let u=window._oc_webroot;if(typeof u>"u"){u=location.pathname;const h=u.indexOf("/index.php/");if(h!==-1)u=u.slice(0,h);else{const y=u.indexOf("/",1);u=u.slice(0,y>0?y:void 0)}}return u}function s(u){return(window._oc_appswebroots??{})[u]??""}function l(u,h){const y=(h?.size||64)<=64?64:512,w=h?.isGuestUser?"/guest":"",_=h?.isDarkTheme?"/dark":"";return a(`/avatar${w}/{user}/{size}${_}`,{user:u,size:y})}e.generateAvatarUrl=l,e.generateFilePath=c,e.generateOcsUrl=i,e.generateRemoteUrl=r,e.generateUrl=a,e.getAppRootUrl=s,e.getBaseUrl=d,e.getRootUrl=m,e.imagePath=f,e.linkTo=n}(Vo)),Vo}var Wo;function xu(){return Wo||(Wo=1,function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=vu(),t=bu(),r=wu(),i=(l=>l&&l.__esModule?l:{default:l})(t),o=i.default.create({headers:{requesttoken:n.getRequestToken()??"","X-Requested-With":"XMLHttpRequest"}});n.onRequestTokenUpdate(l=>{o.defaults.headers.requesttoken=l});const a=Object.assign(o,{CancelToken:i.default.CancelToken,isCancel:i.default.isCancel}),f=Symbol("csrf-retry");function c(l){return async u=>{if(!t.isAxiosError(u))throw u;const{config:h,response:y,request:w}=u,_=w?.responseURL;if(h&&!h[f]&&y?.status===412&&y?.data?.message==="CSRF check failed"){console.warn(`Request to ${_} failed because of a CSRF mismatch. Fetching a new token`);const{data:{token:k}}=await l.get(r.generateUrl("/csrftoken"));return console.debug(`New request token ${k} fetched`),l.defaults.headers.requesttoken=k,l({...h,headers:{...h.headers,requesttoken:k},[f]:!0})}throw u}}const d=Symbol("retryDelay");function m(l){return async u=>{if(!t.isAxiosError(u))throw u;const{config:h,response:y,request:w}=u,_=w?.responseURL,k=y?.status,T=y?.headers;let R=typeof h?.[d]=="number"?h?.[d]:1;if(k===503&&T?.["x-nextcloud-maintenance-mode"]==="1"&&h?.retryIfMaintenanceMode){if(R*=2,R>32)throw console.error("Retry delay exceeded one minute, giving up.",{responseURL:_}),u;return console.warn(`Request to ${_} failed because of maintenance mode. Retrying in ${R}s`),await new Promise($=>{setTimeout($,R*1e3)}),l({...h,[d]:R})}throw u}}async function s(l){if(t.isAxiosError(l)){const{config:u,response:h,request:y}=l,w=y?.responseURL;h?.status===401&&h?.data?.message==="Current user is not logged in"&&u?.reloadExpiredSession&&window?.location&&(console.error(`Request to ${w} failed because the user session expired. Reloading the page …`),window.location.reload())}throw l}a.interceptors.response.use(l=>l,c(a)),a.interceptors.response.use(l=>l,m(a)),a.interceptors.response.use(l=>l,s),Object.defineProperty(e,"isAxiosError",{enumerable:!0,get:()=>t.isAxiosError}),Object.defineProperty(e,"isCancel",{enumerable:!0,get:()=>t.isCancel}),e.default=a}(jo)),jo}var Go;function ku(){if(Go)return zt;Go=1;var e=zt&&zt.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(zt,"__esModule",{value:!0}),zt.getSupportedTypes=i,zt.listen=o;const n=yu(),t=e(xu()),r=aa();function i(){const c=(0,n.getCapabilities)();return c.notify_push?c.notify_push.type:[]}function o(c,d,m={}){return a(m),window._notify_push_listeners[c]||(window._notify_push_listeners[c]=[]),window._notify_push_listeners[c].push(d),window._notify_push_ws!==null&&typeof window._notify_push_ws=="object"&&window._notify_push_ready?window._notify_push_ws.send("listen "+c):f(m),window._notify_push_available}function a(c={}){typeof window._notify_push_listeners>"u"&&(window._notify_push_listeners={},window._notify_push_ws=null,window._notify_push_online=!0,window._notify_push_available=!1,window._notify_push_error_count=0,window._notify_push_ready=!1,(0,r.subscribe)("networkOffline",()=>{window._notify_push_online=!1,window._notify_push_ws=null,window._notify_push_ready=!1}),(0,r.subscribe)("networkOnline",()=>{window._notify_push_error_count=0,window._notify_push_online=!0,f(c)}))}async function f(c={}){if(window._notify_push_ws)return!0;window._notify_push_ws=!0;const d=(0,n.getCapabilities)();if(!d.notify_push)return window._notify_push_available=!1,window._notify_push_ws=null,!1;window._notify_push_available=!0;let m;return c.credentials||(m=(await t.default.post(d.notify_push.endpoints.pre_auth)).data),window._notify_push_ws=new WebSocket(d.notify_push.endpoints.websocket),window._notify_push_ws.onopen=()=>{if(typeof window._notify_push_ws=="object"&&window._notify_push_ws){m?(window._notify_push_ws.send(""),window._notify_push_ws.send(m)):c.credentials&&(window._notify_push_ws.send(c.credentials.username),window._notify_push_ws.send(c.credentials.password)),window._notify_push_ready=!0;for(let s in window._notify_push_listeners)window._notify_push_ws.send("listen "+s)}},window._notify_push_ws.onmessage=s=>{if(s.data==="authenticated")window._notify_push_error_count=0;else{const l=s.data.indexOf(" ");let[u,h]=l>0?[s.data.slice(0,l),s.data.slice(l+1)]:[s.data,null];if(h&&(h=JSON.parse(h)),window._notify_push_listeners[u])for(let y of window._notify_push_listeners[u])y(u,h)}},window._notify_push_ws.onerror=window._notify_push_ws.onclose=()=>{window._notify_push_ws=null,window._notify_push_error_count+=1,window._notify_push_ready=!1,setTimeout(()=>{window._notify_push_online&&f(c)},1e3*window._notify_push_error_count)},!0}return zt}var Su=ku();const Cu=["aria-labelledby"],Iu={key:0,class:"empty-content__icon","aria-hidden":"true"},Au=["id"],Tu={key:2,class:"empty-content__description"},Eu={key:3,class:"empty-content__action"},Ou=kt({__name:"NcEmptyContent",props:{description:{default:""},name:{default:""}},setup(e){const n=tn();return(t,r)=>(M(),z("div",{"aria-labelledby":Ne(n),class:"empty-content",role:"note"},[t.$slots.icon?(M(),z("div",Iu,[je(t.$slots,"icon",{},void 0,!0)])):ae("",!0),t.name!==""||t.$slots.name?(M(),z("div",{key:1,id:Ne(n),class:"empty-content__name"},[je(t.$slots,"name",{},()=>[Mt(ne(t.name),1)],!0)],8,Au)):ae("",!0),t.description!==""||t.$slots.description?(M(),z("p",Tu,[je(t.$slots,"description",{},()=>[Mt(ne(t.description),1)],!0)])):ae("",!0),t.$slots.action?(M(),z("div",Eu,[je(t.$slots,"action",{},void 0,!0)])):ae("",!0)],8,Cu))}}),Pu=Ge(Ou,[["__scopeId","data-v-b101d636"]]),Nu=["id"],Mu={class:"header-menu__caret"},Ru=["id"],Lu={ref:"contentContainer",class:"header-menu__content"},Du=kt({__name:"NcHeaderMenu",props:{id:{},ariaLabel:{default:()=>{}},open:{type:Boolean,default:!1},isNav:{type:Boolean,default:!1},description:{default:()=>{}},excludeClickOutsideSelectors:{default:()=>[]}},emits:["closed","opened","update:open"],setup(e,{emit:n}){const t=n,r=tn(),i=tn(),o=Pt(),a=Pt(e.open),f=oe(()=>e.isNav?"nav":"div"),c=yn("contentContainer"),d=yn("headerMenu"),m=yn("triggerButton"),s=oe(()=>Array.isArray(e.excludeClickOutsideSelectors)?e.excludeClickOutsideSelectors:e.excludeClickOutsideSelectors.split(" "));ri(d,()=>u(!1),{ignore:s}),_c("Escape",()=>u(!1),{prevent:!0}),vc(a,{disabled:()=>!e.isNav}),an(()=>e.open,_=>u(_));function l(){u(!a.value)}async function u(_){_!==a.value&&(a.value=_,t("update:open",_),await oi(),await(_?y():w()),t(_?"opened":"closed"))}function h(_){e.isNav&&_.relatedTarget instanceof Node&&d.value?.contains(_.relatedTarget)&&u(!1)}async function y(){e.isNav||o.value||(o.value=bc(c.value,{allowOutsideClick:!0,trapStack:wc(),fallbackFocus:m.value?.$el}),o.value.activate())}function w(){o.value?.deactivate(),o.value=void 0}return(_,k)=>(M(),ce(Sn(f.value),{id:_.id,ref:"headerMenu","aria-labelledby":_.isNav?Ne(i):null,class:ze([{"header-menu--opened":a.value},"header-menu"]),onFocusout:h},{default:pe(()=>[Le(Ne(Vt),{id:_.isNav?Ne(i):null,ref:"triggerButton","aria-controls":`header-menu-${_.id}`,"aria-expanded":a.value.toString(),"aria-label":_.ariaLabel,class:"header-menu__trigger",size:"large",variant:"tertiary-no-background",onClick:Qc(l,["prevent"])},{icon:pe(()=>[je(_.$slots,"trigger",{},void 0,!0)]),_:3},8,["id","aria-controls","aria-expanded","aria-label"]),_.description?(M(),z("span",{key:0,id:Ne(r),class:"header-menu__description hidden-visually"},ne(_.description),9,Nu)):ae("",!0),si(se("div",Mu,null,512),[[Po,a.value]]),si(se("div",{id:`header-menu-${_.id}`,class:"header-menu__wrapper"},[se("div",Lu,[je(_.$slots,"default",{},void 0,!0)],512)],8,Ru),[[Po,a.value]])]),_:3},40,["id","aria-labelledby","class"]))}}),Fu=Ge(Du,[["__scopeId","data-v-d45c5788"]]),ju={name:"BellOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Uu=["aria-hidden","aria-label"],zu=["fill","width","height"],Bu={d:"M10 21H14C14 22.1 13.1 23 12 23S10 22.1 10 21M21 19V20H3V19L5 17V11C5 7.9 7 5.2 10 4.3V4C10 2.9 10.9 2 12 2S14 2.9 14 4V4.3C17 5.2 19 7.9 19 11V17L21 19M17 11C17 8.2 14.8 6 12 6S7 8.2 7 11V18H17V11Z"},Hu={key:0};function qu(e,n,t,r,i,o){return M(),z("span",Rt(e.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon bell-outline-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(M(),z("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[se("path",Bu,[t.title?(M(),z("title",Hu,ne(t.title),1)):ae("",!0)])],8,zu))],16,Uu)}const Vu=xt(ju,[["render",qu]]),$u={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Wu=["aria-hidden","aria-label"],Gu=["fill","width","height"],Xu={d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},Zu={key:0};function Ku(e,n,t,r,i,o){return M(),z("span",Rt(e.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon close-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(M(),z("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[se("path",Xu,[t.title?(M(),z("title",Zu,ne(t.title),1)):ae("",!0)])],8,Gu))],16,Wu)}const la=xt($u,[["render",Ku]]),Ju={name:"MessageOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Yu=["aria-hidden","aria-label"],Qu=["fill","width","height"],ef={d:"M20 2H4C2.9 2 2 2.9 2 4V22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2M20 16H5.2L4 17.2V4H20V16Z"},tf={key:0};function nf(e,n,t,r,i,o){return M(),z("span",Rt(e.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon message-outline-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(M(),z("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[se("path",ef,[t.title?(M(),z("title",tf,ne(t.title),1)):ae("",!0)])],8,Qu))],16,Yu)}const ca=xt(Ju,[["render",nf]]);function Ii(){try{return Nt("core","capabilities")}catch{return console.debug("Could not find capabilities initial state fall back to _oc_capabilities"),"_oc_capabilities"in window?window._oc_capabilities:{}}}const rf={name:"BellIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},of=["aria-hidden","aria-label"],sf=["fill","width","height"],af={d:"M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M14,21A2,2 0 0,1 12,23A2,2 0 0,1 10,21"},lf={key:0};function cf(e,n,t,r,i,o){return M(),z("span",Rt(e.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon bell-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(M(),z("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[se("path",af,[t.title?(M(),z("title",lf,ne(t.title),1)):ae("",!0)])],8,sf))],16,of)}const uf=xt(rf,[["render",cf]]),ff={key:0,class:"notifications-button__icon"},df=["width","height"],pf={__name:"IconNotification",props:{showDot:{type:Boolean,default:!1},showWarning:{type:Boolean,default:!1},size:{type:Number,default:20}},setup(e){const n=Ii()?.theming,t=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function r(a){const f=parseInt(a.substring(1,3),16)/255,c=parseInt(a.substring(3,5),16)/255,d=parseInt(a.substring(5,7),16)/255,m=Math.max(f,c,d),s=Math.min(f,c,d);let l=0,u=0;const h=(m+s)/2;if(m!==s){const y=m-s;switch(u=h>.5?y/(2-m-s):y/(m+s),m){case f:l=(c-d)/y+(c{if(!n?.color||!t.test(n?.color))return!1;const[a,f,c]=r(n.color);return(a>=330||a<=15)&&f>.4&&(c>.1||c<.6)}),o=oe(()=>{if(!n?.color||!t.test(n?.color))return!1;const[a,f,c]=r(n.color);return(a>=305||a<=64)&&f>.7&&(c>.1||c<.6)});return(a,f)=>e.showDot||e.showWarning?(M(),z("span",ff,[(M(),z("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"currentColor"},[f[0]||(f[0]=se("path",{d:"M 19,11.79 C 18.5,11.92 18,12 17.5,12 14.47,12 12,9.53 12,6.5 12,5.03 12.58,3.7 13.5,2.71 13.15,2.28 12.61,2 12,2 10.9,2 10,2.9 10,4 V 4.29 C 7.03,5.17 5,7.9 5,11 v 6 l -2,2 v 1 H 21 V 19 L 19,17 V 11.79 M 12,23 c 1.11,0 2,-0.89 2,-2 h -4 c 0,1.11 0.9,2 2,2 z"},null,-1)),se("path",{class:ze(["notification__dot",{"notification__dot--warning":e.showWarning&&!o.value,"notification__dot--white":i.value||e.showWarning&&o.value}]),d:"M 21,6.5 C 21,8.43 19.43,10 17.5,10 15.57,10 14,8.43 14,6.5 14,4.57 15.57,3 17.5,3 19.43,3 21,4.57 21,6.5"},null,2)],8,df))])):(M(),ce(uf,{key:1,class:"notifications-button__icon",size:e.size},null,8,["size"]))}},hf=["data-timestamp","title","textContent"],mf=kt({__name:"NcDateTime",props:{timestamp:{},format:{default:()=>({timeStyle:"medium",dateStyle:"short"})},relativeTime:{type:[Boolean,String],default:"long"},ignoreSeconds:{type:Boolean}},setup(e){const n=e,t=oe(()=>({format:n.format})),r=oe(()=>({ignoreSeconds:n.ignoreSeconds,relativeTime:n.relativeTime||"long",update:n.relativeTime!==!1})),i=kc(No(()=>n.timestamp),t),o=xc(No(()=>n.timestamp),r),a=oe(()=>n.relativeTime?o.value:i.value);return(f,c)=>(M(),z("span",{class:"nc-datetime",dir:"auto","data-timestamp":f.timestamp,title:Ne(i),textContent:ne(a.value)},null,8,hf))}}),ua=-1,lr=0,_n=1,rr=2,Ai=3,Ti=4,Ei=5,Oi=6,fa=7,da=8,Xo=typeof self=="object"?self:globalThis,gf=(e,n)=>{const t=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=n[i];switch(o){case lr:case ua:return t(a,i);case _n:{const f=t([],i);for(const c of a)f.push(r(c));return f}case rr:{const f=t({},i);for(const[c,d]of a)f[r(c)]=r(d);return f}case Ai:return t(new Date(a),i);case Ti:{const{source:f,flags:c}=a;return t(new RegExp(f,c),i)}case Ei:{const f=t(new Map,i);for(const[c,d]of a)f.set(r(c),r(d));return f}case Oi:{const f=t(new Set,i);for(const c of a)f.add(r(c));return f}case fa:{const{name:f,message:c}=a;return t(new Xo[f](c),i)}case da:return t(BigInt(a),i);case"BigInt":return t(Object(BigInt(a)),i);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:f}=new Uint8Array(a);return t(new DataView(f),a)}}return t(new Xo[o](a),i)};return r},Zo=e=>gf(new Map,e)(0),Zt="",{toString:yf}={},{keys:_f}=Object,dn=e=>{const n=typeof e;if(n!=="object"||!e)return[lr,n];const t=yf.call(e).slice(8,-1);switch(t){case"Array":return[_n,Zt];case"Object":return[rr,Zt];case"Date":return[Ai,Zt];case"RegExp":return[Ti,Zt];case"Map":return[Ei,Zt];case"Set":return[Oi,Zt];case"DataView":return[_n,t]}return t.includes("Array")?[_n,t]:t.includes("Error")?[fa,t]:[rr,t]},Kn=([e,n])=>e===lr&&(n==="function"||n==="symbol"),vf=(e,n,t,r)=>{const i=(a,f)=>{const c=r.push(a)-1;return t.set(f,c),c},o=a=>{if(t.has(a))return t.get(a);let[f,c]=dn(a);switch(f){case lr:{let m=a;switch(c){case"bigint":f=da,m=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);m=null;break;case"undefined":return i([ua],a)}return i([f,m],a)}case _n:{if(c){let l=a;return c==="DataView"?l=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(l=new Uint8Array(a)),i([c,[...l]],a)}const m=[],s=i([f,m],a);for(const l of a)m.push(o(l));return s}case rr:{if(c)switch(c){case"BigInt":return i([c,a.toString()],a);case"Boolean":case"Number":case"String":return i([c,a.valueOf()],a)}if(n&&"toJSON"in a)return o(a.toJSON());const m=[],s=i([f,m],a);for(const l of _f(a))(e||!Kn(dn(a[l])))&&m.push([o(l),o(a[l])]);return s}case Ai:return i([f,a.toISOString()],a);case Ti:{const{source:m,flags:s}=a;return i([f,{source:m,flags:s}],a)}case Ei:{const m=[],s=i([f,m],a);for(const[l,u]of a)(e||!(Kn(dn(l))||Kn(dn(u))))&&m.push([o(l),o(u)]);return s}case Oi:{const m=[],s=i([f,m],a);for(const l of a)(e||!Kn(dn(l)))&&m.push(o(l));return s}}const{message:d}=a;return i([f,{name:c,message:d}],a)};return o},Ko=(e,{json:n,lossy:t}={})=>{const r=[];return vf(!(n||t),!!n,new Map,r)(e),r},Ht=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Zo(Ko(e,n)):structuredClone(e):(e,n)=>Zo(Ko(e,n)),pa=function(e){if(e==null)return xf;if(typeof e=="string")return wf(e);if(typeof e=="object")return bf(e);if(typeof e=="function")return Pi(e);throw new Error("Expected function, string, or array as `test`")};function bf(e){const n=[];let t=-1;for(;++t":""))+")"})}return l;function l(){let u=ha,h,y,w;if((!n||o(c,d,m[m.length-1]||void 0))&&(u=Lf(t(c,m)),u[0]===ci))return u;if("children"in c&&c.children){const _=c;if(_.children&&u[0]!==Mi)for(y=(r?_.children.length:-1)+a,w=m.concat(_);y>-1&&y<_.children.length;){const k=_.children[y];if(h=f(k,y,w)(),h[0]===ci)return h;y=typeof h[1]=="number"?h[1]:y+a}}return u}}}function Lf(e){return Array.isArray(e)?e:typeof e=="number"?[Rf,e]:e==null?ha:[e]}function wt(e,n,t,r){let i,o,a;typeof n=="function"&&typeof t!="function"?(o=void 0,a=n,i=t):(o=n,a=t,i=r),ma(e,o,f,i);function f(c,d){const m=d[d.length-1],s=m?m.children.indexOf(c):void 0;return a(c,s,m)}}const Df=["http","https"],Ff=["nofollow"],jf={};function Uf(e){const n=e||jf,t=n.protocols||Df,r=pa(n.test);return function(i){wt(i,"element",function(o,a,f){if(o.tagName==="a"&&typeof o.properties.href=="string"&&r(o,a,f)){const c=o.properties.href;if(If(c)?t.includes(c.slice(0,c.indexOf(":"))):c.startsWith("//")){const d=pn(n.content,o),m=d&&!Array.isArray(d)?[d]:d,s=pn(n.rel,o)||Ff,l=typeof s=="string"?Af(s):s,u=pn(n.target,o),h=pn(n.properties,o);if(h&&Object.assign(o.properties,Ht(h)),l.length>0&&(o.properties.rel=[...l]),u&&(o.properties.target=u),m){const y=pn(n.contentProperties,o)||{};o.children.push({type:"element",tagName:"span",properties:Ht(y),children:Ht(m)})}}}})}}function pn(e,n){return typeof e=="function"?e(n):e}function zf(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Bf=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hf=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qf={};function Jo(e,n){return(qf.jsx?Hf:Bf).test(e)}const Vf=/[ \t\n\f\r]/g;function $f(e){return typeof e=="object"?e.type==="text"?Yo(e.value):!1:Yo(e)}function Yo(e){return e.replace(Vf,"")===""}class vn{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}vn.prototype.normal={},vn.prototype.property={},vn.prototype.space=void 0;function ga(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new vn(t,r,n)}function ui(e){return e.toLowerCase()}class Fe{constructor(n,t){this.attribute=t,this.property=n}}Fe.prototype.attribute="",Fe.prototype.booleanish=!1,Fe.prototype.boolean=!1,Fe.prototype.commaOrSpaceSeparated=!1,Fe.prototype.commaSeparated=!1,Fe.prototype.defined=!1,Fe.prototype.mustUseProperty=!1,Fe.prototype.number=!1,Fe.prototype.overloadedBoolean=!1,Fe.prototype.property="",Fe.prototype.spaceSeparated=!1,Fe.prototype.space=void 0;let Wf=0;const re=$t(),ke=$t(),fi=$t(),D=$t(),me=$t(),on=$t(),$e=$t();function $t(){return 2**++Wf}const di=Object.freeze(Object.defineProperty({__proto__:null,boolean:re,booleanish:ke,commaOrSpaceSeparated:$e,commaSeparated:on,number:D,overloadedBoolean:fi,spaceSeparated:me},Symbol.toStringTag,{value:"Module"})),Lr=Object.keys(di);class Ri extends Fe{constructor(n,t,r,i){let o=-1;if(super(n,t),Qo(this,"space",i),typeof r=="number")for(;++o4&&t.slice(0,4)==="data"&&Jf.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(es,ed);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!es.test(o)){let a=o.replace(Kf,Qf);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}i=Ri}return new i(r,n)}function Qf(e){return"-"+e.toLowerCase()}function ed(e){return e.charAt(1).toUpperCase()}const td=ga([ya,Gf,ba,wa,xa],"html"),Li=ga([ya,Xf,ba,wa,xa],"svg");var Kt={},Dr,ts;function nd(){if(ts)return Dr;ts=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,f=/^\s+|\s+$/g,c=` `,d="/",m="*",s="",l="comment",u="declaration";Dr=function(y,w){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];w=w||{};var _=1,k=1;function T(K){var q=K.match(n);q&&(_+=q.length);var Y=K.lastIndexOf(c);k=~Y?K.length-Y:k+K.length}function R(){var K={line:_,column:k};return function(q){return q.position=new $(K),G(),q}}function $(K){this.start=K,this.end={line:_,column:k},this.source=w.source}$.prototype.content=y;function N(K){var q=new Error(w.source+":"+_+":"+k+": "+K);if(q.reason=K,q.filename=w.source,q.line=_,q.column=k,q.source=y,!w.silent)throw q}function J(K){var q=K.exec(y);if(q){var Y=q[0];return T(Y),y=y.slice(Y.length),q}}function G(){J(t)}function H(K){var q;for(K=K||[];q=P();)q!==!1&&K.push(q);return K}function P(){var K=R();if(!(d!=y.charAt(0)||m!=y.charAt(1))){for(var q=2;s!=y.charAt(q)&&(m!=y.charAt(q)||d!=y.charAt(q+1));)++q;if(q+=2,s===y.charAt(q-1))return N("End of comment missing");var Y=y.slice(2,q-2);return k+=2,T(Y),y=y.slice(q),k+=2,K({type:l,comment:Y})}}function X(){var K=R(),q=J(r);if(q){if(P(),!J(i))return N("property missing ':'");var Y=J(o),_e=K({type:u,property:h(q[0].replace(e,s)),value:Y?h(Y[0].replace(e,s)):s});return J(a),_e}}function Z(){var K=[];H(K);for(var q;q=X();)q!==!1&&(K.push(q),H(K));return K}return G(),Z()};function h(y){return y?y.replace(f,s):s}return Dr}var ns;function rd(){if(ns)return Kt;ns=1;var e=Kt&&Kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.default=t;var n=e(nd());function t(r,i){var o=null;if(!r||typeof r!="string")return o;var a=(0,n.default)(r),f=typeof i=="function";return a.forEach(function(c){if(c.type==="declaration"){var d=c.property,m=c.value;f?i(d,m,c):m&&(o=o||{},o[d]=m)}}),o}return Kt}var hn={},rs;function id(){if(rs)return hn;rs=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(d){return!d||t.test(d)||e.test(d)},a=function(d,m){return m.toUpperCase()},f=function(d,m){return"".concat(m,"-")},c=function(d,m){return m===void 0&&(m={}),o(d)?d:(d=d.toLowerCase(),m.reactCompat?d=d.replace(i,f):d=d.replace(r,f),d.replace(n,a))};return hn.camelCase=c,hn}var mn,is;function od(){if(is)return mn;is=1;var e=mn&&mn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(rd()),t=id();function r(i,o){var a={};return!i||typeof i!="string"||(0,n.default)(i,function(f,c){f&&c&&(a[(0,t.camelCase)(f,o)]=c)}),a}return r.default=r,mn=r,mn}var sd=od();const ad=ea(sd),ka=Sa("end"),Di=Sa("start");function Sa(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function ld(e){const n=Di(e),t=ka(e);if(n&&t)return{start:n,end:t}}function bn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?os(e.position):"start"in e||"end"in e?os(e):"line"in e||"column"in e?pi(e):""}function pi(e){return ss(e&&e.line)+":"+ss(e&&e.column)}function os(e){return pi(e&&e.start)+"-"+pi(e&&e.end)}function ss(e){return e&&typeof e=="number"?e:1}class Pe extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},a=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(a=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=f?f.line:void 0,this.name=bn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Pe.prototype.file="",Pe.prototype.name="",Pe.prototype.reason="",Pe.prototype.message="",Pe.prototype.stack="",Pe.prototype.column=void 0,Pe.prototype.line=void 0,Pe.prototype.ancestors=void 0,Pe.prototype.cause=void 0,Pe.prototype.fatal=void 0,Pe.prototype.place=void 0,Pe.prototype.ruleId=void 0,Pe.prototype.source=void 0;const Fi={}.hasOwnProperty,cd=new Map,ud=/[A-Z]/g,fd=new Set(["table","tbody","thead","tfoot","tr"]),dd=new Set(["td","th"]),Ca="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pd(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=wd(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=bd(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Li:td,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=Ia(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Ia(e,n,t){if(n.type==="element")return hd(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return md(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return yd(e,n,t);if(n.type==="mdxjsEsm")return gd(e,n);if(n.type==="root")return _d(e,n,t);if(n.type==="text")return vd(e,n)}function hd(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Li,e.schema=i),e.ancestors.push(n);const o=Ta(e,n.tagName,!1),a=xd(e,n);let f=Ui(e,n);return fd.has(n.tagName)&&(f=f.filter(function(c){return typeof c=="string"?!$f(c):!0})),Aa(e,a,o,n),ji(a,f),e.ancestors.pop(),e.schema=r,e.create(n,o,a,t)}function md(e,n){if(n.data&&n.data.estree&&e.evaluater){const t=n.data.estree.body[0];return t.type,e.evaluater.evaluateExpression(t.expression)}Cn(e,n.position)}function gd(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Cn(e,n.position)}function yd(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Li,e.schema=i),e.ancestors.push(n);const o=n.name===null?e.Fragment:Ta(e,n.name,!0),a=kd(e,n),f=Ui(e,n);return Aa(e,a,o,n),ji(a,f),e.ancestors.pop(),e.schema=r,e.create(n,o,a,t)}function _d(e,n,t){const r={};return ji(r,Ui(e,n)),e.create(n,e.Fragment,r,t)}function vd(e,n){return n.value}function Aa(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function ji(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function bd(e,n,t){return r;function r(i,o,a,f){const c=Array.isArray(a.children)?t:n;return f?c(o,a,f):c(o,a)}}function wd(e,n){return t;function t(r,i,o,a){const f=Array.isArray(o.children),c=Di(r);return n(i,o,a,f,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function xd(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Fi.call(n.properties,i)){const o=Sd(e,i,n.properties[i]);if(o){const[a,f]=o;e.tableCellAlignToStyle&&a==="align"&&typeof f=="string"&&dd.has(n.tagName)?r=f:t[a]=f}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function kd(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const o=i.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Cn(e,n.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else Cn(e,n.position);else o=r.value===null?!0:r.value;t[i]=o}return t}function Ui(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:cd;for(;++r0?{type:"text",value:R}:void 0),R===!1?s.lastIndex=k+1:(u!==k&&w.push({type:"text",value:c.value.slice(u,k)}),Array.isArray(R)?w.push(...R):R&&w.push(R),u=k+_[0].length,y=!0),!s.global)break;_=s.exec(c.value)}return y?(ui?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);o0?(dt(e,e.length,0,n),e):n}const cs={}.hasOwnProperty;function Bd(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function sn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ut=Lt(/[A-Za-z]/),We=Lt(/[\dA-Za-z]/),Vd=Lt(/[#-'*+\--9=?A-Z^-~]/);function hi(e){return e!==null&&(e<32||e===127)}const mi=Lt(/\d/),$d=Lt(/[\dA-Fa-f]/),Wd=Lt(/[!-/:-@[-`{-~]/);function ee(e){return e!==null&&e<-2}function Ue(e){return e!==null&&(e<0||e===32)}function le(e){return e===-2||e===-1||e===32}const Gd=Lt(new RegExp("\\p{P}|\\p{S}","u")),Xd=Lt(/\s/);function Lt(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function cn(e){const n=[];let t=-1,r=0,i=0;for(;++t55295&&o<57344){const f=e.charCodeAt(t+1);o<56320&&f>56319&&f<57344?(a=String.fromCharCode(o,f),i=1):a="�"}else a=String.fromCharCode(o);a&&(n.push(e.slice(r,t),encodeURIComponent(a)),r=t+i+1,a=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function ye(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(c){return le(c)?(e.enter(t),f(c)):n(c)}function f(c){return le(c)&&o++a))return;const J=n.events.length;let G=J,H,P;for(;G--;)if(n.events[G][0]==="exit"&&n.events[G][1].type==="chunkFlow"){if(H){P=n.events[G][1].end;break}H=!0}for(_(r),N=J;NT;){const $=t[R];n.containerState=$[1],$[0].exit.call(n,e)}t.length=T}function k(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Qd(e,n,t){return ye(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function fs(e){if(e===null||Ue(e)||Xd(e))return 1;if(Gd(e))return 2}function Bi(e,n,t){const r=[];let i=-1;for(;++i1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const s={...e[r][1].end},l={...e[t][1].start};ds(s,-c),ds(l,c),a={type:c>1?"strongSequence":"emphasisSequence",start:s,end:{...e[r][1].end}},f={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:l},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...a.start},end:{...f.end}},e[r][1].end={...a.start},e[t][1].start={...f.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Ke(d,[["enter",e[r][1],n],["exit",e[r][1],n]])),d=Ke(d,[["enter",i,n],["enter",a,n],["exit",a,n],["enter",o,n]]),d=Ke(d,Bi(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),d=Ke(d,[["exit",o,n],["enter",f,n],["exit",f,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(m=2,d=Ke(d,[["enter",e[t][1],n],["exit",e[t][1],n]])):m=0,dt(e,r-1,t-r+3,d),t=r+d.length-m-2;break}}for(t=-1;++t0&&le(N)?ye(e,k,"linePrefix",o+1)(N):k(N)}function k(N){return N===null||ee(N)?e.check(ps,y,R)(N):(e.enter("codeFlowValue"),T(N))}function T(N){return N===null||ee(N)?(e.exit("codeFlowValue"),k(N)):(e.consume(N),T)}function R(N){return e.exit("codeFenced"),n(N)}function $(N,J,G){let H=0;return P;function P(Y){return N.enter("lineEnding"),N.consume(Y),N.exit("lineEnding"),X}function X(Y){return N.enter("codeFencedFence"),le(Y)?ye(N,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):Z(Y)}function Z(Y){return Y===f?(N.enter("codeFencedFenceSequence"),K(Y)):G(Y)}function K(Y){return Y===f?(H++,N.consume(Y),K):H>=a?(N.exit("codeFencedFenceSequence"),le(Y)?ye(N,q,"whitespace")(Y):q(Y)):G(Y)}function q(Y){return Y===null||ee(Y)?(N.exit("codeFencedFence"),J(Y)):G(Y)}}}function fp(e,n,t){const r=this;return i;function i(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}const Fr={name:"codeIndented",tokenize:pp},dp={partial:!0,tokenize:hp};function pp(e,n,t){const r=this;return i;function i(d){return e.enter("codeIndented"),ye(e,o,"linePrefix",5)(d)}function o(d){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(d):t(d)}function a(d){return d===null?c(d):ee(d)?e.attempt(dp,a,c)(d):(e.enter("codeFlowValue"),f(d))}function f(d){return d===null||ee(d)?(e.exit("codeFlowValue"),a(d)):(e.consume(d),f)}function c(d){return e.exit("codeIndented"),n(d)}}function hp(e,n,t){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?t(a):ee(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):ye(e,o,"linePrefix",5)(a)}function o(a){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(a):ee(a)?i(a):t(a)}}const mp={name:"codeText",previous:yp,resolve:gp,tokenize:_p};function gp(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&gn(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),gn(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),gn(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(a):e.interrupt(r.parser.constructs.flow,t,n)(a)}}function La(e,n,t,r,i,o,a,f,c){const d=c||Number.POSITIVE_INFINITY;let m=0;return s;function s(_){return _===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(_),e.exit(o),l):_===null||_===32||_===41||hi(_)?t(_):(e.enter(r),e.enter(a),e.enter(f),e.enter("chunkString",{contentType:"string"}),y(_))}function l(_){return _===62?(e.enter(o),e.consume(_),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),u(_))}function u(_){return _===62?(e.exit("chunkString"),e.exit(f),l(_)):_===null||_===60||ee(_)?t(_):(e.consume(_),_===92?h:u)}function h(_){return _===60||_===62||_===92?(e.consume(_),u):u(_)}function y(_){return!m&&(_===null||_===41||Ue(_))?(e.exit("chunkString"),e.exit(f),e.exit(a),e.exit(r),n(_)):m999||u===null||u===91||u===93&&!c||u===94&&!f&&"_hiddenFootnoteSupport"in a.parser.constructs?t(u):u===93?(e.exit(o),e.enter(i),e.consume(u),e.exit(i),e.exit(r),n):ee(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),s(u))}function s(u){return u===null||u===91||u===93||ee(u)||f++>999?(e.exit("chunkString"),m(u)):(e.consume(u),c||(c=!le(u)),u===92?l:s)}function l(u){return u===91||u===92||u===93?(e.consume(u),f++,s):s(u)}}function Fa(e,n,t,r,i,o){let a;return f;function f(l){return l===34||l===39||l===40?(e.enter(r),e.enter(i),e.consume(l),e.exit(i),a=l===40?41:l,c):t(l)}function c(l){return l===a?(e.enter(i),e.consume(l),e.exit(i),e.exit(r),n):(e.enter(o),d(l))}function d(l){return l===a?(e.exit(o),c(a)):l===null?t(l):ee(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ye(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(l))}function m(l){return l===a||l===null||ee(l)?(e.exit("chunkString"),d(l)):(e.consume(l),l===92?s:m)}function s(l){return l===a||l===92?(e.consume(l),m):m(l)}}function wn(e,n){let t;return r;function r(i){return ee(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):le(i)?ye(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Ip={name:"definition",tokenize:Tp},Ap={partial:!0,tokenize:Ep};function Tp(e,n,t){const r=this;let i;return o;function o(u){return e.enter("definition"),a(u)}function a(u){return Da.call(r,e,f,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(u)}function f(u){return i=sn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),u===58?(e.enter("definitionMarker"),e.consume(u),e.exit("definitionMarker"),c):t(u)}function c(u){return Ue(u)?wn(e,d)(u):d(u)}function d(u){return La(e,m,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(u)}function m(u){return e.attempt(Ap,s,s)(u)}function s(u){return le(u)?ye(e,l,"whitespace")(u):l(u)}function l(u){return u===null||ee(u)?(e.exit("definition"),r.parser.defined.push(i),n(u)):t(u)}}function Ep(e,n,t){return r;function r(f){return Ue(f)?wn(e,i)(f):t(f)}function i(f){return Fa(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return le(f)?ye(e,a,"whitespace")(f):a(f)}function a(f){return f===null||ee(f)?n(f):t(f)}}const Op={name:"hardBreakEscape",tokenize:Pp};function Pp(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ee(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const Np={name:"headingAtx",resolve:Mp,tokenize:Rp};function Mp(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},dt(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function Rp(e,n,t){let r=0;return i;function i(m){return e.enter("atxHeading"),o(m)}function o(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&r++<6?(e.consume(m),a):m===null||Ue(m)?(e.exit("atxHeadingSequence"),f(m)):t(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),c(m)):m===null||ee(m)?(e.exit("atxHeading"),n(m)):le(m)?ye(e,f,"whitespace")(m):(e.enter("atxHeadingText"),d(m))}function c(m){return m===35?(e.consume(m),c):(e.exit("atxHeadingSequence"),f(m))}function d(m){return m===null||m===35||Ue(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),d)}}const Lp=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ms=["pre","script","style","textarea"],Dp={concrete:!0,name:"htmlFlow",resolveTo:Up,tokenize:zp},Fp={partial:!0,tokenize:Hp},jp={partial:!0,tokenize:Bp};function Up(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function zp(e,n,t){const r=this;let i,o,a,f,c;return d;function d(C){return m(C)}function m(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),s}function s(C){return C===33?(e.consume(C),l):C===47?(e.consume(C),o=!0,y):C===63?(e.consume(C),i=3,r.interrupt?n:x):ut(C)?(e.consume(C),a=String.fromCharCode(C),w):t(C)}function l(C){return C===45?(e.consume(C),i=2,u):C===91?(e.consume(C),i=5,f=0,h):ut(C)?(e.consume(C),i=4,r.interrupt?n:x):t(C)}function u(C){return C===45?(e.consume(C),r.interrupt?n:x):t(C)}function h(C){const qe="CDATA[";return C===qe.charCodeAt(f++)?(e.consume(C),f===qe.length?r.interrupt?n:Z:h):t(C)}function y(C){return ut(C)?(e.consume(C),a=String.fromCharCode(C),w):t(C)}function w(C){if(C===null||C===47||C===62||Ue(C)){const qe=C===47,pt=a.toLowerCase();return!qe&&!o&&ms.includes(pt)?(i=1,r.interrupt?n(C):Z(C)):Lp.includes(a.toLowerCase())?(i=6,qe?(e.consume(C),_):r.interrupt?n(C):Z(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(C):o?k(C):T(C))}return C===45||We(C)?(e.consume(C),a+=String.fromCharCode(C),w):t(C)}function _(C){return C===62?(e.consume(C),r.interrupt?n:Z):t(C)}function k(C){return le(C)?(e.consume(C),k):P(C)}function T(C){return C===47?(e.consume(C),P):C===58||C===95||ut(C)?(e.consume(C),R):le(C)?(e.consume(C),T):P(C)}function R(C){return C===45||C===46||C===58||C===95||We(C)?(e.consume(C),R):$(C)}function $(C){return C===61?(e.consume(C),N):le(C)?(e.consume(C),$):T(C)}function N(C){return C===null||C===60||C===61||C===62||C===96?t(C):C===34||C===39?(e.consume(C),c=C,J):le(C)?(e.consume(C),N):G(C)}function J(C){return C===c?(e.consume(C),c=null,H):C===null||ee(C)?t(C):(e.consume(C),J)}function G(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Ue(C)?$(C):(e.consume(C),G)}function H(C){return C===47||C===62||le(C)?T(C):t(C)}function P(C){return C===62?(e.consume(C),X):t(C)}function X(C){return C===null||ee(C)?Z(C):le(C)?(e.consume(C),X):t(C)}function Z(C){return C===45&&i===2?(e.consume(C),_e):C===60&&i===1?(e.consume(C),be):C===62&&i===4?(e.consume(C),He):C===63&&i===3?(e.consume(C),x):C===93&&i===5?(e.consume(C),Xe):ee(C)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Fp,Ye,K)(C)):C===null||ee(C)?(e.exit("htmlFlowData"),K(C)):(e.consume(C),Z)}function K(C){return e.check(jp,q,Ye)(C)}function q(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),Y}function Y(C){return C===null||ee(C)?K(C):(e.enter("htmlFlowData"),Z(C))}function _e(C){return C===45?(e.consume(C),x):Z(C)}function be(C){return C===47?(e.consume(C),a="",Se):Z(C)}function Se(C){if(C===62){const qe=a.toLowerCase();return ms.includes(qe)?(e.consume(C),He):Z(C)}return ut(C)&&a.length<8?(e.consume(C),a+=String.fromCharCode(C),Se):Z(C)}function Xe(C){return C===93?(e.consume(C),x):Z(C)}function x(C){return C===62?(e.consume(C),He):C===45&&i===2?(e.consume(C),x):Z(C)}function He(C){return C===null||ee(C)?(e.exit("htmlFlowData"),Ye(C)):(e.consume(C),He)}function Ye(C){return e.exit("htmlFlow"),n(C)}}function Bp(e,n,t){const r=this;return i;function i(a){return ee(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):t(a)}function o(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}function Hp(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ur,n,t)}}const qp={name:"htmlText",tokenize:Vp};function Vp(e,n,t){const r=this;let i,o,a;return f;function f(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),d):x===47?(e.consume(x),$):x===63?(e.consume(x),T):ut(x)?(e.consume(x),G):t(x)}function d(x){return x===45?(e.consume(x),m):x===91?(e.consume(x),o=0,h):ut(x)?(e.consume(x),k):t(x)}function m(x){return x===45?(e.consume(x),u):t(x)}function s(x){return x===null?t(x):x===45?(e.consume(x),l):ee(x)?(a=s,be(x)):(e.consume(x),s)}function l(x){return x===45?(e.consume(x),u):s(x)}function u(x){return x===62?_e(x):x===45?l(x):s(x)}function h(x){const He="CDATA[";return x===He.charCodeAt(o++)?(e.consume(x),o===He.length?y:h):t(x)}function y(x){return x===null?t(x):x===93?(e.consume(x),w):ee(x)?(a=y,be(x)):(e.consume(x),y)}function w(x){return x===93?(e.consume(x),_):y(x)}function _(x){return x===62?_e(x):x===93?(e.consume(x),_):y(x)}function k(x){return x===null||x===62?_e(x):ee(x)?(a=k,be(x)):(e.consume(x),k)}function T(x){return x===null?t(x):x===63?(e.consume(x),R):ee(x)?(a=T,be(x)):(e.consume(x),T)}function R(x){return x===62?_e(x):T(x)}function $(x){return ut(x)?(e.consume(x),N):t(x)}function N(x){return x===45||We(x)?(e.consume(x),N):J(x)}function J(x){return ee(x)?(a=J,be(x)):le(x)?(e.consume(x),J):_e(x)}function G(x){return x===45||We(x)?(e.consume(x),G):x===47||x===62||Ue(x)?H(x):t(x)}function H(x){return x===47?(e.consume(x),_e):x===58||x===95||ut(x)?(e.consume(x),P):ee(x)?(a=H,be(x)):le(x)?(e.consume(x),H):_e(x)}function P(x){return x===45||x===46||x===58||x===95||We(x)?(e.consume(x),P):X(x)}function X(x){return x===61?(e.consume(x),Z):ee(x)?(a=X,be(x)):le(x)?(e.consume(x),X):H(x)}function Z(x){return x===null||x===60||x===61||x===62||x===96?t(x):x===34||x===39?(e.consume(x),i=x,K):ee(x)?(a=Z,be(x)):le(x)?(e.consume(x),Z):(e.consume(x),q)}function K(x){return x===i?(e.consume(x),i=void 0,Y):x===null?t(x):ee(x)?(a=K,be(x)):(e.consume(x),K)}function q(x){return x===null||x===34||x===39||x===60||x===61||x===96?t(x):x===47||x===62||Ue(x)?H(x):(e.consume(x),q)}function Y(x){return x===47||x===62||Ue(x)?H(x):t(x)}function _e(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),n):t(x)}function be(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Se}function Se(x){return le(x)?ye(e,Xe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):Xe(x)}function Xe(x){return e.enter("htmlTextData"),a(x)}}const Hi={name:"labelEnd",resolveAll:Xp,resolveTo:Zp,tokenize:Kp},$p={tokenize:Jp},Wp={tokenize:Yp},Gp={tokenize:Qp};function Xp(e){let n=-1;const t=[];for(;++n=3&&(d===null||ee(d))?(e.exit("thematicBreak"),n(d)):t(d)}function c(d){return d===i?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),le(d)?ye(e,f,"whitespace")(d):f(d))}}const De={continuation:{tokenize:ch},exit:fh,name:"list",tokenize:lh},sh={partial:!0,tokenize:dh},ah={partial:!0,tokenize:uh};function lh(e,n,t){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return f;function f(u){const h=r.containerState.type||(u===42||u===43||u===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||u===r.containerState.marker:mi(u)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),u===42||u===45?e.check(er,t,d)(u):d(u);if(!r.interrupt||u===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(u)}return t(u)}function c(u){return mi(u)&&++a<10?(e.consume(u),c):(!r.interrupt||a<2)&&(r.containerState.marker?u===r.containerState.marker:u===41||u===46)?(e.exit("listItemValue"),d(u)):t(u)}function d(u){return e.enter("listItemMarker"),e.consume(u),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||u,e.check(ur,r.interrupt?t:m,e.attempt(sh,l,s))}function m(u){return r.containerState.initialBlankLine=!0,o++,l(u)}function s(u){return le(u)?(e.enter("listItemPrefixWhitespace"),e.consume(u),e.exit("listItemPrefixWhitespace"),l):t(u)}function l(u){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(u)}}function ch(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(ur,i,o);function i(f){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ye(e,n,"listItemIndent",r.containerState.size+1)(f)}function o(f){return r.containerState.furtherBlankLines||!le(f)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(f)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ah,n,a)(f))}function a(f){return r.containerState._closeFlow=!0,r.interrupt=void 0,ye(e,e.attempt(De,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function uh(e,n,t){const r=this;return ye(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?n(o):t(o)}}function fh(e){e.exit(this.containerState.type)}function dh(e,n,t){const r=this;return ye(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!le(o)&&a&&a[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}const gs={name:"setextUnderline",resolveTo:ph,tokenize:hh};function ph(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,n]),e}function hh(e,n,t){const r=this;let i;return o;function o(d){let m=r.events.length,s;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){s=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter("setextHeadingLine"),i=d,a(d)):t(d)}function a(d){return e.enter("setextHeadingLineSequence"),f(d)}function f(d){return d===i?(e.consume(d),f):(e.exit("setextHeadingLineSequence"),le(d)?ye(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||ee(d)?(e.exit("setextHeadingLine"),n(d)):t(d)}}const mh={tokenize:gh};function gh(e){const n=this,t=e.attempt(ur,r,e.attempt(this.parser.constructs.flowInitial,i,ye(e,e.attempt(this.parser.constructs.flow,i,e.attempt(wp,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const yh={resolveAll:Ua()},_h=ja("string"),vh=ja("text");function ja(e){return{resolveAll:Ua(e==="text"?bh:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,a,f);return a;function a(m){return d(m)?o(m):f(m)}function f(m){if(m===null){t.consume(m);return}return t.enter("data"),t.consume(m),c}function c(m){return d(m)?(t.exit("data"),o(m)):(t.consume(m),c)}function d(m){if(m===null)return!0;const s=i[m];let l=-1;if(s)for(;++l-1){const f=a[0];typeof f=="string"?a[0]=f.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function Mh(e,n){let t=-1;const r=[];let i;for(;++t0){const Ve=Q.tokenStack[Q.tokenStack.length-1];(Ve[1]||_s).call(Q,void 0,Ve[0])}for(F.position={start:Ot(E.length>0?E[0][1].start:{line:1,column:1,offset:0}),end:Ot(E.length>0?E[E.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function Gh(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Xh(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Zh(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=cn(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,f=e.footnoteCounts.get(r);f===void 0?(f=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,f+=1,e.footnoteCounts.set(r,f);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(n,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,d),e.applyData(n,d)}function Kh(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Jh(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Ha(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function Yh(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Ha(e,n);const i={src:cn(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,o),e.applyData(n,o)}function Qh(e,n){const t={src:cn(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function em(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function tm(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Ha(e,n);const i={href:cn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function nm(e,n){const t={href:cn(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function rm(e,n,t){const r=e.all(n),i=t?im(t):qa(n),o={},a=[];if(typeof n.checked=="boolean"){const m=r[0];let s;m&&m.type==="element"&&m.tagName==="p"?s=m:(s={type:"element",tagName:"p",properties:{},children:[]},r.unshift(s)),s.children.length>0&&s.children.unshift({type:"text",value:" "}),s.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f1}function om(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},f=Di(n.children[1]),c=ka(n.children[n.children.length-1]);f&&c&&(a.position={start:f,end:c}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,o),e.applyData(n,o)}function um(e,n,t){const r=t?t.children:void 0,i=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,a=o?o.length:n.children.length;let f=-1;const c=[];for(;++f0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return o.push(ws(n.slice(i),i>0,!1)),o.join("")}function ws(e,n,t){let r=0,i=e.length;if(n){let o=e.codePointAt(r);for(;o===vs||o===bs;)r++,o=e.codePointAt(r)}if(t){let o=e.codePointAt(i-1);for(;o===vs||o===bs;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function pm(e,n){const t={type:"text",value:dm(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function hm(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const mm={blockquote:Vh,break:$h,code:Wh,delete:Gh,emphasis:Xh,footnoteReference:Zh,heading:Kh,html:Jh,imageReference:Yh,image:Qh,inlineCode:em,linkReference:tm,link:nm,listItem:rm,list:om,paragraph:sm,root:am,strong:lm,table:cm,tableCell:fm,tableRow:um,text:pm,thematicBreak:hm,toml:Jn,yaml:Jn,definition:Jn,footnoteDefinition:Jn};function Jn(){}function gm(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function ym(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function _m(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||gm,r=e.options.footnoteBackLabel||ym,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let c=-1;for(;++c0&&h.push({type:"text",value:" "});let k=typeof t=="string"?t:t(c,u);typeof k=="string"&&(k={type:"text",value:k}),h.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+l+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,u),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const w=m[m.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const k=w.children[w.children.length-1];k&&k.type==="text"?k.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...h)}else m.push(...h);const _={type:"element",tagName:"li",properties:{id:n+"fn-"+l},children:e.wrap(m,!0)};e.patch(d,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ht(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:` `}]}}const yi={}.hasOwnProperty,vm={};function bm(e,n){const t=n||vm,r=new Map,i=new Map,o=new Map,a={...mm,...t.handlers},f={all:d,applyData:xm,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:c,options:t,patch:wm,wrap:Sm};return wt(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const s=m.type==="definition"?r:i,l=String(m.identifier).toUpperCase();s.has(l)||s.set(l,m)}}),f;function c(m,s){const l=m.type,u=f.handlers[l];if(yi.call(f.handlers,l)&&u)return u(f,m,s);if(f.options.passThrough&&f.options.passThrough.includes(l)){if("children"in m){const{children:h,...y}=m,w=Ht(y);return w.children=f.all(m),w}return Ht(m)}return(f.options.unknownHandler||km)(f,m,s)}function d(m){const s=[];if("children"in m){const l=m.children;let u=-1;for(;++u0&&t.push({type:"text",value:` `}),t}function xs(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function ks(e,n){const t=bm(e,n),r=t.one(e,void 0),i=_m(t),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` `},i),o}function Cm(e,n){return e&&"run"in e?async function(t,r){const i=ks(t,{file:r,...n});await e.run(i,r)}:function(t,r){return ks(t,{file:r,...e||n})}}function Im(e){wt(e,function(n,t,r){if(t!==void 0&&r&&n.type==="paragraph"&&n.children.every(function(i){return i.type==="text"&&/^\s*$/.test(i.value)}))return r.children.splice(t,1),t})}function Am(e={except:["http","https"]}){return function(n){const t=new Map;wt(n,"definition",function(r,i,o){if(t.set(r.identifier,r.url),o&&typeof i=="number"){const a=r.url;if(a&&a.includes(":")&&!e.except.some(f=>a.startsWith(`${f}:`)))return o.children.splice(i,1),i}}),wt(n,function(r,i,o){if(o&&typeof i=="number"&&(r.type==="link"||r.type==="linkReference")){const a=r.type==="link"?r.url:t.get(r.identifier);if(a&&a.includes(":")&&!e.except.some(f=>a.startsWith(`${f}:`)))return o.children.splice(i,1,...r.children),i}}),Im(n)}}function Ss(e){if(e)throw e}var Ur,Cs;function Tm(){if(Cs)return Ur;Cs=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):n.call(c)==="[object Array]"},o=function(c){if(!c||n.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),m=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!m)return!1;var s;for(s in c);return typeof s>"u"||e.call(c,s)},a=function(c,d){t&&d.name==="__proto__"?t(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},f=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return Ur=function c(){var d,m,s,l,u,h,y=arguments[0],w=1,_=arguments.length,k=!1;for(typeof y=="boolean"&&(k=y,y=arguments[1]||{},w=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});w<_;++w)if(d=arguments[w],d!=null)for(m in d)s=f(y,m),l=f(d,m),y!==l&&(k&&l&&(o(l)||(u=i(l)))?(u?(u=!1,h=s&&i(s)?s:[]):h=s&&o(s)?s:{},a(y,{name:m,newValue:c(k,h,l)})):typeof l<"u"&&a(y,{name:m,newValue:l}));return y},Ur}var Em=Tm();const zr=ea(Em);function _i(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Om(){const e=[],n={run:t,use:r};return n;function t(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);f(null,...i);function f(c,...d){const m=e[++o];let s=-1;if(c){a(c);return}for(;++sa.length;let c;f&&a.push(i);try{c=e.apply(this,a)}catch(d){const m=d;if(f&&t)throw m;return i(m)}f||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(a,...f){t||(t=!0,n(a,...f))}function o(a){i(null,a)}}const lt={basename:Nm,dirname:Mm,extname:Rm,join:Lm,sep:"/"};function Nm(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');En(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let a=-1,f=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else a<0&&(o=!0,a=i+1),f>-1&&(e.codePointAt(i)===n.codePointAt(f--)?f<0&&(r=i):(f=-1,r=a));return t===r?r=a:r<0&&(r=e.length),e.slice(t,r)}function Mm(e){if(En(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Rm(e){En(e);let n=e.length,t=-1,r=0,i=-1,o=0,a;for(;n--;){const f=e.codePointAt(n);if(f===47){if(a){r=n+1;break}continue}t<0&&(a=!0,t=n+1),f===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Lm(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Fm(e,n){let t="",r=0,i=-1,o=0,a=-1,f,c;for(;++a<=e.length;){if(a2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=a,o=0;continue}}else if(t.length>0){t="",r=0,i=a,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,a):t=e.slice(i+1,a),r=a-i-1;i=a,o=0}else f===46&&o>-1?o++:o=-1}return t}function En(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jm={cwd:Um};function Um(){return"/"}function vi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function zm(e){if(typeof e=="string")e=new URL(e);else if(!vi(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Bm(e)}function Bm(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t0){let[u,...h]=m;const y=r[l][1];_i(y)&&_i(u)&&(u=zr(!0,y,u)),r[l]=[d,u,...h]}}}}const Wm=new qi().freeze();function Vr(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function $r(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Wr(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function As(e){if(!_i(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ts(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Yn(e){return Gm(e)?e:new Hm(e)}function Gm(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Xm(e){return typeof e=="string"||Zm(e)}function Zm(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Es(){return Nt("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}window._vue_richtext_widgets??={},window._registerWidget??=(e,n,t,r)=>{Km(e,n,t,r)};function Km(e,n,t=()=>{},r){const i={hasInteractiveView:!0,fullWidth:!1,...r};if(window._vue_richtext_widgets[e]){bt.error(`[ReferencePicker]: Widget for id ${e} already registered`);return}window._vue_richtext_widgets[e]={id:e,callback:n,onDestroy:t,...i}}function Jm(e,n){const{richObjectType:t,richObject:r,accessible:i,interactive:o}=n;if(t!=="open-graph"){if(!window._vue_richtext_widgets[t]){bt.error("Widget for rich object type "+t+" not registered");return}window._vue_richtext_widgets[t].callback(e,{richObjectType:t,richObject:r,accessible:i,interactive:o})}}function Ym(e,n){e!=="open-graph"&&window._vue_richtext_widgets[e]&&window._vue_richtext_widgets[e].onDestroy(n)}function Qm(e){return!!window._vue_richtext_widgets[e]}function eg(e){return!!window._vue_richtext_widgets[e]?.hasInteractiveView}function tg(e){return!!window._vue_richtext_widgets[e]?.fullWidth}window._vue_richtext_custom_picker_elements??={},window._registerCustomPickerElement??=ng;function ng(e,n,t=()=>{},r="large"){if(window._vue_richtext_custom_picker_elements[e]){bt.error(`Custom reference picker element for id ${e} already registered`);return}window._vue_richtext_custom_picker_elements[e]={id:e,callback:n,onDestroy:t,size:r}}function Qt(e,n,t){const r={type:String(e)};return t==null&&(typeof n=="string"||Array.isArray(n))?t=n:Object.assign(r,n),Array.isArray(t)?r.children=t:t!=null&&(r.value=String(t)),r}const Os=/(\s|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/ig,Ps=/(\s|\(|^)((https?:\/\/)([-A-Z0-9+_.]+[-A-Z0-9]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\s|\)|$)/ig,rg=kt({name:"NcLink",props:{href:{type:String,required:!0}},render(){return ve("a",{href:this.href,rel:"noopener noreferrer",target:"_blank",class:"rich-text--external-link"},[this.href.trim()])}});function ig({autolink:e,useMarkdown:n,useExtendedMarkdown:t}){return function(r){t||!n||!e||wt(r,i=>i.type==="text",(i,o,a)=>{let f=Va(i.value);return typeof f=="string"?f=[Qt("text",f)]:f=f.map(c=>typeof c=="string"?Qt("text",c):Qt("link",{url:c.props.href},[Qt("text",c.props.href)])).filter(c=>c).flat(),a.children.splice(o,1,...f),[Mi,(o??0)+f.length]})}}function Va(e){let n=Ps.exec(e);const t=[];let r=0;for(;n!==null;){let o=n[2],a,f=e.substring(r,n.index+n[1].length);o[0]===" "&&(f+=o[0],o=o.substring(1).trim());const c=o[o.length-1];(c==="."||c===","||c===";"||n[0][0]==="("&&c===")")&&(o=o.substring(0,o.length-1),a=c),t.push(f),t.push({component:rg,props:{href:o}}),a&&t.push(a),r=n.index+n[0].length,n=Ps.exec(e)}t.push(e.substring(r));const i=t.map(o=>typeof o=="string"?o:o.props.href).join("");return e===i?t:(bt.error("[NcRichText] Failed to reassemble the chunked text: "+e),e)}function Vi(e,n){const t=(m,s)=>m.startsWith(s)?m.slice(s.length):m,r=(m,...s)=>s.reduce((l,u)=>t(l,u),m);if(!e)return null;const i=/^https?:\/\//.test(n),o=/^[a-z][a-z0-9+.-]*:.+/.test(n);if(!i&&o||i&&!n.startsWith(Eo())||!i&&!n.startsWith("/"))return null;const a=i?r(n,Eo(),"/index.php"):n,f=r(e.options.history.base,Sc(),"/index.php"),c=r(a,f)||"/",d=e.resolve(c);return d.matched.length?d.fullPath:null}Je(Ic,Cc),Je(Ec),de("Any link"),ta("core","filetypes/link.svg"),window._vue_richtext_reference_providers??=Nt("core","reference-provider-list",[]),window._vue_richtext_reference_provider_timestamps??=Nt("core","reference-provider-timestamps",{}),Je(na,Oc),Je(Pc);const og=["src"],sg={class:"widget-default--details"},ag={class:"widget-default--name"},lg={class:"widget-default--link"},cg=3*60*1e3,ug=kt({__name:"NcReferenceWidget",props:{reference:{},interactive:{type:Boolean,default:!0},interactiveOptIn:{type:Boolean,default:!1}},setup(e){const n=e,t=kn(ki,null),r=Pt(!1),i=yn("customWidget"),o=yn("widgetRoot"),{width:a}=Ac(o);Tc(o,([G])=>{oi(()=>{r.value=G.isIntersecting})});const f=Pt(!1),c=Pt(!1);let d=null;const m=oe(()=>!n.interactiveOptIn&&n.interactive||f.value),s=oe(()=>tg(n.reference.richObjectType)),l=oe(()=>Qm(n.reference.richObjectType)),u=oe(()=>l.value&&eg(n.reference.richObjectType)),h=oe(()=>!n.reference.accessible),y=oe(()=>[450,550,650,1/0].findIndex(G=>a.value{if(y.value===0)return{display:"none"};const G=y.value;return{lineClamp:G,webkitLineClamp:G}}),_=oe(()=>{const G=n.reference.openGraphObject.link;return G?G.startsWith("https://")?G.substring(8):G.startsWith("http://")?G.substring(7):G:""}),k=oe(()=>Vi(t,n.reference.openGraphObject.link)),T=oe(()=>k.value?Ci:"a"),R=oe(()=>k.value?{to:k.value}:{href:n.reference.openGraphObject.link,target:"_blank"});an(r,G=>{if(!G){d=setTimeout(()=>{r.value||J()},cg);return}d&&(clearTimeout(d),d=null),c.value||N()},{immediate:!0}),eu(()=>{J()});function $(){f.value=!0,N()}function N(){if(!i.value||n.reference.richObjectType==="open-graph")return;i.value.innerHTML="";const G=document.createElement("div");G.style.width="100%",i.value.appendChild(G),oi(()=>{Jm(G,{...n.reference,interactive:m.value}),c.value=!0})}function J(){c.value&&o.value&&(Ym(n.reference.richObjectType,o.value),c.value=!1)}return(G,H)=>(M(),z("div",{ref_key:"widgetRoot",ref:o,class:ze({"toggle-interactive":u.value&&!m.value})},[G.reference&&l.value?(M(),z("div",{key:0,ref_key:"customWidget",ref:i,class:ze(["widget-custom",{"full-width":s.value}])},null,2)):!h.value&&G.reference&&G.reference.openGraphObject&&!l.value?(M(),ce(Sn(T.value),Rt({key:1},R.value,{rel:"noopener noreferrer",class:"widget-default"}),{default:pe(()=>[G.reference.openGraphObject.thumb?(M(),z("img",{key:0,class:"widget-default--image",src:G.reference.openGraphObject.thumb},null,8,og)):ae("",!0),se("div",sg,[se("p",ag,ne(G.reference.openGraphObject.name),1),se("p",{class:"widget-default--description",style:vt(w.value)},ne(G.reference.openGraphObject.description),5),se("p",lg,ne(_.value),1)])]),_:1},16)):ae("",!0),G.interactiveOptIn&&u.value&&!m.value?(M(),ce(Vt,{key:2,class:"toggle-interactive--button",onClick:$},{default:pe(()=>[Mt(ne(Ne(de)("Enable interactive view")),1)]),_:1})):ae("",!0)],2))}}),fg=Ge(ug,[["__scopeId","data-v-8ce33442"]]);Je(Nc),Je(Rc,na,Mc),Je(Dc,Lc),Je(Fc);const dg=2e3;function pg(e){const n=Pt(!1),t=oe(()=>n.value?sa:fu),r=oe(()=>n.value?de("Copied"):de("Copy to clipboard"));async function i(){if(n.value)return;const o=ia(e);try{await navigator.clipboard.writeText(o)}catch{prompt("",o)}n.value=!0,setTimeout(()=>{n.value=!1},dg)}return{isCopied:n,copy:i,icon:t,altText:r}}const hg={name:"NcReferenceList",components:{NcReferenceWidget:fg},props:{text:{type:String,default:""},referenceData:{type:Array,default:null},limit:{type:Number,default:1},displayFallback:{type:Boolean,default:!1},interactive:{type:Boolean,default:!0},interactiveOptIn:{type:Boolean,default:!1}},emits:["loaded"],data(){return{references:null,loading:!0}},computed:{isVisible(){return this.loading||this.displayedReferences.length!==0},values(){return this.referenceData?this.referenceData:this.displayFallback&&!this.loading&&!this.references?[this.fallbackReference]:this.references?Object.values(this.references):[]},firstReference(){return this.values[0]??null},displayedReferences(){return this.values.filter(Boolean).slice(0,this.limit)},fallbackReference(){return{accessible:!0,openGraphObject:{id:this.text,link:this.text,name:this.text},richObjectType:"open-graph"}}},watch:{text:"fetch"},mounted(){this.fetch()},methods:{fetch(){if(this.loading=!0,this.referenceData){this.references=null,this.loading=!1;return}if(!new RegExp(Os).exec(this.text)){this.references=null,this.loading=!1;return}this.resolve().then(e=>{this.references=e.data.ocs.data.references,this.loading=!1,this.$emit("loaded")}).catch(e=>{bt.error("[NcReferenceList] Failed to extract references",{error:e}),this.loading=!1,this.$emit("loaded")})},resolve(){const e=new RegExp(Os).exec(this.text.trim()),n=xn()===null;return this.limit===1&&e?n?tt.get(_t("references/resolvePublic")+`?reference=${encodeURIComponent(e[0])}&sharingToken=${Es()}`):tt.get(_t("references/resolve")+`?reference=${encodeURIComponent(e[0])}`):n?tt.post(_t("references/extractPublic"),{text:this.text,resolve:!0,limit:this.limit,sharingToken:Es()}):tt.post(_t("references/extract"),{text:this.text,resolve:!0,limit:this.limit})}}};function mg(e,n,t,r,i,o){const a=ge("NcReferenceWidget");return o.isVisible?(M(),z("div",{key:0,class:ze(["widgets--list",{"icon-loading":i.loading}])},[(M(!0),z(Tn,null,ar(o.displayedReferences,f=>(M(),ce(a,{key:f.openGraphObject?.id,reference:f,interactive:t.interactive,interactiveOptIn:t.interactiveOptIn},null,8,["reference","interactive","interactiveOptIn"]))),128))],2)):ae("",!0)}const Gr=Ge(hg,[["render",mg],["__scopeId","data-v-9cde5a6a"]]);function Ns(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}const In=dr(/[A-Za-z]/),$i=dr(/[\dA-Za-z]/);function gg(e){return e!==null&&(e<32||e===127)}function en(e){return e!==null&&e<-2}function Be(e){return e!==null&&(e<0||e===32)}function gt(e){return e===-2||e===-1||e===32}const fr=dr(new RegExp("\\p{P}|\\p{S}","u")),qt=dr(/\s/);function dr(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function yg(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const pr=function(e){if(e==null)return wg;if(typeof e=="function")return hr(e);if(typeof e=="object")return Array.isArray(e)?_g(e):vg(e);if(typeof e=="string")return bg(e);throw new Error("Expected function, string, or object as test")};function _g(e){const n=[];let t=-1;for(;++t":""))+")"})}return l;function l(){let u=$a,h,y,w;if(o(c,d,m[m.length-1]||void 0)&&(u=Ig(t(c,m)),u[0]===Ms))return u;if("children"in c&&c.children){const _=c;if(_.children&&u[0]!==Sg)for(y=-1+a,w=m.concat(_);y>-1&&y<_.children.length;){const k=_.children[y];if(h=f(k,y,w)(),h[0]===Ms)return h;y=typeof h[1]=="number"?h[1]:y+a}}return u}}}function Ig(e){return Array.isArray(e)?e:typeof e=="number"?[kg,e]:e==null?$a:[e]}function Ag(e,n,t){const r=pr((t||{}).ignore||[]),i=Tg(n);let o=-1;for(;++o0?{type:"text",value:R}:void 0),R===!1?s.lastIndex=k+1:(u!==k&&w.push({type:"text",value:c.value.slice(u,k)}),Array.isArray(R)?w.push(...R):R&&w.push(R),u=k+_[0].length,y=!0),!s.global)break;_=s.exec(c.value)}return y?(u?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=Ns(e,"(");let o=Ns(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function Wa(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||qt(t)||fr(t))&&(!n||t!==47)}function On(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Ga.peek=Jg;function qg(){this.buffer()}function Vg(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function $g(){this.buffer()}function Wg(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Gg(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=On(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Xg(e){this.exit(e)}function Zg(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=On(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Kg(e){this.exit(e)}function Jg(){return"["}function Ga(e,n,t,r){const i=t.createTracker(r);let o=i.move("[^");const a=t.enter("footnoteReference"),f=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{after:"]",before:o})),f(),a(),o+=i.move("]"),o}function Yg(){return{enter:{gfmFootnoteCallString:qg,gfmFootnoteCall:Vg,gfmFootnoteDefinitionLabelString:$g,gfmFootnoteDefinition:Wg},exit:{gfmFootnoteCallString:Gg,gfmFootnoteCall:Xg,gfmFootnoteDefinitionLabelString:Zg,gfmFootnoteDefinition:Kg}}}function Qg(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Ga},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,o,a){const f=o.createTracker(a);let c=f.move("[^");const d=o.enter("footnoteDefinition"),m=o.enter("label");return c+=f.move(o.safe(o.associationId(r),{before:c,after:"]"})),m(),c+=f.move("]:"),r.children&&r.children.length>0&&(f.shift(4),c+=f.move((n?` `:" ")+o.indentLines(o.containerFlow(r,f.current()),n?Xa:ey))),d(),c}}function ey(e,n,t){return n===0?e:Xa(e,n,t)}function Xa(e,n,t){return(t?"":" ")+e}const ty=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Za.peek=sy;function ny(){return{canContainEols:["delete"],enter:{strikethrough:iy},exit:{strikethrough:oy}}}function ry(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ty}],handlers:{delete:Za}}}function iy(e){this.enter({type:"delete",children:[]},e)}function oy(e){this.exit(e)}function Za(e,n,t,r){const i=t.createTracker(r),o=t.enter("strikethrough");let a=i.move("~~");return a+=t.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function sy(){return"~"}function ay(e){return e.length}function ly(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||ay,o=[],a=[],f=[],c=[];let d=0,m=-1;for(;++md&&(d=e[m].length);++_c[_])&&(c[_]=T)}y.push(k)}a[m]=y,f[m]=w}let s=-1;if(typeof r=="object"&&"length"in r)for(;++sc[s]&&(c[s]=k),u[s]=k),l[s]=T}a.splice(1,0,l),f.splice(1,0,u),m=-1;const h=[];for(;++m "),o.shift(2);const a=t.indentLines(t.containerFlow(e,o.current()),fy);return i(),a}function fy(e,n,t){return">"+(t?"":" ")+e}function dy(e,n){return Ls(e,n.inConstruct,!0)&&!Ls(e,n.notInConstruct,!1)}function Ls(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++ra&&(a=o):o=1,i=r+n.length,r=t.indexOf(n,i);return a}function hy(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function my(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function gy(e,n,t,r){const i=my(t),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(hy(e,t)){const s=t.enter("codeIndented"),l=t.indentLines(o,yy);return s(),l}const f=t.createTracker(r),c=i.repeat(Math.max(py(o,i)+1,3)),d=t.enter("codeFenced");let m=f.move(c);if(e.lang){const s=t.enter(`codeFencedLang${a}`);m+=f.move(t.safe(e.lang,{before:m,after:" ",encode:["`"],...f.current()})),s()}if(e.lang&&e.meta){const s=t.enter(`codeFencedMeta${a}`);m+=f.move(" "),m+=f.move(t.safe(e.meta,{before:m,after:` `,encode:["`"],...f.current()})),s()}return m+=f.move(` `),o&&(m+=f.move(o+` `)),m+=f.move(c),d(),m}function yy(e,n,t){return(t?"":" ")+e}function Wi(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function _y(e,n,t,r){const i=Wi(t),o=i==='"'?"Quote":"Apostrophe",a=t.enter("definition");let f=t.enter("label");const c=t.createTracker(r);let d=c.move("[");return d+=c.move(t.safe(t.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(f=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":` `,...c.current()}))),f(),e.title&&(f=t.enter(`title${o}`),d+=c.move(" "+i),d+=c.move(t.safe(e.title,{before:d,after:i,...c.current()})),d+=c.move(i),f()),a(),d}function vy(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function An(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ir(e){if(e===null||Be(e)||qt(e))return 1;if(fr(e))return 2}function or(e,n,t){const r=ir(e),i=ir(n);return r===void 0?i===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ka.peek=by;function Ka(e,n,t,r){const i=vy(t),o=t.enter("emphasis"),a=t.createTracker(r),f=a.move(i);let c=a.move(t.containerPhrasing(e,{after:i,before:f,...a.current()}));const d=c.charCodeAt(0),m=or(r.before.charCodeAt(r.before.length-1),d,i);m.inside&&(c=An(d)+c.slice(1));const s=c.charCodeAt(c.length-1),l=or(r.after.charCodeAt(0),s,i);l.inside&&(c=c.slice(0,-1)+An(s));const u=a.move(i);return o(),t.attentionEncodeSurroundingInfo={after:l.outside,before:m.outside},f+c+u}function by(e,n,t){return t.options.emphasis||"*"}const wy={};function Ja(e,n){const t=wy,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Ya(e,r,i)}function Ya(e,n,t){if(xy(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Fs(e.children,n,t)}return Array.isArray(e)?Fs(e,n,t):""}function Fs(e,n,t){const r=[];let i=-1;for(;++i",...c.current()})),d+=c.move(">")):(f=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),f(),e.title&&(f=t.enter(`title${o}`),d+=c.move(" "+i),d+=c.move(t.safe(e.title,{before:d,after:i,...c.current()})),d+=c.move(i),f()),d+=c.move(")"),a(),d}function Iy(){return"!"}tl.peek=Ay;function tl(e,n,t,r){const i=e.referenceType,o=t.enter("imageReference");let a=t.enter("label");const f=t.createTracker(r);let c=f.move("![");const d=t.safe(e.alt,{before:c,after:"]",...f.current()});c+=f.move(d+"]["),a();const m=t.stack;t.stack=[],a=t.enter("reference");const s=t.safe(t.associationId(e),{before:c,after:"]",...f.current()});return a(),t.stack=m,o(),i==="full"||!d||d!==s?c+=f.move(s+"]"):i==="shortcut"?c=c.slice(0,-1):c+=f.move("]"),c}function Ay(){return"!"}nl.peek=Ty;function nl(e,n,t){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o\u007F]/.test(e.url))}il.peek=Ey;function il(e,n,t,r){const i=Wi(t),o=i==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let f,c;if(rl(e,t)){const m=t.stack;t.stack=[],f=t.enter("autolink");let s=a.move("<");return s+=a.move(t.containerPhrasing(e,{before:s,after:">",...a.current()})),s+=a.move(">"),f(),t.stack=m,s}f=t.enter("link"),c=t.enter("label");let d=a.move("[");return d+=a.move(t.containerPhrasing(e,{before:d,after:"](",...a.current()})),d+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),d+=a.move("<"),d+=a.move(t.safe(e.url,{before:d,after:">",...a.current()})),d+=a.move(">")):(c=t.enter("destinationRaw"),d+=a.move(t.safe(e.url,{before:d,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=t.enter(`title${o}`),d+=a.move(" "+i),d+=a.move(t.safe(e.title,{before:d,after:i,...a.current()})),d+=a.move(i),c()),d+=a.move(")"),f(),d}function Ey(e,n,t){return rl(e,t)?"<":"["}ol.peek=Oy;function ol(e,n,t,r){const i=e.referenceType,o=t.enter("linkReference");let a=t.enter("label");const f=t.createTracker(r);let c=f.move("[");const d=t.containerPhrasing(e,{before:c,after:"]",...f.current()});c+=f.move(d+"]["),a();const m=t.stack;t.stack=[],a=t.enter("reference");const s=t.safe(t.associationId(e),{before:c,after:"]",...f.current()});return a(),t.stack=m,o(),i==="full"||!d||d!==s?c+=f.move(s+"]"):i==="shortcut"?c=c.slice(0,-1):c+=f.move("]"),c}function Oy(){return"["}function Gi(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Py(e){const n=Gi(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Ny(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function sl(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function My(e,n,t,r){const i=t.enter("list"),o=t.bulletCurrent;let a=e.ordered?Ny(t):Gi(t);const f=e.ordered?a==="."?")":".":Py(t);let c=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&m&&(!m.children||!m.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(c=!0),sl(t)===a&&m){let s=-1;for(;++s-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(a=Math.ceil(a/4)*4);const f=t.createTracker(r);f.move(o+" ".repeat(a-o.length)),f.shift(a);const c=t.enter("listItem"),d=t.indentLines(t.containerFlow(e,f.current()),m);return c(),d;function m(s,l,u){return l?(u?"":" ".repeat(a))+s:(u?o:o+" ".repeat(a-o.length))+s}}function Dy(e,n,t,r){const i=t.enter("paragraph"),o=t.enter("phrasing"),a=t.containerPhrasing(e,r);return o(),i(),a}const Fy=pr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function jy(e,n,t,r){return(e.children.some(function(i){return Fy(i)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Uy(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}al.peek=zy;function al(e,n,t,r){const i=Uy(t),o=t.enter("strong"),a=t.createTracker(r),f=a.move(i+i);let c=a.move(t.containerPhrasing(e,{after:i,before:f,...a.current()}));const d=c.charCodeAt(0),m=or(r.before.charCodeAt(r.before.length-1),d,i);m.inside&&(c=An(d)+c.slice(1));const s=c.charCodeAt(c.length-1),l=or(r.after.charCodeAt(0),s,i);l.inside&&(c=c.slice(0,-1)+An(s));const u=a.move(i+i);return o(),t.attentionEncodeSurroundingInfo={after:l.outside,before:m.outside},f+c+u}function zy(e,n,t){return t.options.strong||"*"}function By(e,n,t,r){return t.safe(e.value,r)}function Hy(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function qy(e,n,t){const r=(sl(t)+(t.options.ruleSpaces?" ":"")).repeat(Hy(t));return t.options.ruleSpaces?r.slice(0,-1):r}const ll={blockquote:uy,break:Ds,code:gy,definition:_y,emphasis:Ka,hardBreak:Ds,heading:Sy,html:Qa,image:el,imageReference:tl,inlineCode:nl,link:il,linkReference:ol,list:My,listItem:Ly,paragraph:Dy,root:jy,strong:al,text:By,thematicBreak:qy};function Vy(){return{enter:{table:$y,tableData:js,tableHeader:js,tableRow:Gy},exit:{codeText:Xy,table:Wy,tableData:Jr,tableHeader:Jr,tableRow:Jr}}}function $y(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Wy(e){this.exit(e),this.data.inTable=void 0}function Gy(e){this.enter({type:"tableRow",children:[]},e)}function Jr(e){this.exit(e)}function js(e){this.enter({type:"tableCell",children:[]},e)}function Xy(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Zy));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Zy(e,n){return n==="|"?n:e}function Ky(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:l,table:a,tableCell:c,tableRow:f}};function a(u,h,y,w){return d(m(u,y,w),u.align)}function f(u,h,y,w){const _=s(u,y,w),k=d([_]);return k.slice(0,k.indexOf(` `))}function c(u,h,y,w){const _=y.enter("tableCell"),k=y.enter("phrasing"),T=y.containerPhrasing(u,{...w,before:o,after:o});return k(),_(),T}function d(u,h){return ly(u,{align:h,alignDelimiters:r,padding:t,stringLength:i})}function m(u,h,y){const w=u.children;let _=-1;const k=[],T=h.enter("table");for(;++_i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);o0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}function y0(e,n,t){const r=[];let i=-1;for(;++i999||s===93&&!a||s===null||s===91||Be(s))return t(s);if(s===93){e.exit("chunkString");const l=e.exit("gfmFootnoteCallString");return i.includes(On(r.sliceSerialize(l)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(s)}return Be(s)||(a=!0),o++,e.consume(s),s===92?m:d}function m(s){return s===91||s===92||s===93?(e.consume(s),o++,d):d(s)}}function C0(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,f;return c;function c(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):t(h)}function m(h){if(a>999||h===93&&!f||h===null||h===91||Be(h))return t(h);if(h===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return o=On(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),l}return Be(h)||(f=!0),a++,e.consume(h),h===92?s:m}function s(h){return h===91||h===92||h===93?(e.consume(h),a++,m):m(h)}function l(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(o)||i.push(o),yt(e,u,"gfmFootnoteDefinitionWhitespace")):t(h)}function u(h){return n(h)}}function I0(e,n,t){return e.check(_0,n,e.attempt(b0,n,t))}function A0(e){e.exit("gfmFootnoteDefinition")}function T0(e,n,t){const r=this;return yt(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?n(o):t(o)}}function E0(e){let n=(e||{}).singleTilde;const t={name:"strikethrough",tokenize:i,resolveAll:r};return n==null&&(n=!0),{text:{126:t},insideSpan:{null:[t]},attentionMarkers:{null:[126]}};function r(o,a){let f=-1;for(;++f1?f(u):(o.consume(u),m++,l);if(m<2&&!n)return f(u);const y=o.exit("strikethroughSequenceTemporary"),w=ir(u);return y._open=!w||w===2&&!!h,y._close=!h||h===2&&!!w,a(u)}}}class O0{constructor(){this.map=[]}add(n,t,r){P0(this,n,t,r)}consume(n){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const o of i)n.push(o);i=r.pop()}this.map.length=0}}function P0(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i-1;){const q=r.events[X][1].type;if(q==="lineEnding"||q==="linePrefix")X--;else break}const Z=X>-1?r.events[X][1].type:null,K=Z==="tableHead"||Z==="tableRow"?N:c;return K===N&&r.parser.lazy[r.now().line]?t(P):K(P)}function c(P){return e.enter("tableHead"),e.enter("tableRow"),d(P)}function d(P){return P===124||(a=!0,o+=1),m(P)}function m(P){return P===null?t(P):en(P)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),u):t(P):gt(P)?yt(e,m,"whitespace")(P):(o+=1,a&&(a=!1,i+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),s(P)))}function s(P){return P===null||P===124||Be(P)?(e.exit("data"),m(P)):(e.consume(P),P===92?l:s)}function l(P){return P===92||P===124?(e.consume(P),s):s(P)}function u(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(P):(e.enter("tableDelimiterRow"),a=!1,gt(P)?yt(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):h(P))}function h(P){return P===45||P===58?w(P):P===124?(a=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),y):$(P)}function y(P){return gt(P)?yt(e,w,"whitespace")(P):w(P)}function w(P){return P===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),_):P===45?(o+=1,_(P)):P===null||en(P)?R(P):$(P)}function _(P){return P===45?(e.enter("tableDelimiterFiller"),k(P)):$(P)}function k(P){return P===45?(e.consume(P),k):P===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(P))}function T(P){return gt(P)?yt(e,R,"whitespace")(P):R(P)}function R(P){return P===124?h(P):P===null||en(P)?!a||i!==o?$(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(P)):$(P)}function $(P){return t(P)}function N(P){return e.enter("tableRow"),J(P)}function J(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),J):P===null||en(P)?(e.exit("tableRow"),n(P)):gt(P)?yt(e,J,"whitespace")(P):(e.enter("data"),G(P))}function G(P){return P===null||P===124||Be(P)?(e.exit("data"),J(P)):(e.consume(P),P===92?H:G)}function H(P){return P===92||P===124?(e.consume(P),G):G(P)}}function L0(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],f=!1,c=0,d,m,s;const l=new O0;for(;++tt[2]+1){const h=t[2]+1,y=t[3]-t[2]-1;e.add(h,y,[])}}e.add(t[3]+1,0,[["exit",s,n]])}return i!==void 0&&(o.end=Object.assign({},Yt(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function qs(e,n,t,r,i){const o=[],a=Yt(n.events,t);i&&(i.end=Object.assign({},a),o.push(["exit",i,n])),r.end=Object.assign({},a),o.push(["exit",r,n]),e.add(t+1,0,o)}function Yt(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const D0={name:"tasklistCheck",tokenize:j0};function F0(){return{text:{91:D0}}}function j0(e,n,t){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return Be(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):t(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):t(c)}function f(c){return en(c)?n(c):gt(c)?e.check({tokenize:U0},n,t)(c):t(c)}}function U0(e,n,t){return yt(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function z0(e){return r0([l0(),w0(),E0(e),M0(),F0()])}const B0={};function H0(e){const n=this,t=e||B0,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(z0(t)),o.push(t0()),a.push(n0(t))}const q0=kt({__name:"NcRichTextCopyButton",props:{contentId:{}},setup(e){const{copy:n,icon:t,altText:r}=pg(()=>document.getElementById(e.contentId).textContent);return(i,o)=>(M(),ce(Vt,{variant:"tertiary",size:"small","aria-label":Ne(r),title:Ne(r),onClick:Ne(n)},{icon:pe(()=>[Le(Si,{path:Ne(t),inline:""},null,8,["path"])]),_:1},8,["aria-label","title","onClick"]))}});function V0(e){return e.type==="text"}const $0=function(e){wt(e,V0,n);function n(t,r,i){const o=t.value.split(/(\{[a-z\-_.0-9]+\})/ig).map(a=>{const f=a.match(/^\{([a-z\-_.0-9]+)\}$/i);if(!f)return Qt("text",a);const[,c]=f;return Qt("element",{tagName:`#${c}`,children:[]})});i.children.splice(r,1,...o)}},W0=()=>$0;function G0(e){return["text","code","inlineCode"].includes(e.type)}const X0=function(){return function(e){wt(e,G0,(n,t,r)=>(r.children.splice(t,1,{...n,value:n.value.replace(/</gmi,"<").replace(/>/gmi,">")}),[Mi,t+1]))}},Z0=["http","https","mailto","tel"],wi=Pt(null);async function K0(){const e=await ou(()=>import("./index-COufUJ40.chunk.mjs"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url);wi.value=e.default}const J0={name:"NcRichText",components:{NcReferenceList:Gr},props:{text:{type:String,default:""},arguments:{type:Object,default:()=>({})},referenceLimit:{type:Number,default:0},referenceInteractive:{type:Boolean,default:!0},referenceInteractiveOptIn:{type:Boolean,default:!1},references:{type:Array,default:null},useMarkdown:{type:Boolean,default:!1},useExtendedMarkdown:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1},autolink:{type:Boolean,default:!0}},emits:["interactTodo"],data(){return{parentId:tn()}},methods:{renderPlaintext(){const e=this.text.split(/(\{[a-z\-_.0-9]+\})/ig).map(n=>{const t=n.match(/^\{([a-z\-_.0-9]+)\}$/i);if(!t)return this.prepareTextNode(n);const r=t[1],i=this.arguments[r];if(typeof i=="object"){const{component:o,props:a}=i;return ve(typeof o=="string"?ge(o):o,{...a,class:"rich-text--component"})}return i?ve("span",{class:"rich-text--fallback"},i):n});return ve("div",{class:"rich-text--wrapper"},[ve("div",{},e.flat()),this.referenceLimit>0?ve("div",{class:"rich-text--reference-widget"},[ve(Gr,{text:this.text,referenceData:this.references,interactive:this.referenceInteractive,interactiveOptIn:this.referenceInteractiveOptIn})]):null])},renderMarkdown(){const e=Wm().use(qh).use(ig,{autolink:this.autolink,useMarkdown:this.useMarkdown,useExtendedMarkdown:this.useExtendedMarkdown}).use(X0).use(this.useExtendedMarkdown?H0:void 0).use(Fd).use(Am,{except:Z0}).use(Cm,{handlers:{component(n,t){return n(t,t.component,{value:t.value})}}}).use(this.useExtendedMarkdown?wi.value:void 0).use(W0).use(Uf,{target:"_blank",rel:["noopener noreferrer"]}).use(Ed,{Fragment:Tn,jsx:this.createElement,jsxs:this.createElement,elementAttributeNameCase:"html",prefix:!1}).processSync(this.text.replace(/<[^>]+>/g,n=>n.replace(/")).result;return ve("div",{class:"rich-text--wrapper rich-text--wrapper-markdown"},[e,this.referenceLimit>0?ve("div",{class:"rich-text--reference-widget"},[ve(Gr,{text:this.text,referenceData:this.references,interactive:this.referenceInteractive,interactiveOptIn:this.referenceInteractiveOptIn})]):null])},prepareTextNode(e){return this.autolink&&(e=Va(e)),Array.isArray(e)?e.map(n=>{if(typeof n=="string")return n;const{component:t,props:r}=n,i=t.name==="NcLink"?void 0:"rich-text--component";return ve(t,{...r,class:i})}):e},createElement(e,n,t){t&&(n.key=t);const r=n.children??[];if(delete n.children,!String(e).startsWith("#")){["h1","h2","h3","h4","h5","h6"].includes(String(e))&&(e=`h${Math.min(+String(e)[1]+3,6)}`);let o=null;if(this.useExtendedMarkdown){if(String(e)==="code"&&!wi.value&&n?.class?.includes("language")&&K0(),String(e)==="pre"&&r&&String(r.type)==="code"){const a=this.parentId+"-code-block-"+tn();return ve("p",{class:"rich-text__code-block"},[ve(e,{...n,id:a},r),ve(q0,{class:"rich-text__code-block-button",contentId:a})])}if(String(e)==="li"&&Array.isArray(r)&&r.length!==0&&r[0].type==="input"&&r[0].props.type==="checkbox"){const[a,,...f]=r,c=f.findIndex(l=>["ul","ol","li","blockquote","pre"].includes(l.type));c!==-1&&(o=f[c],f.splice(c));const d=this.parentId+"-markdown-input-"+tn(),m={...a.props};delete m.checked;const s=ve(jc,{...m,modelValue:a.props.checked,id:d,disabled:!this.interactive,"onUpdate:modelValue":()=>{this.$emit("interactTodo",d)}},{default:()=>f});return ve(e,n,[s,o])}}if(String(e)==="a"){const a=Vi(this.$router,n.href);if(a)return delete n.href,delete n.target,ve(Ci,{...n,to:a},{default:()=>r})}return ve(e,n,r)}const i=this.arguments[e.slice(1)];return i?i.component?ve(typeof i.component=="string"?ge(i.component):i.component,{...n,...i.props,class:"rich-text--component"},{default:()=>r}):ve("span",{...n},[i]):ve("span",{...n,class:"rich-text--fallback"},[`{${e.slice(1)}}`])}},render(){return this.useMarkdown||this.useExtendedMarkdown?this.renderMarkdown():this.renderPlaintext()}},Y0=Ge(J0,[["__scopeId","data-v-a47e4ba7"]]),Q0={__name:"ActionButton",props:{action:{type:Object,required:!0}},emits:["click"],setup(e,{emit:n}){const t=e,r=n,i=oe(()=>t.action.type==="WEB");function o(a){const f={url:t.action.link,type:t.action.type||"GET"};r("click",{event:a,action:f})}return(a,f)=>(M(),ce(Ne(Vt),{variant:i.value||e.action.primary?"primary":"secondary",href:i.value?e.action.link:void 0,class:"action-button pull-right",onClick:o},{default:pe(()=>[Mt(ne(e.action.label),1)]),_:1},8,["variant","href"]))}},e1={name:"DefaultParameter",props:{type:{type:String,required:!0},id:{type:[Number,String],required:!0},name:{type:String,required:!0},link:{type:String,default:""}},computed:{hasInternalLink(){return this.link&&(this.type==="deck-board"||this.type==="deck-card")}}},t1=["href"],n1=["href"],r1={key:2};function i1(e,n,t,r,i,o){return o.hasInternalLink?(M(),z("a",{key:0,href:t.link},[se("strong",null,ne(t.name),1)],8,t1)):t.link?(M(),z("a",{key:1,href:t.link,class:"external",target:"_blank",rel:"noopener noreferrer"},[se("strong",null,ne(t.name),1)],8,n1)):(M(),z("strong",r1,ne(t.name),1))}const o1=xt(e1,[["render",i1],["__scopeId","data-v-9803ab31"]]),s1={name:"FileParameter",props:{type:{type:String,required:!0},id:{type:[Number,String],required:!0},name:{type:String,required:!0},path:{type:String,default:""},link:{type:String,default:""}},computed:{title(){const e=this.path.lastIndexOf("/"),n=this.path.indexOf("/"),t=this.path.substring(n===0?1:0,e);return t.length===0?"":ft("notifications","in {path}",{path:t})}}},a1=["title","href"];function l1(e,n,t,r,i,o){return M(),z("a",{title:o.title,class:"filename",href:t.link},ne(t.name),9,a1)}const c1=xt(s1,[["render",l1]]),Yr=new WeakMap,u1={mounted(e,n){const t=!n.modifiers.bubble;let r;if(typeof n.value=="function")r=ri(e,n.value,{capture:t});else{const[i,o]=n.value;r=ri(e,i,Object.assign({capture:t},o))}Yr.set(e,r)},unmounted(e){const n=Yr.get(e);n&&typeof n=="function"?n():n?.stop(),Yr.delete(e)}};function f1(e){return window._nc_contacts_menu_hooks?Object.values(window._nc_contacts_menu_hooks).filter(n=>n.enabled(e)):[]}const d1=new Int32Array(4);class Me{static hashStr(n,t=!1){return this.onePassHasher.start().appendStr(n).end(t)}static hashAsciiStr(n,t=!1){return this.onePassHasher.start().appendAsciiStr(n).end(t)}static stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]);static buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);static hexChars="0123456789abcdef";static hexOut=[];static onePassHasher=new Me;static _hex(n){const t=Me.hexChars,r=Me.hexOut;let i,o,a,f;for(f=0;f<4;f+=1)for(o=f*8,i=n[f],a=0;a<8;a+=2)r[o+1+a]=t.charAt(i&15),i>>>=4,r[o+0+a]=t.charAt(i&15),i>>>=4;return r.join("")}static _md5cycle(n,t){let r=n[0],i=n[1],o=n[2],a=n[3];r+=(i&o|~i&a)+t[0]-680876936|0,r=(r<<7|r>>>25)+i|0,a+=(r&i|~r&o)+t[1]-389564586|0,a=(a<<12|a>>>20)+r|0,o+=(a&r|~a&i)+t[2]+606105819|0,o=(o<<17|o>>>15)+a|0,i+=(o&a|~o&r)+t[3]-1044525330|0,i=(i<<22|i>>>10)+o|0,r+=(i&o|~i&a)+t[4]-176418897|0,r=(r<<7|r>>>25)+i|0,a+=(r&i|~r&o)+t[5]+1200080426|0,a=(a<<12|a>>>20)+r|0,o+=(a&r|~a&i)+t[6]-1473231341|0,o=(o<<17|o>>>15)+a|0,i+=(o&a|~o&r)+t[7]-45705983|0,i=(i<<22|i>>>10)+o|0,r+=(i&o|~i&a)+t[8]+1770035416|0,r=(r<<7|r>>>25)+i|0,a+=(r&i|~r&o)+t[9]-1958414417|0,a=(a<<12|a>>>20)+r|0,o+=(a&r|~a&i)+t[10]-42063|0,o=(o<<17|o>>>15)+a|0,i+=(o&a|~o&r)+t[11]-1990404162|0,i=(i<<22|i>>>10)+o|0,r+=(i&o|~i&a)+t[12]+1804603682|0,r=(r<<7|r>>>25)+i|0,a+=(r&i|~r&o)+t[13]-40341101|0,a=(a<<12|a>>>20)+r|0,o+=(a&r|~a&i)+t[14]-1502002290|0,o=(o<<17|o>>>15)+a|0,i+=(o&a|~o&r)+t[15]+1236535329|0,i=(i<<22|i>>>10)+o|0,r+=(i&a|o&~a)+t[1]-165796510|0,r=(r<<5|r>>>27)+i|0,a+=(r&o|i&~o)+t[6]-1069501632|0,a=(a<<9|a>>>23)+r|0,o+=(a&i|r&~i)+t[11]+643717713|0,o=(o<<14|o>>>18)+a|0,i+=(o&r|a&~r)+t[0]-373897302|0,i=(i<<20|i>>>12)+o|0,r+=(i&a|o&~a)+t[5]-701558691|0,r=(r<<5|r>>>27)+i|0,a+=(r&o|i&~o)+t[10]+38016083|0,a=(a<<9|a>>>23)+r|0,o+=(a&i|r&~i)+t[15]-660478335|0,o=(o<<14|o>>>18)+a|0,i+=(o&r|a&~r)+t[4]-405537848|0,i=(i<<20|i>>>12)+o|0,r+=(i&a|o&~a)+t[9]+568446438|0,r=(r<<5|r>>>27)+i|0,a+=(r&o|i&~o)+t[14]-1019803690|0,a=(a<<9|a>>>23)+r|0,o+=(a&i|r&~i)+t[3]-187363961|0,o=(o<<14|o>>>18)+a|0,i+=(o&r|a&~r)+t[8]+1163531501|0,i=(i<<20|i>>>12)+o|0,r+=(i&a|o&~a)+t[13]-1444681467|0,r=(r<<5|r>>>27)+i|0,a+=(r&o|i&~o)+t[2]-51403784|0,a=(a<<9|a>>>23)+r|0,o+=(a&i|r&~i)+t[7]+1735328473|0,o=(o<<14|o>>>18)+a|0,i+=(o&r|a&~r)+t[12]-1926607734|0,i=(i<<20|i>>>12)+o|0,r+=(i^o^a)+t[5]-378558|0,r=(r<<4|r>>>28)+i|0,a+=(r^i^o)+t[8]-2022574463|0,a=(a<<11|a>>>21)+r|0,o+=(a^r^i)+t[11]+1839030562|0,o=(o<<16|o>>>16)+a|0,i+=(o^a^r)+t[14]-35309556|0,i=(i<<23|i>>>9)+o|0,r+=(i^o^a)+t[1]-1530992060|0,r=(r<<4|r>>>28)+i|0,a+=(r^i^o)+t[4]+1272893353|0,a=(a<<11|a>>>21)+r|0,o+=(a^r^i)+t[7]-155497632|0,o=(o<<16|o>>>16)+a|0,i+=(o^a^r)+t[10]-1094730640|0,i=(i<<23|i>>>9)+o|0,r+=(i^o^a)+t[13]+681279174|0,r=(r<<4|r>>>28)+i|0,a+=(r^i^o)+t[0]-358537222|0,a=(a<<11|a>>>21)+r|0,o+=(a^r^i)+t[3]-722521979|0,o=(o<<16|o>>>16)+a|0,i+=(o^a^r)+t[6]+76029189|0,i=(i<<23|i>>>9)+o|0,r+=(i^o^a)+t[9]-640364487|0,r=(r<<4|r>>>28)+i|0,a+=(r^i^o)+t[12]-421815835|0,a=(a<<11|a>>>21)+r|0,o+=(a^r^i)+t[15]+530742520|0,o=(o<<16|o>>>16)+a|0,i+=(o^a^r)+t[2]-995338651|0,i=(i<<23|i>>>9)+o|0,r+=(o^(i|~a))+t[0]-198630844|0,r=(r<<6|r>>>26)+i|0,a+=(i^(r|~o))+t[7]+1126891415|0,a=(a<<10|a>>>22)+r|0,o+=(r^(a|~i))+t[14]-1416354905|0,o=(o<<15|o>>>17)+a|0,i+=(a^(o|~r))+t[5]-57434055|0,i=(i<<21|i>>>11)+o|0,r+=(o^(i|~a))+t[12]+1700485571|0,r=(r<<6|r>>>26)+i|0,a+=(i^(r|~o))+t[3]-1894986606|0,a=(a<<10|a>>>22)+r|0,o+=(r^(a|~i))+t[10]-1051523|0,o=(o<<15|o>>>17)+a|0,i+=(a^(o|~r))+t[1]-2054922799|0,i=(i<<21|i>>>11)+o|0,r+=(o^(i|~a))+t[8]+1873313359|0,r=(r<<6|r>>>26)+i|0,a+=(i^(r|~o))+t[15]-30611744|0,a=(a<<10|a>>>22)+r|0,o+=(r^(a|~i))+t[6]-1560198380|0,o=(o<<15|o>>>17)+a|0,i+=(a^(o|~r))+t[13]+1309151649|0,i=(i<<21|i>>>11)+o|0,r+=(o^(i|~a))+t[4]-145523070|0,r=(r<<6|r>>>26)+i|0,a+=(i^(r|~o))+t[11]-1120210379|0,a=(a<<10|a>>>22)+r|0,o+=(r^(a|~i))+t[2]+718787259|0,o=(o<<15|o>>>17)+a|0,i+=(a^(o|~r))+t[9]-343485551|0,i=(i<<21|i>>>11)+o|0,n[0]=r+n[0]|0,n[1]=i+n[1]|0,n[2]=o+n[2]|0,n[3]=a+n[3]|0}_dataLength=0;_bufferLength=0;_state=new Int32Array(4);_buffer=new ArrayBuffer(68);_buffer8;_buffer32;constructor(){this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(Me.stateIdentity),this}appendStr(n){const t=this._buffer8,r=this._buffer32;let i=this._bufferLength,o,a;for(a=0;a>>6)+192,t[i++]=o&63|128;else if(o<55296||o>56319)t[i++]=(o>>>12)+224,t[i++]=o>>>6&63|128,t[i++]=o&63|128;else{if(o=(o-55296)*1024+(n.charCodeAt(++a)-56320)+65536,o>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");t[i++]=(o>>>18)+240,t[i++]=o>>>12&63|128,t[i++]=o>>>6&63|128,t[i++]=o&63|128}i>=64&&(this._dataLength+=64,Me._md5cycle(this._state,r),i-=64,r[0]=r[16])}return this._bufferLength=i,this}appendAsciiStr(n){const t=this._buffer8,r=this._buffer32;let i=this._bufferLength,o,a=0;for(;;){for(o=Math.min(n.length-a,64-i);o--;)t[i++]=n.charCodeAt(a++);if(i<64)break;this._dataLength+=64,Me._md5cycle(this._state,r),i=0}return this._bufferLength=i,this}appendByteArray(n){const t=this._buffer8,r=this._buffer32;let i=this._bufferLength,o,a=0;for(;;){for(o=Math.min(n.length-a,64-i);o--;)t[i++]=n[a++];if(i<64)break;this._dataLength+=64,Me._md5cycle(this._state,r),i=0}return this._bufferLength=i,this}getState(){const n=this._state;return{buffer:String.fromCharCode.apply(null,Array.from(this._buffer8)),buflen:this._bufferLength,length:this._dataLength,state:[n[0],n[1],n[2],n[3]]}}setState(n){const t=n.buffer,r=n.state,i=this._state;let o;for(this._dataLength=n.length,this._bufferLength=n.buflen,i[0]=r[0],i[1]=r[1],i[2]=r[2],i[3]=r[3],o=0;o>2)+1;this._dataLength+=t;const a=this._dataLength*8;if(r[t]=128,r[t+1]=r[t+2]=r[t+3]=0,i.set(Me.buffer32Identity.subarray(o),o),t>55&&(Me._md5cycle(this._state,i),i.set(Me.buffer32Identity)),a<=4294967295)i[14]=a;else{const f=a.toString(16).match(/(.*?)(.{0,8})$/);if(f===null)return n?d1:"";const c=parseInt(f[2],16),d=parseInt(f[1],16)||0;i[14]=c,i[15]=d}return Me._md5cycle(this._state,i),n?this._state:Me._hex(this._state)}}if(Me.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592")throw new Error("Md5 self test failed.");Je(Uc);class Re{constructor(n,t,r,i){this.r=n,this.g=t,this.b=r,this.name=i,this.r=Math.min(n,255),this.g=Math.min(t,255),this.b=Math.min(r,255),this.name=i}get color(){const n=t=>`00${t.toString(16)}`.slice(-2);return`#${n(this.r)}${n(this.g)}${n(this.b)}`}}function p1(e,n,t){return{r:(t.r-n.r)/e,g:(t.g-n.g)/e,b:(t.b-n.b)/e}}function Qr(e,n,t){const r=[];r.push(n);const i=p1(e,n,t);for(let o=1;o/g,f=/<\/?([^\s\/>]+)/;function c(h,y,w){h=h||"",y=y||[],w=w||"";let _=m(y,w);return s(h,_)}function d(h,y){h=h||[],y=y||"";let w=m(h,y);return function(_){return s(_||"",w)}}c.init_streaming_mode=d;function m(h,y){return h=l(h),{allowable_tags:h,tag_replacement:y,state:r,tag_buffer:"",depth:0,in_quote_char:""}}function s(h,y){if(typeof h!="string")throw new TypeError("'html' parameter must be a string");let w=y.allowable_tags,_=y.tag_replacement,k=y.state,T=y.tag_buffer,R=y.depth,$=y.in_quote_char,N="";for(let J=0,G=h.length;J":if($)break;if(R){R--;break}$="",k=r,T+=">",w.has(u(T))?N+=T:N+=_,T="";break;case'"':case"'":H===$?$="":$=$||H,T+=H;break;case"-":T==="":T.slice(-2)=="--"&&(k=r),T="";break;default:T+=H;break}}return y.state=k,y.tag_buffer=T,y.depth=R,y.in_quote_char=$,N}function l(h){let y=new Set;if(typeof h=="string"){let w;for(;w=a.exec(h);)y.add(w[1])}else!t.nonNative&&typeof h[t.iterator]=="function"?y=new Set(h):typeof h.forEach=="function"&&h.forEach(y.add,y);return y}function u(h){let y=f.exec(h);return y?y[1].toLowerCase():null}e.exports?e.exports=c:n.striptags=c})(g1)}(xi)),xi.exports}y1();function _1(e,n){const t=(n?.size||64)<=64?64:512,r=n?.isGuest?"/guest":"",i=n?.isDarkTheme??ni(document.body)?"/dark":"";return ra(`/avatar${r}/{user}/{size}${i}`,{user:e,size:t})}const v1=` `,b1=` `,w1=` `,Zs=` `,x1=` `;Je(zc),Je(Bc);function ml(e){switch(e){case"away":return de("away");case"busy":return de("busy");case"dnd":return de("do not disturb");case"online":return de("online");case"invisible":return de("invisible");case"offline":return de("offline");default:return e}}const k1=["aria-hidden","aria-label","innerHTML"],S1=kt({__name:"NcUserStatusIcon",props:ai({user:{default:void 0},ariaHidden:{type:[Boolean,String],default:!1}},{status:{},statusModifiers:{}}),emits:["update:status"],setup(e){const n=oa(e,"status"),t=e,r=oe(()=>n.value&&["invisible","offline"].includes(n.value)),i=oe(()=>n.value&&(!t.ariaHidden||t.ariaHidden==="false")?de("User status: {status}",{status:ml(n.value)}):void 0);an(()=>t.user,async f=>{if(!n.value&&f&&Ii()?.user_status?.enabled)try{const{data:c}=await tt.get(_t("/apps/user_status/api/v1/statuses/{user}",{user:f}));n.value=c.ocs?.data?.status}catch(c){bt.debug("Error while fetching user status",{error:c})}},{immediate:!0});const o={online:x1,away:v1,busy:b1,dnd:w1,invisible:Zs,offline:Zs},a=oe(()=>n.value&&o[n.value]);return(f,c)=>n.value?(M(),z("span",{key:0,class:ze(["user-status-icon",{"user-status-icon--invisible":r.value}]),"aria-hidden":!i.value||void 0,"aria-label":i.value,role:"img",innerHTML:a.value},null,10,k1)):ae("",!0)}}),C1=Ge(S1,[["__scopeId","data-v-881a79fb"]]),I1={beforeUpdate(){this.text=this.getText()},data(){return{text:this.getText()}},computed:{isLongText(){return this.text&&this.text.trim().length>20}},methods:{getText(){return this.$slots.default?.()[0].children?.trim?.()||""}}},mr={mixins:[I1],props:{icon:{type:String,default:""},name:{type:String,default:""},title:{type:String,default:""},closeAfterClick:{type:Boolean,default:!1},ariaLabel:{type:String,default:null}},inject:{closeMenu:{from:Hc}},emits:["click"],created(){"ariaHidden"in this.$attrs},computed:{isIconUrl(){try{return!!new URL(this.icon,this.icon.startsWith("/")?window.location.origin:void 0)}catch{return!1}}},methods:{onClick(e){this.$emit("click",e),this.closeAfterClick&&this.closeMenu(!1)}}},A1={name:"NcActionButton",components:{NcIconSvgWrapper:Si},mixins:[mr],inject:{isInSemanticMenu:{from:sr,default:!1}},props:{disabled:{type:Boolean,default:!1},isMenu:{type:Boolean,default:!1},type:{type:String,default:"button",validator:e=>["button","checkbox","radio","reset","submit"].includes(e)},modelValue:{type:[Boolean,String],default:null},value:{type:String,default:null},description:{type:String,default:""}},emits:["update:modelValue"],setup(){return{mdiCheck:sa,mdiChevronRight:uu}},computed:{isFocusable(){return!this.disabled},isChecked(){return this.type==="radio"&&typeof this.modelValue!="boolean"?this.modelValue===this.value:this.modelValue},nativeType(){return this.type==="submit"||this.type==="reset"?this.type:"button"},buttonAttributes(){const e={};return this.isInSemanticMenu?(e.role="menuitem",this.type==="radio"?(e.role="menuitemradio",e["aria-checked"]=this.isChecked?"true":"false"):(this.type==="checkbox"||this.nativeType==="button"&&this.modelValue!==null)&&(e.role="menuitemcheckbox",e["aria-checked"]=this.modelValue===null?"mixed":this.modelValue?"true":"false")):this.modelValue!==null&&this.nativeType==="button"&&(e["aria-pressed"]=this.modelValue?"true":"false"),e}},methods:{handleClick(e){this.onClick(e),(this.modelValue!==null||this.type!=="button")&&(this.type==="radio"?typeof this.modelValue!="boolean"?this.isChecked||this.$emit("update:modelValue",this.value):this.$emit("update:modelValue",!this.isChecked):this.$emit("update:modelValue",!this.isChecked))}}},T1=["role"],E1=["aria-label","disabled","title","type"],O1={class:"action-button__longtext-wrapper"},P1={key:0,class:"action-button__name"},N1=["textContent"],M1={key:2,class:"action-button__text"},R1=["textContent"],L1={key:2,class:"action-button__pressed-icon material-design-icon"};function D1(e,n,t,r,i,o){const a=ge("NcIconSvgWrapper");return M(),z("li",{class:ze(["action",{"action--disabled":t.disabled}]),role:o.isInSemanticMenu&&"presentation"},[se("button",Rt({"aria-label":e.ariaLabel,class:["action-button button-vue",{"action-button--active":o.isChecked,focusable:o.isFocusable}],disabled:t.disabled,title:e.title,type:o.nativeType},o.buttonAttributes,{onClick:n[0]||(n[0]=(...f)=>o.handleClick&&o.handleClick(...f))}),[je(e.$slots,"icon",{},()=>[se("span",{class:ze([[e.isIconUrl?"action-button__icon--url":e.icon],"action-button__icon"]),style:vt({backgroundImage:e.isIconUrl?`url(${e.icon})`:null}),"aria-hidden":"true"},null,6)],!0),se("span",O1,[e.name?(M(),z("strong",P1,ne(e.name),1)):ae("",!0),e.isLongText?(M(),z("span",{key:1,class:"action-button__longtext",textContent:ne(e.text)},null,8,N1)):(M(),z("span",M1,ne(e.text),1)),t.description?(M(),z("span",{key:3,class:"action-button__description",textContent:ne(t.description)},null,8,R1)):ae("",!0)]),t.isMenu?(M(),ce(a,{key:0,class:"action-button__menu-icon",directional:"",path:r.mdiChevronRight},null,8,["path"])):o.isChecked?(M(),ce(a,{key:1,path:r.mdiCheck,class:"action-button__pressed-icon"},null,8,["path"])):o.isChecked===!1?(M(),z("span",L1)):ae("",!0),ae("",!0)],16,E1)],10,T1)}const F1=Ge(A1,[["render",D1],["__scopeId","data-v-6c2daf4e"]]),j1={name:"NcActionLink",mixins:[mr],inject:{isInSemanticMenu:{from:sr,default:!1}},props:{href:{type:String,required:!0,validator:e=>{try{return new URL(e)}catch{return e.startsWith("#")||e.startsWith("/")}}},download:{type:String,default:null},target:{type:String,default:"_self",validator:e=>e&&(!e.startsWith("_")||["_blank","_self","_parent","_top"].indexOf(e)>-1)},title:{type:String,default:null}}},U1=["role"],z1=["download","href","aria-label","target","title","role"],B1={key:0,class:"action-link__longtext-wrapper"},H1={class:"action-link__name"},q1=["textContent"],V1=["textContent"],$1={key:2,class:"action-link__text"};function W1(e,n,t,r,i,o){return M(),z("li",{class:"action",role:o.isInSemanticMenu&&"presentation"},[se("a",{download:t.download,href:t.href,"aria-label":e.ariaLabel,target:t.target,title:t.title,class:"action-link focusable",rel:"nofollow noreferrer noopener",role:o.isInSemanticMenu&&"menuitem",onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a))},[je(e.$slots,"icon",{},()=>[se("span",{"aria-hidden":"true",class:ze(["action-link__icon",[e.isIconUrl?"action-link__icon--url":e.icon]]),style:vt({backgroundImage:e.isIconUrl?`url(${e.icon})`:null})},null,6)],!0),e.name?(M(),z("span",B1,[se("strong",H1,ne(e.name),1),n[1]||(n[1]=se("br",null,null,-1)),se("span",{class:"action-link__longtext",textContent:ne(e.text)},null,8,q1)])):e.isLongText?(M(),z("span",{key:1,class:"action-link__longtext",textContent:ne(e.text)},null,8,V1)):(M(),z("span",$1,ne(e.text),1)),ae("",!0)],8,z1)],8,U1)}const G1=Ge(j1,[["render",W1],["__scopeId","data-v-32f01b7a"]]),X1={name:"NcActionRouter",mixins:[mr],inject:{isInSemanticMenu:{from:sr,default:!1}},props:{to:{type:[String,Object],required:!0}}},Z1=["role"],K1={key:0,class:"action-router__longtext-wrapper"},J1={class:"action-router__name"},Y1=["textContent"],Q1=["textContent"],e_={key:2,class:"action-router__text"};function t_(e,n,t,r,i,o){const a=ge("RouterLink");return M(),z("li",{class:"action",role:o.isInSemanticMenu&&"presentation"},[Le(a,{"aria-label":e.ariaLabel,class:"action-router focusable",rel:"nofollow noreferrer noopener",role:o.isInSemanticMenu&&"menuitem",title:e.title,to:t.to,onClick:e.onClick},{default:pe(()=>[je(e.$slots,"icon",{},()=>[se("span",{"aria-hidden":"true",class:ze(["action-router__icon",[e.isIconUrl?"action-router__icon--url":e.icon]]),style:vt({backgroundImage:e.isIconUrl?`url(${e.icon})`:null})},null,6)],!0),e.name?(M(),z("span",K1,[se("strong",J1,ne(e.name),1),n[0]||(n[0]=se("br",null,null,-1)),se("span",{class:"action-router__longtext",textContent:ne(e.text)},null,8,Y1)])):e.isLongText?(M(),z("span",{key:1,class:"action-router__longtext",textContent:ne(e.text)},null,8,Q1)):(M(),z("span",e_,ne(e.text),1)),ae("",!0)]),_:3},8,["aria-label","role","title","to","onClick"])],8,Z1)}const n_=Ge(X1,[["render",t_],["__scopeId","data-v-87267750"]]),r_={name:"NcActionText",mixins:[mr],inject:{isInSemanticMenu:{from:sr,default:!1}}},i_=["role"],o_={key:0,class:"action-text__longtext-wrapper"},s_={class:"action-text__name"},a_=["textContent"],l_=["textContent"],c_={key:2,class:"action-text__text"};function u_(e,n,t,r,i,o){return M(),z("li",{class:"action",role:o.isInSemanticMenu&&"presentation"},[se("span",{class:"action-text",onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a))},[je(e.$slots,"icon",{},()=>[e.icon!==""?(M(),z("span",{key:0,"aria-hidden":"true",class:ze(["action-text__icon",[e.isIconUrl?"action-text__icon--url":e.icon]]),style:vt({backgroundImage:e.isIconUrl?`url(${e.icon})`:null})},null,6)):ae("",!0)],!0),e.name?(M(),z("span",o_,[se("strong",s_,ne(e.name),1),se("span",{class:"action-text__longtext",textContent:ne(e.text)},null,8,a_)])):e.isLongText?(M(),z("span",{key:1,class:"action-text__longtext",textContent:ne(e.text)},null,8,l_)):(M(),z("span",c_,ne(e.text),1)),ae("",!0)])],8,i_)}const f_=Ge(r_,[["render",u_],["__scopeId","data-v-fa684b48"]]);Je(Gc);const d_={data(){return{hasStatus:!1,userStatus:{status:null,message:null,icon:null}}},methods:{async fetchUserStatus(e){if(!e)return;const n=Ii();if(!(!Object.hasOwn(n,"user_status")||!n.user_status.enabled)&&xn())try{const{data:t}=await tt.get(_t("apps/user_status/api/v1/statuses/{userId}",{userId:e}));this.setUserStatus(t.ocs.data)}catch(t){if(t.response.status===404&&t.response.data.ocs?.data?.length===0)return;bt.error("Failed to fetch user status",{error:t})}},setUserStatus({status:e,message:n,icon:t}){this.userStatus.status=e||"",this.userStatus.message=n||"",this.userStatus.icon=t||"",this.hasStatus=!!e}}},gl=Wc("nextcloud").persist().build();function p_(e){const n=gl.getItem("user-has-avatar."+e);return typeof n=="string"?!!n:null}function Ks(e,n){e&&gl.setItem("user-has-avatar."+e,n)}const h_={name:"NcAvatar",directives:{ClickOutside:u1},components:{IconDotsHorizontal:$c,NcActions:Vc,NcButton:Vt,NcIconSvgWrapper:Si,NcLoadingIcon:qc,NcUserStatusIcon:C1},mixins:[d_],props:{url:{type:String,default:void 0},iconClass:{type:String,default:void 0},user:{type:String,default:void 0},hideStatus:{type:Boolean,default:!1},verboseStatus:{type:Boolean,default:!1},preloadedUserStatus:{type:Object,default:void 0},isGuest:{type:Boolean,default:!1},displayName:{type:String,default:void 0},size:{type:Number,default:32},noPlaceholder:{type:Boolean,default:!1},disableTooltip:{type:Boolean,default:!1},disableMenu:{type:Boolean,default:!1},tooltipMessage:{type:String,default:null},isNoUser:{type:Boolean,default:!1},menuContainer:{type:[Boolean,String,Object,Element],default:"body"}},setup(){return{isDarkTheme:mu()}},data(){return{avatarUrlLoaded:null,avatarSrcSetLoaded:null,userDoesNotExist:!1,isAvatarLoaded:!1,isMenuLoaded:!1,contactsMenuLoading:!1,contactsMenuData:{},contactsMenuActions:[],contactsMenuOpenState:!1}},computed:{avatarAriaLabel(){if(this.hasMenu)return this.canDisplayUserStatus||this.showUserStatusIconOnAvatar?de("Avatar of {displayName}, {status}",{displayName:this.displayName??this.user,status:ml(this.userStatus.status)}):de("Avatar of {displayName}",{displayName:this.displayName??this.user})},canDisplayUserStatus(){return!this.hideStatus&&this.hasStatus&&["online","away","busy","dnd"].includes(this.userStatus.status)},showUserStatusIconOnAvatar(){return!this.hideStatus&&!this.verboseStatus&&this.hasStatus&&this.userStatus.status!=="dnd"&&this.userStatus.icon},userIdentifier(){return this.isDisplayNameDefined?this.displayName:this.isUserDefined?this.user:""},isUserDefined(){return typeof this.user<"u"},isDisplayNameDefined(){return typeof this.displayName<"u"},isUrlDefined(){return typeof this.url<"u"},hasMenu(){return this.disableMenu?!1:this.isMenuLoaded?this.menu.length>0:!(this.user===xn()?.uid||this.userDoesNotExist||this.url)},showInitials(){return!this.noPlaceholder&&this.userDoesNotExist&&!(this.iconClass||this.$slots.icon)},avatarStyle(){return{"--avatar-size":this.size+"px",lineHeight:this.showInitials?this.size+"px":0,fontSize:Math.round(this.size*.45)+"px"}},initialsWrapperStyle(){const{r:e,g:n,b:t}=Gs(this.userIdentifier);return{backgroundColor:`rgba(${e}, ${n}, ${t}, 0.1)`}},initialsStyle(){const{r:e,g:n,b:t}=Gs(this.userIdentifier);return{color:`rgb(${e}, ${n}, ${t})`}},tooltip(){return this.disableTooltip?null:this.tooltipMessage?this.tooltipMessage:this.displayName},initials(){let e="?";if(this.showInitials){const n=this.userIdentifier.trim();if(n==="")return e;const t=n.match(/[\p{L}\p{N}\s]/gu);if(!t)return e;const r=t.join(""),i=r.lastIndexOf(" ");e=String.fromCodePoint(r.codePointAt(0)),i!==-1&&(e=e.concat(String.fromCodePoint(r.codePointAt(i+1))))}return e.toLocaleUpperCase()},menu(){const e=this.contactsMenuActions.map(t=>{const r=Vi(this.$router,t.hyperlink);return{ncActionComponent:r?n_:G1,ncActionComponentProps:r?{to:r,icon:t.icon}:{href:t.hyperlink,icon:t.icon},text:t.title}});for(const t of f1(this.contactsMenuData))try{e.push({ncActionComponent:F1,ncActionComponentProps:{onClick:()=>t.callback(this.contactsMenuData)},text:t.displayName(this.contactsMenuData),iconSvg:t.iconSvg(this.contactsMenuData)})}catch(r){bt.error(`Failed to render ContactsMenu action ${t.id}`,{error:r,action:t})}function n(t){const r=document.createTextNode(t),i=document.createElement("p");return i.appendChild(r),i.innerHTML}if(!this.hideStatus&&(this.userStatus.icon||this.userStatus.message)){const t=` ${n(this.userStatus.icon)} `;return[{ncActionComponent:f_,ncActionComponentProps:{},iconSvg:this.userStatus.icon?t:void 0,text:`${this.userStatus.message}`}].concat(e)}return e}},watch:{url(){this.userDoesNotExist=!1,this.loadAvatarUrl()},user(){this.userDoesNotExist=!1,this.isMenuLoaded=!1,this.loadAvatarUrl()}},mounted(){this.loadAvatarUrl(),rn("settings:avatar:updated",this.loadAvatarUrl),rn("settings:display-name:updated",this.loadAvatarUrl),!this.hideStatus&&this.user&&!this.isNoUser?(this.preloadedUserStatus?this.setUserStatus(this.preloadedUserStatus):this.fetchUserStatus(this.user),rn("user_status:status.updated",this.handleUserStatusUpdated)):!this.hideStatus&&this.preloadedUserStatus&&this.setUserStatus(this.preloadedUserStatus)},beforeUnmount(){nn("settings:avatar:updated",this.loadAvatarUrl),nn("settings:display-name:updated",this.loadAvatarUrl),nn("user_status:status.updated",this.handleUserStatusUpdated)},methods:{t:de,handleUserStatusUpdated(e){this.user===e.userId&&(this.userStatus={status:e.status,icon:e.icon,message:e.message},this.hasStatus=e.status!==null)},async toggleMenu(e){e.type==="keydown"&&e.key!=="Enter"||(this.contactsMenuOpenState||await this.fetchContactsMenu(),this.contactsMenuOpenState=!this.contactsMenuOpenState)},closeMenu(){this.contactsMenuOpenState=!1},async fetchContactsMenu(){this.contactsMenuLoading=!0;try{const e=encodeURIComponent(this.user),{data:n}=await tt.post(ra("contactsmenu/findOne"),`shareType=0&shareWith=${e}`);this.contactsMenuData=n,this.contactsMenuActions=n.topAction?[n.topAction].concat(n.actions):n.actions}catch{this.contactsMenuOpenState=!1}this.contactsMenuLoading=!1,this.isMenuLoaded=!0},loadAvatarUrl(){if(this.isAvatarLoaded=!1,!this.isUrlDefined&&(!this.isUserDefined||this.isNoUser||this.iconClass||this.$slots.icon)){this.isAvatarLoaded=!0,this.userDoesNotExist=!0;return}if(this.isUrlDefined){this.updateImageIfValid(this.url);return}if(this.size<=64){const e=this.avatarUrlGenerator(this.user,64),n=[e+" 1x",this.avatarUrlGenerator(this.user,512)+" 8x"].join(", ");this.updateImageIfValid(e,n)}else{const e=this.avatarUrlGenerator(this.user,512);this.updateImageIfValid(e)}},avatarUrlGenerator(e,n){let t=_1(e,{size:n,isDarkTheme:this.isDarkTheme,isGuest:this.isGuest});return e===xn()?.uid&&typeof oc_userconfig<"u"&&(t+="?v="+window.oc_userconfig.avatar.version),t},updateImageIfValid(e,n=null){const t=p_(this.user);if(this.isUserDefined&&typeof t=="boolean"){this.isAvatarLoaded=!0,this.avatarUrlLoaded=e,n&&(this.avatarSrcSetLoaded=n),t===!1&&(this.userDoesNotExist=!0);return}const r=new Image;r.onload=()=>{this.avatarUrlLoaded=e,n&&(this.avatarSrcSetLoaded=n),this.isAvatarLoaded=!0,Ks(this.user,!0)},r.onerror=i=>{bt.debug("[NcAvatar] Invalid avatar url",{error:i,url:e}),this.avatarUrlLoaded=null,this.avatarSrcSetLoaded=null,this.userDoesNotExist=!0,this.isAvatarLoaded=!1,Ks(this.user,!1)},n&&(r.srcset=n),r.src=e}}},m_=["title"],g_=["src","srcset"],y_={key:2,class:"avatardiv__user-status avatardiv__user-status--icon"};function __(e,n,t,r,i,o){const a=ge("NcLoadingIcon"),f=ge("IconDotsHorizontal"),c=ge("NcButton"),d=ge("NcIconSvgWrapper"),m=ge("NcActions"),s=ge("NcUserStatusIcon"),l=tu("click-outside");return si((M(),z("span",{class:ze(["avatardiv popovermenu-wrapper",{"avatardiv--unknown":i.userDoesNotExist,"avatardiv--with-menu":o.hasMenu,"avatardiv--with-menu-loading":i.contactsMenuLoading}]),style:vt(o.avatarStyle),title:o.tooltip},[je(e.$slots,"icon",{},()=>[t.iconClass?(M(),z("span",{key:0,class:ze([t.iconClass,"avatar-class-icon"])},null,2)):i.isAvatarLoaded&&!i.userDoesNotExist?(M(),z("img",{key:1,src:i.avatarUrlLoaded,srcset:i.avatarSrcSetLoaded,alt:""},null,8,g_)):ae("",!0)],!0),o.hasMenu&&o.menu.length===0?(M(),ce(c,{key:0,"aria-label":o.avatarAriaLabel,class:"action-item action-item__menutoggle",variant:"tertiary-no-background",onClick:o.toggleMenu},{icon:pe(()=>[i.contactsMenuLoading?(M(),ce(a,{key:0})):(M(),ce(f,{key:1,size:20}))]),_:1},8,["aria-label","onClick"])):o.hasMenu?(M(),ce(m,{key:1,open:i.contactsMenuOpenState,"onUpdate:open":n[0]||(n[0]=u=>i.contactsMenuOpenState=u),"aria-label":o.avatarAriaLabel,container:t.menuContainer,forceMenu:"",manualOpen:"",variant:"tertiary-no-background",onClick:o.toggleMenu},li({default:pe(()=>[(M(!0),z(Tn,null,ar(o.menu,(u,h)=>(M(),ce(Sn(u.ncActionComponent),Rt({key:h},{ref_for:!0},u.ncActionComponentProps),li({default:pe(()=>[Mt(" "+ne(u.text),1)]),_:2},[u.iconSvg?{name:"icon",fn:pe(()=>[Le(d,{svg:u.iconSvg},null,8,["svg"])]),key:"0"}:void 0]),1040))),128))]),_:2},[i.contactsMenuLoading?{name:"icon",fn:pe(()=>[Le(a)]),key:"0"}:void 0]),1032,["open","aria-label","container","onClick"])):ae("",!0),o.showUserStatusIconOnAvatar?(M(),z("span",y_,ne(e.userStatus.icon),1)):o.canDisplayUserStatus?(M(),ce(s,{key:3,class:"avatardiv__user-status",status:e.userStatus.status,"aria-hidden":String(o.hasMenu)},null,8,["status","aria-hidden"])):ae("",!0),o.showInitials?(M(),z("span",{key:4,style:vt(o.initialsWrapperStyle),class:"avatardiv__initials-wrapper"},[se("span",{style:vt(o.initialsStyle),class:"avatardiv__initials"},ne(o.initials),5)],4)):ae("",!0)],14,m_)),[[l,o.closeMenu]])}const v_=Ge(h_,[["render",__],["__scopeId","data-v-72a1eed6"]]),b_={};function w_(e,n){return M(),z("div",null,[je(e.$slots,"trigger")])}const x_=Ge(b_,[["render",w_]]),k_={class:"user-bubble__name"},S_={key:0,class:"user-bubble__secondary"},C_=kt({__name:"NcUserBubble",props:ai({avatarImage:{default:void 0},user:{default:void 0},displayName:{default:void 0},showUserStatus:{type:Boolean},url:{default:void 0},to:{default:void 0},primary:{type:Boolean},size:{default:20},margin:{default:2}},{open:{type:Boolean},openModifiers:{}}),emits:ai(["click"],["update:open"]),setup(e,{emit:n}){const t=oa(e,"open"),r=e,i=n,o=oe(()=>{if(!r.avatarImage)return!1;try{return!!new URL(r.avatarImage)}catch{return!1}}),a=oe(()=>!!r.avatarImage),f=oe(()=>({marginInlineStart:`${r.margin}px`})),c=oe(()=>{if(!r.url||r.url.trim()==="")return!1;try{return!!new URL(r.url,r.url?.startsWith?.("/")?window.location.href:void 0)}catch{return nu("[NcUserBubble] Invalid URL passed",{url:r.url}),!1}}),d=oe(()=>c.value?r.url:void 0),m=oe(()=>c.value?"a":r.to?Ci:"div"),s=oe(()=>({height:`${r.size}px`,lineHeight:`${r.size}px`,borderRadius:`${r.size/2}px`}));return an([()=>r.displayName,()=>r.user],()=>{!r.displayName&&r.user}),(l,u)=>(M(),ce(Sn(l.$slots.default?Xc:x_),{shown:t.value,"onUpdate:shown":u[1]||(u[1]=h=>t.value=h),class:"user-bubble__wrapper",trigger:"hover focus"},{trigger:pe(({attrs:h})=>[(M(),ce(Sn(m.value),Rt({class:["user-bubble__content",{"user-bubble__content--primary":l.primary}],style:s.value,to:l.to,href:d.value},h,{onClick:u[0]||(u[0]=y=>i("click",y))}),{default:pe(()=>[Le(v_,{url:a.value&&o.value?l.avatarImage:void 0,iconClass:a.value&&!o.value?l.avatarImage:void 0,user:l.user,displayName:l.displayName,size:l.size-l.margin*2,style:vt(f.value),disableTooltip:"",disableMenu:"",hideStatus:!l.showUserStatus,class:"user-bubble__avatar"},null,8,["url","iconClass","user","displayName","size","style","hideStatus"]),se("span",k_,ne(l.displayName||l.user),1),l.$slots.name?(M(),z("span",S_,[je(l.$slots,"name",{},void 0,!0)])):ae("",!0)]),_:2},1040,["class","style","to","href"]))]),default:pe(()=>[je(l.$slots,"default",{},void 0,!0)]),_:3},40,["shown"]))}}),I_=Ge(C_,[["__scopeId","data-v-9189d023"]]),A_={name:"UserParameter",components:{NcUserBubble:I_},props:{type:{type:String,required:!0},id:{type:String,required:!0},name:{type:String,required:!0},server:{type:String,default:""}},computed:{cloudId(){return this.server?this.id+"@"+this.server:""}}},T_={class:"mention"},E_=["title"];function O_(e,n,t,r,i,o){const a=ge("NcUserBubble");return M(),z("div",T_,[o.cloudId?(M(),z("strong",{key:1,title:o.cloudId},ne(t.name),9,E_)):(M(),ce(a,{key:0,displayName:t.name,user:t.id},null,8,["displayName","user"]))])}const P_=xt(A_,[["render",O_],["__scopeId","data-v-fd1bec4b"]]),N_={name:"NotificationItem",components:{ActionButton:Q0,NcButton:Vt,NcDateTime:mf,IconClose:la,IconMessageOutline:ca,NcRichText:Y0},props:{notification:{type:Object,required:!0}},emits:["remove"],data(){return{showFullMessage:!1}},computed:{timestamp(){return this.notification.datetime==="warning"?0:new Date(this.notification.datetime).valueOf()},useLink(){if(!this.notification.link)return!1;let e=!1;return Object.keys(Object(this.notification.subjectRichParameters)).forEach(n=>{Object(this.notification.subjectRichParameters)[n].link&&(e=!0)}),!e},preparedSubjectParameters(){return this.prepareParameters(this.notification.subjectRichParameters)},preparedMessageParameters(){return this.prepareParameters(this.notification.messageRichParameters)},isCollapsedMessage(){return this.notification.message.length>200&&!this.showFullMessage}},methods:{t:ft,prepareParameters(e={}){const n={};return Object.keys(e).forEach(t=>{const r=e[t].type;r==="user"?n[t]={component:P_,props:e[t]}:r==="file"?n[t]={component:c1,props:e[t]}:n[t]={component:o1,props:e[t]}}),n},onClickMessage(e){e.target.closest(".rich-text--wrapper")?this.showFullMessage=!this.showFullMessage:!this.notification.messageRich&&this.notification.message&&(this.showFullMessage=!this.showFullMessage)},async onClickAction({event:e,action:n}){try{const t={cancelAction:!1,notification:this.notification,action:n};if(await nr("notifications:action:execute",t),n.type==="WEB"){t.cancelAction&&e.preventDefault();return}if(t.cancelAction)return;await tt({method:n.type,url:n.url}),this.$emit("remove"),nr("notifications:action:executed",e)}catch(t){console.error("Failed to perform action",t),ii(ft("notifications","Failed to perform action"))}},onDismissNotification(){tt.delete(_t("apps/notifications/api/v2/notifications/{id}",{id:this.notification.notificationId})).then(()=>{this.$emit("remove")}).catch(()=>{ii(ft("notifications","Failed to dismiss notification"))})}}},M_=["data-id","data-timestamp","data-object-type","data-app"],R_={class:"notification-heading"},L_=["href"],D_={key:0,class:"image"},F_=["src"],j_={class:"subject"},U_=["href"],z_={key:0,class:"image"},B_=["src"],H_={key:2,class:"subject"},q_={key:2,class:"notification-subject"},V_={key:0,class:"image"},$_=["src"],W_={key:2,class:"subject"},G_={key:1},X_={key:0,class:"notification-overflow"},Z_={key:4,class:"notification-actions"},K_={key:5,class:"notification-actions"};function J_(e,n,t,r,i,o){const a=ge("NcDateTime"),f=ge("IconClose"),c=ge("NcButton"),d=ge("NcRichText"),m=ge("ActionButton"),s=ge("IconMessageOutline");return M(),z("li",{class:"notification","data-id":t.notification.notificationId,"data-timestamp":o.timestamp,"data-object-type":t.notification.objectType,"data-app":t.notification.app},[se("div",R_,[o.timestamp?(M(),ce(a,{key:0,class:"notification-time",ignoreSeconds:"",format:{timeStyle:"short",dateStyle:"long"},timestamp:o.timestamp},null,8,["timestamp"])):ae("",!0),o.timestamp?(M(),ce(c,{key:1,class:"notification-dismiss-button",variant:"tertiary","aria-label":o.t("notifications","Dismiss"),onClick:o.onDismissNotification},{icon:pe(()=>[Le(f,{size:20})]),_:1},8,["aria-label","onClick"])):ae("",!0)]),t.notification.externalLink?(M(),z("a",{key:0,href:t.notification.externalLink,class:"notification-subject full-subject-link external",target:"_blank",rel:"noreferrer noopener"},[t.notification.icon?(M(),z("span",D_,[se("img",{src:t.notification.icon,class:"notification-icon",alt:""},null,8,F_)])):ae("",!0),se("span",j_,ne(t.notification.subject)+" ↗",1)],8,L_)):o.useLink?(M(),z("a",{key:1,href:t.notification.link,class:"notification-subject full-subject-link"},[t.notification.icon?(M(),z("span",z_,[se("img",{src:t.notification.icon,class:"notification-icon",alt:""},null,8,B_)])):ae("",!0),t.notification.subjectRich?(M(),ce(d,{key:1,text:t.notification.subjectRich,arguments:o.preparedSubjectParameters},null,8,["text","arguments"])):(M(),z("span",H_,ne(t.notification.subject),1))],8,U_)):(M(),z("div",q_,[t.notification.icon?(M(),z("span",V_,[se("img",{src:t.notification.icon,class:"notification-icon",alt:""},null,8,$_)])):ae("",!0),t.notification.subjectRich?(M(),ce(d,{key:1,text:t.notification.subjectRich,arguments:o.preparedSubjectParameters},null,8,["text","arguments"])):(M(),z("span",W_,ne(t.notification.subject),1))])),t.notification.message?(M(),z("div",{key:3,class:"notification-message",onClick:n[0]||(n[0]=(...l)=>o.onClickMessage&&o.onClickMessage(...l))},[se("div",{class:ze(["message-container",{collapsed:o.isCollapsedMessage}])},[t.notification.messageRich?(M(),ce(d,{key:0,text:t.notification.messageRich,arguments:o.preparedMessageParameters,autolink:!0},null,8,["text","arguments"])):(M(),z("span",G_,ne(t.notification.message),1))],2),o.isCollapsedMessage?(M(),z("div",X_)):ae("",!0)])):ae("",!0),t.notification.actions.length?(M(),z("div",Z_,[(M(!0),z(Tn,null,ar(t.notification.actions,(l,u)=>(M(),ce(m,{key:u,action:l,onClick:o.onClickAction,onRemove:n[1]||(n[1]=h=>e.$emit("remove"))},null,8,["action","onClick"]))),128))])):t.notification.externalLink?(M(),z("div",K_,[Le(c,{variant:"primary",href:"https://nextcloud.com/fairusepolicy",class:"action-button pull-right",target:"_blank",rel:"noreferrer noopener"},{icon:pe(()=>[Le(s,{size:20})]),default:pe(()=>[Mt(" "+ne(o.t("notifications","Contact Nextcloud GmbH"))+" ↗ ",1)]),_:1})])):ae("",!0)],8,M_)}const Y_=xt(N_,[["render",J_],["__scopeId","data-v-a0c97239"]]);async function yl(e,n,t,r){const i=parseInt(Ae.getItem("lastUpdated"),10),o=Ae.getItem("tabId"),a=Math.floor(Date.now()/1e3);return(t||o===e&&i+25=0&&s<=1){if(l._volume=s,l._muted)return l;l.usingWebAudio&&l.masterGain.gain.setValueAtTime(s,t.ctx.currentTime);for(var u=0;u=0;l--)s._howls[l].unload();return s.usingWebAudio&&s.ctx&&typeof s.ctx.close<"u"&&(s.ctx.close(),s.ctx=null,m()),s},codecs:function(s){return(this||t)._codecs[s.replace(/^x-/,"")]},_setup:function(){var s=this||t;if(s.state=s.ctx&&s.ctx.state||"suspended",s._autoSuspend(),!s.usingWebAudio)if(typeof Audio<"u")try{var l=new Audio;typeof l.oncanplaythrough>"u"&&(s._canPlayEvent="canplay")}catch{s.noAudio=!0}else s.noAudio=!0;try{var l=new Audio;l.muted&&(s.noAudio=!0)}catch{}return s.noAudio||s._setupCodecs(),s},_setupCodecs:function(){var s=this||t,l=null;try{l=typeof Audio<"u"?new Audio:null}catch{return s}if(!l||typeof l.canPlayType!="function")return s;var u=l.canPlayType("audio/mpeg;").replace(/^no$/,""),h=s._navigator?s._navigator.userAgent:"",y=h.match(/OPR\/(\d+)/g),w=y&&parseInt(y[0].split("/")[1],10)<33,_=h.indexOf("Safari")!==-1&&h.indexOf("Chrome")===-1,k=h.match(/Version\/(.*?) /),T=_&&k&&parseInt(k[1],10)<15;return s._codecs={mp3:!!(!w&&(u||l.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!u,opus:!!l.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!l.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!l.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(l.canPlayType('audio/wav; codecs="1"')||l.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!l.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!l.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(l.canPlayType("audio/x-m4a;")||l.canPlayType("audio/m4a;")||l.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(l.canPlayType("audio/x-m4b;")||l.canPlayType("audio/m4b;")||l.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(l.canPlayType("audio/x-mp4;")||l.canPlayType("audio/mp4;")||l.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!T&&l.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!T&&l.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!l.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(l.canPlayType("audio/x-flac;")||l.canPlayType("audio/flac;")).replace(/^no$/,"")},s},_unlockAudio:function(){var s=this||t;if(!(s._audioUnlocked||!s.ctx)){s._audioUnlocked=!1,s.autoUnlock=!1,!s._mobileUnloaded&&s.ctx.sampleRate!==44100&&(s._mobileUnloaded=!0,s.unload()),s._scratchBuffer=s.ctx.createBuffer(1,1,22050);var l=function(u){for(;s._html5AudioPool.length"u"?T.noteOn(0):T.start(0),typeof s.ctx.resume=="function"&&s.ctx.resume(),T.onended=function(){T.disconnect(0),s._audioUnlocked=!0,document.removeEventListener("touchstart",l,!0),document.removeEventListener("touchend",l,!0),document.removeEventListener("click",l,!0),document.removeEventListener("keydown",l,!0);for(var R=0;R"u"||!t.usingWebAudio)){for(var l=0;l"u"||!t.usingWebAudio))return s.state==="running"&&s.ctx.state!=="interrupted"&&s._suspendTimer?(clearTimeout(s._suspendTimer),s._suspendTimer=null):s.state==="suspended"||s.state==="running"&&s.ctx.state==="interrupted"?(s.ctx.resume().then(function(){s.state="running";for(var l=0;l"u"&&(s="__default",!u._playLock)){for(var y=0,w=0;w0?_._seek:u._sprite[s][0]/1e3),R=Math.max(0,(u._sprite[s][0]+u._sprite[s][1])/1e3-T),$=R*1e3/Math.abs(_._rate),N=u._sprite[s][0]/1e3,J=(u._sprite[s][0]+u._sprite[s][1])/1e3;_._sprite=s,_._ended=!1;var G=function(){_._paused=!1,_._seek=T,_._start=N,_._stop=J,_._loop=!!(_._loop||u._sprite[s][2])};if(T>=J){u._ended(_);return}var H=_._node;if(u._webAudio){var P=function(){u._playLock=!1,G(),u._refreshBuffer(_);var q=_._muted||u._muted?0:_._volume;H.gain.setValueAtTime(q,t.ctx.currentTime),_._playStart=t.ctx.currentTime,typeof H.bufferSource.start>"u"?_._loop?H.bufferSource.noteGrainOn(0,T,86400):H.bufferSource.noteGrainOn(0,T,R):_._loop?H.bufferSource.start(0,T,86400):H.bufferSource.start(0,T,R),$!==1/0&&(u._endTimers[_._id]=setTimeout(u._ended.bind(u,_),$)),l||setTimeout(function(){u._emit("play",_._id),u._loadQueue()},0)};t.state==="running"&&t.ctx.state!=="interrupted"?P():(u._playLock=!0,u.once("resume",P),u._clearTimer(_._id))}else{var X=function(){H.currentTime=T,H.muted=_._muted||u._muted||t._muted||H.muted,H.volume=_._volume*t.volume(),H.playbackRate=_._rate;try{var q=H.play();if(q&&typeof Promise<"u"&&(q instanceof Promise||typeof q.then=="function")?(u._playLock=!0,G(),q.then(function(){u._playLock=!1,H._unlocked=!0,l?u._loadQueue():u._emit("play",_._id)}).catch(function(){u._playLock=!1,u._emit("playerror",_._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),_._ended=!0,_._paused=!0})):l||(u._playLock=!1,G(),u._emit("play",_._id)),H.playbackRate=_._rate,H.paused){u._emit("playerror",_._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}s!=="__default"||_._loop?u._endTimers[_._id]=setTimeout(u._ended.bind(u,_),$):(u._endTimers[_._id]=function(){u._ended(_),H.removeEventListener("ended",u._endTimers[_._id],!1)},H.addEventListener("ended",u._endTimers[_._id],!1))}catch(Y){u._emit("playerror",_._id,Y)}};H.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(H.src=u._src,H.load());var Z=window&&window.ejecta||!H.readyState&&t._navigator.isCocoonJS;if(H.readyState>=3||Z)X();else{u._playLock=!0,u._state="loading";var K=function(){u._state="loaded",X(),H.removeEventListener(t._canPlayEvent,K,!1)};H.addEventListener(t._canPlayEvent,K,!1),u._clearTimer(_._id)}}return _._id},pause:function(s){var l=this;if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"pause",action:function(){l.pause(s)}}),l;for(var u=l._getSoundIds(s),h=0;h"u"?y._node.bufferSource.noteOff(0):y._node.bufferSource.stop(0),l._cleanBuffer(y._node)}else(!isNaN(y._node.duration)||y._node.duration===1/0)&&y._node.pause();arguments[1]||l._emit("pause",y?y._id:null)}return l},stop:function(s,l){var u=this;if(u._state!=="loaded"||u._playLock)return u._queue.push({event:"stop",action:function(){u.stop(s)}}),u;for(var h=u._getSoundIds(s),y=0;y"u"?w._node.bufferSource.noteOff(0):w._node.bufferSource.stop(0),u._cleanBuffer(w._node)):(!isNaN(w._node.duration)||w._node.duration===1/0)&&(w._node.currentTime=w._start||0,w._node.pause(),w._node.duration===1/0&&u._clearSound(w._node))),l||u._emit("stop",w._id))}return u},mute:function(s,l){var u=this;if(u._state!=="loaded"||u._playLock)return u._queue.push({event:"mute",action:function(){u.mute(s,l)}}),u;if(typeof l>"u")if(typeof s=="boolean")u._muted=s;else return u._muted;for(var h=u._getSoundIds(l),y=0;y"u"){var y=s._getSoundIds(),w=y.indexOf(l[0]);w>=0?h=parseInt(l[0],10):u=parseFloat(l[0])}else l.length>=2&&(u=parseFloat(l[0]),h=parseInt(l[1],10));var _;if(typeof u<"u"&&u>=0&&u<=1){if(s._state!=="loaded"||s._playLock)return s._queue.push({event:"volume",action:function(){s.volume.apply(s,l)}}),s;typeof h>"u"&&(s._volume=u),h=s._getSoundIds(h);for(var k=0;k"u")}}return y},_startFadeInterval:function(s,l,u,h,y,w){var _=this,k=l,T=u-l,R=Math.abs(T/.01),$=Math.max(4,R>0?h/R:h),N=Date.now();s._fadeTo=u,s._interval=setInterval(function(){var J=(Date.now()-N)/h;N=Date.now(),k+=T*J,k=Math.round(k*100)/100,T<0?k=Math.max(u,k):k=Math.min(u,k),_._webAudio?s._volume=k:_.volume(k,s._id,!0),w&&(_._volume=k),(ul&&k>=u)&&(clearInterval(s._interval),s._interval=null,s._fadeTo=null,_.volume(u,s._id),_._emit("fade",s._id))},$)},_stopFade:function(s){var l=this,u=l._soundById(s);return u&&u._interval&&(l._webAudio&&u._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(u._interval),u._interval=null,l.volume(u._fadeTo,s),u._fadeTo=null,l._emit("fade",s)),l},loop:function(){var s=this,l=arguments,u,h,y;if(l.length===0)return s._loop;if(l.length===1)if(typeof l[0]=="boolean")u=l[0],s._loop=u;else return y=s._soundById(parseInt(l[0],10)),y?y._loop:!1;else l.length===2&&(u=l[0],h=parseInt(l[1],10));for(var w=s._getSoundIds(h),_=0;_=0?h=parseInt(l[0],10):u=parseFloat(l[0])}else l.length===2&&(u=parseFloat(l[0]),h=parseInt(l[1],10));var _;if(typeof u=="number"){if(s._state!=="loaded"||s._playLock)return s._queue.push({event:"rate",action:function(){s.rate.apply(s,l)}}),s;typeof h>"u"&&(s._rate=u),h=s._getSoundIds(h);for(var k=0;k=0?h=parseInt(l[0],10):s._sounds.length&&(h=s._sounds[0]._id,u=parseFloat(l[0]))}else l.length===2&&(u=parseFloat(l[0]),h=parseInt(l[1],10));if(typeof h>"u")return 0;if(typeof u=="number"&&(s._state!=="loaded"||s._playLock))return s._queue.push({event:"seek",action:function(){s.seek.apply(s,l)}}),s;var _=s._soundById(h);if(_)if(typeof u=="number"&&u>=0){var k=s.playing(h);k&&s.pause(h,!0),_._seek=u,_._ended=!1,s._clearTimer(h),!s._webAudio&&_._node&&!isNaN(_._node.duration)&&(_._node.currentTime=u);var T=function(){k&&s.play(h,!0),s._emit("seek",h)};if(k&&!s._webAudio){var R=function(){s._playLock?setTimeout(R,0):T()};setTimeout(R,0)}else T()}else if(s._webAudio){var $=s.playing(h)?t.ctx.currentTime-_._playStart:0,N=_._rateSeek?_._rateSeek-_._seek:0;return _._seek+(N+$*Math.abs(_._rate))}else return _._node.currentTime;return s},playing:function(s){var l=this;if(typeof s=="number"){var u=l._soundById(s);return u?!u._paused:!1}for(var h=0;h=0&&t._howls.splice(h,1);var y=!0;for(u=0;u=0){y=!1;break}return o&&y&&delete o[s._src],t.noAudio=!1,s._state="unloaded",s._sounds=[],s=null,null},on:function(s,l,u,h){var y=this,w=y["_on"+s];return typeof l=="function"&&w.push(h?{id:u,fn:l,once:h}:{id:u,fn:l}),y},off:function(s,l,u){var h=this,y=h["_on"+s],w=0;if(typeof l=="number"&&(u=l,l=null),l||u)for(w=0;w=0;w--)(!y[w].id||y[w].id===l||s==="load")&&(setTimeout(function(_){_.call(this,l,u)}.bind(h,y[w].fn),0),y[w].once&&h.off(s,y[w].fn,y[w].id));return h._loadQueue(s),h},_loadQueue:function(s){var l=this;if(l._queue.length>0){var u=l._queue[0];u.event===s&&(l._queue.shift(),l._loadQueue()),s||u.action()}return l},_ended:function(s){var l=this,u=s._sprite;if(!l._webAudio&&s._node&&!s._node.paused&&!s._node.ended&&s._node.currentTime=0;h--){if(u<=l)return;s._sounds[h]._ended&&(s._webAudio&&s._sounds[h]._node&&s._sounds[h]._node.disconnect(0),s._sounds.splice(h,1),u--)}}},_getSoundIds:function(s){var l=this;if(typeof s>"u"){for(var u=[],h=0;h=0;if(!s.bufferSource)return l;if(t._scratchBuffer&&s.bufferSource&&(s.bufferSource.onended=null,s.bufferSource.disconnect(0),u))try{s.bufferSource.buffer=t._scratchBuffer}catch{}return s.bufferSource=null,l},_clearSound:function(s){var l=/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent);l||(s.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var i=function(s){this._parent=s,this.init()};i.prototype={init:function(){var s=this,l=s._parent;return s._muted=l._muted,s._loop=l._loop,s._volume=l._volume,s._rate=l._rate,s._seek=0,s._paused=!0,s._ended=!0,s._sprite="__default",s._id=++t._counter,l._sounds.push(s),s.create(),s},create:function(){var s=this,l=s._parent,u=t._muted||s._muted||s._parent._muted?0:s._volume;return l._webAudio?(s._node=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),s._node.gain.setValueAtTime(u,t.ctx.currentTime),s._node.paused=!0,s._node.connect(t.masterGain)):t.noAudio||(s._node=t._obtainHtml5Audio(),s._errorFn=s._errorListener.bind(s),s._node.addEventListener("error",s._errorFn,!1),s._loadFn=s._loadListener.bind(s),s._node.addEventListener(t._canPlayEvent,s._loadFn,!1),s._endFn=s._endListener.bind(s),s._node.addEventListener("ended",s._endFn,!1),s._node.src=l._src,s._node.preload=l._preload===!0?"auto":l._preload,s._node.volume=u*t.volume(),s._node.load()),s},reset:function(){var s=this,l=s._parent;return s._muted=l._muted,s._loop=l._loop,s._volume=l._volume,s._rate=l._rate,s._seek=0,s._rateSeek=0,s._paused=!0,s._ended=!0,s._sprite="__default",s._id=++t._counter,s},_errorListener:function(){var s=this;s._parent._emit("loaderror",s._id,s._node.error?s._node.error.code:0),s._node.removeEventListener("error",s._errorFn,!1)},_loadListener:function(){var s=this,l=s._parent;l._duration=Math.ceil(s._node.duration*10)/10,Object.keys(l._sprite).length===0&&(l._sprite={__default:[0,l._duration*1e3]}),l._state!=="loaded"&&(l._state="loaded",l._emit("load"),l._loadQueue()),s._node.removeEventListener(t._canPlayEvent,s._loadFn,!1)},_endListener:function(){var s=this,l=s._parent;l._duration===1/0&&(l._duration=Math.ceil(s._node.duration*10)/10,l._sprite.__default[1]===1/0&&(l._sprite.__default[1]=l._duration*1e3),l._ended(s)),s._node.removeEventListener("ended",s._endFn,!1)}};var o={},a=function(s){var l=s._src;if(o[l]){s._duration=o[l].duration,d(s);return}if(/^data:[^;]+;base64,/.test(l)){for(var u=atob(l.split(",")[1]),h=new Uint8Array(u.length),y=0;y0?(o[l._src]=y,d(l,y)):u()};typeof Promise<"u"&&t.ctx.decodeAudioData.length===1?t.ctx.decodeAudioData(s).then(h).catch(u):t.ctx.decodeAudioData(s,h,u)},d=function(s,l){l&&!s._duration&&(s._duration=l.duration),Object.keys(s._sprite).length===0&&(s._sprite={__default:[0,s._duration*1e3]}),s._state!=="loaded"&&(s._state="loaded",s._emit("load"),s._loadQueue())},m=function(){if(t.usingWebAudio){try{typeof AudioContext<"u"?t.ctx=new AudioContext:typeof webkitAudioContext<"u"?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch{t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var s=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),l=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),u=l?parseInt(l[1],10):null;if(s&&u&&u<9){var h=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!h&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};e.Howler=t,e.Howl=r,typeof Jt<"u"?(Jt.HowlerGlobal=n,Jt.Howler=t,Jt.Howl=r,Jt.Sound=i):typeof window<"u"&&(window.HowlerGlobal=n,window.Howler=t,window.Howl=r,window.Sound=i)})(),function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(t){var r=this;if(!r.ctx||!r.ctx.listener)return r;for(var i=r._howls.length-1;i>=0;i--)r._howls[i].stereo(t);return r},HowlerGlobal.prototype.pos=function(t,r,i){var o=this;if(!o.ctx||!o.ctx.listener)return o;if(r=typeof r!="number"?o._pos[1]:r,i=typeof i!="number"?o._pos[2]:i,typeof t=="number")o._pos=[t,r,i],typeof o.ctx.listener.positionX<"u"?(o.ctx.listener.positionX.setTargetAtTime(o._pos[0],Howler.ctx.currentTime,.1),o.ctx.listener.positionY.setTargetAtTime(o._pos[1],Howler.ctx.currentTime,.1),o.ctx.listener.positionZ.setTargetAtTime(o._pos[2],Howler.ctx.currentTime,.1)):o.ctx.listener.setPosition(o._pos[0],o._pos[1],o._pos[2]);else return o._pos;return o},HowlerGlobal.prototype.orientation=function(t,r,i,o,a,f){var c=this;if(!c.ctx||!c.ctx.listener)return c;var d=c._orientation;if(r=typeof r!="number"?d[1]:r,i=typeof i!="number"?d[2]:i,o=typeof o!="number"?d[3]:o,a=typeof a!="number"?d[4]:a,f=typeof f!="number"?d[5]:f,typeof t=="number")c._orientation=[t,r,i,o,a,f],typeof c.ctx.listener.forwardX<"u"?(c.ctx.listener.forwardX.setTargetAtTime(t,Howler.ctx.currentTime,.1),c.ctx.listener.forwardY.setTargetAtTime(r,Howler.ctx.currentTime,.1),c.ctx.listener.forwardZ.setTargetAtTime(i,Howler.ctx.currentTime,.1),c.ctx.listener.upX.setTargetAtTime(o,Howler.ctx.currentTime,.1),c.ctx.listener.upY.setTargetAtTime(a,Howler.ctx.currentTime,.1),c.ctx.listener.upZ.setTargetAtTime(f,Howler.ctx.currentTime,.1)):c.ctx.listener.setOrientation(t,r,i,o,a,f);else return d;return c},Howl.prototype.init=function(t){return function(r){var i=this;return i._orientation=r.orientation||[1,0,0],i._stereo=r.stereo||null,i._pos=r.pos||null,i._pannerAttr={coneInnerAngle:typeof r.coneInnerAngle<"u"?r.coneInnerAngle:360,coneOuterAngle:typeof r.coneOuterAngle<"u"?r.coneOuterAngle:360,coneOuterGain:typeof r.coneOuterGain<"u"?r.coneOuterGain:0,distanceModel:typeof r.distanceModel<"u"?r.distanceModel:"inverse",maxDistance:typeof r.maxDistance<"u"?r.maxDistance:1e4,panningModel:typeof r.panningModel<"u"?r.panningModel:"HRTF",refDistance:typeof r.refDistance<"u"?r.refDistance:1,rolloffFactor:typeof r.rolloffFactor<"u"?r.rolloffFactor:1},i._onstereo=r.onstereo?[{fn:r.onstereo}]:[],i._onpos=r.onpos?[{fn:r.onpos}]:[],i._onorientation=r.onorientation?[{fn:r.onorientation}]:[],t.call(this,r)}}(Howl.prototype.init),Howl.prototype.stereo=function(t,r){var i=this;if(!i._webAudio)return i;if(i._state!=="loaded")return i._queue.push({event:"stereo",action:function(){i.stereo(t,r)}}),i;var o=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof r>"u")if(typeof t=="number")i._stereo=t,i._pos=[t,0,0];else return i._stereo;for(var a=i._getSoundIds(r),f=0;f"u")if(typeof t=="number")a._pos=[t,r,i];else return a._pos;for(var f=a._getSoundIds(o),c=0;c"u")if(typeof t=="number")a._orientation=[t,r,i];else return a._orientation;for(var f=a._getSoundIds(o),c=0;c"u"&&(i.pannerAttr||(i.pannerAttr={coneInnerAngle:i.coneInnerAngle,coneOuterAngle:i.coneOuterAngle,coneOuterGain:i.coneOuterGain,distanceModel:i.distanceModel,maxDistance:i.maxDistance,refDistance:i.refDistance,rolloffFactor:i.rolloffFactor,panningModel:i.panningModel}),t._pannerAttr={coneInnerAngle:typeof i.pannerAttr.coneInnerAngle<"u"?i.pannerAttr.coneInnerAngle:t._coneInnerAngle,coneOuterAngle:typeof i.pannerAttr.coneOuterAngle<"u"?i.pannerAttr.coneOuterAngle:t._coneOuterAngle,coneOuterGain:typeof i.pannerAttr.coneOuterGain<"u"?i.pannerAttr.coneOuterGain:t._coneOuterGain,distanceModel:typeof i.pannerAttr.distanceModel<"u"?i.pannerAttr.distanceModel:t._distanceModel,maxDistance:typeof i.pannerAttr.maxDistance<"u"?i.pannerAttr.maxDistance:t._maxDistance,refDistance:typeof i.pannerAttr.refDistance<"u"?i.pannerAttr.refDistance:t._refDistance,rolloffFactor:typeof i.pannerAttr.rolloffFactor<"u"?i.pannerAttr.rolloffFactor:t._rolloffFactor,panningModel:typeof i.pannerAttr.panningModel<"u"?i.pannerAttr.panningModel:t._panningModel});else return a=t._soundById(parseInt(r[0],10)),a?a._pannerAttr:t._pannerAttr;else r.length===2&&(i=r[0],o=parseInt(r[1],10));for(var f=t._getSoundIds(o),c=0;cconsole.debug("Audio output successfully redirected to secondary speaker")).catch(f=>console.error("Failed to redirect audio output:",f)),a.play()}}}else Nt("notifications","sound_notification")&&new ti.Howl({src:[Oo("notifications","img","notification.ogg")],volume:.5}).play()}const iv=Nt("core","config",{session_keepalive:!0}).session_keepalive,ov=Nt("notifications","throttled_push_notifications"),sv={notificationId:-1,app:"core",user:"",datetime:"warning",objectId:"",objectType:"",subject:ft("notifications","Push notifications might be unreliable"),message:ft("notifications","Nextcloud GmbH sponsors a free push notification gateway for private users. To ensure good service, the gateway limits the number of push notifications per server. For enterprise users, a more scalable gateway is available. Contact Nextcloud GmbH for more information."),link:"https://nextcloud.com/fairusepolicy",actions:[],externalLink:"https://nextcloud.com/fairusepolicy",icon:ta("core","actions/alert-outline.svg")},av={name:"NotificationsApp",components:{IconBellOutline:Vu,IconClose:la,IconMessageOutline:ca,IconNotification:pf,NcButton:Vt,NcEmptyContent:Pu,NcHeaderMenu:Fu,NotificationItem:Y_},setup(){return{fairUsePolicyNotification:sv,hasThrottledPushNotifications:ov}},data(){return{webNotificationsGranted:!1,backgroundFetching:!1,hasNotifyPush:!1,shutdown:!1,notifications:[],lastETag:null,lastTabId:null,userStatus:null,tabId:null,webNotificationsThresholdId:0,pollIntervalBase:3e4,pollIntervalCurrent:3e4,interval:null,pushEndpoints:null,open:!1}},computed:{showBrowserNotifications(){return this.backgroundFetching&&this.webNotificationsGranted&&this.userStatus!=="dnd"&&this.tabId===this.lastTabId},emptyContentMessage(){return this.webNotificationsGranted===null?ft("notifications","Requesting browser permissions to show notifications"):this.hasThrottledPushNotifications?this.fairUsePolicyNotification.subject:ft("notifications","No notifications")},emptyContentDescription(){return this.hasThrottledPushNotifications?this.fairUsePolicyNotification.message:""}},mounted(){this.tabId=Kc()||""+Math.random(),this._oldcount=0,this.checkWebNotificationPermissions(),this._fetch(),Su.listen("notify_notification",()=>{this._fetchAfterNotifyPush()})&&(console.debug("Has notify_push enabled, slowing polling to 15 minutes"),this.pollIntervalBase=15*60*1e3,this.hasNotifyPush=!0),this._setPollingInterval(this.pollIntervalBase),this._watchTabVisibility(),rn("networkOffline",this.handleNetworkOffline),rn("networkOnline",this.handleNetworkOnline),rn("user_status:status.updated",this.userStatusUpdated)},beforeUnmount(){nn("user_status:status.updated",this.userStatusUpdated),nn("networkOffline",this.handleNetworkOffline),nn("networkOnline",this.handleNetworkOnline)},methods:{t:ft,userStatusUpdated(e){xn().uid===e.userId&&(this.userStatus=e.status)},async onOpen(){this.requestWebNotificationPermissions(),await ei(this.tabId),await this._fetch()},handleNetworkOffline(){console.debug("Network is offline, slowing down pollingInterval to "+this.pollIntervalBase*10),this._setPollingInterval(this.pollIntervalBase*10)},handleNetworkOnline(){this._fetch(),console.debug("Network is online, reseting pollingInterval to "+this.pollIntervalBase),this._setPollingInterval(this.pollIntervalBase)},setupBackgroundFetcher(){iv?(console.debug("Started background fetcher as session_keepalive is enabled"),this.interval=window.setInterval(this._backgroundFetch.bind(this),this.pollIntervalCurrent)):console.debug("Did not start background fetcher as session_keepalive is off")},onDismissAll(){tt.delete(_t("apps/notifications/api/v2/notifications")).then(()=>{this.notifications=[],this.open=!1,ei(this.tabId)}).catch(()=>{ii(ft("notifications","Failed to dismiss all notifications"))})},onRemove(e){this.notifications.splice(e,1),ei(this.tabId)},_updateDocTitleOnNewNotifications(e){e.length>this._oldcount&&(this._oldcount=e.length,this.backgroundFetching&&document.hidden&&(document.title.startsWith("* ")||(document.title="* "+document.title)))},_restoreTitle(){document.title.startsWith("* ")&&(document.title=document.title.substring(2))},_fetchAfterNotifyPush(){this.backgroundFetching=!0,this.hasNotifyPush&&this.tabId!==this.lastTabId?(console.debug("Deferring notification refresh from browser storage are notify_push event to give the last tab the chance to do it"),setTimeout(()=>{this._fetch()},5e3)):(console.debug("Refreshing notifications are notify_push event"),this._fetch())},async _fetch(){this.notifications.length&&this.notifications[0].notificationId>this.webNotificationsThresholdId&&(this.webNotificationsThresholdId=this.notifications[0].notificationId);const e=await yl(this.tabId,this.lastETag,!this.backgroundFetching,this.hasNotifyPush);e.status===204?(console.debug("Fetching notifications but no content, slowing down polling to "+this.pollIntervalBase*10),this._setPollingInterval(this.pollIntervalBase*10)):e.status===200?(this.userStatus=e.headers["x-nextcloud-user-status"],this.lastETag=e.headers.etag,this.lastTabId=e.tabId,this.notifications=e.data,this.processWebNotifications(e.data),console.debug("Got notification data, restoring default polling interval."),this._setPollingInterval(this.pollIntervalBase),this._updateDocTitleOnNewNotifications(this.notifications),!this.backgroundFetching&&this.notifications.length&&(this.webNotificationsThresholdId=this.notifications[0].notificationId)):e.status===304?this._setPollingInterval(this.pollIntervalBase):e.status===503?(console.info("Slowing down notifications: instance is in maintenance mode."),this._setPollingInterval(this.pollIntervalBase*10)):e.status===404?(console.info("Slowing down notifications: app is disabled."),this._setPollingInterval(this.pollIntervalBase*10)):(console.info("Slowing down notifications: Status "+e.status),this._setPollingInterval(this.pollIntervalBase*10))},_backgroundFetch(){this.backgroundFetching=!0,this._fetch()},_watchTabVisibility(){document.addEventListener("visibilitychange",this._visibilityChange,!1)},_visibilityChange(){document.hidden||this._restoreTitle()},_setPollingInterval(e){this.interval&&e===this.pollIntervalCurrent||(console.debug("Polling interval updated to "+e),this.interval&&(window.clearInterval(this.interval),this.interval=null),this.pollIntervalCurrent=e,this.setupBackgroundFetcher())},_shutDownNotifications(e){console.debug("Shutting down notifications "+(e?"temporary":"bye")),this.interval&&(window.clearInterval(this.interval),this.interval=null),this.shutdown=!e},checkWebNotificationPermissions(){if(!("Notification"in window)){console.info("Browser does not support notifications"),this.webNotificationsGranted=!1;return}if(window.Notification.permission==="granted"){console.debug("Notifications permissions granted"),this.webNotificationsGranted=!0;return}if(window.Notification.permission==="denied"){console.debug("Notifications permissions denied"),this.webNotificationsGranted=!1;return}if(window.location.protocol==="http:"){console.debug("Notifications require HTTPS"),this.webNotificationsGranted=!1;return}console.info("Notifications permissions not yet requested"),this.webNotificationsGranted=null},async requestWebNotificationPermissions(){this.webNotificationsGranted===null&&(console.info("Requesting notifications permissions"),window.Notification.requestPermission().then(e=>{this.webNotificationsGranted=e==="granted"}))},processWebNotifications(e){e.forEach(n=>{this.backgroundFetching&&nr("notifications:notification:received",{notification:n}),this.showBrowserNotifications&&this.webNotificationsThresholdIdi.open=h),class:"notifications-button",excludeClickOutsideSelectors:[".popover"],"aria-label":o.t("notifications","Notifications"),title:o.t("notifications","Notifications"),onOpened:o.onOpen},{trigger:pe(()=>[Le(a,{size:20,showDot:i.notifications.length!==0||i.webNotificationsGranted===null,showWarning:r.hasThrottledPushNotifications},null,8,["showDot","showWarning"])]),default:pe(()=>[se("div",lv,[Le(ru,{name:"fade",mode:"out-in"},{default:pe(()=>[i.notifications.length>0?(M(),ce(iu,{key:0,class:"notification-wrapper",name:"list",tag:"ul"},{default:pe(()=>[r.hasThrottledPushNotifications?(M(),ce(f,{key:-2016,notification:r.fairUsePolicyNotification},null,8,["notification"])):ae("",!0),(M(!0),z(Tn,null,ar(i.notifications,(h,y)=>(M(),ce(f,{key:h.notificationId,notification:h,onRemove:w=>o.onRemove(y)},null,8,["notification","onRemove"]))),128))]),_:1})):(M(),ce(s,{key:1,name:o.emptyContentMessage,description:o.emptyContentDescription},li({icon:pe(()=>[r.hasThrottledPushNotifications?(M(),z("span",cv)):(M(),ce(c,{key:0}))]),_:2},[r.hasThrottledPushNotifications?{name:"action",fn:pe(()=>[Le(m,{variant:"primary",href:"https://nextcloud.com/fairusepolicy",target:"_blank",rel:"noreferrer noopener"},{icon:pe(()=>[Le(d,{size:20})]),default:pe(()=>[Mt(" "+ne(o.t("notifications","Contact Nextcloud GmbH"))+" ↗ ",1)]),_:1})]),key:"0"}:void 0]),1032,["name","description"]))]),_:1}),i.notifications.length>0?(M(),z("div",uv,[Le(m,{variant:"tertiary",wide:"",onClick:o.onDismissAll},{icon:pe(()=>[Le(l,{size:20})]),default:pe(()=>[Mt(" "+ne(o.t("notifications","Dismiss all notifications")),1)]),_:1},8,["onClick"])])):ae("",!0)])]),_:1},8,["open","aria-label","title","onOpened"]))}const dv=xt(av,[["render",fv],["__scopeId","data-v-bd685ff9"]]),yv=Object.freeze(Object.defineProperty({__proto__:null,default:dv},Symbol.toStringTag,{value:"Module"}));export{yv as N,pa as a,Ni as c,wt as v}; //# sourceMappingURL=NotificationsApp-zv-lMaEW.chunk.mjs.map