Files
nc-talk-ai/js/FilePicker-JKNLPCbR-BmYnnmsy.chunk.mjs
Pascal Kienast 0739d3da6a Initial open-source release of Talk AI
Talk AI is a multi-bot AI assistant manager for Nextcloud Talk:
per-bot prompts and models, agentic tool calling (MCP + built-in
tools), RAG over Nextcloud files, room-document search, vision and
speech-to-text attachments, persistent bot wikis, approval workflows,
rate limiting, and multi-provider LLM support (any OpenAI-compatible
endpoint).

Developed within EDUC - the European Digital UniverCity
(https://educalliance.eu), where it runs as the 'EDUC AI' assistant on
the alliance-wide Nextcloud portal. This public repository is the
upstream point of truth; deployment-specific tools plug in via the
tool-provider extension point (docs/TOOL_PROVIDERS.md).

License: AGPL-3.0-or-later.
2026-07-08 21:13:13 +02:00

13 lines
158 KiB
JavaScript

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('educai', '', 'js/NcColorPicker-Dc8R25Bt.chunk.mjs'),window.OC.filePath('educai', '', 'js/branding-cqWE0Otc.chunk.mjs'),window.OC.filePath('educai', '', 'js/NcTextField-Czr9S6YO-Dqy3Sh8C.chunk.mjs'),window.OC.filePath('educai', '', 'js/index-DSodDqU0.chunk.mjs'),window.OC.filePath('educai', '', 'js/NcDateTimePicker-Cok71ReF.chunk.mjs'),window.OC.filePath('educai', '', 'js/BotForm-S-ACeDfi.chunk.mjs')])))=>i.map(i=>d[i]);
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".material-design-icon[data-v-90a59812]{display:flex;align-self:center;justify-self:center;align-items:center;justify-content:center}button[data-v-90a59812]:not(.button-vue),input[data-v-90a59812]:not([type=range]),textarea[data-v-90a59812]{margin:0;padding:7px 6px;cursor:text;color:var(--color-text-lighter);border:1px solid var(--color-border-dark);border-radius:var(--border-radius);outline:none;background-color:var(--color-main-background);font-size:13px}button[data-v-90a59812]:not(.button-vue):not(:disabled):not(.primary):hover,button[data-v-90a59812]:not(.button-vue):not(:disabled):not(.primary):focus,button:not(.button-vue):not(:disabled):not(.primary).active[data-v-90a59812],input[data-v-90a59812]:not([type=range]):not(:disabled):not(.primary):hover,input[data-v-90a59812]:not([type=range]):not(:disabled):not(.primary):focus,input:not([type=range]):not(:disabled):not(.primary).active[data-v-90a59812],textarea[data-v-90a59812]:not(:disabled):not(.primary):hover,textarea[data-v-90a59812]:not(:disabled):not(.primary):focus,textarea:not(:disabled):not(.primary).active[data-v-90a59812]{border-color:var(--color-primary-element);outline:none}button[data-v-90a59812]:not(.button-vue):not(:disabled):not(.primary):active,input[data-v-90a59812]:not([type=range]):not(:disabled):not(.primary):active,textarea[data-v-90a59812]:not(:disabled):not(.primary):active{color:var(--color-text-light);outline:none;background-color:var(--color-main-background)}button[data-v-90a59812]:not(.button-vue):disabled,input[data-v-90a59812]:not([type=range]):disabled,textarea[data-v-90a59812]:disabled{cursor:default;opacity:.5;color:var(--color-text-maxcontrast);background-color:var(--color-background-dark)}button[data-v-90a59812]:not(.button-vue):required,input[data-v-90a59812]:not([type=range]):required,textarea[data-v-90a59812]:required{box-shadow:none}button[data-v-90a59812]:not(.button-vue):invalid,input[data-v-90a59812]:not([type=range]):invalid,textarea[data-v-90a59812]:invalid{border-color:var(--color-border-error, var(--color-error));box-shadow:none!important}button:not(.button-vue).primary[data-v-90a59812],input:not([type=range]).primary[data-v-90a59812],textarea.primary[data-v-90a59812]{cursor:pointer;color:var(--color-primary-element-text);border-color:var(--color-primary-element);background-color:var(--color-primary-element)}button:not(.button-vue).primary[data-v-90a59812]:not(:disabled):hover,button:not(.button-vue).primary[data-v-90a59812]:not(:disabled):focus,button:not(.button-vue).primary[data-v-90a59812]:not(:disabled):active,input:not([type=range]).primary[data-v-90a59812]:not(:disabled):hover,input:not([type=range]).primary[data-v-90a59812]:not(:disabled):focus,input:not([type=range]).primary[data-v-90a59812]:not(:disabled):active,textarea.primary[data-v-90a59812]:not(:disabled):hover,textarea.primary[data-v-90a59812]:not(:disabled):focus,textarea.primary[data-v-90a59812]:not(:disabled):active{border-color:var(--color-primary-element-light);background-color:var(--color-primary-element-light)}button:not(.button-vue).primary[data-v-90a59812]:not(:disabled):active,input:not([type=range]).primary[data-v-90a59812]:not(:disabled):active,textarea.primary[data-v-90a59812]:not(:disabled):active{color:var(--color-primary-element-text-dark)}button:not(.button-vue).primary[data-v-90a59812]:disabled,input:not([type=range]).primary[data-v-90a59812]:disabled,textarea.primary[data-v-90a59812]:disabled{cursor:default;color:var(--color-primary-element-text-dark);background-color:var(--color-primary-element)}li.action[data-v-90a59812]:hover,li.action.active[data-v-90a59812]{border-radius:6px;padding:0}li.action[data-v-90a59812]:hover{background-color:var(--color-background-hover)}.action--disabled[data-v-90a59812]{pointer-events:none;opacity:.5}.action--disabled[data-v-90a59812]:hover,.action--disabled[data-v-90a59812]:focus{cursor:default;opacity:.5}.action--disabled *[data-v-90a59812]{opacity:1!important}.action-input[data-v-90a59812]{display:flex;align-items:flex-start;width:100%;height:auto;margin:0;padding:0;cursor:pointer;white-space:nowrap;color:var(--color-main-text);border:0;border-radius:0;background-color:transparent;box-shadow:none;font-weight:400}.action-input__icon-wrapper[data-v-90a59812]{display:flex;align-self:center;align-items:center;justify-content:center}.action-input__icon-wrapper[data-v-90a59812] .material-design-icon{width:var(--default-clickable-area);height:var(--default-clickable-area);opacity:1}.action-input__icon-wrapper[data-v-90a59812] .material-design-icon .material-design-icon__svg{vertical-align:middle}.action-input>span[data-v-90a59812]{cursor:pointer;white-space:nowrap}.action-input__icon[data-v-90a59812]{min-width:0;min-height:0;padding:calc(var(--default-clickable-area) / 2) 0 calc(var(--default-clickable-area) / 2) var(--default-clickable-area);background-position:calc((var(--default-clickable-area) - 16px) / 2) center;background-size:16px}.action-input__form[data-v-90a59812]{display:flex;align-items:center;flex:1 1 auto;margin:4px 0;padding-inline-end:calc((var(--default-clickable-area) - 16px) / 2)}.action-input__container[data-v-90a59812]{position:relative;width:100%}.action-input__input-container[data-v-90a59812]{display:flex}.action-input__input-container .colorpicker__trigger[data-v-90a59812],.action-input__input-container .colorpicker__preview[data-v-90a59812]{width:100%}.action-input__input-container .colorpicker__preview[data-v-90a59812]{width:100%;height:36px;border-radius:var(--border-radius-large);border:2px solid var(--color-border-maxcontrast);box-shadow:none!important}.action-input__text-label[data-v-90a59812]{padding:4px 0;display:block}.action-input__text-label--hidden[data-v-90a59812]{position:absolute;inset-inline-start:0;width:1px;height:1px;overflow:hidden;z-index:-1;opacity:0}.action-input__datetimepicker[data-v-90a59812]{width:100%}.action-input__datetimepicker[data-v-90a59812] .mx-input{margin:0}.action-input__multi[data-v-90a59812]{width:100%}li:last-child>.action-input[data-v-90a59812]{padding-bottom:calc((var(--default-clickable-area) - 16px) / 2 - 4px)}li:first-child>.action-input[data-v-90a59812]:not(.action-input--visible-label){padding-top:calc((var(--default-clickable-area) - 16px) / 2 - 4px)}.material-design-icon[data-v-6c1feae8]{display:flex;align-self:center;justify-self:center;align-items:center;justify-content:center}.native-datetime-picker[data-v-6c1feae8]{display:flex;flex-direction:column}.native-datetime-picker .native-datetime-picker--label[data-v-6c1feae8]{margin-block-end:2px}.native-datetime-picker .native-datetime-picker--input[data-v-6c1feae8]{--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));width:100%;flex:0 0 auto;margin:0;padding-inline-start:calc(var(--border-radius-large) + var(--input-border-width-offset));padding-inline-end:calc(var(--default-grid-baseline) + var(--input-border-width-offset));border:var(--border-width-input, 2px) solid var(--color-border-maxcontrast)}.native-datetime-picker .native-datetime-picker--input[data-v-6c1feae8]:active:not([disabled]),.native-datetime-picker .native-datetime-picker--input[data-v-6c1feae8]:hover:not([disabled]),.native-datetime-picker .native-datetime-picker--input[data-v-6c1feae8]:focus:not([disabled]),.native-datetime-picker .native-datetime-picker--input[data-v-6c1feae8]:focus-within:not([disabled]){border-color:var(--color-main-text);border-width:var(--border-width-input-focused, 2px);box-shadow:0 0 0 2px var(--color-main-background)!important;--input-border-width-offset: 0px}[data-theme-light] .native-datetime-picker--input[data-v-6c1feae8],[data-themes*=light] .native-datetime-picker--input[data-v-6c1feae8]{color-scheme:light}[data-theme-dark] .native-datetime-picker--input[data-v-6c1feae8],[data-themes*=dark] .native-datetime-picker--input[data-v-6c1feae8]{color-scheme:dark}@media(prefers-color-scheme:light){[data-theme-default] .native-datetime-picker--input[data-v-6c1feae8],[data-themes*=default] .native-datetime-picker--input[data-v-6c1feae8]{color-scheme:light}}@media(prefers-color-scheme:dark){[data-theme-default] .native-datetime-picker--input[data-v-6c1feae8],[data-themes*=default] .native-datetime-picker--input[data-v-6c1feae8]{color-scheme:dark}}.material-design-icon[data-v-0800cef1]{display:flex;align-self:center;justify-self:center;align-items:center;justify-content:center}[data-v-0800cef1] .password-field__input--secure-text{-webkit-text-security:disc}.material-design-icon[data-v-bc2f0c21]{display:flex;align-self:center;justify-self:center;align-items:center;justify-content:center}.vue-crumb[data-v-bc2f0c21]{background-image:none;display:inline-flex;height:var(--default-clickable-area);padding:0}.vue-crumb[data-v-bc2f0c21]:last-child{min-width:0}.vue-crumb:last-child .vue-crumb__separator[data-v-bc2f0c21]{display:none}.vue-crumb--hidden[data-v-bc2f0c21]{display:none}.vue-crumb__separator[data-v-bc2f0c21]{padding:0;color:var(--color-text-maxcontrast)}.vue-crumb.vue-crumb--hovered[data-v-bc2f0c21] .button-vue{background-color:var(--color-background-dark);color:var(--color-main-text)}.vue-crumb[data-v-bc2f0c21]:not(:last-child) .button-vue{color:var(--color-text-maxcontrast)}.vue-crumb[data-v-bc2f0c21]:not(:last-child) .button-vue:hover,.vue-crumb[data-v-bc2f0c21]:not(:last-child) .button-vue:focus{background-color:var(--color-background-dark);color:var(--color-main-text)}.vue-crumb[data-v-bc2f0c21]:not(:last-child) .button-vue__text{font-weight:400}.vue-crumb[data-v-bc2f0c21] .button-vue__text{margin:0}.vue-crumb[data-v-bc2f0c21]:not(.dropdown) .action-item{max-width:100%}.vue-crumb[data-v-bc2f0c21]:not(.dropdown) .action-item .button-vue{padding:0 4px 0 16px;max-width:100%}.vue-crumb[data-v-bc2f0c21]:not(.dropdown) .action-item .button-vue__wrapper{flex-direction:row-reverse}.vue-crumb[data-v-bc2f0c21]:not(.dropdown) .action-item.action-item--open .action-item__menutoggle{background-color:var(--color-background-dark);color:var(--color-main-text)}.material-design-icon[data-v-8d4e090c]{display:flex;align-self:center;justify-self:center;align-items:center;justify-content:center}.breadcrumb[data-v-8d4e090c]{width:100%;flex-grow:1;display:inline-flex;align-items:center}.breadcrumb--collapsed[data-v-8d4e090c] .vue-crumb:last-child{min-width:100px}.breadcrumb nav[data-v-8d4e090c]{flex-shrink:1;min-width:0}.breadcrumb .breadcrumb__crumbs[data-v-8d4e090c]{max-width:100%}.breadcrumb .breadcrumb__crumbs[data-v-8d4e090c],.breadcrumb .breadcrumb__actions[data-v-8d4e090c]{display:inline-flex}")),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
import{u as bt,g as mt,h as Yi,A as Wi,f as mi,c as Zi,j as Qi,k as Ki,b as Ji,N as vi,e as en,l as bi}from"./NcTextField-Czr9S6YO-Dqy3Sh8C.chunk.mjs";import{aF as me,aG as $e,g as ue,h as ye,aH as tn,aI as nn,r as z,aJ as rn,i as P,G as ze,ap as yt,aK as Ke,D as yi,v as Et,aL as an,t as be,ae as ce,aM as Ei,aN as wi,e as sn,aO as He,S as on,aP as ln,c as wt,l as cn,u as un,aQ as fn,d as Je,k as _t,$ as Nt,V as Me,aw as dn,ax as hn,aR as ae,B as K,aS as vt,ah as _i,ac as Be,a3 as pn,b as Tt,H as gn,j as Ni,aT as mn}from"./branding-cqWE0Otc.chunk.mjs";import{F as Te,_ as et,g as vn,i as Ti,a as bn,d as Ct,C as Ci,b as yn,r as It,c as Ii,e as En,P as $t}from"./BotForm-S-ACeDfi.chunk.mjs";import{g as wn,l as _n}from"./index-DSodDqU0.chunk.mjs";function ao(){if(typeof globalThis.firstDay<"u")return globalThis.firstDay;const e=new Intl.Locale(me()),i=e.getWeekInfo?.()??e.weekInfo;return i?i.firstDay%7:1}function so(){if(typeof globalThis.dayNames<"u")return globalThis.dayNames;const e=me();return[new Date(1970,0,4).toLocaleDateString(e,{weekday:"long"}),new Date(1970,0,5).toLocaleDateString(e,{weekday:"long"}),new Date(1970,0,6).toLocaleDateString(e,{weekday:"long"}),new Date(1970,0,7).toLocaleDateString(e,{weekday:"long"}),new Date(1970,0,8).toLocaleDateString(e,{weekday:"long"}),new Date(1970,0,9).toLocaleDateString(e,{weekday:"long"}),new Date(1970,0,10).toLocaleDateString(e,{weekday:"long"})]}function oo(){if(typeof globalThis.dayNamesShort<"u")return globalThis.dayNamesShort;const e=me();return[new Date(1970,0,4).toLocaleDateString(e,{weekday:"short"}),new Date(1970,0,5).toLocaleDateString(e,{weekday:"short"}),new Date(1970,0,6).toLocaleDateString(e,{weekday:"short"}),new Date(1970,0,7).toLocaleDateString(e,{weekday:"short"}),new Date(1970,0,8).toLocaleDateString(e,{weekday:"short"}),new Date(1970,0,9).toLocaleDateString(e,{weekday:"short"}),new Date(1970,0,10).toLocaleDateString(e,{weekday:"short"})]}function lo(){if(typeof globalThis.dayNamesMin<"u")return globalThis.dayNamesMin;const e=me();return[new Date(1970,0,4).toLocaleDateString(e,{weekday:"narrow"}),new Date(1970,0,5).toLocaleDateString(e,{weekday:"narrow"}),new Date(1970,0,6).toLocaleDateString(e,{weekday:"narrow"}),new Date(1970,0,7).toLocaleDateString(e,{weekday:"narrow"}),new Date(1970,0,8).toLocaleDateString(e,{weekday:"narrow"}),new Date(1970,0,9).toLocaleDateString(e,{weekday:"narrow"}),new Date(1970,0,10).toLocaleDateString(e,{weekday:"narrow"})]}function co(){if(typeof globalThis.monthNames<"u")return globalThis.monthNames;const e=me();return[new Date(1970,0).toLocaleDateString(e,{month:"long"}),new Date(1970,1).toLocaleDateString(e,{month:"long"}),new Date(1970,2).toLocaleDateString(e,{month:"long"}),new Date(1970,3).toLocaleDateString(e,{month:"long"}),new Date(1970,4).toLocaleDateString(e,{month:"long"}),new Date(1970,5).toLocaleDateString(e,{month:"long"}),new Date(1970,6).toLocaleDateString(e,{month:"long"}),new Date(1970,7).toLocaleDateString(e,{month:"long"}),new Date(1970,8).toLocaleDateString(e,{month:"long"}),new Date(1970,9).toLocaleDateString(e,{month:"long"}),new Date(1970,10).toLocaleDateString(e,{month:"long"}),new Date(1970,11).toLocaleDateString(e,{month:"long"})]}function uo(){if(typeof globalThis.monthNamesShort<"u")return globalThis.monthNamesShort;const e=me();return[new Date(1970,0).toLocaleDateString(e,{month:"short"}),new Date(1970,1).toLocaleDateString(e,{month:"short"}),new Date(1970,2).toLocaleDateString(e,{month:"short"}),new Date(1970,3).toLocaleDateString(e,{month:"short"}),new Date(1970,4).toLocaleDateString(e,{month:"short"}),new Date(1970,5).toLocaleDateString(e,{month:"short"}),new Date(1970,6).toLocaleDateString(e,{month:"short"}),new Date(1970,7).toLocaleDateString(e,{month:"short"}),new Date(1970,8).toLocaleDateString(e,{month:"short"}),new Date(1970,9).toLocaleDateString(e,{month:"short"}),new Date(1970,10).toLocaleDateString(e,{month:"short"}),new Date(1970,11).toLocaleDateString(e,{month:"short"})]}function Nn(e=Date.now(),i={}){const n={ignoreSeconds:!1,language:$e(),relativeTime:"long",...i},o=new Date(e),l=new Intl.RelativeTimeFormat([n.language,$e()],{numeric:"auto",style:n.relativeTime}),u=(o.getTime()-Date.now())/1e3;if(Math.abs(u)<59.5)return n.ignoreSeconds||l.format(Math.round(u),"second");const d=u/60;if(Math.abs(d)<=59)return l.format(Math.round(d),"minute");const m=d/60;if(Math.abs(m)<23.5)return l.format(Math.round(m),"hour");const p=m/24;if(Math.abs(p)<6.5)return l.format(Math.round(p),"day");if(Math.abs(p)<27.5){const _=p/7;return l.format(Math.round(_),"week")}const f=p/30,h=Math.abs(f)<11?{month:n.relativeTime,day:"numeric"}:{year:n.relativeTime==="narrow"?"2-digit":"numeric",month:n.relativeTime};return new Intl.DateTimeFormat([n.language,$e()],h).format(o)}const Tn=ye({name:"NcDialog",components:{NcDialogButton:nn,NcModal:tn},props:{name:{type:String,required:!0},message:{type:String,default:""},additionalTrapElements:{type:Array,validator:e=>Array.isArray(e)&&e.every(i=>typeof i=="string"||i instanceof HTMLElement),default:()=>[]},container:{type:String,required:!1,default:"body"},open:{type:Boolean,default:!0},size:{type:String,required:!1,default:"small",validator:e=>typeof e=="string"&&["small","normal","large","full"].includes(e)},buttons:{type:Array,required:!1,default:()=>[],validator:e=>Array.isArray(e)&&e.every(i=>typeof i=="object")},noClose:{type:Boolean,default:!1},canClose:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!1},isForm:{type:Boolean,default:!1},outTransition:{type:Boolean,default:!1},navigationClasses:{type:[String,Array,Object],required:!1,default:""},navigationAriaLabel:{type:String,required:!1,default:""},navigationAriaLabelledby:{type:String,required:!1,default:""},contentClasses:{type:[String,Array,Object],required:!1,default:""},dialogClasses:{type:[String,Array,Object],required:!1,default:""}},emits:["closing","update:open","submit"],setup(e,{emit:i,slots:n}){const o=z(),{width:l}=rn(o,{width:900}),u=P(()=>l.value<876),d=P(()=>n?.navigation!==void 0),m=ze(),p=P(()=>e.navigationAriaLabel||void 0),f=P(()=>{if(!e.navigationAriaLabel)return e.navigationAriaLabelledby||m}),h=z(),_=P(()=>e.isForm&&!d.value?"form":"div"),L=P(()=>_.value==="form"?{submit(w){w.preventDefault(),i("submit",w)},reset(w){w.preventDefault(),i("reset",w)}}:{}),O=z(!0);function B(w,S){(w.type==="submit"||w.nativeType==="submit")&&_.value==="form"&&!h.value.reportValidity()||(I(S),window.setTimeout(()=>k(),300))}function I(w){O.value=!1,i("closing",w)}function k(){O.value=!0,i("update:open",!1)}const N=P(()=>({noClose:e.noClose||!e.canClose,container:e.container===void 0?"body":e.container,labelId:m,size:e.size,show:e.open&&O.value,outTransition:e.outTransition,closeOnClickOutside:e.closeOnClickOutside,additionalTrapElements:e.additionalTrapElements}));return{dialogElement:h,dialogListeners:L,dialogTagName:_,handleButtonClose:B,handleClosing:I,handleClosed:k,hasNavigation:d,navigationId:m,navigationAriaLabelAttr:p,navigationAriaLabelledbyAttr:f,isNavigationCollapsed:u,modalProps:N,wrapper:o}}});var Cn=function(){var e=this,i=e._self._c;return e._self._setupProxy,e.open?i("NcModal",e._b({staticClass:"dialog__modal",attrs:{"enable-slideshow":!1,"enable-swipe":!1},on:{close:e.handleClosed,"update:show":function(n){return e.handleClosing()}}},"NcModal",e.modalProps,!1),[i("h2",{staticClass:"dialog__name",attrs:{id:e.navigationId},domProps:{textContent:e._s(e.name)}}),i(e.dialogTagName,e._g({ref:"dialogElement",tag:"component",staticClass:"dialog",class:e.dialogClasses},e.dialogListeners),[i("div",{ref:"wrapper",staticClass:"dialog__wrapper",class:{"dialog__wrapper--collapsed":e.isNavigationCollapsed}},[e.hasNavigation?i("nav",{staticClass:"dialog__navigation",class:e.navigationClasses,attrs:{"aria-label":e.navigationAriaLabelAttr,"aria-labelledby":e.navigationAriaLabelledbyAttr}},[e._t("navigation",null,{isCollapsed:e.isNavigationCollapsed})],2):e._e(),i("div",{staticClass:"dialog__content",class:e.contentClasses},[e._t("default",function(){return[i("p",{staticClass:"dialog__text"},[e._v(" "+e._s(e.message)+" ")])]})],2)]),i("div",{staticClass:"dialog__actions"},[e._t("actions",function(){return e._l(e.buttons,function(n,o){return i("NcDialogButton",e._b({key:o,on:{click:(l,u)=>e.handleButtonClose(n,u)}},"NcDialogButton",n,!1))})})],2)])],1):e._e()},In=[],Sn=ue(Tn,Cn,In,!1,null,"66c29e13");const An=Sn.exports;var tt={},it={exports:{}},Mt={},Vt;function Ln(){return Vt||(Vt=1,(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var i={},n={};n.byteLength=h,n.toByteArray=L,n.fromByteArray=I;for(var o=[],l=[],u=typeof Uint8Array<"u"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,p=d.length;m<p;++m)o[m]=d[m],l[d.charCodeAt(m)]=m;l[45]=62,l[95]=63;function f(w){var S=w.length;if(S%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var A=w.indexOf("=");A===-1&&(A=S);var F=A===S?0:4-A%4;return[A,F]}function h(w){var S=f(w),A=S[0],F=S[1];return(A+F)*3/4-F}function _(w,S,A){return(S+A)*3/4-A}function L(w){var S,A=f(w),F=A[0],$=A[1],D=new u(_(w,F,$)),x=0,v=$>0?F-4:F,U;for(U=0;U<v;U+=4)S=l[w.charCodeAt(U)]<<18|l[w.charCodeAt(U+1)]<<12|l[w.charCodeAt(U+2)]<<6|l[w.charCodeAt(U+3)],D[x++]=S>>16&255,D[x++]=S>>8&255,D[x++]=S&255;return $===2&&(S=l[w.charCodeAt(U)]<<2|l[w.charCodeAt(U+1)]>>4,D[x++]=S&255),$===1&&(S=l[w.charCodeAt(U)]<<10|l[w.charCodeAt(U+1)]<<4|l[w.charCodeAt(U+2)]>>2,D[x++]=S>>8&255,D[x++]=S&255),D}function O(w){return o[w>>18&63]+o[w>>12&63]+o[w>>6&63]+o[w&63]}function B(w,S,A){for(var F,$=[],D=S;D<A;D+=3)F=(w[D]<<16&16711680)+(w[D+1]<<8&65280)+(w[D+2]&255),$.push(O(F));return $.join("")}function I(w){for(var S,A=w.length,F=A%3,$=[],D=16383,x=0,v=A-F;x<v;x+=D)$.push(B(w,x,x+D>v?v:x+D));return F===1?(S=w[A-1],$.push(o[S>>2]+o[S<<4&63]+"==")):F===2&&(S=(w[A-2]<<8)+w[A-1],$.push(o[S>>10]+o[S>>4&63]+o[S<<2&63]+"=")),$.join("")}var k={};k.read=function(w,S,A,F,$){var D,x,v=$*8-F-1,U=(1<<v)-1,X=U>>1,y=-7,q=A?$-1:0,oe=A?-1:1,ee=w[S+q];for(q+=oe,D=ee&(1<<-y)-1,ee>>=-y,y+=v;y>0;D=D*256+w[S+q],q+=oe,y-=8);for(x=D&(1<<-y)-1,D>>=-y,y+=F;y>0;x=x*256+w[S+q],q+=oe,y-=8);if(D===0)D=1-X;else{if(D===U)return x?NaN:(ee?-1:1)*(1/0);x=x+Math.pow(2,F),D=D-X}return(ee?-1:1)*x*Math.pow(2,D-F)},k.write=function(w,S,A,F,$,D){var x,v,U,X=D*8-$-1,y=(1<<X)-1,q=y>>1,oe=$===23?Math.pow(2,-24)-Math.pow(2,-77):0,ee=F?0:D-1,fe=F?1:-1,M=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(v=isNaN(S)?1:0,x=y):(x=Math.floor(Math.log(S)/Math.LN2),S*(U=Math.pow(2,-x))<1&&(x--,U*=2),x+q>=1?S+=oe/U:S+=oe*Math.pow(2,1-q),S*U>=2&&(x++,U/=2),x+q>=y?(v=0,x=y):x+q>=1?(v=(S*U-1)*Math.pow(2,$),x=x+q):(v=S*Math.pow(2,q-1)*Math.pow(2,$),x=0));$>=8;w[A+ee]=v&255,ee+=fe,v/=256,$-=8);for(x=x<<$|v,X+=$;X>0;w[A+ee]=x&255,ee+=fe,x/=256,X-=8);w[A+ee-fe]|=M*128},(function(w){const S=n,A=k,F=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;w.Buffer=y,w.SlowBuffer=qe,w.INSPECT_MAX_BYTES=50;const $=2147483647;w.kMaxLength=$;const{Uint8Array:D,ArrayBuffer:x,SharedArrayBuffer:v}=globalThis;y.TYPED_ARRAY_SUPPORT=U(),!y.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function U(){try{const t=new D(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,D.prototype),Object.setPrototypeOf(t,r),t.foo()===42}catch{return!1}}Object.defineProperty(y.prototype,"parent",{enumerable:!0,get:function(){if(y.isBuffer(this))return this.buffer}}),Object.defineProperty(y.prototype,"offset",{enumerable:!0,get:function(){if(y.isBuffer(this))return this.byteOffset}});function X(t){if(t>$)throw new RangeError('The value "'+t+'" is invalid for option "size"');const r=new D(t);return Object.setPrototypeOf(r,y.prototype),r}function y(t,r,a){if(typeof t=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return fe(t)}return q(t,r,a)}y.poolSize=8192;function q(t,r,a){if(typeof t=="string")return M(t,r);if(x.isView(t))return Ie(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(de(t,x)||t&&de(t.buffer,x)||typeof v<"u"&&(de(t,v)||t&&de(t.buffer,v)))return we(t,r,a);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=t.valueOf&&t.valueOf();if(g!=null&&g!==t)return y.from(g,r,a);const E=he(t);if(E)return E;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return y.from(t[Symbol.toPrimitive]("string"),r,a);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}y.from=function(t,r,a){return q(t,r,a)},Object.setPrototypeOf(y.prototype,D.prototype),Object.setPrototypeOf(y,D);function oe(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function ee(t,r,a){return oe(t),t<=0?X(t):r!==void 0?typeof a=="string"?X(t).fill(r,a):X(t).fill(r):X(t)}y.alloc=function(t,r,a){return ee(t,r,a)};function fe(t){return oe(t),X(t<0?0:Ee(t)|0)}y.allocUnsafe=function(t){return fe(t)},y.allocUnsafeSlow=function(t){return fe(t)};function M(t,r){if((typeof r!="string"||r==="")&&(r="utf8"),!y.isEncoding(r))throw new TypeError("Unknown encoding: "+r);const a=Se(t,r)|0;let g=X(a);const E=g.write(t,r);return E!==a&&(g=g.slice(0,E)),g}function Ce(t){const r=t.length<0?0:Ee(t.length)|0,a=X(r);for(let g=0;g<r;g+=1)a[g]=t[g]&255;return a}function Ie(t){if(de(t,D)){const r=new D(t);return we(r.buffer,r.byteOffset,r.byteLength)}return Ce(t)}function we(t,r,a){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(a||0))throw new RangeError('"length" is outside of buffer bounds');let g;return r===void 0&&a===void 0?g=new D(t):a===void 0?g=new D(t,r):g=new D(t,r,a),Object.setPrototypeOf(g,y.prototype),g}function he(t){if(y.isBuffer(t)){const r=Ee(t.length)|0,a=X(r);return a.length===0||t.copy(a,0,0,r),a}if(t.length!==void 0)return typeof t.length!="number"||Qe(t.length)?X(0):Ce(t);if(t.type==="Buffer"&&Array.isArray(t.data))return Ce(t.data)}function Ee(t){if(t>=$)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$.toString(16)+" bytes");return t|0}function qe(t){return+t!=t&&(t=0),y.alloc(+t)}y.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==y.prototype},y.compare=function(t,r){if(de(t,D)&&(t=y.from(t,t.offset,t.byteLength)),de(r,D)&&(r=y.from(r,r.offset,r.byteLength)),!y.isBuffer(t)||!y.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let a=t.length,g=r.length;for(let E=0,T=Math.min(a,g);E<T;++E)if(t[E]!==r[E]){a=t[E],g=r[E];break}return a<g?-1:g<a?1:0},y.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},y.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return y.alloc(0);let a;if(r===void 0)for(r=0,a=0;a<t.length;++a)r+=t[a].length;const g=y.allocUnsafe(r);let E=0;for(a=0;a<t.length;++a){let T=t[a];if(de(T,D))E+T.length>g.length?(y.isBuffer(T)||(T=y.from(T)),T.copy(g,E)):D.prototype.set.call(g,T,E);else if(y.isBuffer(T))T.copy(g,E);else throw new TypeError('"list" argument must be an Array of Buffers');E+=T.length}return g};function Se(t,r){if(y.isBuffer(t))return t.length;if(x.isView(t)||de(t,x))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const a=t.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&a===0)return 0;let E=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return a;case"utf8":case"utf-8":return Ze(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a*2;case"hex":return a>>>1;case"base64":return Pt(t).length;default:if(E)return g?-1:Ze(t).length;r=(""+r).toLowerCase(),E=!0}}y.byteLength=Se;function xe(t,r,a){let g=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((a===void 0||a>this.length)&&(a=this.length),a<=0)||(a>>>=0,r>>>=0,a<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return Fe(this,r,a);case"utf8":case"utf-8":return te(this,r,a);case"ascii":return le(this,r,a);case"latin1":case"binary":return Ye(this,r,a);case"base64":return ne(this,r,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ae(this,r,a);default:if(g)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),g=!0}}y.prototype._isBuffer=!0;function pe(t,r,a){const g=t[r];t[r]=t[a],t[a]=g}y.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)pe(this,r,r+1);return this},y.prototype.swap32=function(){const t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)pe(this,r,r+3),pe(this,r+1,r+2);return this},y.prototype.swap64=function(){const t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)pe(this,r,r+7),pe(this,r+1,r+6),pe(this,r+2,r+5),pe(this,r+3,r+4);return this},y.prototype.toString=function(){const t=this.length;return t===0?"":arguments.length===0?te(this,0,t):xe.apply(this,arguments)},y.prototype.toLocaleString=y.prototype.toString,y.prototype.equals=function(t){if(!y.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:y.compare(this,t)===0},y.prototype.inspect=function(){let t="";const r=w.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},F&&(y.prototype[F]=y.prototype.inspect),y.prototype.compare=function(t,r,a,g,E){if(de(t,D)&&(t=y.from(t,t.offset,t.byteLength)),!y.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),a===void 0&&(a=t?t.length:0),g===void 0&&(g=0),E===void 0&&(E=this.length),r<0||a>t.length||g<0||E>this.length)throw new RangeError("out of range index");if(g>=E&&r>=a)return 0;if(g>=E)return-1;if(r>=a)return 1;if(r>>>=0,a>>>=0,g>>>=0,E>>>=0,this===t)return 0;let T=E-g,R=a-r;const G=Math.min(T,R),ie=this.slice(g,E),j=t.slice(r,a);for(let H=0;H<G;++H)if(ie[H]!==j[H]){T=ie[H],R=j[H];break}return T<R?-1:R<T?1:0};function c(t,r,a,g,E){if(t.length===0)return-1;if(typeof a=="string"?(g=a,a=0):a>2147483647?a=2147483647:a<-2147483648&&(a=-2147483648),a=+a,Qe(a)&&(a=E?0:t.length-1),a<0&&(a=t.length+a),a>=t.length){if(E)return-1;a=t.length-1}else if(a<0)if(E)a=0;else return-1;if(typeof r=="string"&&(r=y.from(r,g)),y.isBuffer(r))return r.length===0?-1:s(t,r,a,g,E);if(typeof r=="number")return r=r&255,typeof D.prototype.indexOf=="function"?E?D.prototype.indexOf.call(t,r,a):D.prototype.lastIndexOf.call(t,r,a):s(t,[r],a,g,E);throw new TypeError("val must be string, number or Buffer")}function s(t,r,a,g,E){let T=1,R=t.length,G=r.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(t.length<2||r.length<2)return-1;T=2,R/=2,G/=2,a/=2}function ie(H,Q){return T===1?H[Q]:H.readUInt16BE(Q*T)}let j;if(E){let H=-1;for(j=a;j<R;j++)if(ie(t,j)===ie(r,H===-1?0:j-H)){if(H===-1&&(H=j),j-H+1===G)return H*T}else H!==-1&&(j-=j-H),H=-1}else for(a+G>R&&(a=R-G),j=a;j>=0;j--){let H=!0;for(let Q=0;Q<G;Q++)if(ie(t,j+Q)!==ie(r,Q)){H=!1;break}if(H)return j}return-1}y.prototype.includes=function(t,r,a){return this.indexOf(t,r,a)!==-1},y.prototype.indexOf=function(t,r,a){return c(this,t,r,a,!0)},y.prototype.lastIndexOf=function(t,r,a){return c(this,t,r,a,!1)};function C(t,r,a,g){a=Number(a)||0;const E=t.length-a;g?(g=Number(g),g>E&&(g=E)):g=E;const T=r.length;g>T/2&&(g=T/2);let R;for(R=0;R<g;++R){const G=parseInt(r.substr(R*2,2),16);if(Qe(G))return R;t[a+R]=G}return R}function b(t,r,a,g){return ke(Ze(r,t.length-a),t,a,g)}function V(t,r,a,g){return ke(Gi(r),t,a,g)}function Y(t,r,a,g){return ke(Pt(r),t,a,g)}function W(t,r,a,g){return ke(ji(r,t.length-a),t,a,g)}y.prototype.write=function(t,r,a,g){if(r===void 0)g="utf8",a=this.length,r=0;else if(a===void 0&&typeof r=="string")g=r,a=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(a)?(a=a>>>0,g===void 0&&(g="utf8")):(g=a,a=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const E=this.length-r;if((a===void 0||a>E)&&(a=E),t.length>0&&(a<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");g||(g="utf8");let T=!1;for(;;)switch(g){case"hex":return C(this,t,r,a);case"utf8":case"utf-8":return b(this,t,r,a);case"ascii":case"latin1":case"binary":return V(this,t,r,a);case"base64":return Y(this,t,r,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,t,r,a);default:if(T)throw new TypeError("Unknown encoding: "+g);g=(""+g).toLowerCase(),T=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ne(t,r,a){return r===0&&a===t.length?S.fromByteArray(t):S.fromByteArray(t.slice(r,a))}function te(t,r,a){a=Math.min(t.length,a);const g=[];let E=r;for(;E<a;){const T=t[E];let R=null,G=T>239?4:T>223?3:T>191?2:1;if(E+G<=a){let ie,j,H,Q;switch(G){case 1:T<128&&(R=T);break;case 2:ie=t[E+1],(ie&192)===128&&(Q=(T&31)<<6|ie&63,Q>127&&(R=Q));break;case 3:ie=t[E+1],j=t[E+2],(ie&192)===128&&(j&192)===128&&(Q=(T&15)<<12|(ie&63)<<6|j&63,Q>2047&&(Q<55296||Q>57343)&&(R=Q));break;case 4:ie=t[E+1],j=t[E+2],H=t[E+3],(ie&192)===128&&(j&192)===128&&(H&192)===128&&(Q=(T&15)<<18|(ie&63)<<12|(j&63)<<6|H&63,Q>65535&&Q<1114112&&(R=Q))}}R===null?(R=65533,G=1):R>65535&&(R-=65536,g.push(R>>>10&1023|55296),R=56320|R&1023),g.push(R),E+=G}return J(g)}const ge=4096;function J(t){const r=t.length;if(r<=ge)return String.fromCharCode.apply(String,t);let a="",g=0;for(;g<r;)a+=String.fromCharCode.apply(String,t.slice(g,g+=ge));return a}function le(t,r,a){let g="";a=Math.min(t.length,a);for(let E=r;E<a;++E)g+=String.fromCharCode(t[E]&127);return g}function Ye(t,r,a){let g="";a=Math.min(t.length,a);for(let E=r;E<a;++E)g+=String.fromCharCode(t[E]);return g}function Fe(t,r,a){const g=t.length;(!r||r<0)&&(r=0),(!a||a<0||a>g)&&(a=g);let E="";for(let T=r;T<a;++T)E+=Xi[t[T]];return E}function Ae(t,r,a){const g=t.slice(r,a);let E="";for(let T=0;T<g.length-1;T+=2)E+=String.fromCharCode(g[T]+g[T+1]*256);return E}y.prototype.slice=function(t,r){const a=this.length;t=~~t,r=r===void 0?a:~~r,t<0?(t+=a,t<0&&(t=0)):t>a&&(t=a),r<0?(r+=a,r<0&&(r=0)):r>a&&(r=a),r<t&&(r=t);const g=this.subarray(t,r);return Object.setPrototypeOf(g,y.prototype),g};function Z(t,r,a){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>a)throw new RangeError("Trying to access beyond buffer length")}y.prototype.readUintLE=y.prototype.readUIntLE=function(t,r,a){t=t>>>0,r=r>>>0,a||Z(t,r,this.length);let g=this[t],E=1,T=0;for(;++T<r&&(E*=256);)g+=this[t+T]*E;return g},y.prototype.readUintBE=y.prototype.readUIntBE=function(t,r,a){t=t>>>0,r=r>>>0,a||Z(t,r,this.length);let g=this[t+--r],E=1;for(;r>0&&(E*=256);)g+=this[t+--r]*E;return g},y.prototype.readUint8=y.prototype.readUInt8=function(t,r){return t=t>>>0,r||Z(t,1,this.length),this[t]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||Z(t,2,this.length),this[t]|this[t+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||Z(t,2,this.length),this[t]<<8|this[t+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||Z(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},y.prototype.readUint32BE=y.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||Z(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},y.prototype.readBigUInt64LE=ve(function(t){t=t>>>0,Ne(t,"offset");const r=this[t],a=this[t+7];(r===void 0||a===void 0)&&Le(t,this.length-8);const g=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,E=this[++t]+this[++t]*2**8+this[++t]*2**16+a*2**24;return BigInt(g)+(BigInt(E)<<BigInt(32))}),y.prototype.readBigUInt64BE=ve(function(t){t=t>>>0,Ne(t,"offset");const r=this[t],a=this[t+7];(r===void 0||a===void 0)&&Le(t,this.length-8);const g=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],E=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+a;return(BigInt(g)<<BigInt(32))+BigInt(E)}),y.prototype.readIntLE=function(t,r,a){t=t>>>0,r=r>>>0,a||Z(t,r,this.length);let g=this[t],E=1,T=0;for(;++T<r&&(E*=256);)g+=this[t+T]*E;return E*=128,g>=E&&(g-=Math.pow(2,8*r)),g},y.prototype.readIntBE=function(t,r,a){t=t>>>0,r=r>>>0,a||Z(t,r,this.length);let g=r,E=1,T=this[t+--g];for(;g>0&&(E*=256);)T+=this[t+--g]*E;return E*=128,T>=E&&(T-=Math.pow(2,8*r)),T},y.prototype.readInt8=function(t,r){return t=t>>>0,r||Z(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},y.prototype.readInt16LE=function(t,r){t=t>>>0,r||Z(t,2,this.length);const a=this[t]|this[t+1]<<8;return a&32768?a|4294901760:a},y.prototype.readInt16BE=function(t,r){t=t>>>0,r||Z(t,2,this.length);const a=this[t+1]|this[t]<<8;return a&32768?a|4294901760:a},y.prototype.readInt32LE=function(t,r){return t=t>>>0,r||Z(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},y.prototype.readInt32BE=function(t,r){return t=t>>>0,r||Z(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},y.prototype.readBigInt64LE=ve(function(t){t=t>>>0,Ne(t,"offset");const r=this[t],a=this[t+7];(r===void 0||a===void 0)&&Le(t,this.length-8);const g=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(a<<24);return(BigInt(g)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)}),y.prototype.readBigInt64BE=ve(function(t){t=t>>>0,Ne(t,"offset");const r=this[t],a=this[t+7];(r===void 0||a===void 0)&&Le(t,this.length-8);const g=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(g)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+a)}),y.prototype.readFloatLE=function(t,r){return t=t>>>0,r||Z(t,4,this.length),A.read(this,t,!0,23,4)},y.prototype.readFloatBE=function(t,r){return t=t>>>0,r||Z(t,4,this.length),A.read(this,t,!1,23,4)},y.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||Z(t,8,this.length),A.read(this,t,!0,52,8)},y.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||Z(t,8,this.length),A.read(this,t,!1,52,8)};function se(t,r,a,g,E,T){if(!y.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>E||r<T)throw new RangeError('"value" argument is out of bounds');if(a+g>t.length)throw new RangeError("Index out of range")}y.prototype.writeUintLE=y.prototype.writeUIntLE=function(t,r,a,g){if(t=+t,r=r>>>0,a=a>>>0,!g){const R=Math.pow(2,8*a)-1;se(this,t,r,a,R,0)}let E=1,T=0;for(this[r]=t&255;++T<a&&(E*=256);)this[r+T]=t/E&255;return r+a},y.prototype.writeUintBE=y.prototype.writeUIntBE=function(t,r,a,g){if(t=+t,r=r>>>0,a=a>>>0,!g){const R=Math.pow(2,8*a)-1;se(this,t,r,a,R,0)}let E=a-1,T=1;for(this[r+E]=t&255;--E>=0&&(T*=256);)this[r+E]=t/T&255;return r+a},y.prototype.writeUint8=y.prototype.writeUInt8=function(t,r,a){return t=+t,r=r>>>0,a||se(this,t,r,1,255,0),this[r]=t&255,r+1},y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(t,r,a){return t=+t,r=r>>>0,a||se(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2},y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(t,r,a){return t=+t,r=r>>>0,a||se(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2},y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(t,r,a){return t=+t,r=r>>>0,a||se(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4},y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(t,r,a){return t=+t,r=r>>>0,a||se(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function Dt(t,r,a,g,E){kt(r,g,E,t,a,7);let T=Number(r&BigInt(4294967295));t[a++]=T,T=T>>8,t[a++]=T,T=T>>8,t[a++]=T,T=T>>8,t[a++]=T;let R=Number(r>>BigInt(32)&BigInt(4294967295));return t[a++]=R,R=R>>8,t[a++]=R,R=R>>8,t[a++]=R,R=R>>8,t[a++]=R,a}function Ot(t,r,a,g,E){kt(r,g,E,t,a,7);let T=Number(r&BigInt(4294967295));t[a+7]=T,T=T>>8,t[a+6]=T,T=T>>8,t[a+5]=T,T=T>>8,t[a+4]=T;let R=Number(r>>BigInt(32)&BigInt(4294967295));return t[a+3]=R,R=R>>8,t[a+2]=R,R=R>>8,t[a+1]=R,R=R>>8,t[a]=R,a+8}y.prototype.writeBigUInt64LE=ve(function(t,r=0){return Dt(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))}),y.prototype.writeBigUInt64BE=ve(function(t,r=0){return Ot(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))}),y.prototype.writeIntLE=function(t,r,a,g){if(t=+t,r=r>>>0,!g){const G=Math.pow(2,8*a-1);se(this,t,r,a,G-1,-G)}let E=0,T=1,R=0;for(this[r]=t&255;++E<a&&(T*=256);)t<0&&R===0&&this[r+E-1]!==0&&(R=1),this[r+E]=(t/T>>0)-R&255;return r+a},y.prototype.writeIntBE=function(t,r,a,g){if(t=+t,r=r>>>0,!g){const G=Math.pow(2,8*a-1);se(this,t,r,a,G-1,-G)}let E=a-1,T=1,R=0;for(this[r+E]=t&255;--E>=0&&(T*=256);)t<0&&R===0&&this[r+E+1]!==0&&(R=1),this[r+E]=(t/T>>0)-R&255;return r+a},y.prototype.writeInt8=function(t,r,a){return t=+t,r=r>>>0,a||se(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1},y.prototype.writeInt16LE=function(t,r,a){return t=+t,r=r>>>0,a||se(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2},y.prototype.writeInt16BE=function(t,r,a){return t=+t,r=r>>>0,a||se(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2},y.prototype.writeInt32LE=function(t,r,a){return t=+t,r=r>>>0,a||se(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},y.prototype.writeInt32BE=function(t,r,a){return t=+t,r=r>>>0,a||se(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4},y.prototype.writeBigInt64LE=ve(function(t,r=0){return Dt(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),y.prototype.writeBigInt64BE=ve(function(t,r=0){return Ot(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Rt(t,r,a,g,E,T){if(a+g>t.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("Index out of range")}function Bt(t,r,a,g,E){return r=+r,a=a>>>0,E||Rt(t,r,a,4),A.write(t,r,a,g,23,4),a+4}y.prototype.writeFloatLE=function(t,r,a){return Bt(this,t,r,!0,a)},y.prototype.writeFloatBE=function(t,r,a){return Bt(this,t,r,!1,a)};function xt(t,r,a,g,E){return r=+r,a=a>>>0,E||Rt(t,r,a,8),A.write(t,r,a,g,52,8),a+8}y.prototype.writeDoubleLE=function(t,r,a){return xt(this,t,r,!0,a)},y.prototype.writeDoubleBE=function(t,r,a){return xt(this,t,r,!1,a)},y.prototype.copy=function(t,r,a,g){if(!y.isBuffer(t))throw new TypeError("argument should be a Buffer");if(a||(a=0),!g&&g!==0&&(g=this.length),r>=t.length&&(r=t.length),r||(r=0),g>0&&g<a&&(g=a),g===a||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(a<0||a>=this.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("sourceEnd out of bounds");g>this.length&&(g=this.length),t.length-r<g-a&&(g=t.length-r+a);const E=g-a;return this===t&&typeof D.prototype.copyWithin=="function"?this.copyWithin(r,a,g):D.prototype.set.call(t,this.subarray(a,g),r),E},y.prototype.fill=function(t,r,a,g){if(typeof t=="string"){if(typeof r=="string"?(g=r,r=0,a=this.length):typeof a=="string"&&(g=a,a=this.length),g!==void 0&&typeof g!="string")throw new TypeError("encoding must be a string");if(typeof g=="string"&&!y.isEncoding(g))throw new TypeError("Unknown encoding: "+g);if(t.length===1){const T=t.charCodeAt(0);(g==="utf8"&&T<128||g==="latin1")&&(t=T)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<a)throw new RangeError("Out of range index");if(a<=r)return this;r=r>>>0,a=a===void 0?this.length:a>>>0,t||(t=0);let E;if(typeof t=="number")for(E=r;E<a;++E)this[E]=t;else{const T=y.isBuffer(t)?t:y.from(t,g),R=T.length;if(R===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(E=0;E<a-r;++E)this[E+r]=T[E%R]}return this};const _e={};function We(t,r,a){_e[t]=class extends a{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(g){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:g,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}We("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),We("ERR_INVALID_ARG_TYPE",function(t,r){return`The "${t}" argument must be of type number. Received type ${typeof r}`},TypeError),We("ERR_OUT_OF_RANGE",function(t,r,a){let g=`The value of "${t}" is out of range.`,E=a;return Number.isInteger(a)&&Math.abs(a)>2**32?E=Ft(String(a)):typeof a=="bigint"&&(E=String(a),(a>BigInt(2)**BigInt(32)||a<-(BigInt(2)**BigInt(32)))&&(E=Ft(E)),E+="n"),g+=` It must be ${r}. Received ${E}`,g},RangeError);function Ft(t){let r="",a=t.length;const g=t[0]==="-"?1:0;for(;a>=g+4;a-=3)r=`_${t.slice(a-3,a)}${r}`;return`${t.slice(0,a)}${r}`}function Ui(t,r,a){Ne(r,"offset"),(t[r]===void 0||t[r+a]===void 0)&&Le(r,t.length-(a+1))}function kt(t,r,a,g,E,T){if(t>a||t<r){const R=typeof r=="bigint"?"n":"";let G;throw r===0||r===BigInt(0)?G=`>= 0${R} and < 2${R} ** ${(T+1)*8}${R}`:G=`>= -(2${R} ** ${(T+1)*8-1}${R}) and < 2 ** ${(T+1)*8-1}${R}`,new _e.ERR_OUT_OF_RANGE("value",G,t)}Ui(g,E,T)}function Ne(t,r){if(typeof t!="number")throw new _e.ERR_INVALID_ARG_TYPE(r,"number",t)}function Le(t,r,a){throw Math.floor(t)!==t?(Ne(t,a),new _e.ERR_OUT_OF_RANGE("offset","an integer",t)):r<0?new _e.ERR_BUFFER_OUT_OF_BOUNDS:new _e.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${r}`,t)}const zi=/[^+/0-9A-Za-z-_]/g;function Hi(t){if(t=t.split("=")[0],t=t.trim().replace(zi,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Ze(t,r){r=r||1/0;let a;const g=t.length;let E=null;const T=[];for(let R=0;R<g;++R){if(a=t.charCodeAt(R),a>55295&&a<57344){if(!E){if(a>56319){(r-=3)>-1&&T.push(239,191,189);continue}else if(R+1===g){(r-=3)>-1&&T.push(239,191,189);continue}E=a;continue}if(a<56320){(r-=3)>-1&&T.push(239,191,189),E=a;continue}a=(E-55296<<10|a-56320)+65536}else E&&(r-=3)>-1&&T.push(239,191,189);if(E=null,a<128){if((r-=1)<0)break;T.push(a)}else if(a<2048){if((r-=2)<0)break;T.push(a>>6|192,a&63|128)}else if(a<65536){if((r-=3)<0)break;T.push(a>>12|224,a>>6&63|128,a&63|128)}else if(a<1114112){if((r-=4)<0)break;T.push(a>>18|240,a>>12&63|128,a>>6&63|128,a&63|128)}else throw new Error("Invalid code point")}return T}function Gi(t){const r=[];for(let a=0;a<t.length;++a)r.push(t.charCodeAt(a)&255);return r}function ji(t,r){let a,g,E;const T=[];for(let R=0;R<t.length&&!((r-=2)<0);++R)a=t.charCodeAt(R),g=a>>8,E=a%256,T.push(E),T.push(g);return T}function Pt(t){return S.toByteArray(Hi(t))}function ke(t,r,a,g){let E;for(E=0;E<g&&!(E+a>=r.length||E>=t.length);++E)r[E+a]=t[E];return E}function de(t,r){return t instanceof r||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===r.name}function Qe(t){return t!==t}const Xi=(function(){const t="0123456789abcdef",r=new Array(256);for(let a=0;a<16;++a){const g=a*16;for(let E=0;E<16;++E)r[g+E]=t[a]+t[E]}return r})();function ve(t){return typeof BigInt>"u"?qi:t}function qi(){throw new Error("BigInt not supported")}})(i);const N=i.Buffer;e.Blob=i.Blob,e.BlobOptions=i.BlobOptions,e.Buffer=i.Buffer,e.File=i.File,e.FileOptions=i.FileOptions,e.INSPECT_MAX_BYTES=i.INSPECT_MAX_BYTES,e.SlowBuffer=i.SlowBuffer,e.TranscodeEncoding=i.TranscodeEncoding,e.atob=i.atob,e.btoa=i.btoa,e.constants=i.constants,e.default=N,e.isAscii=i.isAscii,e.isUtf8=i.isUtf8,e.kMaxLength=i.kMaxLength,e.kStringMaxLength=i.kStringMaxLength,e.resolveObjectURL=i.resolveObjectURL,e.transcode=i.transcode})(Mt)),Mt}var Ut;function Dn(){return Ut||(Ut=1,(function(e,i){var n=Ln(),o=n.Buffer;function l(d,m){for(var p in d)m[p]=d[p]}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(l(n,i),i.Buffer=u);function u(d,m,p){return o(d,m,p)}u.prototype=Object.create(o.prototype),l(o,u),u.from=function(d,m,p){if(typeof d=="number")throw new TypeError("Argument must not be a number");return o(d,m,p)},u.alloc=function(d,m,p){if(typeof d!="number")throw new TypeError("Argument must be a number");var f=o(d);return m!==void 0?typeof p=="string"?f.fill(m,p):f.fill(m):f.fill(0),f},u.allocUnsafe=function(d){if(typeof d!="number")throw new TypeError("Argument must be a number");return o(d)},u.allocUnsafeSlow=function(d){if(typeof d!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(d)}})(it,it.exports)),it.exports}var zt;function On(){if(zt)return tt;zt=1;var e=Dn().Buffer,i=e.isEncoding||function(N){switch(N=""+N,N&&N.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(N){if(!N)return"utf8";for(var w;;)switch(N){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return N;default:if(w)return;N=(""+N).toLowerCase(),w=!0}}function o(N){var w=n(N);if(typeof w!="string"&&(e.isEncoding===i||!i(N)))throw new Error("Unknown encoding: "+N);return w||N}tt.StringDecoder=l;function l(N){this.encoding=o(N);var w;switch(this.encoding){case"utf16le":this.text=_,this.end=L,w=4;break;case"utf8":this.fillLast=p,w=4;break;case"base64":this.text=O,this.end=B,w=3;break;default:this.write=I,this.end=k;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(w)}l.prototype.write=function(N){if(N.length===0)return"";var w,S;if(this.lastNeed){if(w=this.fillLast(N),w===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;return S<N.length?w?w+this.text(N,S):this.text(N,S):w||""},l.prototype.end=h,l.prototype.text=f,l.prototype.fillLast=function(N){if(this.lastNeed<=N.length)return N.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);N.copy(this.lastChar,this.lastTotal-this.lastNeed,0,N.length),this.lastNeed-=N.length};function u(N){return N<=127?0:N>>5===6?2:N>>4===14?3:N>>3===30?4:N>>6===2?-1:-2}function d(N,w,S){var A=w.length-1;if(A<S)return 0;var F=u(w[A]);return F>=0?(F>0&&(N.lastNeed=F-1),F):--A<S||F===-2?0:(F=u(w[A]),F>=0?(F>0&&(N.lastNeed=F-2),F):--A<S||F===-2?0:(F=u(w[A]),F>=0?(F>0&&(F===2?F=0:N.lastNeed=F-3),F):0))}function m(N,w,S){if((w[0]&192)!==128)return N.lastNeed=0,"";if(N.lastNeed>1&&w.length>1){if((w[1]&192)!==128)return N.lastNeed=1,"";if(N.lastNeed>2&&w.length>2&&(w[2]&192)!==128)return N.lastNeed=2,""}}function p(N){var w=this.lastTotal-this.lastNeed,S=m(this,N);if(S!==void 0)return S;if(this.lastNeed<=N.length)return N.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);N.copy(this.lastChar,w,0,N.length),this.lastNeed-=N.length}function f(N,w){var S=d(this,N,w);if(!this.lastNeed)return N.toString("utf8",w);this.lastTotal=S;var A=N.length-(S-this.lastNeed);return N.copy(this.lastChar,0,A),N.toString("utf8",w,A)}function h(N){var w=N&&N.length?this.write(N):"";return this.lastNeed?w+"":w}function _(N,w){if((N.length-w)%2===0){var S=N.toString("utf16le",w);if(S){var A=S.charCodeAt(S.length-1);if(A>=55296&&A<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=N[N.length-1],N.toString("utf16le",w,N.length-1)}function L(N){var w=N&&N.length?this.write(N):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,S)}return w}function O(N,w){var S=(N.length-w)%3;return S===0?N.toString("base64",w):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=N[N.length-1]:(this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1]),N.toString("base64",w,N.length-S))}function B(N){var w=N&&N.length?this.write(N):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function I(N){return N.toString(this.encoding)}function k(N){return N&&N.length?this.write(N):""}return tt}var Rn=On();const Bn=yt(Rn);var nt={},Ht,Gt;function Si(){return Gt||(Gt=1,Ht=typeof yi=="object"&&nt&&nt.NODE_DEBUG&&/\bsemver\b/i.test(nt.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}),Ht}var rt,jt;function Ai(){if(jt)return rt;jt=1;const e="2.0.0",i=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,o=16,l=i-6;return rt={MAX_LENGTH:i,MAX_SAFE_COMPONENT_LENGTH:o,MAX_SAFE_BUILD_LENGTH:l,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},rt}var at={exports:{}},Xt;function xn(){return Xt||(Xt=1,(function(e,i){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:l}=Ai(),u=Si();i=e.exports={};const d=i.re=[],m=i.safeRe=[],p=i.src=[],f=i.safeSrc=[],h=i.t={};let _=0;const L="[a-zA-Z0-9-]",O=[["\\s",1],["\\d",l],[L,o]],B=k=>{for(const[N,w]of O)k=k.split(`${N}*`).join(`${N}{0,${w}}`).split(`${N}+`).join(`${N}{1,${w}}`);return k},I=(k,N,w)=>{const S=B(N),A=_++;u(k,A,N),h[k]=A,p[A]=N,f[A]=S,d[A]=new RegExp(N,w?"g":void 0),m[A]=new RegExp(S,w?"g":void 0)};I("NUMERICIDENTIFIER","0|[1-9]\\d*"),I("NUMERICIDENTIFIERLOOSE","\\d+"),I("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${L}*`),I("MAINVERSION",`(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})`),I("MAINVERSIONLOOSE",`(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})`),I("PRERELEASEIDENTIFIER",`(?:${p[h.NONNUMERICIDENTIFIER]}|${p[h.NUMERICIDENTIFIER]})`),I("PRERELEASEIDENTIFIERLOOSE",`(?:${p[h.NONNUMERICIDENTIFIER]}|${p[h.NUMERICIDENTIFIERLOOSE]})`),I("PRERELEASE",`(?:-(${p[h.PRERELEASEIDENTIFIER]}(?:\\.${p[h.PRERELEASEIDENTIFIER]})*))`),I("PRERELEASELOOSE",`(?:-?(${p[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[h.PRERELEASEIDENTIFIERLOOSE]})*))`),I("BUILDIDENTIFIER",`${L}+`),I("BUILD",`(?:\\+(${p[h.BUILDIDENTIFIER]}(?:\\.${p[h.BUILDIDENTIFIER]})*))`),I("FULLPLAIN",`v?${p[h.MAINVERSION]}${p[h.PRERELEASE]}?${p[h.BUILD]}?`),I("FULL",`^${p[h.FULLPLAIN]}$`),I("LOOSEPLAIN",`[v=\\s]*${p[h.MAINVERSIONLOOSE]}${p[h.PRERELEASELOOSE]}?${p[h.BUILD]}?`),I("LOOSE",`^${p[h.LOOSEPLAIN]}$`),I("GTLT","((?:<|>)?=?)"),I("XRANGEIDENTIFIERLOOSE",`${p[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),I("XRANGEIDENTIFIER",`${p[h.NUMERICIDENTIFIER]}|x|X|\\*`),I("XRANGEPLAIN",`[v=\\s]*(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:${p[h.PRERELEASE]})?${p[h.BUILD]}?)?)?`),I("XRANGEPLAINLOOSE",`[v=\\s]*(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:${p[h.PRERELEASELOOSE]})?${p[h.BUILD]}?)?)?`),I("XRANGE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAIN]}$`),I("XRANGELOOSE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAINLOOSE]}$`),I("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),I("COERCE",`${p[h.COERCEPLAIN]}(?:$|[^\\d])`),I("COERCEFULL",p[h.COERCEPLAIN]+`(?:${p[h.PRERELEASE]})?(?:${p[h.BUILD]})?(?:$|[^\\d])`),I("COERCERTL",p[h.COERCE],!0),I("COERCERTLFULL",p[h.COERCEFULL],!0),I("LONETILDE","(?:~>?)"),I("TILDETRIM",`(\\s*)${p[h.LONETILDE]}\\s+`,!0),i.tildeTrimReplace="$1~",I("TILDE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAIN]}$`),I("TILDELOOSE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAINLOOSE]}$`),I("LONECARET","(?:\\^)"),I("CARETTRIM",`(\\s*)${p[h.LONECARET]}\\s+`,!0),i.caretTrimReplace="$1^",I("CARET",`^${p[h.LONECARET]}${p[h.XRANGEPLAIN]}$`),I("CARETLOOSE",`^${p[h.LONECARET]}${p[h.XRANGEPLAINLOOSE]}$`),I("COMPARATORLOOSE",`^${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]})$|^$`),I("COMPARATOR",`^${p[h.GTLT]}\\s*(${p[h.FULLPLAIN]})$|^$`),I("COMPARATORTRIM",`(\\s*)${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]}|${p[h.XRANGEPLAIN]})`,!0),i.comparatorTrimReplace="$1$2$3",I("HYPHENRANGE",`^\\s*(${p[h.XRANGEPLAIN]})\\s+-\\s+(${p[h.XRANGEPLAIN]})\\s*$`),I("HYPHENRANGELOOSE",`^\\s*(${p[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[h.XRANGEPLAINLOOSE]})\\s*$`),I("STAR","(<|>)?=?\\s*\\*"),I("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),I("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(at,at.exports)),at.exports}var st,qt;function Fn(){if(qt)return st;qt=1;const e=Object.freeze({loose:!0}),i=Object.freeze({});return st=n=>n?typeof n!="object"?e:n:i,st}var ot,Yt;function kn(){if(Yt)return ot;Yt=1;const e=/^[0-9]+$/,i=(n,o)=>{if(typeof n=="number"&&typeof o=="number")return n===o?0:n<o?-1:1;const l=e.test(n),u=e.test(o);return l&&u&&(n=+n,o=+o),n===o?0:l&&!u?-1:u&&!l?1:n<o?-1:1};return ot={compareIdentifiers:i,rcompareIdentifiers:(n,o)=>i(o,n)},ot}var lt,Wt;function Li(){if(Wt)return lt;Wt=1;const e=Si(),{MAX_LENGTH:i,MAX_SAFE_INTEGER:n}=Ai(),{safeRe:o,t:l}=xn(),u=Fn(),{compareIdentifiers:d}=kn();class m{constructor(f,h){if(h=u(h),f instanceof m){if(f.loose===!!h.loose&&f.includePrerelease===!!h.includePrerelease)return f;f=f.version}else if(typeof f!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof f}".`);if(f.length>i)throw new TypeError(`version is longer than ${i} characters`);e("SemVer",f,h),this.options=h,this.loose=!!h.loose,this.includePrerelease=!!h.includePrerelease;const _=f.trim().match(h.loose?o[l.LOOSE]:o[l.FULL]);if(!_)throw new TypeError(`Invalid Version: ${f}`);if(this.raw=f,this.major=+_[1],this.minor=+_[2],this.patch=+_[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");_[4]?this.prerelease=_[4].split(".").map(L=>{if(/^[0-9]+$/.test(L)){const O=+L;if(O>=0&&O<n)return O}return L}):this.prerelease=[],this.build=_[5]?_[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(f){if(e("SemVer.compare",this.version,this.options,f),!(f instanceof m)){if(typeof f=="string"&&f===this.version)return 0;f=new m(f,this.options)}return f.version===this.version?0:this.compareMain(f)||this.comparePre(f)}compareMain(f){return f instanceof m||(f=new m(f,this.options)),this.major<f.major?-1:this.major>f.major?1:this.minor<f.minor?-1:this.minor>f.minor?1:this.patch<f.patch?-1:this.patch>f.patch?1:0}comparePre(f){if(f instanceof m||(f=new m(f,this.options)),this.prerelease.length&&!f.prerelease.length)return-1;if(!this.prerelease.length&&f.prerelease.length)return 1;if(!this.prerelease.length&&!f.prerelease.length)return 0;let h=0;do{const _=this.prerelease[h],L=f.prerelease[h];if(e("prerelease compare",h,_,L),_===void 0&&L===void 0)return 0;if(L===void 0)return 1;if(_===void 0)return-1;if(_!==L)return d(_,L)}while(++h)}compareBuild(f){f instanceof m||(f=new m(f,this.options));let h=0;do{const _=this.build[h],L=f.build[h];if(e("build compare",h,_,L),_===void 0&&L===void 0)return 0;if(L===void 0)return 1;if(_===void 0)return-1;if(_!==L)return d(_,L)}while(++h)}inc(f,h,_){if(f.startsWith("pre")){if(!h&&_===!1)throw new Error("invalid increment argument: identifier is empty");if(h){const L=`-${h}`.match(this.options.loose?o[l.PRERELEASELOOSE]:o[l.PRERELEASE]);if(!L||L[1]!==h)throw new Error(`invalid identifier: ${h}`)}}switch(f){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",h,_);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",h,_);break;case"prepatch":this.prerelease.length=0,this.inc("patch",h,_),this.inc("pre",h,_);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",h,_),this.inc("pre",h,_);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const L=Number(_)?1:0;if(this.prerelease.length===0)this.prerelease=[L];else{let O=this.prerelease.length;for(;--O>=0;)typeof this.prerelease[O]=="number"&&(this.prerelease[O]++,O=-2);if(O===-1){if(h===this.prerelease.join(".")&&_===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(L)}}if(h){let O=[h,L];_===!1&&(O=[h]),d(this.prerelease[0],h)===0?isNaN(this.prerelease[1])&&(this.prerelease=O):this.prerelease=O}break}default:throw new Error(`invalid increment argument: ${f}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return lt=m,lt}var ct,Zt;function Pn(){if(Zt)return ct;Zt=1;const e=Li();return ct=(i,n)=>new e(i,n).major,ct}Pn();var ut,Qt;function $n(){if(Qt)return ut;Qt=1;const e=Li();return ut=(i,n,o=!1)=>{if(i instanceof e)return i;try{return new e(i,n)}catch(l){if(!o)return null;throw l}},ut}var ft,Kt;function Mn(){if(Kt)return ft;Kt=1;const e=$n();return ft=(i,n)=>{const o=e(i,n);return o?o.version:null},ft}Mn();var Jt={},ei;function Vn(){return ei||(ei=1,(function(e){(function(i){i.parser=function(c,s){return new o(c,s)},i.SAXParser=o,i.SAXStream=h,i.createStream=f,i.MAX_BUFFER_LENGTH=64*1024;var n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];i.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function o(c,s){if(!(this instanceof o))return new o(c,s);var C=this;u(C),C.q=C.c="",C.bufferCheckPosition=i.MAX_BUFFER_LENGTH,C.opt=s||{},C.opt.lowercase=C.opt.lowercase||C.opt.lowercasetags,C.looseCase=C.opt.lowercase?"toLowerCase":"toUpperCase",C.tags=[],C.closed=C.closedRoot=C.sawRoot=!1,C.tag=C.error=null,C.strict=!!c,C.noscript=!!(c||C.opt.noscript),C.state=v.BEGIN,C.strictEntities=C.opt.strictEntities,C.ENTITIES=C.strictEntities?Object.create(i.XML_ENTITIES):Object.create(i.ENTITIES),C.attribList=[],C.opt.xmlns&&(C.ns=Object.create(I)),C.opt.unquotedAttributeValues===void 0&&(C.opt.unquotedAttributeValues=!c),C.trackPosition=C.opt.position!==!1,C.trackPosition&&(C.position=C.line=C.column=0),X(C,"onready")}Object.create||(Object.create=function(c){function s(){}s.prototype=c;var C=new s;return C}),Object.keys||(Object.keys=function(c){var s=[];for(var C in c)c.hasOwnProperty(C)&&s.push(C);return s});function l(c){for(var s=Math.max(i.MAX_BUFFER_LENGTH,10),C=0,b=0,V=n.length;b<V;b++){var Y=c[n[b]].length;if(Y>s)switch(n[b]){case"textNode":q(c);break;case"cdata":y(c,"oncdata",c.cdata),c.cdata="";break;case"script":y(c,"onscript",c.script),c.script="";break;default:ee(c,"Max buffer length exceeded: "+n[b])}C=Math.max(C,Y)}var W=i.MAX_BUFFER_LENGTH-C;c.bufferCheckPosition=W+c.position}function u(c){for(var s=0,C=n.length;s<C;s++)c[n[s]]=""}function d(c){q(c),c.cdata!==""&&(y(c,"oncdata",c.cdata),c.cdata=""),c.script!==""&&(y(c,"onscript",c.script),c.script="")}o.prototype={end:function(){fe(this)},write:pe,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){d(this)}};var m;try{m=require("stream").Stream}catch{m=function(){}}m||(m=function(){});var p=i.EVENTS.filter(function(c){return c!=="error"&&c!=="end"});function f(c,s){return new h(c,s)}function h(c,s){if(!(this instanceof h))return new h(c,s);m.apply(this),this._parser=new o(c,s),this.writable=!0,this.readable=!0;var C=this;this._parser.onend=function(){C.emit("end")},this._parser.onerror=function(b){C.emit("error",b),C._parser.error=null},this._decoder=null,p.forEach(function(b){Object.defineProperty(C,"on"+b,{get:function(){return C._parser["on"+b]},set:function(V){if(!V)return C.removeAllListeners(b),C._parser["on"+b]=V,V;C.on(b,V)},enumerable:!0,configurable:!1})})}h.prototype=Object.create(m.prototype,{constructor:{value:h}}),h.prototype.write=function(c){if(typeof Ke=="function"&&typeof Ke.isBuffer=="function"&&Ke.isBuffer(c)){if(!this._decoder){var s=Bn.StringDecoder;this._decoder=new s("utf8")}c=this._decoder.write(c)}return this._parser.write(c.toString()),this.emit("data",c),!0},h.prototype.end=function(c){return c&&c.length&&this.write(c),this._parser.end(),!0},h.prototype.on=function(c,s){var C=this;return!C._parser["on"+c]&&p.indexOf(c)!==-1&&(C._parser["on"+c]=function(){var b=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);b.splice(0,0,c),C.emit.apply(C,b)}),m.prototype.on.call(C,c,s)};var _="[CDATA[",L="DOCTYPE",O="http://www.w3.org/XML/1998/namespace",B="http://www.w3.org/2000/xmlns/",I={xml:O,xmlns:B},k=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,N=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,w=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,S=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function A(c){return c===" "||c===`
`||c==="\r"||c===" "}function F(c){return c==='"'||c==="'"}function $(c){return c===">"||A(c)}function D(c,s){return c.test(s)}function x(c,s){return!D(c,s)}var v=0;i.STATE={BEGIN:v++,BEGIN_WHITESPACE:v++,TEXT:v++,TEXT_ENTITY:v++,OPEN_WAKA:v++,SGML_DECL:v++,SGML_DECL_QUOTED:v++,DOCTYPE:v++,DOCTYPE_QUOTED:v++,DOCTYPE_DTD:v++,DOCTYPE_DTD_QUOTED:v++,COMMENT_STARTING:v++,COMMENT:v++,COMMENT_ENDING:v++,COMMENT_ENDED:v++,CDATA:v++,CDATA_ENDING:v++,CDATA_ENDING_2:v++,PROC_INST:v++,PROC_INST_BODY:v++,PROC_INST_ENDING:v++,OPEN_TAG:v++,OPEN_TAG_SLASH:v++,ATTRIB:v++,ATTRIB_NAME:v++,ATTRIB_NAME_SAW_WHITE:v++,ATTRIB_VALUE:v++,ATTRIB_VALUE_QUOTED:v++,ATTRIB_VALUE_CLOSED:v++,ATTRIB_VALUE_UNQUOTED:v++,ATTRIB_VALUE_ENTITY_Q:v++,ATTRIB_VALUE_ENTITY_U:v++,CLOSE_TAG:v++,CLOSE_TAG_SAW_WHITE:v++,SCRIPT:v++,SCRIPT_ENDING:v++},i.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},i.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(i.ENTITIES).forEach(function(c){var s=i.ENTITIES[c],C=typeof s=="number"?String.fromCharCode(s):s;i.ENTITIES[c]=C});for(var U in i.STATE)i.STATE[i.STATE[U]]=U;v=i.STATE;function X(c,s,C){c[s]&&c[s](C)}function y(c,s,C){c.textNode&&q(c),X(c,s,C)}function q(c){c.textNode=oe(c.opt,c.textNode),c.textNode&&X(c,"ontext",c.textNode),c.textNode=""}function oe(c,s){return c.trim&&(s=s.trim()),c.normalize&&(s=s.replace(/\s+/g," ")),s}function ee(c,s){return q(c),c.trackPosition&&(s+=`
Line: `+c.line+`
Column: `+c.column+`
Char: `+c.c),s=new Error(s),c.error=s,X(c,"onerror",s),c}function fe(c){return c.sawRoot&&!c.closedRoot&&M(c,"Unclosed root tag"),c.state!==v.BEGIN&&c.state!==v.BEGIN_WHITESPACE&&c.state!==v.TEXT&&ee(c,"Unexpected end"),q(c),c.c="",c.closed=!0,X(c,"onend"),o.call(c,c.strict,c.opt),c}function M(c,s){if(typeof c!="object"||!(c instanceof o))throw new Error("bad call to strictFail");c.strict&&ee(c,s)}function Ce(c){c.strict||(c.tagName=c.tagName[c.looseCase]());var s=c.tags[c.tags.length-1]||c,C=c.tag={name:c.tagName,attributes:{}};c.opt.xmlns&&(C.ns=s.ns),c.attribList.length=0,y(c,"onopentagstart",C)}function Ie(c,s){var C=c.indexOf(":"),b=C<0?["",c]:c.split(":"),V=b[0],Y=b[1];return s&&c==="xmlns"&&(V="xmlns",Y=""),{prefix:V,local:Y}}function we(c){if(c.strict||(c.attribName=c.attribName[c.looseCase]()),c.attribList.indexOf(c.attribName)!==-1||c.tag.attributes.hasOwnProperty(c.attribName)){c.attribName=c.attribValue="";return}if(c.opt.xmlns){var s=Ie(c.attribName,!0),C=s.prefix,b=s.local;if(C==="xmlns")if(b==="xml"&&c.attribValue!==O)M(c,"xml: prefix must be bound to "+O+`
Actual: `+c.attribValue);else if(b==="xmlns"&&c.attribValue!==B)M(c,"xmlns: prefix must be bound to "+B+`
Actual: `+c.attribValue);else{var V=c.tag,Y=c.tags[c.tags.length-1]||c;V.ns===Y.ns&&(V.ns=Object.create(Y.ns)),V.ns[b]=c.attribValue}c.attribList.push([c.attribName,c.attribValue])}else c.tag.attributes[c.attribName]=c.attribValue,y(c,"onattribute",{name:c.attribName,value:c.attribValue});c.attribName=c.attribValue=""}function he(c,s){if(c.opt.xmlns){var C=c.tag,b=Ie(c.tagName);C.prefix=b.prefix,C.local=b.local,C.uri=C.ns[b.prefix]||"",C.prefix&&!C.uri&&(M(c,"Unbound namespace prefix: "+JSON.stringify(c.tagName)),C.uri=b.prefix);var V=c.tags[c.tags.length-1]||c;C.ns&&V.ns!==C.ns&&Object.keys(C.ns).forEach(function(Z){y(c,"onopennamespace",{prefix:Z,uri:C.ns[Z]})});for(var Y=0,W=c.attribList.length;Y<W;Y++){var ne=c.attribList[Y],te=ne[0],ge=ne[1],J=Ie(te,!0),le=J.prefix,Ye=J.local,Fe=le===""?"":C.ns[le]||"",Ae={name:te,value:ge,prefix:le,local:Ye,uri:Fe};le&&le!=="xmlns"&&!Fe&&(M(c,"Unbound namespace prefix: "+JSON.stringify(le)),Ae.uri=le),c.tag.attributes[te]=Ae,y(c,"onattribute",Ae)}c.attribList.length=0}c.tag.isSelfClosing=!!s,c.sawRoot=!0,c.tags.push(c.tag),y(c,"onopentag",c.tag),s||(!c.noscript&&c.tagName.toLowerCase()==="script"?c.state=v.SCRIPT:c.state=v.TEXT,c.tag=null,c.tagName=""),c.attribName=c.attribValue="",c.attribList.length=0}function Ee(c){if(!c.tagName){M(c,"Weird empty close tag."),c.textNode+="</>",c.state=v.TEXT;return}if(c.script){if(c.tagName!=="script"){c.script+="</"+c.tagName+">",c.tagName="",c.state=v.SCRIPT;return}y(c,"onscript",c.script),c.script=""}var s=c.tags.length,C=c.tagName;c.strict||(C=C[c.looseCase]());for(var b=C;s--;){var V=c.tags[s];if(V.name!==b)M(c,"Unexpected close tag");else break}if(s<0){M(c,"Unmatched closing tag: "+c.tagName),c.textNode+="</"+c.tagName+">",c.state=v.TEXT;return}c.tagName=C;for(var Y=c.tags.length;Y-- >s;){var W=c.tag=c.tags.pop();c.tagName=c.tag.name,y(c,"onclosetag",c.tagName);var ne={};for(var te in W.ns)ne[te]=W.ns[te];var ge=c.tags[c.tags.length-1]||c;c.opt.xmlns&&W.ns!==ge.ns&&Object.keys(W.ns).forEach(function(J){var le=W.ns[J];y(c,"onclosenamespace",{prefix:J,uri:le})})}s===0&&(c.closedRoot=!0),c.tagName=c.attribValue=c.attribName="",c.attribList.length=0,c.state=v.TEXT}function qe(c){var s=c.entity,C=s.toLowerCase(),b,V="";return c.ENTITIES[s]?c.ENTITIES[s]:c.ENTITIES[C]?c.ENTITIES[C]:(s=C,s.charAt(0)==="#"&&(s.charAt(1)==="x"?(s=s.slice(2),b=parseInt(s,16),V=b.toString(16)):(s=s.slice(1),b=parseInt(s,10),V=b.toString(10))),s=s.replace(/^0+/,""),isNaN(b)||V.toLowerCase()!==s?(M(c,"Invalid character entity"),"&"+c.entity+";"):String.fromCodePoint(b))}function Se(c,s){s==="<"?(c.state=v.OPEN_WAKA,c.startTagPosition=c.position):A(s)||(M(c,"Non-whitespace before first tag."),c.textNode=s,c.state=v.TEXT)}function xe(c,s){var C="";return s<c.length&&(C=c.charAt(s)),C}function pe(c){var s=this;if(this.error)throw this.error;if(s.closed)return ee(s,"Cannot write after close. Assign an onready handler.");if(c===null)return fe(s);typeof c=="object"&&(c=c.toString());for(var C=0,b="";b=xe(c,C++),s.c=b,!!b;)switch(s.trackPosition&&(s.position++,b===`
`?(s.line++,s.column=0):s.column++),s.state){case v.BEGIN:if(s.state=v.BEGIN_WHITESPACE,b==="\uFEFF")continue;Se(s,b);continue;case v.BEGIN_WHITESPACE:Se(s,b);continue;case v.TEXT:if(s.sawRoot&&!s.closedRoot){for(var V=C-1;b&&b!=="<"&&b!=="&";)b=xe(c,C++),b&&s.trackPosition&&(s.position++,b===`
`?(s.line++,s.column=0):s.column++);s.textNode+=c.substring(V,C-1)}b==="<"&&!(s.sawRoot&&s.closedRoot&&!s.strict)?(s.state=v.OPEN_WAKA,s.startTagPosition=s.position):(!A(b)&&(!s.sawRoot||s.closedRoot)&&M(s,"Text data outside of root node."),b==="&"?s.state=v.TEXT_ENTITY:s.textNode+=b);continue;case v.SCRIPT:b==="<"?s.state=v.SCRIPT_ENDING:s.script+=b;continue;case v.SCRIPT_ENDING:b==="/"?s.state=v.CLOSE_TAG:(s.script+="<"+b,s.state=v.SCRIPT);continue;case v.OPEN_WAKA:if(b==="!")s.state=v.SGML_DECL,s.sgmlDecl="";else if(!A(b))if(D(k,b))s.state=v.OPEN_TAG,s.tagName=b;else if(b==="/")s.state=v.CLOSE_TAG,s.tagName="";else if(b==="?")s.state=v.PROC_INST,s.procInstName=s.procInstBody="";else{if(M(s,"Unencoded <"),s.startTagPosition+1<s.position){var Y=s.position-s.startTagPosition;b=new Array(Y).join(" ")+b}s.textNode+="<"+b,s.state=v.TEXT}continue;case v.SGML_DECL:if(s.sgmlDecl+b==="--"){s.state=v.COMMENT,s.comment="",s.sgmlDecl="";continue}s.doctype&&s.doctype!==!0&&s.sgmlDecl?(s.state=v.DOCTYPE_DTD,s.doctype+="<!"+s.sgmlDecl+b,s.sgmlDecl=""):(s.sgmlDecl+b).toUpperCase()===_?(y(s,"onopencdata"),s.state=v.CDATA,s.sgmlDecl="",s.cdata=""):(s.sgmlDecl+b).toUpperCase()===L?(s.state=v.DOCTYPE,(s.doctype||s.sawRoot)&&M(s,"Inappropriately located doctype declaration"),s.doctype="",s.sgmlDecl=""):b===">"?(y(s,"onsgmldeclaration",s.sgmlDecl),s.sgmlDecl="",s.state=v.TEXT):(F(b)&&(s.state=v.SGML_DECL_QUOTED),s.sgmlDecl+=b);continue;case v.SGML_DECL_QUOTED:b===s.q&&(s.state=v.SGML_DECL,s.q=""),s.sgmlDecl+=b;continue;case v.DOCTYPE:b===">"?(s.state=v.TEXT,y(s,"ondoctype",s.doctype),s.doctype=!0):(s.doctype+=b,b==="["?s.state=v.DOCTYPE_DTD:F(b)&&(s.state=v.DOCTYPE_QUOTED,s.q=b));continue;case v.DOCTYPE_QUOTED:s.doctype+=b,b===s.q&&(s.q="",s.state=v.DOCTYPE);continue;case v.DOCTYPE_DTD:b==="]"?(s.doctype+=b,s.state=v.DOCTYPE):b==="<"?(s.state=v.OPEN_WAKA,s.startTagPosition=s.position):F(b)?(s.doctype+=b,s.state=v.DOCTYPE_DTD_QUOTED,s.q=b):s.doctype+=b;continue;case v.DOCTYPE_DTD_QUOTED:s.doctype+=b,b===s.q&&(s.state=v.DOCTYPE_DTD,s.q="");continue;case v.COMMENT:b==="-"?s.state=v.COMMENT_ENDING:s.comment+=b;continue;case v.COMMENT_ENDING:b==="-"?(s.state=v.COMMENT_ENDED,s.comment=oe(s.opt,s.comment),s.comment&&y(s,"oncomment",s.comment),s.comment=""):(s.comment+="-"+b,s.state=v.COMMENT);continue;case v.COMMENT_ENDED:b!==">"?(M(s,"Malformed comment"),s.comment+="--"+b,s.state=v.COMMENT):s.doctype&&s.doctype!==!0?s.state=v.DOCTYPE_DTD:s.state=v.TEXT;continue;case v.CDATA:b==="]"?s.state=v.CDATA_ENDING:s.cdata+=b;continue;case v.CDATA_ENDING:b==="]"?s.state=v.CDATA_ENDING_2:(s.cdata+="]"+b,s.state=v.CDATA);continue;case v.CDATA_ENDING_2:b===">"?(s.cdata&&y(s,"oncdata",s.cdata),y(s,"onclosecdata"),s.cdata="",s.state=v.TEXT):b==="]"?s.cdata+="]":(s.cdata+="]]"+b,s.state=v.CDATA);continue;case v.PROC_INST:b==="?"?s.state=v.PROC_INST_ENDING:A(b)?s.state=v.PROC_INST_BODY:s.procInstName+=b;continue;case v.PROC_INST_BODY:if(!s.procInstBody&&A(b))continue;b==="?"?s.state=v.PROC_INST_ENDING:s.procInstBody+=b;continue;case v.PROC_INST_ENDING:b===">"?(y(s,"onprocessinginstruction",{name:s.procInstName,body:s.procInstBody}),s.procInstName=s.procInstBody="",s.state=v.TEXT):(s.procInstBody+="?"+b,s.state=v.PROC_INST_BODY);continue;case v.OPEN_TAG:D(N,b)?s.tagName+=b:(Ce(s),b===">"?he(s):b==="/"?s.state=v.OPEN_TAG_SLASH:(A(b)||M(s,"Invalid character in tag name"),s.state=v.ATTRIB));continue;case v.OPEN_TAG_SLASH:b===">"?(he(s,!0),Ee(s)):(M(s,"Forward-slash in opening tag not followed by >"),s.state=v.ATTRIB);continue;case v.ATTRIB:if(A(b))continue;b===">"?he(s):b==="/"?s.state=v.OPEN_TAG_SLASH:D(k,b)?(s.attribName=b,s.attribValue="",s.state=v.ATTRIB_NAME):M(s,"Invalid attribute name");continue;case v.ATTRIB_NAME:b==="="?s.state=v.ATTRIB_VALUE:b===">"?(M(s,"Attribute without value"),s.attribValue=s.attribName,we(s),he(s)):A(b)?s.state=v.ATTRIB_NAME_SAW_WHITE:D(N,b)?s.attribName+=b:M(s,"Invalid attribute name");continue;case v.ATTRIB_NAME_SAW_WHITE:if(b==="=")s.state=v.ATTRIB_VALUE;else{if(A(b))continue;M(s,"Attribute without value"),s.tag.attributes[s.attribName]="",s.attribValue="",y(s,"onattribute",{name:s.attribName,value:""}),s.attribName="",b===">"?he(s):D(k,b)?(s.attribName=b,s.state=v.ATTRIB_NAME):(M(s,"Invalid attribute name"),s.state=v.ATTRIB)}continue;case v.ATTRIB_VALUE:if(A(b))continue;F(b)?(s.q=b,s.state=v.ATTRIB_VALUE_QUOTED):(s.opt.unquotedAttributeValues||ee(s,"Unquoted attribute value"),s.state=v.ATTRIB_VALUE_UNQUOTED,s.attribValue=b);continue;case v.ATTRIB_VALUE_QUOTED:if(b!==s.q){b==="&"?s.state=v.ATTRIB_VALUE_ENTITY_Q:s.attribValue+=b;continue}we(s),s.q="",s.state=v.ATTRIB_VALUE_CLOSED;continue;case v.ATTRIB_VALUE_CLOSED:A(b)?s.state=v.ATTRIB:b===">"?he(s):b==="/"?s.state=v.OPEN_TAG_SLASH:D(k,b)?(M(s,"No whitespace between attributes"),s.attribName=b,s.attribValue="",s.state=v.ATTRIB_NAME):M(s,"Invalid attribute name");continue;case v.ATTRIB_VALUE_UNQUOTED:if(!$(b)){b==="&"?s.state=v.ATTRIB_VALUE_ENTITY_U:s.attribValue+=b;continue}we(s),b===">"?he(s):s.state=v.ATTRIB;continue;case v.CLOSE_TAG:if(s.tagName)b===">"?Ee(s):D(N,b)?s.tagName+=b:s.script?(s.script+="</"+s.tagName,s.tagName="",s.state=v.SCRIPT):(A(b)||M(s,"Invalid tagname in closing tag"),s.state=v.CLOSE_TAG_SAW_WHITE);else{if(A(b))continue;x(k,b)?s.script?(s.script+="</"+b,s.state=v.SCRIPT):M(s,"Invalid tagname in closing tag."):s.tagName=b}continue;case v.CLOSE_TAG_SAW_WHITE:if(A(b))continue;b===">"?Ee(s):M(s,"Invalid characters in closing tag");continue;case v.TEXT_ENTITY:case v.ATTRIB_VALUE_ENTITY_Q:case v.ATTRIB_VALUE_ENTITY_U:var W,ne;switch(s.state){case v.TEXT_ENTITY:W=v.TEXT,ne="textNode";break;case v.ATTRIB_VALUE_ENTITY_Q:W=v.ATTRIB_VALUE_QUOTED,ne="attribValue";break;case v.ATTRIB_VALUE_ENTITY_U:W=v.ATTRIB_VALUE_UNQUOTED,ne="attribValue";break}if(b===";"){var te=qe(s);s.opt.unparsedEntities&&!Object.values(i.XML_ENTITIES).includes(te)?(s.entity="",s.state=W,s.write(te)):(s[ne]+=te,s.entity="",s.state=W)}else D(s.entity.length?S:w,b)?s.entity+=b:(M(s,"Invalid character in entity name"),s[ne]+="&"+s.entity+b,s.entity="",s.state=W);continue;default:throw new Error(s,"Unknown state: "+s.state)}return s.position>=s.bufferCheckPosition&&l(s),s}String.fromCodePoint||(function(){var c=String.fromCharCode,s=Math.floor,C=function(){var b=16384,V=[],Y,W,ne=-1,te=arguments.length;if(!te)return"";for(var ge="";++ne<te;){var J=Number(arguments[ne]);if(!isFinite(J)||J<0||J>1114111||s(J)!==J)throw RangeError("Invalid code point: "+J);J<=65535?V.push(J):(J-=65536,Y=(J>>10)+55296,W=J%1024+56320,V.push(Y,W)),(ne+1===te||V.length>b)&&(ge+=c.apply(null,V),V.length=0)}return ge};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:C,configurable:!0,writable:!0}):String.fromCodePoint=C})()})(e)})(Jt)),Jt}Vn();var Ve=(e=>(e.ReservedName="reserved name",e.Character="character",e.Extension="extension",e))(Ve||{});class De extends Error{constructor(i){super(`Invalid ${i.reason} '${i.segment}' in filename '${i.filename}'`,{cause:i})}get filename(){return this.cause.filename}get reason(){return this.cause.reason}get segment(){return this.cause.segment}}function Un(e){const i=wn().files,n=i.forbidden_filename_characters??window._oc_config?.forbidden_filenames_characters??["/","\\"];for(const d of n)if(e.includes(d))throw new De({segment:d,reason:"character",filename:e});if(e=e.toLocaleLowerCase(),(i.forbidden_filenames??[".htaccess"]).includes(e))throw new De({filename:e,segment:e,reason:"reserved name"});const o=e.indexOf(".",1),l=e.substring(0,o===-1?void 0:o);if((i.forbidden_filename_basenames??[]).includes(l))throw new De({filename:e,segment:l,reason:"reserved name"});const u=i.forbidden_filename_extensions??[".part",".filepart"];for(const d of u)if(e.length>d.length&&e.endsWith(d))throw new De({segment:d,reason:"extension",filename:e})}const dt=["B","KB","MB","GB","TB","PB"],ht=["B","KiB","MiB","GiB","TiB","PiB"];function zn(e,i=!1,n=!1,o=!1){n=n&&!o,typeof e=="string"&&(e=Number(e));let l=e>0?Math.floor(Math.log(e)/Math.log(o?1e3:1024)):0;l=Math.min((n?ht.length:dt.length)-1,l);const u=n?ht[l]:dt[l];let d=(e/Math.pow(o?1e3:1024,l)).toFixed(1);return i===!0&&l===0?(d!=="0.0"?"< 1 ":"0 ")+(n?ht[1]:dt[1]):(l<2?d=parseFloat(d).toFixed(0):d=parseFloat(d).toLocaleString(me()),d+" "+u)}function ti(e){return e instanceof Date?e.toISOString():String(e)}function Hn(e,i,n){i=i??[u=>u],n=n??[];const o=i.map((u,d)=>(n[d]??"asc")==="asc"?1:-1),l=Intl.Collator([$e(),me()],{numeric:!0,usage:"sort"});return[...e].sort((u,d)=>{for(const[m,p]of i.entries()){const f=l.compare(ti(p(u)),ti(p(d)));if(f!==0)return f*o[m]}return 0})}function Gn(e,i={}){const n={sortingMode:"basename",sortingOrder:"asc",...i};function o(d){const m=d.displayname||d.attributes?.displayname||d.basename||"";return d.type===Te.Folder?m:m.lastIndexOf(".")>0?m.slice(0,m.lastIndexOf(".")):m}const l=[...n.sortFavoritesFirst?[d=>d.attributes?.favorite!==1]:[],...n.sortFoldersFirst?[d=>d.type!=="folder"]:[],...n.sortingMode!=="basename"?[d=>d[n.sortingMode]??d.attributes[n.sortingMode]]:[],d=>o(d),d=>d.basename],u=[...n.sortFavoritesFirst?["asc"]:[],...n.sortFoldersFirst?["asc"]:[],...n.sortingMode==="mtime"?[n.sortingOrder==="asc"?"desc":"asc"]:[],...n.sortingMode!=="mtime"&&n.sortingMode!=="basename"?[n.sortingOrder]:[],n.sortingOrder,n.sortingOrder];return Hn(e,l,u)}function Di(e,i,n){const o=`#initial-state-${e}-${i}`;if(window._nc_initial_state?.has(o))return window._nc_initial_state.get(o);window._nc_initial_state||(window._nc_initial_state=new Map);const l=document.querySelector(o);if(l===null)return n;try{const u=JSON.parse(atob(l.value));return window._nc_initial_state.set(o,u),u}catch(u){return console.error("[@nextcloud/initial-state] Could not parse initial state",{key:i,app:e,error:u}),n}}const ii=(e,i,n)=>{const o=Object.assign({escape:!0},{}),l=function(u,d){return d=d||{},u.replace(/{([^{}]*)}/g,function(m,p){const f=d[p];return o.escape?encodeURIComponent(typeof f=="string"||typeof f=="number"?f.toString():m):typeof f=="string"||typeof f=="number"?f.toString():m})};return e.charAt(0)!=="/"&&(e="/"+e),l(e,i||{})},St=(e,i,n)=>{const o=Object.assign({noRewrite:!1},{}),l=jn();return window?.OC?.config?.modRewriteWorking===!0&&!o.noRewrite?l+ii(e,i):l+"/index.php"+ii(e,i)};function jn(){let e=window._oc_webroot;if(typeof e>"u"){e=location.pathname;const i=e.indexOf("/index.php/");if(i!==-1)e=e.slice(0,i);else{const n=e.indexOf("/",1);e=e.slice(0,n>0?n:void 0)}}return e}Et(an);const Xn={long:be("a few seconds ago"),short:be("seconds ago"),narrow:be("sec. ago")};function qn(e=Date.now(),i={}){let n;const o=P(()=>new Date(ce(e))),l=P(()=>{const{language:m,relativeTime:p,ignoreSeconds:f}=ce(i);return{...m&&{language:m},...p&&{relativeTime:p},ignoreSeconds:f?Xn[p||"long"]:!1}}),u=z("");Ei(()=>d());function d(){if(u.value=Nn(o.value,l.value),ce(i).update!==!1){const m=Math.abs(Date.now()-new Date(ce(e)).getTime()),p=m>12e4||l.value.ignoreSeconds?Math.min(m/60,18e5):1e3;n=window.setTimeout(d,p)}}return wi(()=>n&&window.clearTimeout(n)),sn(u)}function Yn(e,i){const n=P(()=>({locale:me(),format:{dateStyle:"short",timeStyle:"medium"},...ce(i)})),o=P(()=>new Intl.DateTimeFormat(n.value.locale,n.value.format));return P(()=>o.value.format(ce(e)))}const Wn={name:"NcDateTime",props:{timestamp:{type:[Date,Number],required:!0},format:{type:Object,default:()=>({timeStyle:"medium",dateStyle:"short"})},relativeTime:{type:[Boolean,String],default:"long",validator:e=>e===!1||["long","short","narrow"].includes(e)},ignoreSeconds:{type:Boolean,default:!1}},setup(e){const i=P(()=>({format:e.format})),n=P(()=>({ignoreSeconds:e.ignoreSeconds,relativeTime:e.relativeTime||"long",update:e.relativeTime!==!1})),o=Yn(He(e,"timestamp"),i),l=qn(He(e,"timestamp"),n);return{formattedTime:P(()=>e.relativeTime?l.value:o.value),title:o}}};var Zn=function(){var e=this,i=e._self._c;return i("span",{staticClass:"nc-datetime",attrs:{dir:"auto","data-timestamp":e.timestamp,title:e.title},domProps:{textContent:e._s(e.formattedTime)}})},Qn=[],Kn=ue(Wn,Zn,Qn,!1,null,null);const Jn=Kn.exports;var er="M12,5A3.5,3.5 0 0,0 8.5,8.5A3.5,3.5 0 0,0 12,12A3.5,3.5 0 0,0 15.5,8.5A3.5,3.5 0 0,0 12,5M12,7A1.5,1.5 0 0,1 13.5,8.5A1.5,1.5 0 0,1 12,10A1.5,1.5 0 0,1 10.5,8.5A1.5,1.5 0 0,1 12,7M5.5,8A2.5,2.5 0 0,0 3,10.5C3,11.44 3.53,12.25 4.29,12.68C4.65,12.88 5.06,13 5.5,13C5.94,13 6.35,12.88 6.71,12.68C7.08,12.47 7.39,12.17 7.62,11.81C6.89,10.86 6.5,9.7 6.5,8.5C6.5,8.41 6.5,8.31 6.5,8.22C6.2,8.08 5.86,8 5.5,8M18.5,8C18.14,8 17.8,8.08 17.5,8.22C17.5,8.31 17.5,8.41 17.5,8.5C17.5,9.7 17.11,10.86 16.38,11.81C16.5,12 16.63,12.15 16.78,12.3C16.94,12.45 17.1,12.58 17.29,12.68C17.65,12.88 18.06,13 18.5,13C18.94,13 19.35,12.88 19.71,12.68C20.47,12.25 21,11.44 21,10.5A2.5,2.5 0 0,0 18.5,8M12,14C9.66,14 5,15.17 5,17.5V19H19V17.5C19,15.17 14.34,14 12,14M4.71,14.55C2.78,14.78 0,15.76 0,17.5V19H3V17.07C3,16.06 3.69,15.22 4.71,14.55M19.29,14.55C20.31,15.22 21,16.06 21,17.07V19H24V17.5C24,15.76 21.22,14.78 19.29,14.55M12,16C13.53,16 15.24,16.5 16.23,17H7.77C8.76,16.5 10.47,16 12,16Z",ni="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M6,10V7H4V10H1V12H4V15H6V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z",tr="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z",ir="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",nr="M7 14C5.9 14 5 13.1 5 12S5.9 10 7 10 9 10.9 9 12 8.1 14 7 14M12.6 10C11.8 7.7 9.6 6 7 6C3.7 6 1 8.7 1 12S3.7 18 7 18C9.6 18 11.8 16.3 12.6 14H16V18H20V14H23V10H12.6Z",rr="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z",ar="M15,20A1,1 0 0,0 14,19H13V17H17A2,2 0 0,0 19,15V5A2,2 0 0,0 17,3H7A2,2 0 0,0 5,5V15A2,2 0 0,0 7,17H11V19H10A1,1 0 0,0 9,20H2V22H9A1,1 0 0,0 10,23H14A1,1 0 0,0 15,22H22V20H15M7,15V5H17V15H7Z",sr="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z",or="M21.41 11.58L12.41 2.58A2 2 0 0 0 11 2H4A2 2 0 0 0 2 4V11A2 2 0 0 0 2.59 12.42L11.59 21.42A2 2 0 0 0 13 22A2 2 0 0 0 14.41 21.41L21.41 14.41A2 2 0 0 0 22 13A2 2 0 0 0 21.41 11.58M13 20L4 11V4H11L20 13M6.5 5A1.5 1.5 0 1 1 5 6.5A1.5 1.5 0 0 1 6.5 5Z",Ge;(function(e){e[e.User=0]="User",e[e.Group=1]="Group",e[e.Link=3]="Link",e[e.Email=4]="Email",e[e.Remote=6]="Remote",e[e.Team=7]="Team",e[e.Guest=8]="Guest",e[e.RemoteGroup=9]="RemoteGroup",e[e.Room=10]="Room",e[e.Deck=12]="Deck",e[e.FederatedGroup=14]="FederatedGroup",e[e.ScienceMesh=15]="ScienceMesh"})(Ge||(Ge={}));var ri={exports:{}},ai;function lr(){return ai||(ai=1,(function(e){var i=Object.prototype.hasOwnProperty,n="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(n=!1));function l(p,f,h){this.fn=p,this.context=f,this.once=h||!1}function u(p,f,h,_,L){if(typeof h!="function")throw new TypeError("The listener must be a function");var O=new l(h,_||p,L),B=n?n+f:f;return p._events[B]?p._events[B].fn?p._events[B]=[p._events[B],O]:p._events[B].push(O):(p._events[B]=O,p._eventsCount++),p}function d(p,f){--p._eventsCount===0?p._events=new o:delete p._events[f]}function m(){this._events=new o,this._eventsCount=0}m.prototype.eventNames=function(){var p=[],f,h;if(this._eventsCount===0)return p;for(h in f=this._events)i.call(f,h)&&p.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(f)):p},m.prototype.listeners=function(p){var f=n?n+p:p,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var _=0,L=h.length,O=new Array(L);_<L;_++)O[_]=h[_].fn;return O},m.prototype.listenerCount=function(p){var f=n?n+p:p,h=this._events[f];return h?h.fn?1:h.length:0},m.prototype.emit=function(p,f,h,_,L,O){var B=n?n+p:p;if(!this._events[B])return!1;var I=this._events[B],k=arguments.length,N,w;if(I.fn){switch(I.once&&this.removeListener(p,I.fn,void 0,!0),k){case 1:return I.fn.call(I.context),!0;case 2:return I.fn.call(I.context,f),!0;case 3:return I.fn.call(I.context,f,h),!0;case 4:return I.fn.call(I.context,f,h,_),!0;case 5:return I.fn.call(I.context,f,h,_,L),!0;case 6:return I.fn.call(I.context,f,h,_,L,O),!0}for(w=1,N=new Array(k-1);w<k;w++)N[w-1]=arguments[w];I.fn.apply(I.context,N)}else{var S=I.length,A;for(w=0;w<S;w++)switch(I[w].once&&this.removeListener(p,I[w].fn,void 0,!0),k){case 1:I[w].fn.call(I[w].context);break;case 2:I[w].fn.call(I[w].context,f);break;case 3:I[w].fn.call(I[w].context,f,h);break;case 4:I[w].fn.call(I[w].context,f,h,_);break;default:if(!N)for(A=1,N=new Array(k-1);A<k;A++)N[A-1]=arguments[A];I[w].fn.apply(I[w].context,N)}}return!0},m.prototype.on=function(p,f,h){return u(this,p,f,h,!1)},m.prototype.once=function(p,f,h){return u(this,p,f,h,!0)},m.prototype.removeListener=function(p,f,h,_){var L=n?n+p:p;if(!this._events[L])return this;if(!f)return d(this,L),this;var O=this._events[L];if(O.fn)O.fn===f&&(!_||O.once)&&(!h||O.context===h)&&d(this,L);else{for(var B=0,I=[],k=O.length;B<k;B++)(O[B].fn!==f||_&&!O[B].once||h&&O[B].context!==h)&&I.push(O[B]);I.length?this._events[L]=I.length===1?I[0]:I:d(this,L)}return this},m.prototype.removeAllListeners=function(p){var f;return p?(f=n?n+p:p,this._events[f]&&d(this,f)):(this._events=new o,this._eventsCount=0),this},m.prototype.off=m.prototype.removeListener,m.prototype.addListener=m.prototype.on,m.prefixed=n,m.EventEmitter=m,e.exports=m})(ri)),ri.exports}var cr=lr();const ur=yt(cr);class At extends Error{name="TimeoutError";constructor(i,n){super(i,n),Error.captureStackTrace?.(this,At)}}const si=e=>e.reason??new DOMException("This operation was aborted.","AbortError");function fr(e,i){const{milliseconds:n,fallback:o,message:l,customTimers:u={setTimeout,clearTimeout},signal:d}=i;let m,p;const f=new Promise((h,_)=>{if(typeof n!="number"||Math.sign(n)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${n}\``);if(d?.aborted){_(si(d));return}if(d&&(p=()=>{_(si(d))},d.addEventListener("abort",p,{once:!0})),e.then(h,_),n===Number.POSITIVE_INFINITY)return;const L=new At;m=u.setTimeout.call(void 0,()=>{if(o){try{h(o())}catch(O){_(O)}return}typeof e.cancel=="function"&&e.cancel(),l===!1?h():l instanceof Error?_(l):(L.message=l??`Promise timed out after ${n} milliseconds`,_(L))},n)}).finally(()=>{f.clear(),p&&d&&d.removeEventListener("abort",p)});return f.clear=()=>{u.clearTimeout.call(void 0,m),m=void 0},f}function dr(e,i,n){let o=0,l=e.length;for(;l>0;){const u=Math.trunc(l/2);let d=o+u;n(e[d],i)<=0?(o=++d,l-=u+1):l=u}return o}class oi{#t=[];enqueue(i,n){const{priority:o=0,id:l}=n??{},u={priority:o,id:l,run:i};if(this.size===0||this.#t[this.size-1].priority>=o){this.#t.push(u);return}const d=dr(this.#t,u,(m,p)=>p.priority-m.priority);this.#t.splice(d,0,u)}setPriority(i,n){const o=this.#t.findIndex(u=>u.id===i);if(o===-1)throw new ReferenceError(`No promise function with the id "${i}" exists in the queue.`);const[l]=this.#t.splice(o,1);this.enqueue(l.run,{priority:n,id:i})}remove(i){const n=this.#t.findIndex(o=>typeof i=="string"?o.id===i:o.run===i);n!==-1&&this.#t.splice(n,1)}dequeue(){return this.#t.shift()?.run}filter(i){return this.#t.filter(n=>n.priority===i.priority).map(n=>n.run)}get size(){return this.#t.length}}class hr extends ur{#t;#s;#o=0;#h;#g=!1;#y=!1;#l;#S=0;#E=0;#c;#u;#a;#r=[];#n=0;#e;#A;#i=0;#m;#f;#B=1n;#v=new Map;#w=new Set;timeout;constructor(i){if(super(),i={carryoverIntervalCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:oi,strict:!1,...i},!(typeof i.intervalCap=="number"&&i.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${i.intervalCap?.toString()??""}\` (${typeof i.intervalCap})`);if(i.interval===void 0||!(Number.isFinite(i.interval)&&i.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${i.interval?.toString()??""}\` (${typeof i.interval})`);if(i.strict&&i.interval===0)throw new TypeError("The `strict` option requires a non-zero `interval`");if(i.strict&&i.intervalCap===Number.POSITIVE_INFINITY)throw new TypeError("The `strict` option requires a finite `intervalCap`");if(this.#t=i.carryoverIntervalCount??i.carryoverConcurrencyCount??!1,this.#s=i.intervalCap===Number.POSITIVE_INFINITY||i.interval===0,this.#h=i.intervalCap,this.#l=i.interval,this.#a=i.strict,this.#e=new i.queueClass,this.#A=i.queueClass,this.concurrency=i.concurrency,i.timeout!==void 0&&!(Number.isFinite(i.timeout)&&i.timeout>0))throw new TypeError(`Expected \`timeout\` to be a positive finite number, got \`${i.timeout}\` (${typeof i.timeout})`);this.timeout=i.timeout,this.#f=i.autoStart===!1,this.#U()}#_(i){for(;this.#n<this.#r.length;){const n=this.#r[this.#n];if(n!==void 0&&i-n>=this.#l)this.#n++;else break}(this.#n>100&&this.#n>this.#r.length/2||this.#n===this.#r.length)&&(this.#r=this.#r.slice(this.#n),this.#n=0)}#x(i){this.#a?this.#r.push(i):this.#o++}#F(){this.#a?this.#r.length>this.#n&&this.#r.pop():this.#o>0&&this.#o--}#N(){return this.#r.length-this.#n}get#k(){return this.#s?!0:this.#a?this.#N()<this.#h:this.#o<this.#h}get#P(){return this.#i<this.#m}#$(){this.#i--,this.#i===0&&this.emit("pendingZero"),this.#b(),this.emit("next")}#M(){this.#u=void 0,this.#O(),this.#D()}#V(i){if(this.#a){if(this.#_(i),this.#N()>=this.#h){const n=this.#r[this.#n],o=this.#l-(i-n);return this.#T(o),!0}return!1}if(this.#c===void 0){const n=this.#S-i;if(n<0){if(this.#E>0){const o=i-this.#E;if(o<this.#l)return this.#T(this.#l-o),!0}this.#o=this.#t?this.#i:0}else return this.#T(n),!0}return!1}#T(i){this.#u===void 0&&(this.#u=setTimeout(()=>{this.#M()},i))}#C(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}#L(){this.#u&&(clearTimeout(this.#u),this.#u=void 0)}#b(){if(this.#e.size===0){if(this.#C(),this.emit("empty"),this.#i===0){if(this.#L(),this.#a&&this.#n>0){const n=Date.now();this.#_(n)}this.emit("idle")}return!1}let i=!1;if(!this.#f){const n=Date.now(),o=!this.#V(n);if(this.#k&&this.#P){const l=this.#e.dequeue();this.#s||(this.#x(n),this.#p()),this.emit("active"),l(),o&&this.#D(),i=!0}}return i}#D(){this.#s||this.#c!==void 0||this.#a||(this.#c=setInterval(()=>{this.#O()},this.#l),this.#S=Date.now()+this.#l)}#O(){this.#a||(this.#o===0&&this.#i===0&&this.#c&&this.#C(),this.#o=this.#t?this.#i:0),this.#I(),this.#p()}#I(){for(;this.#b(););}get concurrency(){return this.#m}set concurrency(i){if(!(typeof i=="number"&&i>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${i}\` (${typeof i})`);this.#m=i,this.#I()}setPriority(i,n){if(typeof n!="number"||!Number.isFinite(n))throw new TypeError(`Expected \`priority\` to be a finite number, got \`${n}\` (${typeof n})`);this.#e.setPriority(i,n)}async add(i,n={}){return n={timeout:this.timeout,...n,id:n.id??(this.#B++).toString()},new Promise((o,l)=>{const u=Symbol(`task-${n.id}`);let d=()=>{};const m=async()=>{d(),this.#i++,this.#v.set(u,{id:n.id,priority:n.priority??0,startTime:Date.now(),timeout:n.timeout});let f;try{try{n.signal?.throwIfAborted()}catch(L){throw this.#z(),this.#v.delete(u),L}this.#E=Date.now();let h=i({signal:n.signal});if(n.timeout&&(h=fr(Promise.resolve(h),{milliseconds:n.timeout,message:`Task timed out after ${n.timeout}ms (queue has ${this.#i} running, ${this.#e.size} waiting)`})),n.signal){const{signal:L}=n;h=Promise.race([h,new Promise((O,B)=>{f=()=>{B(L.reason)},L.addEventListener("abort",f,{once:!0})})])}const _=await h;o(_),this.emit("completed",_)}catch(h){l(h),this.emit("error",h)}finally{f&&n.signal?.removeEventListener("abort",f),this.#v.delete(u),queueMicrotask(()=>{this.#$()})}};this.#e.enqueue(m,n);const p=()=>{if(this.#e instanceof oi){this.#e.remove(m);return}this.#e.remove?.(n.id)};if(n.signal){const{signal:f}=n,h=()=>{d(),p(),l(f.reason),this.#b(),this.emit("next")};if(d=()=>{f.removeEventListener("abort",h),this.#w.delete(d)},f.aborted){h();return}f.addEventListener("abort",h,{once:!0}),this.#w.add(d)}this.emit("add"),this.#b()})}async addAll(i,n){return Promise.all(i.map(async o=>this.add(o,n)))}start(){return this.#f?(this.#f=!1,this.#I(),this):this}pause(){this.#f=!0}clear(){for(const i of this.#w)i();this.#e=new this.#A,this.#C(),this.#R(),this.emit("empty"),this.#i===0&&(this.#L(),this.emit("idle")),this.emit("next")}async onEmpty(){this.#e.size!==0&&await this.#d("empty")}async onSizeLessThan(i){this.#e.size<i||await this.#d("next",()=>this.#e.size<i)}async onIdle(){this.#i===0&&this.#e.size===0||await this.#d("idle")}async onPendingZero(){this.#i!==0&&await this.#d("pendingZero")}async onRateLimit(){this.isRateLimited||await this.#d("rateLimit")}async onRateLimitCleared(){this.isRateLimited&&await this.#d("rateLimitCleared")}onError(){return new Promise((i,n)=>{const o=l=>{this.off("error",o),n(l)};this.on("error",o)})}async#d(i,n){return new Promise(o=>{const l=()=>{n&&!n()||(this.off(i,l),o())};this.on(i,l)})}get size(){return this.#e.size}sizeBy(i){return this.#e.filter(i).length}get pending(){return this.#i}get isPaused(){return this.#f}#U(){this.#s||(this.on("add",()=>{this.#e.size>0&&this.#p()}),this.on("next",()=>{this.#p()}))}#p(){this.#s||this.#y||(this.#y=!0,queueMicrotask(()=>{this.#y=!1,this.#R()}))}#z(){this.#s||(this.#F(),this.#p())}#R(){const i=this.#g;if(this.#s||this.#e.size===0){i&&(this.#g=!1,this.emit("rateLimitCleared"));return}let n;if(this.#a){const l=Date.now();this.#_(l),n=this.#N()}else n=this.#o;const o=n>=this.#h;o!==i&&(this.#g=o,this.emit(o?"rateLimit":"rateLimitCleared"))}get isRateLimited(){return this.#g}get isSaturated(){return this.#i===this.#m&&this.#e.size>0||this.isRateLimited&&this.#e.size>0}get runningTasks(){return[...this.#v.values()].map(i=>({...i}))}}const pr=["date","datetime-local","month","time","week"],gr={name:"NcDateTimePickerNative",inheritAttrs:!1,model:{prop:"modelValue",event:"update:modelValue"},props:{value:{type:Date,default:void 0},modelValue:{type:Date,default:null},id:{type:String,default:()=>"date-time-picker-"+ze(),validator:e=>e.trim()!==""},type:{type:String,default:"date",validate:e=>pr.includes(e)},label:{type:String,default:"Please choose a date"},min:{type:[Boolean,Date],default:null},max:{type:[Boolean,Date],default:null},hideLabel:{type:Boolean,default:!1},inputClass:{type:[Object,String],default:""}},emits:["input","update:modelValue","update:model-value"],setup(){return{model:bt("value","input")}},computed:{formattedValue(){return this.formatValue(this.model)},formattedMin(){return this.min?this.formatValue(this.min):!1},formattedMax(){return this.max?this.formatValue(this.max):!1},listeners(){return{...this.$listeners,input:e=>{if(isNaN(e.target.valueAsNumber))this.model=null;else if(this.type==="time"){const i=e.target.value;if(this.model===""){const{yyyy:n,MM:o,dd:l}=this.getReadableDate(new Date);this.model=new Date(`${n}-${o}-${l}T${i}`)}else{const{yyyy:n,MM:o,dd:l}=this.getReadableDate(this.model);this.model=new Date(`${n}-${o}-${l}T${i}`)}}else if(this.type==="month"){const i=(new Date(e.target.value).getMonth()+1).toString().padStart(2,"0");if(this.model===""){const{yyyy:n,dd:o,hh:l,mm:u}=this.getReadableDate(new Date);this.model=new Date(`${n}-${i}-${o}T${l}:${u}`)}else{const{yyyy:n,dd:o,hh:l,mm:u}=this.getReadableDate(this.model);this.model=new Date(`${n}-${i}-${o}T${l}:${u}`)}}else{const i=new Date(e.target.valueAsNumber).getTimezoneOffset()*1e3*60,n=e.target.valueAsNumber+i;this.model=new Date(n)}}}}},methods:{getReadableDate(e){if(e instanceof Date){const i=e.getFullYear().toString().padStart(4,"0"),n=(e.getMonth()+1).toString().padStart(2,"0"),o=e.getDate().toString().padStart(2,"0"),l=e.getHours().toString().padStart(2,"0"),u=e.getMinutes().toString().padStart(2,"0");return{yyyy:i,MM:n,dd:o,hh:l,mm:u}}},formatValue(e){if(e instanceof Date){const{yyyy:i,MM:n,dd:o,hh:l,mm:u}=this.getReadableDate(e);if(this.type==="datetime-local")return`${i}-${n}-${o}T${l}:${u}`;if(this.type==="date")return`${i}-${n}-${o}`;if(this.type==="month")return`${i}-${n}`;if(this.type==="time")return`${l}:${u}`;if(this.type==="week"){const d=new Date(i,0,1),m=Math.floor((e-d)/(1440*60*1e3)),p=Math.ceil(m/7);return`${i}-W${p}`}}else return""}}};var mr=function(){var e=this,i=e._self._c;return i("div",{staticClass:"native-datetime-picker"},[i("label",{staticClass:"native-datetime-picker--label",class:{"hidden-visually":e.hideLabel},attrs:{for:e.id}},[e._v(" "+e._s(e.label)+" ")]),i("input",e._g(e._b({staticClass:"native-datetime-picker--input",class:e.inputClass,attrs:{id:e.id,type:e.type,min:e.formattedMin,max:e.formattedMax},domProps:{value:e.formattedValue}},"input",e.$attrs,!1),e.listeners))])},vr=[],br=ue(gr,mr,vr,!1,null,"6c1feae8");const Oi=br.exports;on(Oi);var Pe={exports:{}},li;function yr(){if(li)return Pe.exports;li=1;function e(i,n=100,o={}){if(typeof i!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof i}\`.`);if(n<0)throw new RangeError("`wait` must not be negative.");const{immediate:l}=typeof o=="boolean"?{immediate:o}:o;let u,d,m,p,f;function h(){const O=u,B=d;return u=void 0,d=void 0,f=i.apply(O,B),f}function _(){const O=Date.now()-p;O<n&&O>=0?m=setTimeout(_,n-O):(m=void 0,l||(f=h()))}const L=function(...O){if(u&&this!==u&&Object.getPrototypeOf(this)===Object.getPrototypeOf(u))throw new Error("Debounced method called with different contexts of the same prototype.");u=this,d=O,p=Date.now();const B=l&&!m;return m||(m=setTimeout(_,n)),B&&(f=h()),f};return Object.defineProperty(L,"isPending",{get(){return m!==void 0}}),L.clear=()=>{m&&(clearTimeout(m),m=void 0)},L.flush=()=>{m&&L.trigger()},L.trigger=()=>{f=h(),L.clear()},L}return Pe.exports.debounce=e,Pe.exports=e,Pe.exports}var Er=yr();const Ri=yt(Er),wr={name:"EyeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var _r=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon eye-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Nr=[],Tr=ue(wr,_r,Nr,!1,null,null);const Cr=Tr.exports,Ir={name:"EyeOffIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Sr=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon eye-off-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Ar=[],Lr=ue(Ir,Sr,Ar,!1,null,null);const Dr=Lr.exports;Et(ln);const Or=_n("core","capabilities",{}).password_policy||null,Rr=new Set(Object.keys(mt.props)),Br={name:"NcPasswordField",components:{NcInputField:mt,IconEye:Cr,IconEyeOff:Dr},inheritAttrs:!1,model:{prop:"modelValue",event:"update:modelValue"},props:{" ":{},...mt.props,showTrailingButton:{type:Boolean,default:!0},trailingButtonLabel:void 0,checkPasswordStrength:{type:Boolean,default:!1},minlength:{type:Number,default:void 0},maxlength:{type:Number,default:null},asText:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},emits:["valid","invalid","update:value","update:modelValue","update:model-value","update:visible"],setup(e,{emit:i}){const n=bt("value","update:value"),o=un(e,"visible",i,{passive:!0});return{t:be,model:n,visibility:o}},data(){return{internalHelpMessage:"",isValid:null}},computed:{computedError(){return this.error||this.isValid===!1},computedSuccess(){return this.success||this.isValid===!0},computedHelperText(){return this.helperText.length>0?this.helperText:this.internalHelpMessage},rules(){const{minlength:e}=this;return{minlength:e??(this.checkPasswordStrength?Or?.minLength:void 0)}},trailingButtonLabelPassword(){return this.visibility?be("Hide password"):be("Show password")},propsAndAttrsToForward(){return{...this.$attrs,...Object.fromEntries(Object.entries(this.$props).filter(([e])=>Rr.has(e)))}}},watch:{model(e){this.isValid=void 0,this.internalHelpMessage="",e&&this.checkPasswordStrength&&this.checkPassword(e)}},methods:{focus(){this.$refs.inputField.focus()},select(){this.$refs.inputField.select()},handleInput(e){this.model=e.target.value},toggleVisibility(){this.visibility=!this.visibility},checkPassword:Ri(async function(e){try{const{data:i}=await wt.post(Yi("apps/password_policy/api/v1/validate"),{password:e});if(this.isValid=i.ocs.data.passed,i.ocs.data.passed){this.internalHelpMessage=be("Password is secure"),this.$emit("valid");return}this.internalHelpMessage=i.ocs.data.reason,this.$emit("invalid")}catch(i){cn.error("Password policy returned an error",i)}},500)}};var xr=function(){var e=this,i=e._self._c;return i("NcInputField",e._g(e._b({ref:"inputField",attrs:{type:e.visibility||e.asText?"text":"password","trailing-button-label":e.trailingButtonLabelPassword,"helper-text":e.computedHelperText,error:e.computedError,success:e.computedSuccess,minlength:e.rules.minlength,"input-class":{"password-field__input--secure-text":!e.visibility&&e.asText}},on:{"trailing-button-click":e.toggleVisibility,input:e.handleInput},scopedSlots:e._u([e.$scopedSlots.icon||e.$slots.default||e.$scopedSlots.default?{key:"icon",fn:function(){return[e._t("icon",function(){return[e._t("default")]})]},proxy:!0}:null,{key:"trailing-button-icon",fn:function(){return[e.visibility?i("IconEyeOff",{attrs:{size:18}}):i("IconEye",{attrs:{size:18}})]},proxy:!0}],null,!0)},"NcInputField",e.propsAndAttrsToForward,!1),e.$listeners))},Fr=[],kr=ue(Br,xr,Fr,!1,null,"0800cef1");const Pr=kr.exports;Et(fn);const $r={name:"NcActionInput",components:{NcDateTimePickerNative:Oi,NcPasswordField:Pr,NcTextField:mi,NcColorPicker:Je(()=>et(()=>import("./NcColorPicker-Dc8R25Bt.chunk.mjs"),__vite__mapDeps([0,1,2,3]),import.meta.url)),NcDateTimePicker:Je(()=>et(()=>import("./NcDateTimePicker-Cok71ReF.chunk.mjs"),__vite__mapDeps([4,1,2,3,5]),import.meta.url)),NcSelect:Je(()=>et(()=>Promise.resolve().then(()=>wa),void 0,import.meta.url))},mixins:[Wi],model:{prop:"modelValue",event:"update:modelValue"},props:{id:{type:String,default:()=>"action-"+ze(),validator:e=>e.trim()!==""},inputId:{type:String,default:()=>"action-input-"+ze(),validator:e=>e.trim()!==""},icon:{type:String,default:""},type:{type:String,default:"text",validator(e){return["date","datetime-local","month","multiselect","number","password","search","tel","text","time","url","week","color","email"].indexOf(e)>-1}},idNativeDateTimePicker:{type:String,default:"date-time-picker_id"},isNativePicker:{type:Boolean,default:!1},label:{type:String,default:null},labelOutside:{type:Boolean,default:!0},value:{type:[String,Date,Number,Array],default:void 0},modelValue:{type:[String,Date,Number,Array],default:""},disabled:{type:Boolean,default:!1},ariaLabel:{type:String,default:""},ariaHidden:{type:Boolean,default:null},showTrailingButton:{type:Boolean,default:!0},trailingButtonLabel:{type:String,default:be("Submit")}},emits:["input","submit","change","update:value","update:modelValue","update:model-value"],setup(){return{model:bt("value","update:value")}},computed:{isIconUrl(){try{return new URL(this.icon)}catch{return!1}},isMultiselectType(){return this.type==="multiselect"},nativeDatePickerType(){switch(this.type){case"date":case"month":case"time":case"week":case"datetime-local":return this.type}return!1},datePickerType(){if(!this.isNativePicker)switch(this.type){case"date":case"month":case"time":return this.type;case"datetime-local":return"datetime"}return!1},isFocusable(){return!this.disabled}},methods:{onLeave(){this.$refs.datetimepicker&&this.$refs.datetimepicker.$refs.datepicker&&this.$refs.datetimepicker.$refs.datepicker.closePopup()},onInput(e){this.$emit("input",e),this.model=e.target?e.target.value:e},onSubmit(e){if(e.preventDefault(),e.stopPropagation(),!this.disabled)this.$emit("submit",e);else return!1},onChange(e){this.$emit("change",e)}}};var Mr=function(){var e=this,i=e._self._c;return i("li",{staticClass:"action",class:{"action--disabled":e.disabled}},[i("span",{staticClass:"action-input",class:{"action-input-picker--disabled":e.disabled,"action-input--visible-label":e.labelOutside&&e.label},on:{mouseleave:e.onLeave}},[i("span",{staticClass:"action-input__icon-wrapper"},[e._t("icon",function(){return[i("span",{staticClass:"action-input__icon",class:[e.isIconUrl?"action-input__icon--url":e.icon],style:{backgroundImage:e.isIconUrl?`url(${e.icon})`:null},attrs:{"aria-hidden":"true"}})]})],2),i("form",{ref:"form",staticClass:"action-input__form",attrs:{disabled:e.disabled},on:{submit:function(n){return n.preventDefault(),e.onSubmit.apply(null,arguments)}}},[i("div",{staticClass:"action-input__container"},[e.label&&e.labelOutside&&!e.isNativePicker?i("label",{staticClass:"action-input__text-label",class:{"action-input__text-label--hidden":!e.labelOutside},attrs:{for:e.inputId}},[e._v(" "+e._s(e.label)+" ")]):e._e(),i("div",{staticClass:"action-input__input-container"},[e.datePickerType?i("NcDateTimePicker",e._b({ref:"datetimepicker",staticClass:"action-input__datetimepicker",staticStyle:{"z-index":"99999999999"},attrs:{value:e.model,placeholder:e.text,disabled:e.disabled,type:e.datePickerType,"input-class":["mx-input",{focusable:e.isFocusable}]},on:{input:e.onInput,change:e.onChange}},"NcDateTimePicker",e.$attrs,!1)):e.isNativePicker?i("NcDateTimePickerNative",e._b({staticClass:"action-input__datetimepicker",attrs:{id:e.idNativeDateTimePicker,value:e.model,label:e.label,type:e.nativeDatePickerType,"input-class":{focusable:e.isFocusable}},on:{"update:model-value":function(n){e.model=n},change:function(n){return e.$emit("change",n)}}},"NcDateTimePickerNative",e.$attrs,!1)):e.isMultiselectType?i("NcSelect",e._g(e._b({staticClass:"action-input__multi",attrs:{value:e.model,placeholder:e.text,disabled:e.disabled,"append-to-body":e.$attrs.appendToBody||e.$attrs["append-to-body"]||!1,"input-class":{focusable:e.isFocusable}}},"NcSelect",e.$attrs,!1),e.$listeners)):e.type==="password"?i("NcPasswordField",e._g(e._b({attrs:{id:e.inputId,value:e.model,label:e.label,"label-outside":!e.label||e.labelOutside,placeholder:e.text,disabled:e.disabled,"input-class":{focusable:e.isFocusable},"show-trailing-button":e.showTrailingButton&&!e.disabled},on:{input:e.onInput,change:e.onChange}},"NcPasswordField",e.$attrs,!1),e.$listeners)):e.type==="color"?i("div",{staticClass:"action-input__container"},[e.label&&e.type==="color"?i("label",{staticClass:"action-input__text-label",class:{"action-input__text-label--hidden":!e.labelOutside},attrs:{for:e.inputId}},[e._v(" "+e._s(e.label)+" ")]):e._e(),i("div",{staticClass:"action-input__input-container"},[i("NcColorPicker",e._g(e._b({staticClass:"colorpicker__trigger",attrs:{id:"inputId",value:e.model},on:{"update:model-value":e.onInput,submit:function(n){return e.$refs.form.requestSubmit()}}},"NcColorPicker",e.$attrs,!1),e.$listeners),[i("button",{staticClass:"colorpicker__preview",class:{focusable:e.isFocusable},style:{"background-color":e.model}})])],1)]):i("NcTextField",e._g(e._b({attrs:{id:e.inputId,value:e.model,label:e.label,"label-outside":!e.label||e.labelOutside,placeholder:e.text,disabled:e.disabled,"input-class":{focusable:e.isFocusable},type:e.type,"trailing-button-icon":"arrowRight","trailing-button-label":e.trailingButtonLabel,"show-trailing-button":e.showTrailingButton&&!e.disabled},on:{"trailing-button-click":function(n){return e.$refs.form.requestSubmit()},input:e.onInput,change:e.onChange}},"NcTextField",e.$attrs,!1),e.$listeners))],1)])])])])},Vr=[],Ur=ue($r,Mr,Vr,!1,null,"90a59812");const zr=Ur.exports,Hr={name:"ChevronRightIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Gr=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon chevron-right-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},jr=[],Xr=ue(Hr,Gr,jr,!1,null,null);const qr=Xr.exports,Yr={name:"NcBreadcrumb",components:{NcActions:Nt,ChevronRight:qr,NcButton:_t},inheritAttrs:!1,props:{name:{type:String,required:!0},title:{type:String,default:null},to:{type:[String,Object],default:void 0},exact:{type:Boolean,default:!1},href:{type:String,default:void 0},icon:{type:String,default:""},forceIconText:{type:Boolean,default:!1},disableDrop:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:["update:open","dropped"],setup(){const e=Zi();return{actionsContainer:`.vue-crumb[data-crumb-id="${e}"]`,crumbId:e}},data(){return{hovering:!1}},computed:{linkAttributes(){return this.to?{to:this.to,exact:this.exact,...this.$attrs}:this.href?{href:this.href,...this.$attrs}:this.$attrs}},methods:{onOpenChange(e){this.$emit("update:open",e)},dropped(e){return this.disableDrop||(this.$emit("dropped",e,this.to||this.href),this.$parent.$emit("dropped",e,this.to||this.href),this.hovering=!1),!1},dragEnter(){this.disableDrop||(this.hovering=!0)},dragLeave(e){this.disableDrop||e.target.contains(e.relatedTarget)||this.$refs.crumb.contains(e.relatedTarget)||(this.hovering=!1)}}};var Wr=function(){var e=this,i=e._self._c;return i("li",{ref:"crumb",staticClass:"vue-crumb",class:{"vue-crumb--hovered":e.hovering},attrs:{"data-crumb-id":e.crumbId,draggable:"false"},on:{dragstart:function(n){return n.preventDefault(),(()=>{}).apply(null,arguments)},drop:function(n){return n.preventDefault(),e.dropped.apply(null,arguments)},dragover:function(n){return n.preventDefault(),(()=>{}).apply(null,arguments)},dragenter:e.dragEnter,dragleave:e.dragLeave}},[(e.name||e.icon||e.$slots.icon)&&!e.$slots.default?i("NcButton",e._g(e._b({attrs:{"aria-label":e.icon?e.name:void 0,title:e.title,variant:"tertiary"},scopedSlots:e._u([e.$slots.icon||e.icon?{key:"icon",fn:function(){return[e._t("icon",function(){return[i("span",{staticClass:"icon",class:e.icon})]})]},proxy:!0}:null,!(e.$slots.icon||e.icon)||e.forceIconText?{key:"default",fn:function(){return[e._v(" "+e._s(e.name)+" ")]},proxy:!0}:null],null,!0)},"NcButton",e.linkAttributes,!1),e.$listeners)):e._e(),e.$slots.default?i("NcActions",{ref:"actions",attrs:{"force-menu":e.forceMenu,open:e.open,"menu-name":e.name,title:e.title,"force-name":!0,container:e.actionsContainer,variant:"tertiary"},on:{"update:open":e.onOpenChange},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("menu-icon")]},proxy:!0}],null,!0)},[e._t("default")],2):e._e(),i("ChevronRight",{staticClass:"vue-crumb__separator",attrs:{size:20}})],1)},Zr=[],Qr=ue(Yr,Wr,Zr,!1,null,"bc2f0c21");const Bi=Qr.exports;var Xe=Symbol(),Oe=Symbol(),ci=Symbol(),ui=Symbol(),Lt=function(e){return"frag"in e},Kr={get:function(){return this[Oe]||this.parentElement},configurable:!0},Re=function(e,i){Oe in e||(e[Oe]=i,Object.defineProperty(e,"parentNode",Kr))},Jr={get:function(){var e=this.parentNode.childNodes,i=e.indexOf(this);return i>-1&&e[i+1]||null}},Ue=function(e){ci in e||(e[ci]=!0,Object.defineProperty(e,"nextSibling",Jr))},ea=function(e,i){for(;e.parentNode!==i;){var n=e,o=n.parentNode;o&&(e=o)}return e},pt,xi=function(e){if(!pt){var i=Object.getOwnPropertyDescriptor(Node.prototype,"childNodes");pt=i.get}var n=pt.apply(e),o=Array.from(n).map((function(l){return ea(l,e)}));return o.filter((function(l,u){return l!==o[u-1]}))},ta={get:function(){return this.frag||xi(this)}},ia={get:function(){return this.childNodes[0]||null}};function na(){return this.childNodes.length>0}var fi=function(e){ui in e||(e[ui]=!0,Object.defineProperties(e,{childNodes:ta,firstChild:ia}),e.hasChildNodes=na)};function ra(){var e;(e=this.frag[0]).before.apply(e,arguments)}function aa(){var e=this.frag,i=e.splice(0,e.length);i.forEach((function(n){n.remove()}))}var sa=function e(i){var n;return(n=Array.prototype).concat.apply(n,i.map((function(o){return Lt(o)?e(o.frag):o})))},oa=function(e,i){var n=e[Xe];i.before(n),Re(n,e),e.frag.unshift(n)};function di(e){if(Lt(this)){var i=this.frag.indexOf(e);if(i>-1){var n=this.frag.splice(i,1),o=n[0];this.frag.length===0&&oa(this,o),e.remove()}}else{var l=xi(this),u=l.indexOf(e);u>-1&&e.remove()}return e}function hi(e,i){var n=this,o=e.frag||[e];if(Lt(this)){if(e[Oe]===this&&e.parentElement)return e;var l=this.frag;if(i){var u=l.indexOf(i);u>-1&&(l.splice.apply(l,[u,0].concat(o)),i.before.apply(i,o))}else{var d=l[l.length-1];l.push.apply(l,o),d.after.apply(d,o)}Fi(this)}else i?this.childNodes.includes(i)&&i.before.apply(i,o):this.append.apply(this,o);o.forEach((function(p){Re(p,n)}));var m=o[o.length-1];return Ue(m),e}function la(e){if(e[Oe]===this&&e.parentElement)return e;var i=this.frag,n=i[i.length-1];return n.after(e),Re(e,this),Fi(this),i.push(e),e}var Fi=function(e){var i=e[Xe];e.frag[0]===i&&(e.frag.shift(),i.remove())},ca={set:function(e){var i=this;if(this.frag[0]!==this[Xe]&&this.frag.slice().forEach((function(o){return i.removeChild(o)})),e){var n=document.createElement("div");n.innerHTML=e,Array.from(n.childNodes).forEach((function(o){i.appendChild(o)}))}},get:function(){return""}},ua={inserted:function(e){var i=e.parentNode,n=e.nextSibling,o=e.previousSibling,l=Array.from(e.childNodes),u=document.createComment("");l.length===0&&l.push(u),e.frag=l,e[Xe]=u;var d=document.createDocumentFragment();d.append.apply(d,sa(l)),e.replaceWith(d),l.forEach((function(m){Re(m,e),Ue(m)})),fi(e),Object.assign(e,{remove:aa,appendChild:la,insertBefore:hi,removeChild:di,before:ra}),Object.defineProperty(e,"innerHTML",ca),i&&(Object.assign(i,{removeChild:di,insertBefore:hi}),Re(e,i),fi(i)),n&&Ue(e),o&&Ue(o)},unbind:function(e){e.remove()}},ki={name:"Fragment",directives:{frag:ua},render:function(e){return e("div",{directives:[{name:"frag"}]},this.$slots.default)}};const fa={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var da=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon folder-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},ha=[],pa=ue(fa,da,ha,!1,null,null);const ga=pa.exports;function pi(e,i,n){if(e!==void 0)for(let o=e.length-1;o>=0;o--){const l=e[o],u=!l.componentOptions&&l.tag&&i.indexOf(l.tag)===-1,d=!!l.componentOptions&&typeof l.componentOptions.tag=="string",m=d&&i.indexOf(l.componentOptions.tag)===-1;(u||!d||m)&&((u||m)&&Me.util.warn(`${u?l.tag:l.componentOptions.tag} is not allowed inside the ${n.$options.name} component`,n),e.splice(o,1))}}const re="vue-crumb",ma={name:"NcBreadcrumbs",components:{NcActions:Nt,NcActionButton:Ji,NcActionRouter:Ki,NcActionLink:Qi,NcBreadcrumb:Bi,IconFolder:ga},props:{rootIcon:{type:String,default:"icon-home"},ariaLabel:{type:String,default:null}},emits:["dropped"],data(){return{hiddenIndices:[],menuBreadcrumbProps:{name:"",forceMenu:!0,disableDrop:!0,open:!1},breadcrumbsRefs:{}}},beforeMount(){pi(this.$slots.default,["NcBreadcrumb"],this)},beforeUpdate(){pi(this.$slots.default,["NcBreadcrumb"],this)},created(){window.addEventListener("resize",Ri(()=>{this.handleWindowResize()},100)),hn("navigation-toggled",this.delayedResize)},mounted(){this.handleWindowResize()},updated(){this.delayedResize(),this.$nextTick(()=>{this.hideCrumbs()})},beforeDestroy(){window.removeEventListener("resize",this.handleWindowResize),dn("navigation-toggled",this.delayedResize)},methods:{closeActions(e){this.$refs.actionsBreadcrumb.$el.contains(e.relatedTarget)||(this.menuBreadcrumbProps.open=!1)},async delayedResize(){await this.$nextTick(),this.handleWindowResize()},handleWindowResize(){if(!this.$refs.container)return;const e=Object.values(this.breadcrumbsRefs),i=e.length,n=[],o=this.$refs.container.offsetWidth;let l=this.getTotalWidth(e);this.$refs.breadcrumb__actions&&(l+=this.$refs.breadcrumb__actions.offsetWidth);let u=l-o;u+=u>0?64:0;let d=0;const m=Math.floor(i/2);for(;u>0&&d<i-2;){const p=m+(d%2?d+1:d)/2*Math.pow(-1,d+i%2);u-=this.getWidth(e[p]?.elm,p===e.length-1),n.push(p),d++}this.arraysEqual(this.hiddenIndices,n.sort((p,f)=>p-f))||(this.hiddenIndices=n)},arraysEqual(e,i){if(e.length!==i.length)return!1;if(e===i)return!0;if(e===null||i===null)return!1;for(let n=0;n<e.length;++n)if(e[n]!==i[n])return!1;return!0},getTotalWidth(e){return e.reduce((i,n,o)=>i+this.getWidth(n?.elm,o===e.length-1),0)},getWidth(e,i){if(!e?.classList)return 0;const n=e.classList.contains(`${re}--hidden`);e.style.minWidth="auto",i&&(e.style.maxWidth="210px"),e.classList.remove(`${re}--hidden`);const o=e.offsetWidth;return n&&e.classList.add(`${re}--hidden`),e.style.minWidth="",e.style.maxWidth="",o},preventDefault(e){return e.preventDefault&&e.preventDefault(),!1},dragStart(e){return this.preventDefault(e)},dropped(e,i,n){return n||this.$emit("dropped",e,i),this.menuBreadcrumbProps.open=!1,document.querySelectorAll(`.${re}`).forEach(o=>{o.classList.remove(`${re}--hovered`)}),this.preventDefault(e)},dragOver(e){return this.preventDefault(e)},dragEnter(e,i){if(!i&&e.target.closest){const n=e.target.closest(`.${re}`);n.classList&&n.classList.contains(re)&&(document.querySelectorAll(`.${re}`).forEach(o=>{o.classList.remove(`${re}--hovered`)}),n.classList.add(`${re}--hovered`))}},dragLeave(e,i){if(!i&&!e.target.contains(e.relatedTarget)&&e.target.closest){const n=e.target.closest(`.${re}`);if(n.contains(e.relatedTarget))return;n.classList&&n.classList.contains(re)&&n.classList.remove(`${re}--hovered`)}},hideCrumbs(){Object.values(this.breadcrumbsRefs).forEach((e,i)=>{e?.elm?.classList&&(this.hiddenIndices.includes(i)?e.elm.classList.add(`${re}--hidden`):e.elm.classList.remove(`${re}--hidden`))})},isBreadcrumb(e){return(e?.componentOptions?.tag||e?.tag||"").includes("NcBreadcrumb")}},render(e){const i=[];if(this.$slots.default.forEach(u=>{if(this.isBreadcrumb(u)){i.push(u);return}u?.type===ki&&u?.children?.forEach?.(d=>{this.isBreadcrumb(d)&&i.push(d)})}),i.length===0)return;Me.set(i[0].componentOptions.propsData,"icon",this.rootIcon),Me.set(i[0].componentOptions.propsData,"ref","breadcrumbs");const n={};i.forEach((u,d)=>{Me.set(u,"ref",`crumb-${d}`),n[d]=u});let o;if(!this.hiddenIndices.length)o=i;else{o=i.slice(0,Math.round(i.length/2)),o.push(e("NcBreadcrumb",{class:"dropdown",props:this.menuBreadcrumbProps,attrs:{"aria-hidden":!0},ref:"actionsBreadcrumb",key:"actions-breadcrumb-1",nativeOn:{dragstart:this.dragStart,dragenter:()=>{this.menuBreadcrumbProps.open=!0},dragleave:this.closeActions},on:{"update:open":d=>{this.menuBreadcrumbProps.open=d}}},this.hiddenIndices.filter(d=>d<=i.length-1).map(d=>{const m=i[d],p=m.componentOptions.propsData.to,f=m.componentOptions.propsData.href,h=m.componentOptions.propsData.disableDrop,_=m.componentOptions.propsData.title,L=m.componentOptions.propsData.name;let O="NcActionButton",B="";f&&(O="NcActionLink",B=f),p&&(O="NcActionRouter",B=p);const I=e("IconFolder",{props:{size:20},slot:"icon"});return e(O,{class:re,props:{href:f||null,title:_,to:p||null},attrs:{draggable:!1},on:{...m.componentOptions.listeners},nativeOn:{dragstart:this.dragStart,drop:k=>this.dropped(k,B,h),dragover:this.dragOver,dragenter:k=>this.dragEnter(k,h),dragleave:k=>this.dragLeave(k,h)}},[I,L])})));const u=i.slice(Math.round(i.length/2));o=o.concat(u)}const l=[e("nav",{attrs:{"aria-label":this.ariaLabel}},[e("ul",{class:"breadcrumb__crumbs"},[o])])];return this.$slots.actions&&l.push(e("div",{class:"breadcrumb__actions",ref:"breadcrumb__actions"},this.$slots.actions)),this.breadcrumbsRefs=n,e("div",{class:["breadcrumb",{"breadcrumb--collapsed":this.hiddenIndices.length===i.length-2}],ref:"container"},l)}},va=null,ba=null;var ya=ue(ma,va,ba,!1,null,"8d4e090c");const Ea=ya.exports,wa=Object.freeze(Object.defineProperty({__proto__:null,default:vi},Symbol.toStringTag,{value:"Module"}));var gt,gi;function _a(){if(gi)return gt;gi=1;function e(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function i(l,u){for(var d="",m=0,p=-1,f=0,h,_=0;_<=l.length;++_){if(_<l.length)h=l.charCodeAt(_);else{if(h===47)break;h=47}if(h===47){if(!(p===_-1||f===1))if(p!==_-1&&f===2){if(d.length<2||m!==2||d.charCodeAt(d.length-1)!==46||d.charCodeAt(d.length-2)!==46){if(d.length>2){var L=d.lastIndexOf("/");if(L!==d.length-1){L===-1?(d="",m=0):(d=d.slice(0,L),m=d.length-1-d.lastIndexOf("/")),p=_,f=0;continue}}else if(d.length===2||d.length===1){d="",m=0,p=_,f=0;continue}}u&&(d.length>0?d+="/..":d="..",m=2)}else d.length>0?d+="/"+l.slice(p+1,_):d=l.slice(p+1,_),m=_-p-1;p=_,f=0}else h===46&&f!==-1?++f:f=-1}return d}function n(l,u){var d=u.dir||u.root,m=u.base||(u.name||"")+(u.ext||"");return d?d===u.root?d+m:d+l+m:m}var o={resolve:function(){for(var l="",u=!1,d,m=arguments.length-1;m>=-1&&!u;m--){var p;m>=0?p=arguments[m]:(d===void 0&&(d=yi.cwd()),p=d),e(p),p.length!==0&&(l=p+"/"+l,u=p.charCodeAt(0)===47)}return l=i(l,!u),u?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(l){if(e(l),l.length===0)return".";var u=l.charCodeAt(0)===47,d=l.charCodeAt(l.length-1)===47;return l=i(l,!u),l.length===0&&!u&&(l="."),l.length>0&&d&&(l+="/"),u?"/"+l:l},isAbsolute:function(l){return e(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,u=0;u<arguments.length;++u){var d=arguments[u];e(d),d.length>0&&(l===void 0?l=d:l+="/"+d)}return l===void 0?".":o.normalize(l)},relative:function(l,u){if(e(l),e(u),l===u||(l=o.resolve(l),u=o.resolve(u),l===u))return"";for(var d=1;d<l.length&&l.charCodeAt(d)===47;++d);for(var m=l.length,p=m-d,f=1;f<u.length&&u.charCodeAt(f)===47;++f);for(var h=u.length,_=h-f,L=p<_?p:_,O=-1,B=0;B<=L;++B){if(B===L){if(_>L){if(u.charCodeAt(f+B)===47)return u.slice(f+B+1);if(B===0)return u.slice(f+B)}else p>L&&(l.charCodeAt(d+B)===47?O=B:B===0&&(O=0));break}var I=l.charCodeAt(d+B),k=u.charCodeAt(f+B);if(I!==k)break;I===47&&(O=B)}var N="";for(B=d+O+1;B<=m;++B)(B===m||l.charCodeAt(B)===47)&&(N.length===0?N+="..":N+="/..");return N.length>0?N+u.slice(f+O):(f+=O,u.charCodeAt(f)===47&&++f,u.slice(f))},_makeLong:function(l){return l},dirname:function(l){if(e(l),l.length===0)return".";for(var u=l.charCodeAt(0),d=u===47,m=-1,p=!0,f=l.length-1;f>=1;--f)if(u=l.charCodeAt(f),u===47){if(!p){m=f;break}}else p=!1;return m===-1?d?"/":".":d&&m===1?"//":l.slice(0,m)},basename:function(l,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');e(l);var d=0,m=-1,p=!0,f;if(u!==void 0&&u.length>0&&u.length<=l.length){if(u.length===l.length&&u===l)return"";var h=u.length-1,_=-1;for(f=l.length-1;f>=0;--f){var L=l.charCodeAt(f);if(L===47){if(!p){d=f+1;break}}else _===-1&&(p=!1,_=f+1),h>=0&&(L===u.charCodeAt(h)?--h===-1&&(m=f):(h=-1,m=_))}return d===m?m=_:m===-1&&(m=l.length),l.slice(d,m)}else{for(f=l.length-1;f>=0;--f)if(l.charCodeAt(f)===47){if(!p){d=f+1;break}}else m===-1&&(p=!1,m=f+1);return m===-1?"":l.slice(d,m)}},extname:function(l){e(l);for(var u=-1,d=0,m=-1,p=!0,f=0,h=l.length-1;h>=0;--h){var _=l.charCodeAt(h);if(_===47){if(!p){d=h+1;break}continue}m===-1&&(p=!1,m=h+1),_===46?u===-1?u=h:f!==1&&(f=1):u!==-1&&(f=-1)}return u===-1||m===-1||f===0||f===1&&u===m-1&&u===d+1?"":l.slice(u,m)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return n("/",l)},parse:function(l){e(l);var u={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return u;var d=l.charCodeAt(0),m=d===47,p;m?(u.root="/",p=1):p=0;for(var f=-1,h=0,_=-1,L=!0,O=l.length-1,B=0;O>=p;--O){if(d=l.charCodeAt(O),d===47){if(!L){h=O+1;break}continue}_===-1&&(L=!1,_=O+1),d===46?f===-1?f=O:B!==1&&(B=1):f!==-1&&(B=-1)}return f===-1||_===-1||B===0||B===1&&f===_-1&&f===h+1?_!==-1&&(h===0&&m?u.base=u.name=l.slice(1,_):u.base=u.name=l.slice(h,_)):(h===0&&m?(u.name=l.slice(1,f),u.base=l.slice(1,_)):(u.name=l.slice(h,f),u.base=l.slice(h,_)),u.ext=l.slice(f,_)),h>0?u.dir=l.slice(0,h-1):m&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};return o.posix=o,gt=o,gt}var je=_a();const Na={name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Ta=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon file-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Ca=[],Ia=ae(Na,Ta,Ca,!1,null,null);const Pi=Ia.exports,$i=()=>{const e=Di("files","config",null),i=z(e?.show_hidden??!0),n=z(e?.sort_favorites_first??!0),o=z(e?.crop_image_previews??!0);return Be(async()=>{if(Ti())console.debug("Skip loading files settings - currently on public share");else try{const{data:l}=await wt.get(St("/apps/files/api/v1/configs"));i.value=l?.data?.show_hidden??!1,n.value=l?.data?.sort_favorites_first??!0,o.value=l?.data?.crop_image_previews??!0}catch(l){console.error("Could not load files settings",l),Tt(K("Could not load files settings"))}}),{showHiddenFiles:i,sortFavoritesFirst:n,cropImagePreviews:o}},Sa=e=>{const i=f=>f==="asc"?"ascending":f==="desc"?"descending":"none",n=Di("files","viewConfigs",null),o=z({sortBy:n?.files?.sorting_mode??"basename",order:i(n?.files?.sorting_direction??"asc")}),l=z({sortBy:n?.recent?.sorting_mode??"basename",order:i(n?.recent?.sorting_direction??"asc")}),u=z({sortBy:n?.favorites?.sorting_mode??"basename",order:i(n?.favorites?.sorting_direction??"asc")});Be(async()=>{if(Ti())console.debug("Skip loading files views - currently on public share");else try{const{data:f}=await wt.get(St("/apps/files/api/v1/views"));o.value={sortBy:f?.data?.files?.sorting_mode??"basename",order:i(f?.data?.files?.sorting_direction)},u.value={sortBy:f?.data?.favorites?.sorting_mode??"basename",order:i(f?.data?.favorites?.sorting_direction)},l.value={sortBy:f?.data?.recent?.sorting_mode??"basename",order:i(f?.data?.recent?.sorting_direction)}}catch(f){console.error("Could not load files views",f),Tt(K("Could not load files views"))}});const d=P(()=>ce(e||"files")==="files"?o.value:ce(e)==="recent"?l.value:u.value),m=P(()=>d.value.sortBy),p=P(()=>d.value.order);return{filesViewConfig:o,favoritesViewConfig:u,recentViewConfig:l,currentConfig:d,sortBy:m,order:p}},Aa={name:"MenuUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var La=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon menu-up-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M7,15L12,10L17,15H7Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Da=[],Oa=ae(Aa,La,Da,!1,null,null);const Ra=Oa.exports,Ba={name:"MenuDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var xa=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon menu-down-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M7,10L12,15L17,10H7Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Fa=[],ka=ae(Ba,xa,Fa,!1,null,null);const Pa=ka.exports,Mi={"file-picker__file-icon":"_file-picker__file-icon_3v9zx_9","file-picker__file-icon--primary":"_file-picker__file-icon--primary_3v9zx_21","file-picker__file-icon-overlay":"_file-picker__file-icon-overlay_3v9zx_25"},$a=ye({__name:"LoadingTableRow",props:{showCheckbox:{type:Boolean}},setup(e){return{__sfc:!0,fileListIconStyles:Mi}}});var Ma=function(){var e=this,i=e._self._c,n=e._self._setupProxy;return i("tr",{staticClass:"file-picker__row loading-row",attrs:{"aria-hidden":"true"}},[e.showCheckbox?i("td",{staticClass:"row-checkbox"},[i("span")]):e._e(),i("td",{staticClass:"row-name"},[i("div",{staticClass:"row-wrapper"},[i("span",{class:n.fileListIconStyles["file-picker__file-icon"]}),i("span")])]),e._m(0),e._m(1)])},Va=[function(){var e=this,i=e._self._c;return e._self._setupProxy,i("td",{staticClass:"row-size"},[i("span")])},function(){var e=this,i=e._self._c;return e._self._setupProxy,i("td",{staticClass:"row-modified"},[i("span")])}],Ua=ae($a,Ma,Va,!1,null,"15187afc");const za=Ua.exports,Ha=new hr({concurrency:5});function Ga(e){const{resolve:i,promise:n}=Promise.withResolvers();return Ha.add(()=>{const o=new Image;return o.onerror=()=>i(!1),o.onload=()=>i(!0),o.src=e,n}),n}function ja(e,i={}){i={size:32,cropPreview:!1,mimeFallback:!0,...i};try{const n=e.attributes?.previewUrl||St("/core/preview?fileId={fileid}",{fileid:e.fileid});let o;try{o=new URL(n)}catch{o=new URL(n,window.location.origin)}return o.searchParams.set("x",`${i.size}`),o.searchParams.set("y",`${i.size}`),o.searchParams.set("mimeFallback",`${i.mimeFallback}`),o.searchParams.set("a",i.cropPreview===!0?"0":"1"),o.searchParams.set("c",`${e.attributes.etag}`),o}catch{return null}}const Xa=(e,i)=>{const n=z(null),o=z(!1);return Ei(()=>{o.value=!1,n.value=ja(ce(e),ce(i||{})),n.value&&ce(e).type===Te.File&&Ga(n.value.href).then(l=>{o.value=l})}),{previewURL:n,previewLoaded:o}},qa={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Ya=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon folder-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Wa=[],Za=ae(qa,Ya,Wa,!1,null,null);const Vi=Za.exports,Qa={name:"FilePreview"},Ka=ye({...Qa,props:{node:null,cropImagePreviews:{type:Boolean}},setup(e){const i=e,n=z(Mi),{previewURL:o,previewLoaded:l}=Xa(He(i,"node"),P(()=>({cropPreview:i.cropImagePreviews}))),u=P(()=>i.node.type===Te.File),d=P(()=>{if(i.node.type!==Te.Folder)return null;if(i.node.attributes?.["is-encrypted"]===1)return nr;if(i.node.attributes?.["is-tag"])return or;const m=Object.values(i.node.attributes?.["share-types"]||{}).flat();if(m.some(p=>p===Ge.Link||p===Ge.Email))return rr;if(m.length>0)return ni;switch(i.node.attributes?.["mount-type"]){case"external":case"external-session":return ar;case"group":return er;case"shared":return ni}return null});return{__sfc:!0,fileListIconStyles:n,props:i,previewURL:o,previewLoaded:l,isFile:u,folderDecorationIcon:d,NcIconSvgWrapper:Ni,IconFile:Pi,IconFolder:Vi}}});var Ja=function(){var e=this,i=e._self._c,n=e._self._setupProxy;return i("div",{class:n.fileListIconStyles["file-picker__file-icon"],style:n.previewLoaded?{backgroundImage:`url(${n.previewURL})`}:void 0},[n.previewLoaded?e._e():[n.isFile?i(n.IconFile,{attrs:{size:32}}):[n.folderDecorationIcon?i(n.NcIconSvgWrapper,{class:n.fileListIconStyles["file-picker__file-icon-overlay"],attrs:{inline:"",path:n.folderDecorationIcon,size:16}}):e._e(),i(n.IconFolder,{class:n.fileListIconStyles["file-picker__file-icon--primary"],attrs:{size:32}})]]],2)},es=[],ts=ae(Ka,Ja,es,!1,null,null);const is=ts.exports,ns=ye({__name:"FileListRow",props:{allowPickDirectory:{type:Boolean},selected:{type:Boolean},showCheckbox:{type:Boolean},canPick:{type:Boolean},node:null,cropImagePreviews:{type:Boolean}},emits:["update:selected","enter-directory"],setup(e,{emit:i}){const n=e,o=P(()=>En(n.node.displayname)),l=P(()=>n.node.displayname.slice(0,o.value?-o.value.length:void 0)),u=P(()=>n.node.type===Te.Folder),d=P(()=>n.canPick&&(n.allowPickDirectory||!u.value)),m=P(()=>(n.node.permissions&$t.READ)===$t.READ);function p(){d.value&&i("update:selected",!n.selected)}function f(){u.value?m.value&&i("enter-directory",n.node):p()}function h(_){_.key==="Enter"&&f()}return{__sfc:!0,props:n,emit:i,fileExtension:o,displayName:l,isDirectory:u,isPickable:d,isNavigatable:m,toggleSelected:p,handleClick:f,handleKeyDown:h,formatFileSize:zn,NcCheckboxRadioSwitch:bi,NcDateTime:Jn,t:K,FilePreview:is}}});var rs=function(){var e=this,i=e._self._c,n=e._self._setupProxy;return i("tr",e._g({class:["file-picker__row",{"file-picker__row--selected":e.selected&&!e.showCheckbox,"file-picker__row--not-navigatable":n.isDirectory&&!n.isNavigatable,"file-picker__row--not-pickable":!n.isPickable}],attrs:{tabindex:e.showCheckbox&&!n.isDirectory?void 0:0,"aria-selected":n.isPickable?e.selected:void 0,"data-filename":e.node.basename,"data-testid":"file-list-row"}},{click:n.handleClick,...!e.showCheckbox||n.isDirectory?{keydown:n.handleKeyDown}:{}}),[e.showCheckbox?i("td",{staticClass:"row-checkbox",on:{click:function(o){return o.stopPropagation(),(()=>{}).apply(null,arguments)}}},[i(n.NcCheckboxRadioSwitch,{attrs:{"aria-label":n.t("Select the row for {nodename}",{nodename:n.displayName}),disabled:!n.isPickable,"data-testid":"row-checkbox","model-value":e.selected},on:{"update:model-value":n.toggleSelected}})],1):e._e(),i("td",{staticClass:"row-name"},[i("div",{staticClass:"file-picker__name-container",attrs:{"data-testid":"row-name"}},[i(n.FilePreview,{attrs:{node:e.node,"crop-image-previews":e.cropImagePreviews}}),i("div",{staticClass:"file-picker__file-name",attrs:{title:n.displayName},domProps:{textContent:e._s(n.displayName)}}),i("div",{staticClass:"file-picker__file-extension",domProps:{textContent:e._s(n.fileExtension)}})],1)]),i("td",{staticClass:"row-size"},[e._v(" "+e._s(n.formatFileSize(e.node.size||0))+" ")]),i("td",{staticClass:"row-modified"},[i(n.NcDateTime,{attrs:{timestamp:e.node.mtime,"ignore-seconds":!0}})],1)])},as=[],ss=ae(ns,rs,as,!1,null,"82f380c9");const os=ss.exports,ls=ye({__name:"FileList",props:{currentView:null,multiselect:{type:Boolean},allowPickDirectory:{type:Boolean},loading:{type:Boolean},files:null,canPick:null,selectedFiles:null,path:null},emits:["update:path","update:selectedFiles"],setup(e,{emit:i}){const n=e,o=z(),{currentConfig:l}=Sa(n.currentView),u=P(()=>o.value??l.value),d=P(()=>u.value.sortBy==="basename"?u.value.order==="none"?void 0:u.value.order:void 0),m=P(()=>u.value.sortBy==="size"?u.value.order==="none"?void 0:u.value.order:void 0),p=P(()=>u.value.sortBy==="mtime"?u.value.order==="none"?void 0:u.value.order:void 0),f=A=>{u.value.sortBy===A?u.value.order==="ascending"?o.value={sortBy:u.value.sortBy,order:"descending"}:o.value={sortBy:u.value.sortBy,order:"ascending"}:o.value={sortBy:A,order:"ascending"}},{sortFavoritesFirst:h,cropImagePreviews:_}=$i(),L=P(()=>Gn(n.files,{sortFoldersFirst:!0,sortFavoritesFirst:h.value,sortingOrder:u.value.order==="descending"?"desc":"asc",sortingMode:u.value.sortBy})),O=P(()=>n.files.filter(A=>n.allowPickDirectory||A.type!==Te.Folder)),B=P(()=>!n.loading&&n.selectedFiles.length>0&&n.selectedFiles.length>=O.value.length);function I(){n.selectedFiles.length<O.value.length?i("update:selectedFiles",O.value):i("update:selectedFiles",[])}function k(A){n.selectedFiles.includes(A)?i("update:selectedFiles",n.selectedFiles.filter(F=>F.path!==A.path)):n.multiselect?i("update:selectedFiles",[...n.selectedFiles,A]):i("update:selectedFiles",[A])}function N(A){i("update:path",A.path)}const w=z(4),S=z();{const A=()=>mn(()=>{const F=S.value?.parentElement?.children||[];let $=S.value?.parentElement?.clientHeight||450;for(let D=0;D<F.length;D++)S.value?.isSameNode(F[D])||($-=F[D].clientHeight);w.value=Math.max(1,Math.floor(($-50)/50))});Be(()=>{window.addEventListener("resize",A),A()}),wi(()=>{window.removeEventListener("resize",A)})}return{__sfc:!0,props:n,emit:i,customSortingConfig:o,filesAppSorting:l,sortingConfig:u,sortByName:d,sortBySize:m,sortByModified:p,toggleSorting:f,sortFavoritesFirst:h,cropImagePreviews:_,sortedFiles:L,selectableFiles:O,allSelected:B,onSelectAll:I,onNodeSelected:k,onChangeDirectory:N,skeletonNumber:w,fileContainer:S,NcButton:_t,NcCheckboxRadioSwitch:bi,t:K,IconSortAscending:Ra,IconSortDescending:Pa,LoadingTableRow:za,FileListRow:os}}});var cs=function(){var e=this,i=e._self._c,n=e._self._setupProxy;return i("div",{ref:"fileContainer",staticClass:"file-picker__files"},[i("table",[i("thead",[i("tr",[e.multiselect?i("th",{staticClass:"row-checkbox"},[i("span",{staticClass:"hidden-visually"},[e._v(" "+e._s(n.t("Select entry"))+" ")]),e.multiselect?i(n.NcCheckboxRadioSwitch,{attrs:{"aria-label":n.t("Select all entries"),"data-testid":"select-all-checkbox","model-value":n.allSelected},on:{"update:model-value":n.onSelectAll}}):e._e()],1):e._e(),i("th",{staticClass:"row-name",attrs:{"aria-sort":n.sortByName}},[i("div",{staticClass:"header-wrapper"},[i("span",{staticClass:"file-picker__header-preview"}),i(n.NcButton,{attrs:{wide:!0,type:"tertiary","data-test":"file-picker_sort-name"},on:{click:function(o){return n.toggleSorting("basename")}},scopedSlots:e._u([{key:"icon",fn:function(){return[n.sortByName==="ascending"?i(n.IconSortAscending,{attrs:{size:20}}):n.sortByName==="descending"?i(n.IconSortDescending,{attrs:{size:20}}):i("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[e._v(" "+e._s(n.t("Name"))+" ")])],1)]),i("th",{staticClass:"row-size",attrs:{"aria-sort":n.sortBySize}},[i(n.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:function(o){return n.toggleSorting("size")}},scopedSlots:e._u([{key:"icon",fn:function(){return[n.sortBySize==="ascending"?i(n.IconSortAscending,{attrs:{size:20}}):n.sortBySize==="descending"?i(n.IconSortDescending,{attrs:{size:20}}):i("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[e._v(" "+e._s(n.t("Size"))+" ")])],1),i("th",{staticClass:"row-modified",attrs:{"aria-sort":n.sortByModified}},[i(n.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:function(o){return n.toggleSorting("mtime")}},scopedSlots:e._u([{key:"icon",fn:function(){return[n.sortByModified==="ascending"?i(n.IconSortAscending,{attrs:{size:20}}):n.sortByModified==="descending"?i(n.IconSortDescending,{attrs:{size:20}}):i("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[e._v(" "+e._s(n.t("Modified"))+" ")])],1)])]),i("tbody",[e.loading?e._l(n.skeletonNumber,function(o){return i(n.LoadingTableRow,{key:o,attrs:{"show-checkbox":e.multiselect}})}):e._l(n.sortedFiles,function(o){return i(n.FileListRow,{key:o.fileid||o.path,attrs:{"allow-pick-directory":e.allowPickDirectory,"show-checkbox":e.multiselect,"can-pick":(e.multiselect||e.selectedFiles.length===0||e.selectedFiles.includes(o))&&(e.canPick===void 0||e.canPick(o)),selected:e.selectedFiles.includes(o),node:o,"crop-image-previews":n.cropImagePreviews},on:{"update:selected":function(l){return n.onNodeSelected(o)},"enter-directory":n.onChangeDirectory}})})],2)])])},us=[],fs=ae(ls,cs,us,!1,null,"6503afab");const ds=fs.exports,hs={name:"HomeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var ps=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon home-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},gs=[],ms=ae(hs,ps,gs,!1,null,null);const vs=ms.exports,bs={name:"PlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var ys=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon plus-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Es=[],ws=ae(bs,ys,Es,!1,null,null);const _s=ws.exports,Ns=ye({__name:"FilePickerBreadcrumbs",props:{path:null,showMenu:{type:Boolean}},emits:["update:path","create-node"],setup(e,{emit:i}){const n=e,o=z(!1),l=z(""),u=z();function d(){const f=l.value.trim(),h=u.value?.$el?.querySelector("input");let _="";try{Un(f)}catch(L){if(!(L instanceof De))throw L;switch(L.reason){case Ve.Character:_=K('"{char}" is not allowed inside a folder name.',{char:L.segment});break;case Ve.ReservedName:_=K('"{segment}" is a reserved name and not allowed for folder names.',{segment:L.segment});break;case Ve.Extension:_=K('Folder names must not end with "{extension}".',{extension:L.segment});break;default:_=K("Invalid folder name.")}}return h&&h.setCustomValidity(_),_===""}const m=function(){const f=l.value.trim();d()&&(o.value=!1,i("create-node",f),l.value="")},p=P(()=>n.path.split("/").filter(f=>f!=="").map((f,h,_)=>({name:f,path:"/"+_.slice(0,h+1).join("/")})));return{__sfc:!0,props:n,emit:i,actionsOpen:o,newNodeName:l,nameInput:u,validateInput:d,onSubmit:m,pathElements:p,NcActionInput:zr,NcActions:Nt,NcBreadcrumb:Bi,NcBreadcrumbs:Ea,IconFolder:Vi,IconHome:vs,IconPlus:_s,t:K}}});var Ts=function(){var e=this,i=e._self._c,n=e._self._setupProxy;return i(n.NcBreadcrumbs,{staticClass:"file-picker__breadcrumbs",scopedSlots:e._u([{key:"default",fn:function(){return[i(n.NcBreadcrumb,{attrs:{name:n.t("All files"),title:n.t("Home")},on:{click:function(o){return n.emit("update:path","/")}},scopedSlots:e._u([{key:"icon",fn:function(){return[i(n.IconHome,{attrs:{size:20}})]},proxy:!0}])}),e._l(n.pathElements,function(o){return i(n.NcBreadcrumb,{key:o.path,attrs:{name:o.name,title:o.path},on:{click:function(l){return n.emit("update:path",o.path)}}})})]},proxy:!0},e.showMenu?{key:"actions",fn:function(){return[i(n.NcActions,{attrs:{open:n.actionsOpen,"aria-label":n.t("Create directory"),"force-menu":!0,"force-name":!0,"menu-name":n.t("New"),type:"secondary"},on:{"update:open":function(o){n.actionsOpen=o},close:function(o){n.newNodeName=""}},scopedSlots:e._u([{key:"icon",fn:function(){return[i(n.IconPlus,{attrs:{size:20}})]},proxy:!0}],null,!1,2971667417)},[i(n.NcActionInput,{ref:"nameInput",attrs:{value:n.newNodeName,label:n.t("New folder"),placeholder:n.t("New folder name")},on:{"update:value":function(o){n.newNodeName=o},submit:n.onSubmit,"update:model-value":n.validateInput},scopedSlots:e._u([{key:"icon",fn:function(){return[i(n.IconFolder,{attrs:{size:20}})]},proxy:!0}],null,!1,1614167509)})],1)]},proxy:!0}:null],null,!0)})},Cs=[],Is=ae(Ns,Ts,Cs,!1,null,"1a8cb0b2");const Ss=Is.exports,As={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Ls=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon close-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{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"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Ds=[],Os=ae(As,Ls,Ds,!1,null,null);const Rs=Os.exports,Bs={name:"MagnifyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var xs=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon magnify-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(n){return e.$emit("click",n)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},Fs=[],ks=ae(Bs,xs,Fs,!1,null,null);const Ps=ks.exports,$s=e=>{const i=[{id:"files",label:K("All files"),icon:ir},{id:"recent",label:K("Recent"),icon:tr},{id:"favorites",label:K("Favorites"),icon:sr}],n=e.value?i.filter(({id:o})=>o==="files"):i;return{allViews:i,availableViews:n}},Ms=ye({__name:"FilePickerNavigation",props:{currentView:null,filterString:null,isCollapsed:{type:Boolean},disabledNavigation:{type:Boolean}},emits:["update:currentView","update:filterString"],setup(e,{emit:i}){const n=e,{availableViews:o}=$s(z(gn()===null)),l=P(()=>o.filter(u=>u.id===n.currentView)[0]??o[0]);return{__sfc:!0,props:n,emit:i,availableViews:o,currentViewObject:l,updateFilterValue:u=>i("update:filterString",u),IconClose:Rs,IconMagnify:Ps,NcButton:_t,NcIconSvgWrapper:Ni,NcSelect:vi,NcTextField:mi,Fragment:ki,t:K}}});var Vs=function(){var e=this,i=e._self._c,n=e._self._setupProxy;return i(n.Fragment,[i(n.NcTextField,{staticClass:"file-picker__filter-input",attrs:{label:n.t("Filter file list"),"show-trailing-button":!!e.filterString,"model-value":e.filterString},on:{"update:model-value":n.updateFilterValue,"trailing-button-click":function(o){return n.updateFilterValue("")}},scopedSlots:e._u([{key:"trailing-button-icon",fn:function(){return[i(n.IconClose,{attrs:{size:16}})]},proxy:!0}])},[i(n.IconMagnify,{attrs:{size:16}})],1),n.availableViews.length>1&&!e.disabledNavigation?[e.isCollapsed?i(n.NcSelect,{attrs:{"aria-label":n.t("Current view selector"),clearable:!1,searchable:!1,options:n.availableViews,"model-value":n.currentViewObject},on:{"update:model-value":function(o){return n.emit("update:currentView",o.id)}}}):i("ul",{staticClass:"file-picker__side"},e._l(n.availableViews,function(o){return i("li",{key:o.id},[i(n.NcButton,{attrs:{type:e.currentView===o.id?"primary":"tertiary",wide:!0},on:{click:function(l){return e.$emit("update:currentView",o.id)}},scopedSlots:e._u([{key:"icon",fn:function(){return[i(n.NcIconSvgWrapper,{attrs:{path:o.icon,size:20}})]},proxy:!0}],null,!0)},[e._v(" "+e._s(o.label)+" ")])],1)}),0)]:e._e()],2)},Us=[],zs=ae(Ms,Vs,Us,!1,null,"f5975252");const Hs=zs.exports;function Gs(e){const i=new AbortController,n=Math.round(Date.now()/1e3)-3600*24*14;return new Ci(async(o,l,u)=>{u(()=>i.abort());try{const{data:d}=await e.search("/",{signal:i.signal,details:!0,data:yn(n)}),m=d.results.map(p=>It(p));o(m)}catch(d){l(d)}})}function js(e,i){const n=new AbortController;return new Ci(async(o,l,u)=>{u(()=>n.abort());try{const d=(await e.getDirectoryContents(je.join(Ct,i),{signal:n.signal,details:!0,includeSelf:!0,data:Ii()})).data.map(m=>It(m));o({contents:d.filter(({path:m})=>m!==i),folder:d.find(({path:m})=>m===i)})}catch(d){l(d)}})}async function Xs(e,i){const{data:n}=await e.stat(je.join(Ct,i),{details:!0,data:Ii()});return It(n)}const qs=function(e,i){const n=vn(),o=vt([]),l=vt(null),u=z(!0),d=z(null);async function m(f){const h=je.join(i.value,f);await n.createDirectory(je.join(Ct,h));const _=await Xs(n,h);return o.value=[...o.value,_],_}async function p(){d.value&&d.value.cancel(),u.value=!0,e.value==="favorites"?d.value=bn(n,i.value):e.value==="recent"?d.value=Gs(n):d.value=js(n,i.value);const f=await d.value;"folder"in f?(l.value=f.folder,o.value=f.contents):(l.value=null,o.value=f),d.value=null,u.value=!1}return _i([e,i],()=>p()),Be(()=>p()),{isLoading:u,files:o,folder:l,loadFiles:p,createDirectory:m}},Ys=function(e){const i=P(()=>e.value.map(n=>n.split("/")));return{isSupportedMimeType:n=>{const o=n.split("/");return i.value.some(([l,u])=>(o[0]===l||l==="*")&&(o[1]===u||u==="*"))}}},Ws={name:"FilePicker"},Zs=ye({...Ws,props:{buttons:null,name:null,allowPickDirectory:{type:Boolean,default:!1},disabledNavigation:{type:Boolean,default:!1},container:{default:"body"},filterFn:{default:void 0},canPickFn:{default:void 0},mimetypeFilter:{default:()=>[]},multiselect:{type:Boolean,default:!0},path:{default:void 0}},emits:["close"],setup(e,{emit:i}){const n=e,o=z(!0),l=P(()=>{const D=f.value.length===0&&n.allowPickDirectory&&k.value?[k.value]:f.value;return(typeof n.buttons=="function"?n.buttons(D,L.value,m.value):n.buttons).map(x=>({...x,disabled:x.disabled||N.value,callback:()=>{u=!0,d(x.callback,D)}}))});let u=!1;const d=async(D,x)=>{D(x),i("close",x),u=!1},m=z("files"),p=P(()=>m.value==="favorites"?K("Favorites"):m.value==="recent"?K("Recent"):""),f=vt([]),h=z(window?.sessionStorage.getItem("NC.FilePicker.LastPath")||"/"),_=z("");_i([_],()=>{n.path===void 0&&_.value&&window.sessionStorage.setItem("NC.FilePicker.LastPath",_.value),f.value=[]});const L=P({get:()=>m.value==="files"?_.value||n.path||h.value:"/",set:D=>{_.value=D}}),O=z(""),{isSupportedMimeType:B}=Ys(He(n,"mimetypeFilter")),{files:I,folder:k,isLoading:N,loadFiles:w,createDirectory:S}=qs(m,L);Be(()=>w());const{showHiddenFiles:A}=$i(),F=P(()=>{let D=I.value;return A.value||(D=D.filter(x=>!x.basename.startsWith("."))),n.mimetypeFilter.length>0&&(D=D.filter(x=>x.type==="folder"||x.mime&&B(x.mime))),O.value&&(D=D.filter(x=>x.basename.toLowerCase().includes(O.value.toLowerCase()))),n.filterFn&&(D=D.filter(x=>n.filterFn(x))),D}),$=P(()=>m.value==="files"?K("Upload some content or sync with your devices!"):m.value==="recent"?K("Files and folders you recently modified will show up here."):K("Files and folders you mark as favorite will show up here."));return{__sfc:!0,props:n,emit:i,isOpen:o,dialogButtons:l,isHandlingCallback:u,handleButtonClick:d,currentView:m,viewHeadline:p,selectedFiles:f,savedPath:h,navigatedPath:_,currentPath:L,filterString:O,isSupportedMimeType:B,files:I,currentFolder:k,isLoading:N,loadFiles:w,createDirectory:S,showHiddenFiles:A,filteredFiles:F,noFilesDescription:$,onCreateFolder:async D=>{try{const x=await S(D);_.value=x.path,pn("files:node:created",I.value.filter(v=>v.basename===D)[0])}catch(x){console.warn("Could not create new folder",{name:D,error:x}),Tt(K("Could not create the new folder"))}},handleClose:D=>{!D&&!u&&i("close")},IconFile:Pi,FileList:ds,FilePickerBreadcrumbs:Ss,FilePickerNavigation:Hs,NcDialog:An,NcEmptyContent:en,t:K}}});var Qs=function(){var e=this,i=e._self._c,n=e._self._setupProxy;return i(n.NcDialog,{attrs:{open:n.isOpen,container:e.container,buttons:n.dialogButtons,name:e.name,size:"large","content-classes":"file-picker__content","dialog-classes":"file-picker","navigation-classes":"file-picker__navigation"},on:{"update:open":[function(o){n.isOpen=o},n.handleClose]},scopedSlots:e._u([{key:"navigation",fn:function({isCollapsed:o}){return[i(n.FilePickerNavigation,{attrs:{"current-view":n.currentView,"filter-string":n.filterString,"is-collapsed":o,"disabled-navigation":e.disabledNavigation},on:{"update:currentView":function(l){n.currentView=l},"update:current-view":function(l){n.currentView=l},"update:filterString":function(l){n.filterString=l},"update:filter-string":function(l){n.filterString=l}}})]}}])},[i("div",{staticClass:"file-picker__main"},[n.currentView==="files"?i(n.FilePickerBreadcrumbs,{attrs:{path:n.currentPath,"show-menu":e.allowPickDirectory},on:{"update:path":function(o){n.currentPath=o},"create-node":n.onCreateFolder}}):i("div",{staticClass:"file-picker__view"},[i("h3",[e._v(e._s(n.viewHeadline))])]),n.isLoading||n.filteredFiles.length>0?i(n.FileList,{attrs:{path:n.currentPath,"selected-files":n.selectedFiles,"allow-pick-directory":e.allowPickDirectory,"current-view":n.currentView,files:n.filteredFiles,multiselect:e.multiselect,loading:n.isLoading,name:n.viewHeadline,"can-pick":e.canPickFn},on:{"update:path":[function(o){n.currentPath=o},function(o){n.currentView="files"}],"update:selectedFiles":function(o){n.selectedFiles=o},"update:selected-files":function(o){n.selectedFiles=o}}}):n.filterString?i(n.NcEmptyContent,{attrs:{name:n.t("No matching files"),description:n.t("No files matching your filter were found.")},scopedSlots:e._u([{key:"icon",fn:function(){return[i(n.IconFile)]},proxy:!0}])}):i(n.NcEmptyContent,{attrs:{name:n.t("No files in here"),description:n.noFilesDescription},scopedSlots:e._u([{key:"icon",fn:function(){return[i(n.IconFile)]},proxy:!0}])})],1)])},Ks=[],Js=ae(Zs,Qs,Ks,!1,null,"dda9b42b");const eo=Js.exports,fo=Object.freeze(Object.defineProperty({__proto__:null,default:eo},Symbol.toStringTag,{value:"Module"}));export{fo as F,lo as a,oo as b,so as c,uo as d,co as e,ao as g};
//# sourceMappingURL=FilePicker-JKNLPCbR-BmYnnmsy.chunk.mjs.map