92 lines
81 KiB
JavaScript
92 lines
81 KiB
JavaScript
/*! third party licenses: js/vendor.LICENSE.txt */
|
|
import{n as V,f as gt,C as ye,D as We,E as Xe,h as Ut,F as Y,H as Ke,I as Ge,J as st,V as kt,K as jt,L as at,M as Dt,O as Ze,P as Ye,Q as be,R as Je,T as Ht,U as Qe,g as tn,_ as we,t as B,W as $t,X as xe,Y as Z,r as ct,Z as en,$ as nn,a0 as Ft,a1 as Bt,l as Nt,a2 as Se,i as _e,j as sn,a3 as on,a4 as rn,a5 as St,a6 as _t,a7 as an,a8 as ln,a9 as cn,G as Wt,u as un,aa as dn,ab as hn,ac as pn}from"./logreader-main.mjs";import{g as fn}from"./colors-BwQwSDJi-BUp7eygq.chunk.mjs";function gn(t,e,n){const i=document.querySelector(`#initial-state-${t}-${e}`);if(i===null)throw new Error(`Could not find initial state ${e} of ${t}`);try{return JSON.parse(atob(i.value))}catch{throw new Error(`Could not parse initial state ${e} of ${t}`)}}function Ce(){try{return gn("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 ut=Math.min,K=Math.max,dt=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),mn={left:"right",right:"left",bottom:"top",top:"bottom"},vn={start:"end",end:"start"};function Xt(t,e,n){return K(t,ut(e,n))}function Q(t,e){return typeof t=="function"?t(e):t}function j(t){return t.split("-")[0]}function mt(t){return t.split("-")[1]}function Vt(t){return t==="x"?"y":"x"}function Oe(t){return t==="y"?"height":"width"}const yn=new Set(["top","bottom"]);function z(t){return yn.has(j(t))?"y":"x"}function Le(t){return Vt(z(t))}function bn(t,e,n){n===void 0&&(n=!1);const i=mt(t),r=Le(t),d=Oe(r);let u=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[d]>e.floating[d]&&(u=ht(u)),[u,ht(u)]}function wn(t){const e=ht(t);return[It(t),e,It(e)]}function It(t){return t.replace(/start|end/g,e=>vn[e])}const Kt=["left","right"],Gt=["right","left"],xn=["top","bottom"],Sn=["bottom","top"];function _n(t,e,n){switch(t){case"top":case"bottom":return n?e?Gt:Kt:e?Kt:Gt;case"left":case"right":return e?xn:Sn;default:return[]}}function Cn(t,e,n,i){const r=mt(t);let d=_n(j(t),n==="start",i);return r&&(d=d.map(u=>u+"-"+r),e&&(d=d.concat(d.map(It)))),d}function ht(t){return t.replace(/left|right|bottom|top/g,e=>mn[e])}function On(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ln(t){return typeof t!="number"?On(t):{top:t,right:t,bottom:t,left:t}}function pt(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function Zt(t,e,n){let{reference:i,floating:r}=t;const d=z(e),u=Le(e),o=Oe(u),f=j(e),a=d==="y",l=i.x+i.width/2-r.width/2,c=i.y+i.height/2-r.height/2,h=i[o]/2-r[o]/2;let p;switch(f){case"top":p={x:l,y:i.y-r.height};break;case"bottom":p={x:l,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:c};break;case"left":p={x:i.x-r.width,y:c};break;default:p={x:i.x,y:i.y}}switch(mt(e)){case"start":p[u]-=h*(n&&a?-1:1);break;case"end":p[u]+=h*(n&&a?-1:1);break}return p}const An=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:d=[],platform:u}=n,o=d.filter(Boolean),f=await(u.isRTL==null?void 0:u.isRTL(e));let a=await u.getElementRects({reference:t,floating:e,strategy:r}),{x:l,y:c}=Zt(a,i,f),h=i,p={},v=0;for(let y=0;y<o.length;y++){const{name:w,fn:x}=o[y],{x:_,y:S,data:A,reset:L}=await x({x:l,y:c,initialPlacement:i,placement:h,strategy:r,middlewareData:p,rects:a,platform:u,elements:{reference:t,floating:e}});l=_??l,c=S??c,p={...p,[w]:{...p[w],...A}},L&&v<=50&&(v++,typeof L=="object"&&(L.placement&&(h=L.placement),L.rects&&(a=L.rects===!0?await u.getElementRects({reference:t,floating:e,strategy:r}):L.rects),{x:l,y:c}=Zt(a,h,f)),y=-1)}return{x:l,y:c,placement:h,strategy:r,middlewareData:p}};async function Ae(t,e){var n;e===void 0&&(e={});const{x:i,y:r,platform:d,rects:u,elements:o,strategy:f}=t,{boundary:a="clippingAncestors",rootBoundary:l="viewport",elementContext:c="floating",altBoundary:h=!1,padding:p=0}=Q(e,t),v=Ln(p),y=o[h?c==="floating"?"reference":"floating":c],w=pt(await d.getClippingRect({element:(n=await(d.isElement==null?void 0:d.isElement(y)))==null||n?y:y.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(o.floating)),boundary:a,rootBoundary:l,strategy:f})),x=c==="floating"?{x:i,y:r,width:u.floating.width,height:u.floating.height}:u.reference,_=await(d.getOffsetParent==null?void 0:d.getOffsetParent(o.floating)),S=await(d.isElement==null?void 0:d.isElement(_))?await(d.getScale==null?void 0:d.getScale(_))||{x:1,y:1}:{x:1,y:1},A=pt(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:x,offsetParent:_,strategy:f}):x);return{top:(w.top-A.top+v.top)/S.y,bottom:(A.bottom-w.bottom+v.bottom)/S.y,left:(w.left-A.left+v.left)/S.x,right:(A.right-w.right+v.right)/S.x}}const Tn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:r,middlewareData:d,rects:u,initialPlacement:o,platform:f,elements:a}=e,{mainAxis:l=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...w}=Q(t,e);if((n=d.arrow)!=null&&n.alignmentOffset)return{};const x=j(r),_=z(o),S=j(o)===o,A=await(f.isRTL==null?void 0:f.isRTL(a.floating)),L=h||(S||!y?[ht(o)]:wn(o)),T=v!=="none";!h&&T&&L.push(...Cn(o,y,v,A));const R=[o,...L],W=await Ae(e,w),k=[];let s=((i=d.flip)==null?void 0:i.overflows)||[];if(l&&k.push(W[x]),c){const C=bn(r,u,A);k.push(W[C[0]],W[C[1]])}if(s=[...s,{placement:r,overflows:k}],!k.every(C=>C<=0)){var g,m;const C=(((g=d.flip)==null?void 0:g.index)||0)+1,O=R[C];if(O&&(!(c==="alignment"&&_!==z(O))||s.every(M=>z(M.placement)===_?M.overflows[0]>0:!0)))return{data:{index:C,overflows:s},reset:{placement:O}};let N=(m=s.filter(M=>M.overflows[0]<=0).sort((M,P)=>M.overflows[1]-P.overflows[1])[0])==null?void 0:m.placement;if(!N)switch(p){case"bestFit":{var b;const M=(b=s.filter(P=>{if(T){const D=z(P.placement);return D===_||D==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(D=>D>0).reduce((D,xt)=>D+xt,0)]).sort((P,D)=>P[1]-D[1])[0])==null?void 0:b[0];M&&(N=M);break}case"initialPlacement":N=o;break}if(r!==N)return{reset:{placement:N}}}return{}}}},Te=new Set(["left","top"]);async function kn(t,e){const{placement:n,platform:i,elements:r}=t,d=await(i.isRTL==null?void 0:i.isRTL(r.floating)),u=j(n),o=mt(n),f=z(n)==="y",a=Te.has(u)?-1:1,l=d&&f?-1:1,c=Q(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:v}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return o&&typeof v=="number"&&(p=o==="end"?v*-1:v),f?{x:p*l,y:h*a}:{x:h*a,y:p*l}}const Dn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:r,y:d,placement:u,middlewareData:o}=e,f=await kn(e,t);return u===((n=o.offset)==null?void 0:n.placement)&&(i=o.arrow)!=null&&i.alignmentOffset?{}:{x:r+f.x,y:d+f.y,data:{...f,placement:u}}}}},Bn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:d=!0,crossAxis:u=!1,limiter:o={fn:w=>{let{x,y:_}=w;return{x,y:_}}},...f}=Q(t,e),a={x:n,y:i},l=await Ae(e,f),c=z(j(r)),h=Vt(c);let p=a[h],v=a[c];if(d){const w=h==="y"?"top":"left",x=h==="y"?"bottom":"right",_=p+l[w],S=p-l[x];p=Xt(_,p,S)}if(u){const w=c==="y"?"top":"left",x=c==="y"?"bottom":"right",_=v+l[w],S=v-l[x];v=Xt(_,v,S)}const y=o.fn({...e,[h]:p,[c]:v});return{...y,data:{x:y.x-n,y:y.y-i,enabled:{[h]:d,[c]:u}}}}}},Nn=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:r,rects:d,middlewareData:u}=e,{offset:o=0,mainAxis:f=!0,crossAxis:a=!0}=Q(t,e),l={x:n,y:i},c=z(r),h=Vt(c);let p=l[h],v=l[c];const y=Q(o,e),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(f){const S=h==="y"?"height":"width",A=d.reference[h]-d.floating[S]+w.mainAxis,L=d.reference[h]+d.reference[S]-w.mainAxis;p<A?p=A:p>L&&(p=L)}if(a){var x,_;const S=h==="y"?"width":"height",A=Te.has(j(r)),L=d.reference[c]-d.floating[S]+(A&&((x=u.offset)==null?void 0:x[c])||0)+(A?0:w.crossAxis),T=d.reference[c]+d.reference[S]+(A?0:((_=u.offset)==null?void 0:_[c])||0)-(A?w.crossAxis:0);v<L?v=L:v>T&&(v=T)}return{[h]:p,[c]:v}}}};function vt(){return typeof window<"u"}function et(t){return ke(t)?(t.nodeName||"").toLowerCase():"#document"}function I(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function q(t){var e;return(e=(ke(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ke(t){return vt()?t instanceof Node||t instanceof I(t).Node:!1}function E(t){return vt()?t instanceof Element||t instanceof I(t).Element:!1}function F(t){return vt()?t instanceof HTMLElement||t instanceof I(t).HTMLElement:!1}function Yt(t){return!vt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof I(t).ShadowRoot}const In=new Set(["inline","contents"]);function ot(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=U(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!In.has(r)}const Mn=new Set(["table","td","th"]);function Pn(t){return Mn.has(et(t))}const En=[":popover-open",":modal"];function yt(t){return En.some(e=>{try{return t.matches(e)}catch{return!1}})}const Un=["transform","translate","scale","rotate","perspective"],$n=["transform","translate","scale","rotate","perspective","filter"],Fn=["paint","layout","strict","content"];function qt(t){const e=zt(),n=E(t)?U(t):t;return Un.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||$n.some(i=>(n.willChange||"").includes(i))||Fn.some(i=>(n.contain||"").includes(i))}function Vn(t){let e=H(t);for(;F(e)&&!tt(e);){if(qt(e))return e;if(yt(e))return null;e=H(e)}return null}function zt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const qn=new Set(["html","body","#document"]);function tt(t){return qn.has(et(t))}function U(t){return I(t).getComputedStyle(t)}function bt(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function H(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||q(t);return Yt(e)?e.host:e}function De(t){const e=H(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:F(e)&&ot(e)?e:De(e)}function it(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=De(t),d=r===((i=t.ownerDocument)==null?void 0:i.body),u=I(r);if(d){const o=Mt(u);return e.concat(u,u.visualViewport||[],ot(r)?r:[],o&&n?it(o):[])}return e.concat(r,it(r,[],n))}function Mt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Be(t){const e=U(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=F(t),d=r?t.offsetWidth:n,u=r?t.offsetHeight:i,o=dt(n)!==d||dt(i)!==u;return o&&(n=d,i=u),{width:n,height:i,$:o}}function Rt(t){return E(t)?t:t.contextElement}function J(t){const e=Rt(t);if(!F(e))return $(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:d}=Be(e);let u=(d?dt(n.width):n.width)/i,o=(d?dt(n.height):n.height)/r;return(!u||!Number.isFinite(u))&&(u=1),(!o||!Number.isFinite(o))&&(o=1),{x:u,y:o}}const zn=$(0);function Ne(t){const e=I(t);return!zt()||!e.visualViewport?zn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Rn(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==I(t)?!1:e}function G(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),d=Rt(t);let u=$(1);e&&(i?E(i)&&(u=J(i)):u=J(t));const o=Rn(d,n,i)?Ne(d):$(0);let f=(r.left+o.x)/u.x,a=(r.top+o.y)/u.y,l=r.width/u.x,c=r.height/u.y;if(d){const h=I(d),p=i&&E(i)?I(i):i;let v=h,y=Mt(v);for(;y&&i&&p!==v;){const w=J(y),x=y.getBoundingClientRect(),_=U(y),S=x.left+(y.clientLeft+parseFloat(_.paddingLeft))*w.x,A=x.top+(y.clientTop+parseFloat(_.paddingTop))*w.y;f*=w.x,a*=w.y,l*=w.x,c*=w.y,f+=S,a+=A,v=I(y),y=Mt(v)}}return pt({width:l,height:c,x:f,y:a})}function wt(t,e){const n=bt(t).scrollLeft;return e?e.left+n:G(q(t)).left+n}function Ie(t,e){const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-wt(t,n),r=n.top+e.scrollTop;return{x:i,y:r}}function jn(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const d=r==="fixed",u=q(i),o=e?yt(e.floating):!1;if(i===u||o&&d)return n;let f={scrollLeft:0,scrollTop:0},a=$(1);const l=$(0),c=F(i);if((c||!c&&!d)&&((et(i)!=="body"||ot(u))&&(f=bt(i)),F(i))){const p=G(i);a=J(i),l.x=p.x+i.clientLeft,l.y=p.y+i.clientTop}const h=u&&!c&&!d?Ie(u,f):$(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-f.scrollLeft*a.x+l.x+h.x,y:n.y*a.y-f.scrollTop*a.y+l.y+h.y}}function Hn(t){return Array.from(t.getClientRects())}function Wn(t){const e=q(t),n=bt(t),i=t.ownerDocument.body,r=K(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),d=K(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let u=-n.scrollLeft+wt(t);const o=-n.scrollTop;return U(i).direction==="rtl"&&(u+=K(e.clientWidth,i.clientWidth)-r),{width:r,height:d,x:u,y:o}}const Jt=25;function Xn(t,e){const n=I(t),i=q(t),r=n.visualViewport;let d=i.clientWidth,u=i.clientHeight,o=0,f=0;if(r){d=r.width,u=r.height;const l=zt();(!l||l&&e==="fixed")&&(o=r.offsetLeft,f=r.offsetTop)}const a=wt(i);if(a<=0){const l=i.ownerDocument,c=l.body,h=getComputedStyle(c),p=l.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,v=Math.abs(i.clientWidth-c.clientWidth-p);v<=Jt&&(d-=v)}else a<=Jt&&(d+=a);return{width:d,height:u,x:o,y:f}}const Kn=new Set(["absolute","fixed"]);function Gn(t,e){const n=G(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,d=F(t)?J(t):$(1),u=t.clientWidth*d.x,o=t.clientHeight*d.y,f=r*d.x,a=i*d.y;return{width:u,height:o,x:f,y:a}}function Qt(t,e,n){let i;if(e==="viewport")i=Xn(t,n);else if(e==="document")i=Wn(q(t));else if(E(e))i=Gn(e,n);else{const r=Ne(t);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return pt(i)}function Me(t,e){const n=H(t);return n===e||!E(n)||tt(n)?!1:U(n).position==="fixed"||Me(n,e)}function Zn(t,e){const n=e.get(t);if(n)return n;let i=it(t,[],!1).filter(o=>E(o)&&et(o)!=="body"),r=null;const d=U(t).position==="fixed";let u=d?H(t):t;for(;E(u)&&!tt(u);){const o=U(u),f=qt(u);!f&&o.position==="fixed"&&(r=null),(d?!f&&!r:!f&&o.position==="static"&&r&&Kn.has(r.position)||ot(u)&&!f&&Me(t,u))?i=i.filter(a=>a!==u):r=o,u=H(u)}return e.set(t,i),i}function Yn(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const d=[...n==="clippingAncestors"?yt(e)?[]:Zn(e,this._c):[].concat(n),i],u=d[0],o=d.reduce((f,a)=>{const l=Qt(e,a,r);return f.top=K(l.top,f.top),f.right=ut(l.right,f.right),f.bottom=ut(l.bottom,f.bottom),f.left=K(l.left,f.left),f},Qt(e,u,r));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}}function Jn(t){const{width:e,height:n}=Be(t);return{width:e,height:n}}function Qn(t,e,n){const i=F(e),r=q(e),d=n==="fixed",u=G(t,!0,d,e);let o={scrollLeft:0,scrollTop:0};const f=$(0);function a(){f.x=wt(r)}if(i||!i&&!d)if((et(e)!=="body"||ot(r))&&(o=bt(e)),i){const p=G(e,!0,d,e);f.x=p.x+e.clientLeft,f.y=p.y+e.clientTop}else r&&a();d&&!i&&r&&a();const l=r&&!i&&!d?Ie(r,o):$(0),c=u.left+o.scrollLeft-f.x-l.x,h=u.top+o.scrollTop-f.y-l.y;return{x:c,y:h,width:u.width,height:u.height}}function Ct(t){return U(t).position==="static"}function te(t,e){if(!F(t)||U(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return q(t)===n&&(n=n.ownerDocument.body),n}function Pe(t,e){const n=I(t);if(yt(t))return n;if(!F(t)){let r=H(t);for(;r&&!tt(r);){if(E(r)&&!Ct(r))return r;r=H(r)}return n}let i=te(t,e);for(;i&&Pn(i)&&Ct(i);)i=te(i,e);return i&&tt(i)&&Ct(i)&&!qt(i)?n:i||Vn(t)||n}const ts=async function(t){const e=this.getOffsetParent||Pe,n=this.getDimensions,i=await n(t.floating);return{reference:Qn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function es(t){return U(t).direction==="rtl"}const ns={convertOffsetParentRelativeRectToViewportRelativeRect:jn,getDocumentElement:q,getClippingRect:Yn,getOffsetParent:Pe,getElementRects:ts,getClientRects:Hn,getDimensions:Jn,getScale:J,isElement:E,isRTL:es};function Ee(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ss(t,e){let n=null,i;const r=q(t);function d(){var o;clearTimeout(i),(o=n)==null||o.disconnect(),n=null}function u(o,f){o===void 0&&(o=!1),f===void 0&&(f=1),d();const a=t.getBoundingClientRect(),{left:l,top:c,width:h,height:p}=a;if(o||e(),!h||!p)return;const v=rt(c),y=rt(r.clientWidth-(l+h)),w=rt(r.clientHeight-(c+p)),x=rt(l),_={rootMargin:-v+"px "+-y+"px "+-w+"px "+-x+"px",threshold:K(0,ut(1,f))||1};let S=!0;function A(L){const T=L[0].intersectionRatio;if(T!==f){if(!S)return u();T?u(!1,T):i=setTimeout(()=>{u(!1,1e-7)},1e3)}T===1&&!Ee(a,t.getBoundingClientRect())&&u(),S=!1}try{n=new IntersectionObserver(A,{..._,root:r.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(t)}return u(!0),d}function is(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:d=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,a=Rt(t),l=r||d?[...a?it(a):[],...it(e)]:[];l.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),d&&x.addEventListener("resize",n)});const c=a&&o?ss(a,n):null;let h=-1,p=null;u&&(p=new ResizeObserver(x=>{let[_]=x;_&&_.target===a&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(e)})),n()}),a&&!f&&p.observe(a),p.observe(e));let v,y=f?G(t):null;f&&w();function w(){const x=G(t);y&&!Ee(y,x)&&n(),y=x,v=requestAnimationFrame(w)}return n(),()=>{var x;l.forEach(_=>{r&&_.removeEventListener("scroll",n),d&&_.removeEventListener("resize",n)}),c?.(),(x=p)==null||x.disconnect(),p=null,f&&cancelAnimationFrame(v)}}const os=Dn,rs=Bn,as=Tn,ls=Nn,cs=(t,e,n)=>{const i=new Map,r={platform:ns,...n},d={...r.platform,_c:i};return An(t,e,{...r,platform:d})};var Pt={exports:{}},us=Pt.exports,ee;function ds(){return ee||(ee=1,function(t,e){(function(n,i){t.exports=i()})(typeof self<"u"?self:us,function(){return(()=>{var n={646:u=>{u.exports=function(o){if(Array.isArray(o)){for(var f=0,a=new Array(o.length);f<o.length;f++)a[f]=o[f];return a}}},713:u=>{u.exports=function(o,f,a){return f in o?Object.defineProperty(o,f,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[f]=a,o}},860:u=>{u.exports=function(o){if(Symbol.iterator in Object(o)||Object.prototype.toString.call(o)==="[object Arguments]")return Array.from(o)}},206:u=>{u.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},319:(u,o,f)=>{var a=f(646),l=f(860),c=f(206);u.exports=function(h){return a(h)||l(h)||c()}},8:u=>{function o(f){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u.exports=o=function(a){return typeof a}:u.exports=o=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},o(f)}u.exports=o}},i={};function r(u){var o=i[u];if(o!==void 0)return o.exports;var f=i[u]={exports:{}};return n[u](f,f.exports,r),f.exports}r.n=u=>{var o=u&&u.__esModule?()=>u.default:()=>u;return r.d(o,{a:o}),o},r.d=(u,o)=>{for(var f in o)r.o(o,f)&&!r.o(u,f)&&Object.defineProperty(u,f,{enumerable:!0,get:o[f]})},r.o=(u,o)=>Object.prototype.hasOwnProperty.call(u,o),r.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var d={};return(()=>{r.r(d),r.d(d,{VueSelect:()=>R,default:()=>k,mixins:()=>W});var u=r(319),o=r.n(u),f=r(8),a=r.n(f),l=r(713),c=r.n(l);const h={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer:function(){this.autoscroll&&this.maybeAdjustScroll()},open:function(s){var g=this;this.autoscroll&&s&&this.$nextTick(function(){return g.maybeAdjustScroll()})}},methods:{maybeAdjustScroll:function(){var s,g=((s=this.$refs.dropdownMenu)===null||s===void 0?void 0:s.children[this.typeAheadPointer])||!1;if(g){var m=this.getDropdownViewport(),b=g.getBoundingClientRect(),C=b.top,O=b.bottom,N=b.height;if(C<m.top)return this.$refs.dropdownMenu.scrollTop=g.offsetTop;if(O>m.bottom)return this.$refs.dropdownMenu.scrollTop=g.offsetTop-(m.height-N)}},getDropdownViewport:function(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},p={data:function(){return{typeAheadPointer:-1}},watch:{filteredOptions:function(){if(this.resetFocusOnOptionsChange){for(var s=0;s<this.filteredOptions.length;s++)if(this.selectable(this.filteredOptions[s])){this.typeAheadPointer=s;break}}},open:function(s){s&&this.typeAheadToLastSelected()},selectedValue:function(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp:function(){for(var s=this.typeAheadPointer-1;s>=0;s--)if(this.selectable(this.filteredOptions[s])){this.typeAheadPointer=s;break}},typeAheadDown:function(){for(var s=this.typeAheadPointer+1;s<this.filteredOptions.length;s++)if(this.selectable(this.filteredOptions[s])){this.typeAheadPointer=s;break}},typeAheadSelect:function(){var s=this.filteredOptions[this.typeAheadPointer];s&&this.selectable(s)&&this.select(s)},typeAheadToLastSelected:function(){var s=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1;s!==-1&&(this.typeAheadPointer=s)}}},v={props:{loading:{type:Boolean,default:!1}},data:function(){return{mutableLoading:!1}},watch:{search:function(){this.$emit("search",this.search,this.toggleLoading)},loading:function(s){this.mutableLoading=s}},methods:{toggleLoading:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.mutableLoading=s??!this.mutableLoading}}};function y(s,g,m,b,C,O,N,M){var P,D=typeof s=="function"?s.options:s;return g&&(D.render=g,D.staticRenderFns=m,D._compiled=!0),{exports:s,options:D}}const w={Deselect:y({},function(){var s=this.$createElement,g=this._self._c||s;return g("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"}},[g("path",{attrs:{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"}})])},[]).exports,OpenIndicator:y({},function(){var s=this.$createElement,g=this._self._c||s;return g("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"}},[g("path",{attrs:{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"}})])},[]).exports},x={inserted:function(s,g,m){var b=m.context;if(b.appendToBody){document.body.appendChild(s);var C=b.$refs.toggle.getBoundingClientRect(),O=C.height,N=C.top,M=C.left,P=C.width,D=window.scrollX||window.pageXOffset,xt=window.scrollY||window.pageYOffset;s.unbindPosition=b.calculatePosition(s,b,{width:P+"px",left:D+M+"px",top:xt+N+O+"px"})}},unbind:function(s,g,m){m.context.appendToBody&&(s.unbindPosition&&typeof s.unbindPosition=="function"&&s.unbindPosition(),s.parentNode&&s.parentNode.removeChild(s))}},_=function(s){var g={};return Object.keys(s).sort().forEach(function(m){g[m]=s[m]}),JSON.stringify(g)};var S=0;const A=function(){return++S};function L(s,g){var m=Object.keys(s);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(s);g&&(b=b.filter(function(C){return Object.getOwnPropertyDescriptor(s,C).enumerable})),m.push.apply(m,b)}return m}function T(s){for(var g=1;g<arguments.length;g++){var m=arguments[g]!=null?arguments[g]:{};g%2?L(Object(m),!0).forEach(function(b){c()(s,b,m[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(m)):L(Object(m)).forEach(function(b){Object.defineProperty(s,b,Object.getOwnPropertyDescriptor(m,b))})}return s}const R=y({components:T({},w),directives:{appendToBody:x},mixins:[h,p,v],props:{value:{},components:{type:Object,default:function(){return{}}},options:{type:Array,default:function(){return[]}},limit:{type:Number,default:null},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},ariaLabelCombobox:{type:String,default:"Search for options"},ariaLabelListbox:{type:String,default:"Options"},ariaLabelClearSelected:{type:String,default:"Clear selected"},ariaLabelDeselectOption:{type:Function,default:function(s){return"Deselect ".concat(s)}},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:function(s){return s}},selectable:{type:Function,default:function(s){return!0}},getOptionLabel:{type:Function,default:function(s){return a()(s)==="object"?s.hasOwnProperty(this.label)?s[this.label]:console.warn('[vue-select warn]: Label key "option.'.concat(this.label,'" does not')+" exist in options object ".concat(JSON.stringify(s),`.
|
|
`)+"https://vue-select.org/api/props.html#getoptionlabel"):s}},getOptionKey:{type:Function,default:function(s){if(a()(s)!=="object")return s;try{return s.hasOwnProperty("id")?s.id:_(s)}catch(g){return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.
|
|
https://vue-select.org/api/props.html#getoptionkey`,s,g)}}},onTab:{type:Function,default:function(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default:function(s,g,m){return(g||"").toLocaleLowerCase().indexOf(m.toLocaleLowerCase())>-1}},filter:{type:Function,default:function(s,g){var m=this;return s.filter(function(b){var C=m.getOptionLabel(b);return typeof C=="number"&&(C=C.toString()),m.filterBy(b,C,g)})}},createOption:{type:Function,default:function(s){return a()(this.optionList[0])==="object"?c()({},this.label,s):s}},resetFocusOnOptionsChange:{type:Boolean,default:!0},resetOnOptionsChange:{default:!1,validator:function(s){return["function","boolean"].includes(a()(s))}},clearSearchOnBlur:{type:Function,default:function(s){var g=s.clearSearchOnSelect,m=s.multiple;return g&&!m}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:function(){return[13]}},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:function(s,g){return s}},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default:function(s,g,m){var b=m.width,C=m.top,O=m.left;s.style.top=C,s.style.left=O,s.style.width=b}},dropdownShouldOpen:{type:Function,default:function(s){var g=s.noDrop,m=s.open,b=s.mutableLoading;return!g&&m&&!b}},keyboardFocusBorder:{type:Boolean,default:!1},uid:{type:[String,Number],default:function(){return A()}}},data:function(){return{search:"",open:!1,isComposing:!1,isKeyboardNavigation:!1,pushedTags:[],_value:[]}},computed:{isTrackingValues:function(){return this.value===void 0||this.$options.propsData.hasOwnProperty("reduce")},selectedValue:function(){var s=this.value;return this.isTrackingValues&&(s=this.$data._value),s!=null&&s!==""?[].concat(s):[]},optionList:function(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl:function(){return this.$scopedSlots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope:function(){var s=this,g={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:T({id:this.inputId,disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,role:"combobox","aria-autocomplete":"list","aria-label":this.ariaLabelCombobox,"aria-controls":"vs-".concat(this.uid,"__listbox"),"aria-owns":"vs-".concat(this.uid,"__listbox"),"aria-expanded":this.dropdownOpen.toString(),ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":"vs-".concat(this.uid,"__option-").concat(this.typeAheadPointer)}:{}),events:{compositionstart:function(){return s.isComposing=!0},compositionend:function(){return s.isComposing=!1},keydown:this.onSearchKeyDown,keypress:this.onSearchKeyPress,blur:this.onSearchBlur,focus:this.onSearchFocus,input:function(m){return s.search=m.target.value}}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:g,listFooter:g,header:T({},g,{deselect:this.deselect}),footer:T({},g,{deselect:this.deselect})}},childComponents:function(){return T({},w,{},this.components)},stateClasses:function(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching:function(){return!!this.search},dropdownOpen:function(){return this.dropdownShouldOpen(this)},searchPlaceholder:function(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions:function(){var s=this,g=function(O){return s.limit!==null?O.slice(0,s.limit):O},m=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return g(m);var b=this.search.length?this.filter(m,this.search,this):m;if(this.taggable&&this.search.length)try{var C=this.createOption(this.search);this.optionExists(C)||b.unshift(C)}catch{}return g(b)},isValueEmpty:function(){return this.selectedValue.length===0},showClearButton:function(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options:function(s,g){var m=this;!this.taggable&&(typeof m.resetOnOptionsChange=="function"?m.resetOnOptionsChange(s,g,m.selectedValue):m.resetOnOptionsChange)&&this.clearSelection(),this.value&&this.isTrackingValues&&this.setInternalValueFromOptions(this.value)},value:{immediate:!0,handler:function(s){this.isTrackingValues&&this.setInternalValueFromOptions(s)}},multiple:function(){this.clearSelection()},open:function(s){this.$emit(s?"open":"close")},search:function(s){s.length&&(this.open=!0)}},created:function(){this.mutableLoading=this.loading,this.$on("option:created",this.pushTag)},methods:{setInternalValueFromOptions:function(s){var g=this;Array.isArray(s)?this.$data._value=s.map(function(m){return g.findOptionFromReducedValue(m)}):this.$data._value=this.findOptionFromReducedValue(s)},select:function(s){this.$emit("option:selecting",s),this.isOptionSelected(s)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(s):(this.taggable&&!this.optionExists(s)&&this.$emit("option:created",s),this.multiple&&(s=this.selectedValue.concat(s)),this.updateValue(s),this.$emit("option:selected",s)),this.onAfterSelect(s)},deselect:function(s){var g=this;this.$emit("option:deselecting",s),this.updateValue(this.selectedValue.filter(function(m){return!g.optionComparator(m,s)})),this.$emit("option:deselected",s)},keyboardDeselect:function(s,g){var m,b;this.deselect(s);var C=(m=this.$refs.deselectButtons)===null||m===void 0?void 0:m[g+1],O=(b=this.$refs.deselectButtons)===null||b===void 0?void 0:b[g-1],N=C??O;N?N.focus():this.searchEl.focus()},clearSelection:function(){this.updateValue(this.multiple?[]:null),this.searchEl.focus()},onAfterSelect:function(s){var g=this;this.closeOnSelect&&(this.open=!this.open),this.clearSearchOnSelect&&(this.search=""),this.noDrop&&this.multiple&&this.$nextTick(function(){return g.$refs.search.focus()})},updateValue:function(s){var g=this;this.value===void 0&&(this.$data._value=s),s!==null&&(s=Array.isArray(s)?s.map(function(m){return g.reduce(m)}):this.reduce(s)),this.$emit("input",s)},toggleDropdown:function(s){var g=s.target!==this.searchEl;g&&s.preventDefault();var m=[].concat(o()(this.$refs.deselectButtons||[]),o()([this.$refs.clearButton]));this.searchEl===void 0||m.filter(Boolean).some(function(b){return b.contains(s.target)||b===s.target})?s.preventDefault():this.open&&g?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected:function(s){var g=this;return this.selectedValue.some(function(m){return g.optionComparator(m,s)})},isOptionDeselectable:function(s){return this.isOptionSelected(s)&&this.deselectFromDropdown},hasKeyboardFocusBorder:function(s){return!(!this.keyboardFocusBorder||!this.isKeyboardNavigation)&&s===this.typeAheadPointer},optionComparator:function(s,g){return this.getOptionKey(s)===this.getOptionKey(g)},findOptionFromReducedValue:function(s){var g=this,m=[].concat(o()(this.options),o()(this.pushedTags)).filter(function(b){return JSON.stringify(g.reduce(b))===JSON.stringify(s)});return m.length===1?m[0]:m.find(function(b){return g.optionComparator(b,g.$data._value)})||s},closeSearchOptions:function(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue:function(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){var s=null;this.multiple&&(s=o()(this.selectedValue.slice(0,this.selectedValue.length-1))),this.updateValue(s)}},optionExists:function(s){var g=this;return this.optionList.some(function(m){return g.optionComparator(m,s)})},optionAriaSelected:function(s){return this.selectable(s)?String(this.isOptionSelected(s)):null},normalizeOptionForSlot:function(s){return a()(s)==="object"?s:c()({},this.label,s)},pushTag:function(s){this.pushedTags.push(s)},onEscape:function(){this.search.length?this.search="":this.open=!1},onSearchBlur:function(){if(!this.mousedown||this.searching){var s=this.clearSearchOnSelect,g=this.multiple;return this.clearSearchOnBlur({clearSearchOnSelect:s,multiple:g})&&(this.search=""),void this.closeSearchOptions()}this.mousedown=!1,this.search.length!==0||this.options.length!==0||this.closeSearchOptions()},onSearchFocus:function(){this.open=!0,this.$emit("search:focus")},onMousedown:function(){this.mousedown=!0},onMouseUp:function(){this.mousedown=!1},onMouseMove:function(s,g){this.isKeyboardNavigation=!1,this.selectable(s)&&(this.typeAheadPointer=g)},onSearchKeyDown:function(s){var g=this,m=function(O){if(O.preventDefault(),g.open)return!g.isComposing&&g.typeAheadSelect();g.open=!0},b={8:function(O){return g.maybeDeleteValue()},9:function(O){return g.onTab()},27:function(O){return g.onEscape()},38:function(O){if(O.preventDefault(),g.isKeyboardNavigation=!0,g.open)return g.typeAheadUp();g.open=!0},40:function(O){if(O.preventDefault(),g.isKeyboardNavigation=!0,g.open)return g.typeAheadDown();g.open=!0}};this.selectOnKeyCodes.forEach(function(O){return b[O]=m});var C=this.mapKeydown(b,this);if(typeof C[s.keyCode]=="function")return C[s.keyCode](s)},onSearchKeyPress:function(s){this.open||s.keyCode!==32||(s.preventDefault(),this.open=!0)}}},function(){var s=this,g=s.$createElement,m=s._self._c||g;return m("div",{staticClass:"v-select",class:s.stateClasses,attrs:{id:"v-select-"+s.uid,dir:s.dir}},[s._t("header",null,null,s.scope.header),s._v(" "),m("div",{ref:"toggle",staticClass:"vs__dropdown-toggle"},[m("div",{ref:"selectedOptions",staticClass:"vs__selected-options",on:{mousedown:s.toggleDropdown}},[s._l(s.selectedValue,function(b,C){return s._t("selected-option-container",[m("span",{key:s.getOptionKey(b),staticClass:"vs__selected"},[s._t("selected-option",[s._v(`
|
|
`+s._s(s.getOptionLabel(b))+`
|
|
`)],null,s.normalizeOptionForSlot(b)),s._v(" "),s.multiple?m("button",{ref:"deselectButtons",refInFor:!0,staticClass:"vs__deselect",attrs:{disabled:s.disabled,type:"button",title:s.ariaLabelDeselectOption(s.getOptionLabel(b)),"aria-label":s.ariaLabelDeselectOption(s.getOptionLabel(b))},on:{mousedown:function(O){return O.stopPropagation(),s.deselect(b)},keydown:function(O){return!O.type.indexOf("key")&&s._k(O.keyCode,"enter",13,O.key,"Enter")?null:s.keyboardDeselect(b,C)}}},[m(s.childComponents.Deselect,{tag:"component"})],1):s._e()],2)],{option:s.normalizeOptionForSlot(b),deselect:s.deselect,multiple:s.multiple,disabled:s.disabled})}),s._v(" "),s._t("search",[m("input",s._g(s._b({staticClass:"vs__search"},"input",s.scope.search.attributes,!1),s.scope.search.events))],null,s.scope.search)],2),s._v(" "),m("div",{ref:"actions",staticClass:"vs__actions"},[m("button",{directives:[{name:"show",rawName:"v-show",value:s.showClearButton,expression:"showClearButton"}],ref:"clearButton",staticClass:"vs__clear",attrs:{disabled:s.disabled,type:"button",title:s.ariaLabelClearSelected,"aria-label":s.ariaLabelClearSelected},on:{click:s.clearSelection}},[m(s.childComponents.Deselect,{tag:"component"})],1),s._v(" "),s.noDrop?s._e():m("button",{ref:"openIndicatorButton",staticClass:"vs__open-indicator-button",attrs:{type:"button",tabindex:"-1","aria-labelledby":"vs-"+s.uid+"__listbox","aria-controls":"vs-"+s.uid+"__listbox","aria-expanded":s.dropdownOpen.toString()},on:{mousedown:s.toggleDropdown}},[s._t("open-indicator",[m(s.childComponents.OpenIndicator,s._b({tag:"component"},"component",s.scope.openIndicator.attributes,!1))],null,s.scope.openIndicator)],2),s._v(" "),s._t("spinner",[m("div",{directives:[{name:"show",rawName:"v-show",value:s.mutableLoading,expression:"mutableLoading"}],staticClass:"vs__spinner"},[s._v("Loading...")])],null,s.scope.spinner)],2)]),s._v(" "),m("transition",{attrs:{name:s.transition}},[s.dropdownOpen?m("ul",{directives:[{name:"append-to-body",rawName:"v-append-to-body"}],key:"vs-"+s.uid+"__listbox",ref:"dropdownMenu",staticClass:"vs__dropdown-menu",attrs:{id:"vs-"+s.uid+"__listbox",role:"listbox","aria-label":s.ariaLabelListbox,"aria-multiselectable":s.multiple,tabindex:"-1"},on:{mousedown:function(b){return b.preventDefault(),s.onMousedown(b)},mouseup:s.onMouseUp}},[s._t("list-header",null,null,s.scope.listHeader),s._v(" "),s._l(s.filteredOptions,function(b,C){return m("li",{key:s.getOptionKey(b),staticClass:"vs__dropdown-option",class:{"vs__dropdown-option--deselect":s.isOptionDeselectable(b)&&C===s.typeAheadPointer,"vs__dropdown-option--selected":s.isOptionSelected(b),"vs__dropdown-option--highlight":C===s.typeAheadPointer,"vs__dropdown-option--kb-focus":s.hasKeyboardFocusBorder(C),"vs__dropdown-option--disabled":!s.selectable(b)},attrs:{id:"vs-"+s.uid+"__option-"+C,role:"option","aria-selected":s.optionAriaSelected(b)},on:{mousemove:function(O){return s.onMouseMove(b,C)},click:function(O){O.preventDefault(),O.stopPropagation(),s.selectable(b)&&s.select(b)}}},[s._t("option",[s._v(`
|
|
`+s._s(s.getOptionLabel(b))+`
|
|
`)],null,s.normalizeOptionForSlot(b))],2)}),s._v(" "),s.filteredOptions.length===0?m("li",{staticClass:"vs__no-options"},[s._t("no-options",[s._v(`
|
|
Sorry, no matching options.
|
|
`)],null,s.scope.noOptions)],2):s._e(),s._v(" "),s._t("list-footer",null,null,s.scope.listFooter)],2):m("ul",{staticStyle:{display:"none",visibility:"hidden"},attrs:{id:"vs-"+s.uid+"__listbox",role:"listbox","aria-label":s.ariaLabelListbox}})]),s._v(" "),s._t("footer",null,null,s.scope.footer)],2)},[]).exports,W={ajax:v,pointer:p,pointerScroll:h},k=R})(),d})()})}(Pt)),Pt.exports}var X=ds();const hs={name:"ChevronDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var ps=function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon chevron-down-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(n){return t.$emit("click",n)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},fs=[],gs=V(hs,ps,fs,!1,null,null);const ms=gs.exports;function Ue(t,e){const n=[];let i=0,r=t.toLowerCase().indexOf(e.toLowerCase(),i),d=0;for(;r>-1&&d<t.length;)i=r+e.length,n.push({start:r,end:i}),r=t.toLowerCase().indexOf(e.toLowerCase(),i),d++;return n}const vs={name:"NcHighlight",props:{text:{type:String,default:""},search:{type:String,default:""},highlight:{type:Array,default:()=>[]}},computed:{ranges(){let t=[];return!this.search&&this.highlight.length===0||(this.highlight.length>0?t=this.highlight:t=Ue(this.text,this.search),t.forEach((e,n)=>{e.end<e.start&&(t[n]={start:e.end,end:e.start})}),t=t.reduce((e,n)=>(n.start<this.text.length&&n.end>0&&e.push({start:n.start<0?0:n.start,end:n.end>this.text.length?this.text.length:n.end}),e),[]),t.sort((e,n)=>e.start-n.start),t=t.reduce((e,n)=>{if(!e.length)e.push(n);else{const i=e.length-1;e[i].end>=n.start?e[i]={start:e[i].start,end:Math.max(e[i].end,n.end)}:e.push(n)}return e},[])),t},chunks(){if(this.ranges.length===0)return[{start:0,end:this.text.length,highlight:!1,text:this.text}];const t=[];let e=0,n=0;for(;e<this.text.length;){const i=this.ranges[n];if(i.start===e){t.push({...i,highlight:!0,text:this.text.slice(i.start,i.end)}),n++,e=i.end,n>=this.ranges.length&&e<this.text.length&&(t.push({start:e,end:this.text.length,highlight:!1,text:this.text.slice(e)}),e=this.text.length);continue}t.push({start:e,end:i.start,highlight:!1,text:this.text.slice(e,i.start)}),e=i.start}return t}},render(t){return this.ranges.length?t("span",{},this.chunks.map(e=>e.highlight?t("strong",{},e.text):e.text)):t("span",{},this.text)}},ys=null,bs=null;var ws=V(vs,ys,bs,!1,null,null);const $e=ws.exports,xs={name:"NcEllipsisedOption",components:{NcHighlight:$e},props:{name:{type:String,default:""},search:{type:String,default:""}},computed:{needsTruncate(){return this.name&&this.name.length>=10},split(){return this.name.length-Math.min(Math.floor(this.name.length/2),10)},part1(){return this.needsTruncate?this.name.slice(0,this.split):this.name},part2(){return this.needsTruncate?this.name.slice(this.split):""},highlight1(){return this.search?Ue(this.name,this.search):[]},highlight2(){return this.highlight1.map(t=>({start:t.start-this.split,end:t.end-this.split}))}}};var Ss=function(){var t=this,e=t._self._c;return e("span",{staticClass:"name-parts",attrs:{dir:"auto",title:t.name}},[e("NcHighlight",{staticClass:"name-parts__first",attrs:{text:t.part1,search:t.search,highlight:t.highlight1}}),t.part2?e("NcHighlight",{staticClass:"name-parts__last",attrs:{text:t.part2,search:t.search,highlight:t.highlight2}}):t._e()],1)},_s=[],Cs=V(xs,Ss,_s,!1,null,"592b8444");const Os=Cs.exports,Fe=gt(Ve());window.addEventListener("resize",()=>{Fe.value=Ve()});function Ve(){return window.outerHeight===window.screen.height}ye(Fe);var Et={exports:{}},Ls=Et.exports,ne;function As(){return ne||(ne=1,function(t){(function(e){if(typeof n!="function"){var n=function(v){return v};n.nonNative=!0}const i=n("plaintext"),r=n("html"),d=n("comment"),u=/<(\w*)>/g,o=/<\/?([^\s\/>]+)/;function f(v,y,w){v=v||"",y=y||[],w=w||"";let x=l(y,w);return c(v,x)}function a(v,y){v=v||[],y=y||"";let w=l(v,y);return function(x){return c(x||"",w)}}f.init_streaming_mode=a;function l(v,y){return v=h(v),{allowable_tags:v,tag_replacement:y,state:i,tag_buffer:"",depth:0,in_quote_char:""}}function c(v,y){if(typeof v!="string")throw new TypeError("'html' parameter must be a string");let w=y.allowable_tags,x=y.tag_replacement,_=y.state,S=y.tag_buffer,A=y.depth,L=y.in_quote_char,T="";for(let R=0,W=v.length;R<W;R++){let k=v[R];if(_===i)switch(k){case"<":_=r,S+=k;break;default:T+=k;break}else if(_===r)switch(k){case"<":if(L)break;A++;break;case">":if(L)break;if(A){A--;break}L="",_=i,S+=">",w.has(p(S))?T+=S:T+=x,S="";break;case'"':case"'":k===L?L="":L=L||k,S+=k;break;case"-":S==="<!-"&&(_=d),S+=k;break;case" ":case`
|
|
`:if(S==="<"){_=i,T+="< ",S="";break}S+=k;break;default:S+=k;break}else if(_===d)switch(k){case">":S.slice(-2)=="--"&&(_=i),S="";break;default:S+=k;break}}return y.state=_,y.tag_buffer=S,y.depth=A,y.in_quote_char=L,T}function h(v){let y=new Set;if(typeof v=="string"){let w;for(;w=u.exec(v);)y.add(w[1])}else!n.nonNative&&typeof v[n.iterator]=="function"?y=new Set(v):typeof v.forEach=="function"&&v.forEach(y.add,y);return y}function p(v){let y=o.exec(v);return y?y[1].toLowerCase():null}t.exports?t.exports=f:e.striptags=f})(Ls)}(Et)),Et.exports}As();function ft(t=document.body){const e=window.getComputedStyle(t).getPropertyValue("--background-invert-if-dark");return e!==void 0?e==="invert(100%)":!1}ft();const Ts=Symbol.for("nc:theme:enforced");function ks(t){const e=Ut(()=>Y(t)??document.body),n=gt(ft(e.value)),i=Ke();function r(){n.value=ft(e.value)}return Ge(e,r,{attributes:!0}),st(e,r),st(i,r,{immediate:!0}),ye(n)}const Ds=We(()=>ks());function Bs(){const t=Ds(),e=Xe(Ts,void 0);return Ut(()=>e?.value?e.value==="dark":t.value)}kt.util.warn;function nt(t){var e;const n=Y(t);return(e=n?.$el)!=null?e:n}const qe=Ze?window:void 0;function lt(...t){let e,n,i,r;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,r]=t,e=qe):[e,n,i,r]=t,!e)return at;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const d=[],u=()=>{d.forEach(l=>l()),d.length=0},o=(l,c,h,p)=>(l.addEventListener(c,h,p),()=>l.removeEventListener(c,h,p)),f=st(()=>[nt(e),Y(r)],([l,c])=>{if(u(),!l)return;const h=Ye(c)?{...c}:c;d.push(...n.flatMap(p=>i.map(v=>o(l,p,v,h))))},{immediate:!0,flush:"post"}),a=()=>{f(),u()};return be(a),a}let se=!1;function ie(t,e,n={}){const{window:i=qe,ignore:r=[],capture:d=!0,detectIframe:u=!1}=n;if(!i)return at;Dt&&!se&&(se=!0,Array.from(i.document.body.children).forEach(l=>l.addEventListener("click",at)),i.document.documentElement.addEventListener("click",at));let o=!0;const f=l=>r.some(c=>{if(typeof c=="string")return Array.from(i.document.querySelectorAll(c)).some(h=>h===l.target||l.composedPath().includes(h));{const h=nt(c);return h&&(l.target===h||l.composedPath().includes(h))}}),a=[lt(i,"click",l=>{const c=nt(t);if(!(!c||c===l.target||l.composedPath().includes(c))){if(l.detail===0&&(o=!f(l)),!o){o=!0;return}e(l)}},{passive:!0,capture:d}),lt(i,"pointerdown",l=>{const c=nt(t);o=!f(l)&&!!(c&&!l.composedPath().includes(c))},{passive:!0}),u&<(i,"blur",l=>{setTimeout(()=>{var c;const h=nt(t);((c=i.document.activeElement)==null?void 0:c.tagName)==="IFRAME"&&!h?.contains(i.document.activeElement)&&e(l)},0)})].filter(Boolean);return()=>a.forEach(l=>l())}const Ns={[jt.mounted](t,e){const n=!e.modifiers.bubble;if(typeof e.value=="function")t.__onClickOutside_stop=ie(t,e.value,{capture:n});else{const[i,r]=e.value;t.__onClickOutside_stop=ie(t,i,Object.assign({capture:n},r))}},[jt.unmounted](t){t.__onClickOutside_stop()}};function Ot(t){return typeof Window<"u"&&t instanceof Window?t.document.documentElement:typeof Document<"u"&&t instanceof Document?t.documentElement:t}function ze(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!n||n.tagName==="BODY"?!1:ze(n)}}function Is(t){const e=t||window.event,n=e.target;return ze(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}const Lt=new WeakMap;function Ms(t,e=!1){const n=gt(e);let i=null,r="";st(Je(t),o=>{const f=Ot(Y(o));if(f){const a=f;if(Lt.get(a)||Lt.set(a,a.style.overflow),a.style.overflow!=="hidden"&&(r=a.style.overflow),a.style.overflow==="hidden")return n.value=!0;if(n.value)return a.style.overflow="hidden"}},{immediate:!0});const d=()=>{const o=Ot(Y(t));!o||n.value||(Dt&&(i=lt(o,"touchmove",f=>{Is(f)},{passive:!1})),o.style.overflow="hidden",n.value=!0)},u=()=>{const o=Ot(Y(t));!o||!n.value||(Dt&&i?.(),o.style.overflow=r,Lt.delete(o),n.value=!1)};return be(u),Ut({get(){return n.value},set(o){o?d():u()}})}function Ps(){let t=!1;const e=gt(!1);return(n,i)=>{if(e.value=i.value,t)return;t=!0;const r=Ms(n,i.value);st(e,d=>r.value=d)}}Ps();function Es(t,e){const n=(l,c)=>l.startsWith(c)?l.slice(c.length):l,i=(l,...c)=>c.reduce((h,p)=>n(h,p),l);if(!t)return null;const r=/^https?:\/\//.test(e),d=/^[a-z][a-z0-9+.-]*:.+/.test(e);if(!r&&d||r&&!e.startsWith(Ht())||!r&&!e.startsWith("/"))return null;const u=r?i(e,Ht(),"/index.php"):e,o=i(t.history.base,Qe(),"/index.php"),f=i(u,o)||"/",a=t.resolve(f).route;return a.matched.length?a.fullPath:null}function Us(t){return window._nc_contacts_menu_hooks?Object.values(window._nc_contacts_menu_hooks).filter(e=>e.enabled(t)):[]}var oe={exports:{}},re={exports:{}},ae;function $s(){return ae||(ae=1,function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(n,i){return n<<i|n>>>32-i},rotr:function(n,i){return n<<32-i|n>>>i},endian:function(n){if(n.constructor==Number)return e.rotl(n,8)&16711935|e.rotl(n,24)&4278255360;for(var i=0;i<n.length;i++)n[i]=e.endian(n[i]);return n},randomBytes:function(n){for(var i=[];n>0;n--)i.push(Math.floor(Math.random()*256));return i},bytesToWords:function(n){for(var i=[],r=0,d=0;r<n.length;r++,d+=8)i[d>>>5]|=n[r]<<24-d%32;return i},wordsToBytes:function(n){for(var i=[],r=0;r<n.length*32;r+=8)i.push(n[r>>>5]>>>24-r%32&255);return i},bytesToHex:function(n){for(var i=[],r=0;r<n.length;r++)i.push((n[r]>>>4).toString(16)),i.push((n[r]&15).toString(16));return i.join("")},hexToBytes:function(n){for(var i=[],r=0;r<n.length;r+=2)i.push(parseInt(n.substr(r,2),16));return i},bytesToBase64:function(n){for(var i=[],r=0;r<n.length;r+=3)for(var d=n[r]<<16|n[r+1]<<8|n[r+2],u=0;u<4;u++)r*8+u*6<=n.length*8?i.push(t.charAt(d>>>6*(3-u)&63)):i.push("=");return i.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var i=[],r=0,d=0;r<n.length;d=++r%4)d!=0&&i.push((t.indexOf(n.charAt(r-1))&Math.pow(2,-2*d+8)-1)<<d*2|t.indexOf(n.charAt(r))>>>6-d*2);return i}};re.exports=e}()),re.exports}var At,le;function ce(){if(le)return At;le=1;var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var n=[],i=0;i<e.length;i++)n.push(e.charCodeAt(i)&255);return n},bytesToString:function(e){for(var n=[],i=0;i<e.length;i++)n.push(String.fromCharCode(e[i]));return n.join("")}}};return At=t,At}var Tt,ue;function Fs(){if(ue)return Tt;ue=1,Tt=function(n){return n!=null&&(t(n)||e(n)||!!n._isBuffer)};function t(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function e(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&t(n.slice(0,0))}return Tt}var de;function Vs(){return de||(de=1,function(){var t=$s(),e=ce().utf8,n=Fs(),i=ce().bin,r=function(d,u){d.constructor==String?u&&u.encoding==="binary"?d=i.stringToBytes(d):d=e.stringToBytes(d):n(d)?d=Array.prototype.slice.call(d,0):!Array.isArray(d)&&d.constructor!==Uint8Array&&(d=d.toString());for(var o=t.bytesToWords(d),f=d.length*8,a=1732584193,l=-271733879,c=-1732584194,h=271733878,p=0;p<o.length;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360;o[f>>>5]|=128<<f%32,o[(f+64>>>9<<4)+14]=f;for(var v=r._ff,y=r._gg,w=r._hh,x=r._ii,p=0;p<o.length;p+=16){var _=a,S=l,A=c,L=h;a=v(a,l,c,h,o[p+0],7,-680876936),h=v(h,a,l,c,o[p+1],12,-389564586),c=v(c,h,a,l,o[p+2],17,606105819),l=v(l,c,h,a,o[p+3],22,-1044525330),a=v(a,l,c,h,o[p+4],7,-176418897),h=v(h,a,l,c,o[p+5],12,1200080426),c=v(c,h,a,l,o[p+6],17,-1473231341),l=v(l,c,h,a,o[p+7],22,-45705983),a=v(a,l,c,h,o[p+8],7,1770035416),h=v(h,a,l,c,o[p+9],12,-1958414417),c=v(c,h,a,l,o[p+10],17,-42063),l=v(l,c,h,a,o[p+11],22,-1990404162),a=v(a,l,c,h,o[p+12],7,1804603682),h=v(h,a,l,c,o[p+13],12,-40341101),c=v(c,h,a,l,o[p+14],17,-1502002290),l=v(l,c,h,a,o[p+15],22,1236535329),a=y(a,l,c,h,o[p+1],5,-165796510),h=y(h,a,l,c,o[p+6],9,-1069501632),c=y(c,h,a,l,o[p+11],14,643717713),l=y(l,c,h,a,o[p+0],20,-373897302),a=y(a,l,c,h,o[p+5],5,-701558691),h=y(h,a,l,c,o[p+10],9,38016083),c=y(c,h,a,l,o[p+15],14,-660478335),l=y(l,c,h,a,o[p+4],20,-405537848),a=y(a,l,c,h,o[p+9],5,568446438),h=y(h,a,l,c,o[p+14],9,-1019803690),c=y(c,h,a,l,o[p+3],14,-187363961),l=y(l,c,h,a,o[p+8],20,1163531501),a=y(a,l,c,h,o[p+13],5,-1444681467),h=y(h,a,l,c,o[p+2],9,-51403784),c=y(c,h,a,l,o[p+7],14,1735328473),l=y(l,c,h,a,o[p+12],20,-1926607734),a=w(a,l,c,h,o[p+5],4,-378558),h=w(h,a,l,c,o[p+8],11,-2022574463),c=w(c,h,a,l,o[p+11],16,1839030562),l=w(l,c,h,a,o[p+14],23,-35309556),a=w(a,l,c,h,o[p+1],4,-1530992060),h=w(h,a,l,c,o[p+4],11,1272893353),c=w(c,h,a,l,o[p+7],16,-155497632),l=w(l,c,h,a,o[p+10],23,-1094730640),a=w(a,l,c,h,o[p+13],4,681279174),h=w(h,a,l,c,o[p+0],11,-358537222),c=w(c,h,a,l,o[p+3],16,-722521979),l=w(l,c,h,a,o[p+6],23,76029189),a=w(a,l,c,h,o[p+9],4,-640364487),h=w(h,a,l,c,o[p+12],11,-421815835),c=w(c,h,a,l,o[p+15],16,530742520),l=w(l,c,h,a,o[p+2],23,-995338651),a=x(a,l,c,h,o[p+0],6,-198630844),h=x(h,a,l,c,o[p+7],10,1126891415),c=x(c,h,a,l,o[p+14],15,-1416354905),l=x(l,c,h,a,o[p+5],21,-57434055),a=x(a,l,c,h,o[p+12],6,1700485571),h=x(h,a,l,c,o[p+3],10,-1894986606),c=x(c,h,a,l,o[p+10],15,-1051523),l=x(l,c,h,a,o[p+1],21,-2054922799),a=x(a,l,c,h,o[p+8],6,1873313359),h=x(h,a,l,c,o[p+15],10,-30611744),c=x(c,h,a,l,o[p+6],15,-1560198380),l=x(l,c,h,a,o[p+13],21,1309151649),a=x(a,l,c,h,o[p+4],6,-145523070),h=x(h,a,l,c,o[p+11],10,-1120210379),c=x(c,h,a,l,o[p+2],15,718787259),l=x(l,c,h,a,o[p+9],21,-343485551),a=a+_>>>0,l=l+S>>>0,c=c+A>>>0,h=h+L>>>0}return t.endian([a,l,c,h])};r._ff=function(d,u,o,f,a,l,c){var h=d+(u&o|~u&f)+(a>>>0)+c;return(h<<l|h>>>32-l)+u},r._gg=function(d,u,o,f,a,l,c){var h=d+(u&f|o&~f)+(a>>>0)+c;return(h<<l|h>>>32-l)+u},r._hh=function(d,u,o,f,a,l,c){var h=d+(u^o^f)+(a>>>0)+c;return(h<<l|h>>>32-l)+u},r._ii=function(d,u,o,f,a,l,c){var h=d+(o^(u|~f))+(a>>>0)+c;return(h<<l|h>>>32-l)+u},r._blocksize=16,r._digestsize=16,oe.exports=function(d,u){if(d==null)throw new Error("Illegal argument "+d);var o=t.wordsToBytes(r(d,u));return u&&u.asBytes?o:u&&u.asString?i.bytesToString(o):t.bytesToHex(o)}}()),oe.exports}var qs=Vs();const zs=tn(qs);function he(t){let e=t.toLowerCase();e.match(/^([0-9a-f]{4}-?){8}$/)===null&&(e=zs(e)),e=e.replace(/[^0-9a-f]/g,"");const n=6,i=fn(n);function r(d,u){let o=0;const f=[];for(let a=0;a<d.length;a++)f.push(parseInt(d.charAt(a),16)%16);for(const a in f)o+=f[a];return parseInt(parseInt(o,10)%u,10)}return i[r(e,n*3)]}function Rs(t,e){const n=(e?.size||64)<=64?64:512,i=e?.isGuest?"/guest":"",r=e?.isDarkTheme??ft(document.body)?"/dark":"";return we(`/avatar${i}/{user}/{size}${r}`,{user:t,size:n})}const pe=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="-1 -1 18 18" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
|
<path fill="none" d="M-4-4h24v24H-4z" />
|
|
<path fill="var(--color-warning)" d="M6.9.1C3 .6-.1 4-.1 8c0 4.4 3.6 8 8 8 4 0 7.4-3 8-6.9-1.2 1.3-2.9 2.1-4.7 2.1-3.5 0-6.4-2.9-6.4-6.4 0-1.9.8-3.6 2.1-4.7z" />
|
|
</svg>
|
|
`,js=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="0 -960 960 960" width="24px" height="24px" xmlns="http://www.w3.org/2000/svg">
|
|
<path
|
|
fill="var(--user-status-color-away, var(--color-warning, #C88800))"
|
|
d="m612-292 56-56-148-148v-184h-80v216l172 172ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/>
|
|
</svg>
|
|
`,Hs=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="0 -960 960 960" width="24px" height="24px" xmlns="http://www.w3.org/2000/svg">
|
|
<path
|
|
fill="var(--user-status-color-busy, var(--color-error, #DB0606))"
|
|
d="M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/>
|
|
</svg>
|
|
`,Ws=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="-1 -1 18 18" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
|
<path fill="none" d="M-4-4h24v24H-4V-4z" />
|
|
<path fill="var(--color-border-error, var(--color-error))" d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8z" />
|
|
<path fill="#fdffff" d="M5 6.5h6c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5H5c-.8 0-1.5-.7-1.5-1.5S4.2 6.5 5 6.5z" />
|
|
</svg>
|
|
`,Xs=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="0 -960 960 960" width="24px" height="24px" xmlns="http://www.w3.org/2000/svg">
|
|
<path
|
|
fill="var(--user-status-color-busy, var(--color-error, #DB0606))"
|
|
d="M280-440h400v-80H280v80ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/>
|
|
</svg>
|
|
`,fe=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="-1 -1 18 18" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
|
<path fill="none" d="M-4-4h24v24H-4V-4z" />
|
|
<path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 3.2c2.7 0 4.8 2.1 4.8 4.8s-2.1 4.8-4.8 4.8S3.2 10.7 3.2 8 5.3 3.2 8 3.2z" />
|
|
</svg>
|
|
`,ge=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="0 -960 960 960" width="24px" height="24px" xmlns="http://www.w3.org/2000/svg">
|
|
<path
|
|
fill="var(--user-status-color-offline, var(--color-text-maxcontrast, #6B6B6B))"
|
|
d="M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/>
|
|
</svg>
|
|
`,Ks=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="-1 -1 18 18" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
|
<path fill="var(--color-success)" d="M4.8 11.2h6.4V4.8H4.8v6.4zM8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8z" />
|
|
</svg>
|
|
`,Gs=`<!--
|
|
- SPDX-FileCopyrightText: 2020 Google Inc.
|
|
- SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<svg viewBox="0 -960 960 960" width="24px" height="24px" xmlns="http://www.w3.org/2000/svg">
|
|
<path
|
|
fill="var(--user-status-color-online, var(--color-success, #2D7B41))"
|
|
d="m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/>
|
|
</svg>
|
|
`;ct(en),ct(nn);function Re(t){switch(t){case"away":return B("away");case"busy":return B("busy");case"dnd":return B("do not disturb");case"online":return B("online");case"invisible":return B("invisible");case"offline":return B("offline");default:return t}}const Zs={online:Z?Ks:Gs,away:Z?pe:js,busy:Z?pe:Hs,dnd:Z?Ws:Xs,invisible:Z?fe:ge,offline:Z?fe:ge},Ys={name:"NcUserStatusIcon",props:{user:{type:String,default:null},status:{type:String,default:null,validator:t=>["online","away","busy","dnd","invisible","offline"].includes(t)},ariaHidden:{type:String,default:null,validator:t=>["true","false"].includes(t)}},data(){return{fetchedUserStatus:null}},computed:{activeStatus(){return this.status??this.fetchedUserStatus},activeSvg(){return Zs[this.activeStatus]??null},ariaLabel(){return this.ariaHidden==="true"?null:B("User status: {status}",{status:Re(this.activeStatus)})}},watch:{user:{immediate:!0,async handler(t){if(!t||!Ce()?.user_status?.enabled){this.fetchedUserStatus=null;return}try{const{data:e}=await $t.get(xe("/apps/user_status/api/v1/statuses/{user}",{user:t}));this.fetchedUserStatus=e.ocs?.data?.status}catch{this.fetchedUserStatus=null}}}}};var Js=function(){var t=this,e=t._self._c;return t.activeStatus?e("span",{staticClass:"user-status-icon",class:{"user-status-icon--invisible":["invisible","offline"].includes(t.status)},attrs:{role:"img","aria-hidden":t.ariaHidden,"aria-label":t.ariaLabel},domProps:{innerHTML:t._s(t.activeSvg)}}):t._e()},Qs=[],ti=V(Ys,Js,Qs,!1,null,"86b73d39");const ei=ti.exports,ni={name:"NcActionLink",mixins:[Ft],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{href:{type:String,required:!0,validator:t=>{try{return new URL(t)}catch{return t.startsWith("#")||t.startsWith("/")}}},download:{type:String,default:null},target:{type:String,default:"_self",validator:t=>t&&(!t.startsWith("_")||["_blank","_self","_parent","_top"].indexOf(t)>-1)},title:{type:String,default:null},ariaHidden:{type:Boolean,default:null}}};var si=function(){var t=this,e=t._self._c;return e("li",{staticClass:"action",attrs:{role:t.isInSemanticMenu&&"presentation"}},[e("a",{staticClass:"action-link focusable",attrs:{download:t.download,href:t.href,"aria-label":t.ariaLabel,target:t.target,title:t.title,rel:"nofollow noreferrer noopener",role:t.isInSemanticMenu&&"menuitem"},on:{click:t.onClick}},[t._t("icon",function(){return[e("span",{staticClass:"action-link__icon",class:[t.isIconUrl?"action-link__icon--url":t.icon],style:{backgroundImage:t.isIconUrl?`url(${t.icon})`:null},attrs:{"aria-hidden":"true"}})]}),t.name?e("span",{staticClass:"action-link__longtext-wrapper"},[e("strong",{staticClass:"action-link__name"},[t._v(" "+t._s(t.name)+" ")]),e("br"),e("span",{staticClass:"action-link__longtext",domProps:{textContent:t._s(t.text)}})]):t.isLongText?e("span",{staticClass:"action-link__longtext",domProps:{textContent:t._s(t.text)}}):e("span",{staticClass:"action-link__text"},[t._v(t._s(t.text))]),t._e()],2)])},ii=[],oi=V(ni,si,ii,!1,null,"86e09254");const ri=oi.exports,ai={name:"NcActionRouter",mixins:[Ft],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{to:{type:[String,Object],required:!0},exact:{type:Boolean,default:!1}}};var li=function(){var t=this,e=t._self._c;return e("li",{staticClass:"action",attrs:{role:t.isInSemanticMenu&&"presentation"}},[e("RouterLink",{staticClass:"action-router focusable",attrs:{to:t.to,"aria-label":t.ariaLabel,exact:t.exact,title:t.title,rel:"nofollow noreferrer noopener",role:t.isInSemanticMenu&&"menuitem"},nativeOn:{click:function(n){return t.onClick.apply(null,arguments)}}},[t._t("icon",function(){return[e("span",{staticClass:"action-router__icon",class:[t.isIconUrl?"action-router__icon--url":t.icon],style:{backgroundImage:t.isIconUrl?`url(${t.icon})`:null},attrs:{"aria-hidden":"true"}})]}),t.name?e("span",{staticClass:"action-router__longtext-wrapper"},[e("strong",{staticClass:"action-router__name"},[t._v(" "+t._s(t.name)+" ")]),e("br"),e("span",{staticClass:"action-router__longtext",domProps:{textContent:t._s(t.text)}})]):t.isLongText?e("span",{staticClass:"action-router__longtext",domProps:{textContent:t._s(t.text)}}):e("span",{staticClass:"action-router__text"},[t._v(t._s(t.text))]),t._e()],2)],1)},ci=[],ui=V(ai,li,ci,!1,null,"4dae1ff7");const di=ui.exports,hi={name:"NcActionText",mixins:[Ft],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}}};var pi=function(){var t=this,e=t._self._c;return e("li",{staticClass:"action",attrs:{role:t.isInSemanticMenu&&"presentation"}},[e("span",{staticClass:"action-text",on:{click:t.onClick}},[t._t("icon",function(){return[t.icon!==""?e("span",{staticClass:"action-text__icon",class:[t.isIconUrl?"action-text__icon--url":t.icon],style:{backgroundImage:t.isIconUrl?`url(${t.icon})`:null},attrs:{"aria-hidden":"true"}}):t._e()]}),t.name?e("span",{staticClass:"action-text__longtext-wrapper"},[e("strong",{staticClass:"action-text__name"},[t._v(" "+t._s(t.name)+" ")]),e("span",{staticClass:"action-text__longtext",domProps:{textContent:t._s(t.text)}})]):t.isLongText?e("span",{staticClass:"action-text__longtext",domProps:{textContent:t._s(t.text)}}):e("span",{staticClass:"action-text__text"},[t._v(t._s(t.text))]),t._e()],2)])},fi=[],gi=V(hi,pi,fi,!1,null,"2fe7eb92");const mi=gi.exports;ct(cn);const je={data(){return{hasStatus:!1,userStatus:{status:null,message:null,icon:null}}},methods:{async fetchUserStatus(t){if(!t)return;const e=Ce();if(!(!Object.hasOwn(e,"user_status")||!e.user_status.enabled)&&Bt())try{const{data:n}=await $t.get(xe("apps/user_status/api/v1/statuses/{userId}",{userId:t})),{status:i,message:r,icon:d}=n.ocs.data;this.userStatus.status=i,this.userStatus.message=r||"",this.userStatus.icon=d||"",this.hasStatus=!0}catch(n){if(n.response.status===404&&n.response.data.ocs?.data?.length===0)return;Nt.error("Could not fetch user status",{error:n})}}}},He=ln("nextcloud").persist().build();function vi(t){const e=He.getItem("user-has-avatar."+t);return typeof e=="string"?!!e:null}function me(t,e){t&&He.setItem("user-has-avatar."+t,e)}const yi={name:"NcAvatar",directives:{ClickOutside:Ns},components:{IconDotsHorizontal:rn,NcActions:on,NcButton:sn,NcIconSvgWrapper:_e,NcLoadingIcon:Se,NcUserStatusIcon:ei},mixins:[je],props:{url:{type:String,default:void 0},iconClass:{type:String,default:void 0},user:{type:String,default:void 0},hideStatus:{type:Boolean,default:!1},showUserStatus:{type:Boolean,default:!0},verboseStatus:{type:Boolean,default:!1},showUserStatusCompact:{type:Boolean,default:!0},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},allowPlaceholder:{type:Boolean,default:!0},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:Bs()}},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?B("Avatar of {displayName}, {status}",{displayName:this.displayName??this.user,status:Re(this.userStatus.status)}):B("Avatar of {displayName}",{displayName:this.displayName??this.user})},canDisplayUserStatus(){return!this.hideStatus&&this.showUserStatus&&this.hasStatus&&["online","away","busy","dnd"].includes(this.userStatus.status)},showUserStatusIconOnAvatar(){return!this.hideStatus&&this.showUserStatus&&!this.verboseStatus&&this.showUserStatusCompact&&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===Bt()?.uid||this.userDoesNotExist||this.url)},showInitials(){return!this.noPlaceholder&&this.allowPlaceholder&&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:t,g:e,b:n}=he(this.userIdentifier);return{backgroundColor:`rgba(${t}, ${e}, ${n}, 0.1)`}},initialsStyle(){const{r:t,g:e,b:n}=he(this.userIdentifier);return{color:`rgb(${t}, ${e}, ${n})`}},tooltip(){return this.disableTooltip?!1:this.tooltipMessage?this.tooltipMessage:this.displayName},initials(){let t="?";if(this.showInitials){const e=this.userIdentifier.trim();if(e==="")return t;const n=e.match(/[\p{L}\p{N}\s]/gu);if(!n)return t;const i=n.join(""),r=i.lastIndexOf(" ");t=String.fromCodePoint(i.codePointAt(0)),r!==-1&&(t=t.concat(String.fromCodePoint(i.codePointAt(r+1))))}return t.toLocaleUpperCase()},menu(){const t=this.contactsMenuActions.map(n=>{const i=Es(this.$router,n.hyperlink);return{ncActionComponent:i?di:ri,ncActionComponentProps:i?{to:i,icon:n.icon}:{href:n.hyperlink,icon:n.icon},text:n.title}});for(const n of Us(this.contactsMenuData))try{t.push({ncActionComponent:an,ncActionComponentProps:{},ncActionComponentHandlers:{click:()=>n.callback(this.contactsMenuData)},text:n.displayName(this.contactsMenuData),iconSvg:n.iconSvg(this.contactsMenuData)})}catch(i){Nt.error(`Failed to render ContactsMenu action ${n.id}`,{error:i,action:n})}function e(n){const i=document.createTextNode(n),r=document.createElement("p");return r.appendChild(i),r.innerHTML}if(!this.hideStatus&&this.showUserStatus&&(this.userStatus.icon||this.userStatus.message)){const n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
|
<text x="50%" y="50%" text-anchor="middle" style="dominant-baseline: central; font-size: 85%">${e(this.userStatus.icon)}</text>
|
|
</svg>`;return[{ncActionComponent:mi,ncActionComponentProps:{},iconSvg:this.userStatus.icon?n:void 0,text:`${this.userStatus.message}`}].concat(t)}return t}},watch:{url(){this.userDoesNotExist=!1,this.loadAvatarUrl()},user(){this.userDoesNotExist=!1,this.isMenuLoaded=!1,this.loadAvatarUrl()}},mounted(){this.loadAvatarUrl(),_t("settings:avatar:updated",this.loadAvatarUrl),_t("settings:display-name:updated",this.loadAvatarUrl),!this.hideStatus&&this.showUserStatus&&this.user&&!this.isNoUser&&(this.preloadedUserStatus?(this.userStatus.status=this.preloadedUserStatus.status||"",this.userStatus.message=this.preloadedUserStatus.message||"",this.userStatus.icon=this.preloadedUserStatus.icon||"",this.hasStatus=this.preloadedUserStatus.status!==null):this.fetchUserStatus(this.user),_t("user_status:status.updated",this.handleUserStatusUpdated))},beforeDestroy(){St("settings:avatar:updated",this.loadAvatarUrl),St("settings:display-name:updated",this.loadAvatarUrl),St("user_status:status.updated",this.handleUserStatusUpdated)},methods:{t:B,handleUserStatusUpdated(t){this.user===t.userId&&(this.userStatus={status:t.status,icon:t.icon,message:t.message},this.hasStatus=t.status!==null)},async toggleMenu(t){t.type==="keydown"&&t.key!=="Enter"||(this.contactsMenuOpenState||await this.fetchContactsMenu(),this.contactsMenuOpenState=!this.contactsMenuOpenState)},closeMenu(){this.contactsMenuOpenState=!1},async fetchContactsMenu(){this.contactsMenuLoading=!0;try{const t=encodeURIComponent(this.user),{data:e}=await $t.post(we("contactsmenu/findOne"),`shareType=0&shareWith=${t}`);this.contactsMenuData=e,this.contactsMenuActions=e.topAction?[e.topAction].concat(e.actions):e.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.isAvatarLoaded=!0,this.userDoesNotExist=!0;return}if(this.isUrlDefined){this.updateImageIfValid(this.url);return}if(this.size<=64){const t=this.avatarUrlGenerator(this.user,64),e=[t+" 1x",this.avatarUrlGenerator(this.user,512)+" 8x"].join(", ");this.updateImageIfValid(t,e)}else{const t=this.avatarUrlGenerator(this.user,512);this.updateImageIfValid(t)}},avatarUrlGenerator(t,e){let n=Rs(t,{size:e,isDarkTheme:this.isDarkTheme,isGuest:this.isGuest});return t===Bt()?.uid&&typeof window.oc_userconfig<"u"&&(n+="?v="+window.oc_userconfig.avatar.version),n},updateImageIfValid(t,e=null){const n=vi(this.user);if(this.isUserDefined&&typeof n=="boolean"){this.isAvatarLoaded=!0,this.avatarUrlLoaded=t,e&&(this.avatarSrcSetLoaded=e),n===!1&&(this.userDoesNotExist=!0);return}const i=new Image;i.onload=()=>{this.avatarUrlLoaded=t,e&&(this.avatarSrcSetLoaded=e),this.isAvatarLoaded=!0,me(this.user,!0)},i.onerror=r=>{Nt.debug("Invalid avatar url",{error:r,url:t}),this.avatarUrlLoaded=null,this.avatarSrcSetLoaded=null,this.userDoesNotExist=!0,this.isAvatarLoaded=!1,me(this.user,!1)},e&&(i.srcset=e),i.src=t}}};var bi=function(){var t=this,e=t._self._c;return e("span",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.closeMenu,expression:"closeMenu"}],staticClass:"avatardiv popovermenu-wrapper",class:{"avatardiv--unknown":t.userDoesNotExist,"avatardiv--with-menu":t.hasMenu,"avatardiv--with-menu-loading":t.contactsMenuLoading},style:t.avatarStyle,attrs:{title:t.tooltip}},[t._t("icon",function(){return[t.iconClass?e("span",{staticClass:"avatar-class-icon",class:t.iconClass}):t.isAvatarLoaded&&!t.userDoesNotExist?e("img",{attrs:{src:t.avatarUrlLoaded,srcset:t.avatarSrcSetLoaded,alt:""}}):t._e()]}),t.hasMenu&&t.menu.length===0?e("NcButton",{staticClass:"action-item action-item__menutoggle",attrs:{"aria-label":t.avatarAriaLabel,variant:"tertiary-no-background"},on:{click:t.toggleMenu},scopedSlots:t._u([{key:"icon",fn:function(){return[t.contactsMenuLoading?e("NcLoadingIcon"):e("IconDotsHorizontal",{attrs:{size:20}})]},proxy:!0}],null,!1,1269954734)}):t.hasMenu?e("NcActions",{attrs:{"aria-label":t.avatarAriaLabel,container:t.menuContainer,"force-menu":"","manual-open":"",open:t.contactsMenuOpenState,variant:"tertiary-no-background"},on:{"update:open":function(n){t.contactsMenuOpenState=n},click:t.toggleMenu},scopedSlots:t._u([t.contactsMenuLoading?{key:"icon",fn:function(){return[e("NcLoadingIcon")]},proxy:!0}:null],null,!0)},t._l(t.menu,function(n,i){return e(n.ncActionComponent,t._g(t._b({key:i,tag:"component",scopedSlots:t._u([n.iconSvg?{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{svg:n.iconSvg}})]},proxy:!0}:null],null,!0)},"component",n.ncActionComponentProps,!1),n.ncActionComponentHandlers),[t._v(" "+t._s(n.text)+" ")])}),1):t._e(),t.showUserStatusIconOnAvatar?e("span",{staticClass:"avatardiv__user-status avatardiv__user-status--icon"},[t._v(" "+t._s(t.userStatus.icon)+" ")]):t.canDisplayUserStatus?e("NcUserStatusIcon",{staticClass:"avatardiv__user-status",attrs:{status:t.userStatus.status,"aria-hidden":String(t.hasMenu)}}):t._e(),t.showInitials?e("span",{staticClass:"avatardiv__initials-wrapper",style:t.initialsWrapperStyle},[e("span",{staticClass:"avatardiv__initials",style:t.initialsStyle},[t._v(" "+t._s(t.initials)+" ")])]):t._e()],2)},wi=[],xi=V(yi,bi,wi,!1,null,"936fbce2");const Si=xi.exports,_i=8,ve=32,Ci={name:"NcListItemIcon",components:{NcAvatar:Si,NcHighlight:$e,NcIconSvgWrapper:_e},mixins:[je],props:{name:{type:String,required:!0},subname:{type:String,default:""},icon:{type:String,default:""},iconSvg:{type:String,default:""},iconName:{type:String,default:""},search:{type:String,default:""},avatarSize:{type:Number,default:ve},noMargin:{type:Boolean,default:!1},displayName:{type:String,default:null},isNoUser:{type:Boolean,default:!1},id:{type:String,default:null}},setup(){return{margin:_i,defaultSize:ve}},computed:{hasIcon(){return this.icon!==""},hasIconSvg(){return this.iconSvg!==""},isValidSubname(){return this.subname?.trim?.()!==""},isSizeBigEnough(){return this.avatarSize>=26},cssVars(){const t=this.noMargin?0:this.margin;return{"--height":this.avatarSize+2*t+"px","--margin":this.margin+"px"}},searchParts(){const t=/^([^<]*)<([^>]+)>?$/,e=this.search.match(t);return this.isNoUser||!e?[this.search,this.search]:[e[1].trim(),e[2]]}},beforeMount(){!this.isNoUser&&!this.subname&&this.fetchUserStatus(this.user)}};var Oi=function(){var t=this,e=t._self._c;return e("span",t._g({staticClass:"option",class:{"option--compact":t.avatarSize<t.defaultSize},style:t.cssVars,attrs:{id:t.id}},t.$listeners),[e("NcAvatar",t._b({staticClass:"option__avatar",attrs:{"disable-menu":!0,"disable-tooltip":!0,"display-name":t.displayName||t.name,"is-no-user":t.isNoUser,size:t.avatarSize}},"NcAvatar",t.$attrs,!1)),e("div",{staticClass:"option__details"},[e("NcHighlight",{staticClass:"option__lineone",attrs:{text:t.name,search:t.searchParts[0]}}),t.isValidSubname&&t.isSizeBigEnough?e("NcHighlight",{staticClass:"option__linetwo",attrs:{text:t.subname,search:t.searchParts[1]}}):t.hasStatus?e("span",[e("span",[t._v(t._s(t.userStatus.icon))]),e("span",[t._v(t._s(t.userStatus.message))])]):t._e()],1),t._t("default",function(){return[t.hasIconSvg?e("NcIconSvgWrapper",{staticClass:"option__icon",attrs:{svg:t.iconSvg,name:t.iconName}}):t.hasIcon?e("span",{staticClass:"icon option__icon",class:t.icon,attrs:{"aria-label":t.iconName}}):t._e()]})],2)},Li=[],Ai=V(Ci,Oi,Li,!1,null,"a4bb0ab9");const Ti=Ai.exports;ct(pn,hn);const ki={name:"NcSelect",components:{ChevronDown:ms,NcEllipsisedOption:Os,NcListItemIcon:Ti,NcLoadingIcon:Se,VueSelect:X.VueSelect},model:{prop:"modelValue",event:"update:modelValue"},props:{...X.VueSelect.props,...X.VueSelect.mixins.reduce((t,e)=>({...t,...e.props}),{}),ariaLabelClearSelected:{type:String,default:B("Clear selected")},ariaLabelCombobox:{type:String,default:null},ariaLabelListbox:{type:String,default:B("Options")},ariaLabelDeselectOption:{type:Function,default:t=>B("Deselect {option}",{option:t})},appendToBody:{type:Boolean,default:!0},calculatePosition:{type:Function,default:null},closeOnSelect:{type:Boolean,default:!0},keepOpen:{type:Boolean,default:!1},components:{type:Object,default:()=>({Deselect:{render:t=>t(dn,{props:{size:20,fillColor:"var(--vs-controls-color)"},style:{cursor:"pointer"}})}})},limit:{type:Number,default:null},disabled:{type:Boolean,default:!1},dropdownShouldOpen:{type:Function,default:({noDrop:t,open:e})=>t?!1:e},filterBy:{type:Function,default:null},inputClass:{type:[String,Object],default:null},inputId:{type:String,default:()=>`select-input-${Wt()}`},inputLabel:{type:String,default:null},labelOutside:{type:Boolean,default:!1},keyboardFocusBorder:{type:Boolean,default:!0},label:{type:String,default:null},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},noWrap:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},placeholder:{type:String,default:""},mapKeydown:{type:Function,default(t,e){return{...t,27:n=>{e.open&&n.stopPropagation(),t[27](n)}}}},uid:{type:String,default:()=>Wt()},placement:{type:String,default:"bottom"},resetFocusOnOptionsChange:{type:Boolean,default:!0},userSelect:{type:Boolean,default:!1},value:{type:[String,Number,Object,Array],default:void 0},modelValue:{type:[String,Number,Object,Array],default:null},required:{type:Boolean,default:!1}," ":{}},emits:[" ","input","update:modelValue","update:model-value"],setup(){const t=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),e=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline")),n=t-2*e,i=un("value","input");return{avatarSize:n,model:i}},data(){return{search:""}},computed:{inputRequired(){return this.required?this.model===null||Array.isArray(this.model)&&this.model.length===0:null},localCalculatePosition(){return this.calculatePosition!==null?this.calculatePosition:(t,e,{width:n})=>{t.style.width=n;const i={name:"addClass",fn(){return t.classList.add("vs__dropdown-menu--floating"),{}}},r={name:"togglePlacementClass",fn({placement:u}){return e.$el.classList.toggle("select--drop-up",u==="top"),t.classList.toggle("vs__dropdown-menu--floating-placement-top",u==="top"),{}}},d=()=>{cs(e.$refs.toggle,t,{placement:this.placement,middleware:[os(-1),i,r,as(),rs({limiter:ls()})]}).then(({x:u,y:o})=>{Object.assign(t.style,{left:`${u}px`,top:`${o}px`,width:`${e.$refs.toggle.getBoundingClientRect().width}px`})})};return is(e.$refs.toggle,t,d)}},localFilterBy(){const t=/[^<]*<([^>]+)/;return this.filterBy!==null?this.filterBy:this.userSelect?(e,n,i)=>{const r=i.match(t);return r&&e.subname?.toLocaleLowerCase?.()?.indexOf(r[1].toLocaleLowerCase())>-1||`${n} ${e.subname}`.toLocaleLowerCase().indexOf(i.toLocaleLowerCase())>-1}:X.VueSelect.props.filterBy.default},localLabel(){return this.label!==null?this.label:this.userSelect?"displayName":X.VueSelect.props.label.default},propsToForward(){const t=[...Object.keys(X.VueSelect.props),...X.VueSelect.mixins.flatMap(e=>Object.keys(e.props??{}))];return{...Object.fromEntries(Object.entries(this.$props).filter(([e])=>t.includes(e))),value:this.model,calculatePosition:this.localCalculatePosition,closeOnSelect:this.closeOnSelect&&!this.keepOpen,filterBy:this.localFilterBy,label:this.localLabel}},listenersToForward(){return{...this.$listeners,input:t=>{this.model=t}}}},mounted(){!this.labelOutside&&!this.inputLabel&&!this.ariaLabelCombobox&&kt.util.warn("[NcSelect] An `inputLabel` or `ariaLabelCombobox` should be set. If an external label is used, `labelOutside` should be set to `true`."),this.inputLabel&&this.ariaLabelCombobox&&kt.util.warn("[NcSelect] Only one of `inputLabel` or `ariaLabelCombobox` should to be set.")},methods:{t:B}};var Di=function(){var t=this,e=t._self._c;return e("VueSelect",t._g(t._b({staticClass:"select",class:{"select--no-wrap":t.noWrap,"user-select":t.userSelect},on:{search:n=>t.search=n},scopedSlots:t._u([!t.labelOutside&&t.inputLabel?{key:"header",fn:function(){return[e("label",{staticClass:"select__label",attrs:{for:t.inputId}},[t._v(" "+t._s(t.inputLabel)+" ")])]},proxy:!0}:null,{key:"search",fn:function({attributes:n,events:i}){return[e("input",t._g(t._b({staticClass:"vs__search",class:t.inputClass,attrs:{required:t.inputRequired,dir:"auto"}},"input",n,!1),i))]}},{key:"open-indicator",fn:function({attributes:n}){return[e("ChevronDown",t._b({style:{cursor:t.disabled?null:"pointer"},attrs:{"fill-color":"var(--vs-controls-color)",size:26}},"ChevronDown",n,!1))]}},{key:"option",fn:function(n){return[t._t("option",function(){return[t.userSelect?e("NcListItemIcon",t._b({attrs:{"avatar-size":32,name:n[t.localLabel],search:t.search}},"NcListItemIcon",n,!1)):e("NcEllipsisedOption",{attrs:{name:String(n[t.localLabel]),search:t.search}})]},null,n)]}},{key:"selected-option",fn:function(n){return[t._t("selected-option",function(){return[t.userSelect?e("NcListItemIcon",t._b({attrs:{"avatar-size":t.avatarSize,name:n[t.localLabel],"no-margin":"",search:t.search}},"NcListItemIcon",n,!1)):e("NcEllipsisedOption",{attrs:{name:String(n[t.localLabel]),search:t.search}})]},{vBind:n})]}},{key:"spinner",fn:function(n){return[n.loading?e("NcLoadingIcon"):t._e()]}},{key:"no-options",fn:function(){return[t._v(" "+t._s(t.t("No results"))+" ")]},proxy:!0},t._l(t.$scopedSlots,function(n,i){return{key:i,fn:function(r){return[t._t(i,null,null,r)]}}})],null,!0)},"VueSelect",t.propsToForward,!1),t.listenersToForward))},Bi=[],Ni=V(ki,Di,Bi,!1,null,null);const Pi=Ni.exports;export{Pi as default};
|
|
//# sourceMappingURL=NcSelect-B_LW9fCa.chunk.mjs.map
|