25 lines
212 KiB
JavaScript
25 lines
212 KiB
JavaScript
/**
|
|
* @vue/shared v3.4.38
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**//*! #__NO_SIDE_EFFECTS__ */function makeMap(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),isModelListener=e=>e.startsWith("onUpdate:"),extend=Object.assign,remove=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hasOwnProperty$1=Object.prototype.hasOwnProperty,hasOwn=(e,t)=>hasOwnProperty$1.call(e,t),isArray=Array.isArray,isMap=e=>toTypeString(e)==="[object Map]",isSet=e=>toTypeString(e)==="[object Set]",isFunction=e=>typeof e=="function",isString=e=>typeof e=="string",isSymbol=e=>typeof e=="symbol",isObject$1=e=>e!==null&&typeof e=="object",isPromise$1=e=>(isObject$1(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),toRawType=e=>toTypeString(e).slice(8,-1),isPlainObject=e=>toTypeString(e)==="[object Object]",isIntegerKey=e=>isString(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(e=>e.replace(camelizeRE,(t,n)=>n?n.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(e=>e.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(e=>e.charAt(0).toUpperCase()+e.slice(1)),toHandlerKey=cacheStringFunction(e=>e?"on"+capitalize(e):""),hasChanged=(e,t)=>!Object.is(e,t),invokeArrayFns=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];for(let i=0;i<t.length;i++)t[i](...r)},def=function(t,n,r,s){s===void 0&&(s=!1),Object.defineProperty(t,n,{configurable:!0,enumerable:!1,writable:s,value:r})},looseToNumber=e=>{const t=parseFloat(e);return isNaN(t)?e:t},toNumber=e=>{const t=isString(e)?Number(e):NaN;return isNaN(t)?e:t};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function normalizeStyle(e){if(isArray(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=isString(r)?parseStringStyle(r):normalizeStyle(r);if(s)for(const i in s)t[i]=s[i]}return t}else if(isString(e)||isObject$1(e))return e}const listDelimiterRE=/;(?![^(]*\))/g,propertyDelimiterRE=/:([^]+)/,styleCommentRE=/\/\*[^]*?\*\//g;function parseStringStyle(e){const t={};return e.replace(styleCommentRE,"").split(listDelimiterRE).forEach(n=>{if(n){const r=n.split(propertyDelimiterRE);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function normalizeClass(e){let t="";if(isString(e))t=e;else if(isArray(e))for(let n=0;n<e.length;n++){const r=normalizeClass(e[n]);r&&(t+=r+" ")}else if(isObject$1(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const specialBooleanAttrs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",isSpecialBooleanAttr=makeMap(specialBooleanAttrs);function includeBooleanAttr(e){return!!e||e===""}const isRef$1=e=>!!(e&&e.__v_isRef===!0),toDisplayString=e=>isString(e)?e:e==null?"":isArray(e)||isObject$1(e)&&(e.toString===objectToString||!isFunction(e.toString))?isRef$1(e)?toDisplayString(e.value):JSON.stringify(e,replacer,2):String(e),replacer=(e,t)=>isRef$1(t)?replacer(e,t.value):isMap(t)?{["Map("+t.size+")"]:[...t.entries()].reduce((n,r,s)=>{let[i,o]=r;return n[stringifySymbol(i,s)+" =>"]=o,n},{})}:isSet(t)?{["Set("+t.size+")"]:[...t.values()].map(n=>stringifySymbol(n))}:isSymbol(t)?stringifySymbol(t):isObject$1(t)&&!isArray(t)&&!isPlainObject(t)?String(t):t,stringifySymbol=function(t,n){n===void 0&&(n="");var r;return isSymbol(t)?"Symbol("+((r=t.description)!=null?r:n)+")":t};/**
|
|
* @vue/reactivity v3.4.38
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let activeEffectScope;class EffectScope{constructor(t){t===void 0&&(t=!1),this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!t&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=activeEffectScope;try{return activeEffectScope=this,t()}finally{activeEffectScope=n}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0,this._active=!1}}}function effectScope(e){return new EffectScope(e)}function recordEffectScope(e,t){t===void 0&&(t=activeEffectScope),t&&t.active&&t.effects.push(e)}function getCurrentScope(){return activeEffectScope}let activeEffect;class ReactiveEffect{constructor(t,n,r,s){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,recordEffectScope(this,s)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,pauseTracking();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(triggerComputed(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),resetTracking()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=shouldTrack,n=activeEffect;try{return shouldTrack=!0,activeEffect=this,this._runnings++,preCleanupEffect(this),this.fn()}finally{postCleanupEffect(this),this._runnings--,activeEffect=n,shouldTrack=t}}stop(){this.active&&(preCleanupEffect(this),postCleanupEffect(this),this.onStop&&this.onStop(),this.active=!1)}}function triggerComputed(e){return e.value}function preCleanupEffect(e){e._trackId++,e._depsLength=0}function postCleanupEffect(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)cleanupDepEffect(e.deps[t],e);e.deps.length=e._depsLength}}function cleanupDepEffect(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let shouldTrack=!0,pauseScheduleStack=0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){const e=trackStack.pop();shouldTrack=e===void 0?!0:e}function pauseScheduling(){pauseScheduleStack++}function resetScheduling(){for(pauseScheduleStack--;!pauseScheduleStack&&queueEffectSchedulers.length;)queueEffectSchedulers.shift()()}function trackEffect(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const r=e.deps[e._depsLength];r!==t?(r&&cleanupDepEffect(r,e),e.deps[e._depsLength++]=t):e._depsLength++}}const queueEffectSchedulers=[];function triggerEffects(e,t,n){pauseScheduling();for(const r of e.keys()){let s;r._dirtyLevel<t&&(s??(s=e.get(r)===r._trackId))&&(r._shouldSchedule||(r._shouldSchedule=r._dirtyLevel===0),r._dirtyLevel=t),r._shouldSchedule&&(s??(s=e.get(r)===r._trackId))&&(r.trigger(),(!r._runnings||r.allowRecurse)&&r._dirtyLevel!==2&&(r._shouldSchedule=!1,r.scheduler&&queueEffectSchedulers.push(r.scheduler)))}resetScheduling()}const createDep=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},targetMap=new WeakMap,ITERATE_KEY=Symbol(""),MAP_KEY_ITERATE_KEY=Symbol("");function track(e,t,n){if(shouldTrack&&activeEffect){let r=targetMap.get(e);r||targetMap.set(e,r=new Map);let s=r.get(n);s||r.set(n,s=createDep(()=>r.delete(n))),trackEffect(activeEffect,s)}}function trigger(e,t,n,r,s,i){const o=targetMap.get(e);if(!o)return;let a=[];if(t==="clear")a=[...o.values()];else if(n==="length"&&isArray(e)){const l=Number(r);o.forEach((c,u)=>{(u==="length"||!isSymbol(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(o.get(n)),t){case"add":isArray(e)?isIntegerKey(n)&&a.push(o.get("length")):(a.push(o.get(ITERATE_KEY)),isMap(e)&&a.push(o.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray(e)||(a.push(o.get(ITERATE_KEY)),isMap(e)&&a.push(o.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(e)&&a.push(o.get(ITERATE_KEY));break}pauseScheduling();for(const l of a)l&&triggerEffects(l,4);resetScheduling()}function getDepFromReactive(e,t){const n=targetMap.get(e);return n&&n.get(t)}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(isSymbol)),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(){const n=toRaw(this);for(let a=0,l=this.length;a<l;a++)track(n,"get",a+"");for(var r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];const o=n[t](...s);return o===-1||o===!1?n[t](...s.map(toRaw)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(){pauseTracking(),pauseScheduling();for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];const i=toRaw(this)[t].apply(this,r);return resetScheduling(),resetTracking(),i}}),e}function hasOwnProperty(e){isSymbol(e)||(e=String(e));const t=toRaw(this);return track(t,"has",e),t.hasOwnProperty(e)}class BaseReactiveHandler{constructor(t,n){t===void 0&&(t=!1),n===void 0&&(n=!1),this._isReadonly=t,this._isShallow=n}get(t,n,r){const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?shallowReadonlyMap:readonlyMap:i?shallowReactiveMap:reactiveMap).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=isArray(t);if(!s){if(o&&hasOwn(arrayInstrumentations,n))return Reflect.get(arrayInstrumentations,n,r);if(n==="hasOwnProperty")return hasOwnProperty}const a=Reflect.get(t,n,r);return(isSymbol(n)?builtInSymbols.has(n):isNonTrackableKeys(n))||(s||track(t,"get",n),i)?a:isRef(a)?o&&isIntegerKey(n)?a:a.value:isObject$1(a)?s?readonly(a):reactive(a):a}}class MutableReactiveHandler extends BaseReactiveHandler{constructor(t){t===void 0&&(t=!1),super(!1,t)}set(t,n,r,s){let i=t[n];if(!this._isShallow){const l=isReadonly(i);if(!isShallow(r)&&!isReadonly(r)&&(i=toRaw(i),r=toRaw(r)),!isArray(t)&&isRef(i)&&!isRef(r))return l?!1:(i.value=r,!0)}const o=isArray(t)&&isIntegerKey(n)?Number(n)<t.length:hasOwn(t,n),a=Reflect.set(t,n,r,s);return t===toRaw(s)&&(o?hasChanged(r,i)&&trigger(t,"set",n,r):trigger(t,"add",n,r)),a}deleteProperty(t,n){const r=hasOwn(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&trigger(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!isSymbol(n)||!builtInSymbols.has(n))&&track(t,"has",n),r}ownKeys(t){return track(t,"iterate",isArray(t)?"length":ITERATE_KEY),Reflect.ownKeys(t)}}class ReadonlyReactiveHandler extends BaseReactiveHandler{constructor(t){t===void 0&&(t=!1),super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const mutableHandlers=new MutableReactiveHandler,readonlyHandlers=new ReadonlyReactiveHandler,shallowReactiveHandlers=new MutableReactiveHandler(!0),shallowReadonlyHandlers=new ReadonlyReactiveHandler(!0),toShallow=e=>e,getProto=e=>Reflect.getPrototypeOf(e);function get(e,t,n,r){n===void 0&&(n=!1),r===void 0&&(r=!1),e=e.__v_raw;const s=toRaw(e),i=toRaw(t);n||(hasChanged(t,i)&&track(s,"get",t),track(s,"get",i));const{has:o}=getProto(s),a=r?toShallow:n?toReadonly:toReactive;if(o.call(s,t))return a(e.get(t));if(o.call(s,i))return a(e.get(i));e!==s&&e.get(t)}function has(e,t){t===void 0&&(t=!1);const n=this.__v_raw,r=toRaw(n),s=toRaw(e);return t||(hasChanged(e,s)&&track(r,"has",e),track(r,"has",s)),e===s?n.has(e):n.has(e)||n.has(s)}function size(e,t){return t===void 0&&(t=!1),e=e.__v_raw,!t&&track(toRaw(e),"iterate",ITERATE_KEY),Reflect.get(e,"size",e)}function add(e,t){t===void 0&&(t=!1),!t&&!isShallow(e)&&!isReadonly(e)&&(e=toRaw(e));const n=toRaw(this);return getProto(n).has.call(n,e)||(n.add(e),trigger(n,"add",e,e)),this}function set(e,t,n){n===void 0&&(n=!1),!n&&!isShallow(t)&&!isReadonly(t)&&(t=toRaw(t));const r=toRaw(this),{has:s,get:i}=getProto(r);let o=s.call(r,e);o||(e=toRaw(e),o=s.call(r,e));const a=i.call(r,e);return r.set(e,t),o?hasChanged(t,a)&&trigger(r,"set",e,t):trigger(r,"add",e,t),this}function deleteEntry(e){const t=toRaw(this),{has:n,get:r}=getProto(t);let s=n.call(t,e);s||(e=toRaw(e),s=n.call(t,e)),r&&r.call(t,e);const i=t.delete(e);return s&&trigger(t,"delete",e,void 0),i}function clear(){const e=toRaw(this),t=e.size!==0,n=e.clear();return t&&trigger(e,"clear",void 0,void 0),n}function createForEach(e,t){return function(r,s){const i=this,o=i.__v_raw,a=toRaw(o),l=t?toShallow:e?toReadonly:toReactive;return!e&&track(a,"iterate",ITERATE_KEY),o.forEach((c,u)=>r.call(s,l(c),l(u),i))}}function createIterableMethod(e,t,n){return function(){const r=this.__v_raw,s=toRaw(r),i=isMap(s),o=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,l=r[e](...arguments),c=n?toShallow:t?toReadonly:toReactive;return!t&&track(s,"iterate",a?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:u,done:f}=l.next();return f?{value:u,done:f}:{value:o?[c(u[0]),c(u[1])]:c(u),done:f}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(e){return function(){return e==="delete"?!1:e==="clear"?void 0:this}}function createInstrumentations(){const e={get(i){return get(this,i)},get size(){return size(this)},has,add,set,delete:deleteEntry,clear,forEach:createForEach(!1,!1)},t={get(i){return get(this,i,!1,!0)},get size(){return size(this)},has,add(i){return add.call(this,i,!0)},set(i,o){return set.call(this,i,o,!0)},delete:deleteEntry,clear,forEach:createForEach(!1,!0)},n={get(i){return get(this,i,!0)},get size(){return size(this,!0)},has(i){return has.call(this,i,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},r={get(i){return get(this,i,!0,!0)},get size(){return size(this,!0)},has(i){return has.call(this,i,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=createIterableMethod(i,!1,!1),n[i]=createIterableMethod(i,!0,!1),t[i]=createIterableMethod(i,!1,!0),r[i]=createIterableMethod(i,!0,!0)}),[e,n,t,r]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(e,t){const n=t?e?shallowReadonlyInstrumentations:shallowInstrumentations:e?readonlyInstrumentations:mutableInstrumentations;return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(hasOwn(n,s)&&s in r?n:r,s,i)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(e){return e.__v_skip||!Object.isExtensible(e)?0:targetTypeMap(toRawType(e))}function reactive(e){return isReadonly(e)?e:createReactiveObject(e,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(e){return createReactiveObject(e,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(e){return createReactiveObject(e,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(e){return createReactiveObject(e,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(e,t,n,r,s){if(!isObject$1(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=s.get(e);if(i)return i;const o=getTargetType(e);if(o===0)return e;const a=new Proxy(e,o===2?r:n);return s.set(e,a),a}function isReactive(e){return isReadonly(e)?isReactive(e.__v_raw):!!(e&&e.__v_isReactive)}function isReadonly(e){return!!(e&&e.__v_isReadonly)}function isShallow(e){return!!(e&&e.__v_isShallow)}function isProxy(e){return e?!!e.__v_raw:!1}function toRaw(e){const t=e&&e.__v_raw;return t?toRaw(t):e}function markRaw(e){return Object.isExtensible(e)&&def(e,"__v_skip",!0),e}const toReactive=e=>isObject$1(e)?reactive(e):e,toReadonly=e=>isObject$1(e)?readonly(e):e;class ComputedRefImpl{constructor(t,n,r,s){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new ReactiveEffect(()=>t(this._value),()=>triggerRefValue(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=r}get value(){const t=toRaw(this);return(!t._cacheable||t.effect.dirty)&&hasChanged(t._value,t._value=t.effect.run())&&triggerRefValue(t,4),trackRefValue(t),t.effect._dirtyLevel>=2&&triggerRefValue(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function computed$1(e,t,n){n===void 0&&(n=!1);let r,s;const i=isFunction(e);return i?(r=e,s=NOOP):(r=e.get,s=e.set),new ComputedRefImpl(r,s,i||!s,n)}function trackRefValue(e){var t;shouldTrack&&activeEffect&&(e=toRaw(e),trackEffect(activeEffect,(t=e.dep)!=null?t:e.dep=createDep(()=>e.dep=void 0,e instanceof ComputedRefImpl?e:void 0)))}function triggerRefValue(e,t,n,r){t===void 0&&(t=4),e=toRaw(e);const s=e.dep;s&&triggerEffects(s,t)}function isRef(e){return!!(e&&e.__v_isRef===!0)}function ref(e){return createRef(e,!1)}function createRef(e,t){return isRef(e)?e:new RefImpl(e,t)}class RefImpl{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:toRaw(t),this._value=n?t:toReactive(t)}get value(){return trackRefValue(this),this._value}set value(t){const n=this.__v_isShallow||isShallow(t)||isReadonly(t);t=n?t:toRaw(t),hasChanged(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=n?t:toReactive(t),triggerRefValue(this,4))}}function unref(e){return isRef(e)?e.value:e}const shallowUnwrapHandlers={get:(e,t,n)=>unref(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return isRef(s)&&!isRef(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function proxyRefs(e){return isReactive(e)?e:new Proxy(e,shallowUnwrapHandlers)}function toRefs(e){const t=isArray(e)?new Array(e.length):{};for(const n in e)t[n]=propertyToRef(e,n);return t}class ObjectRefImpl{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}}function propertyToRef(e,t,n){const r=e[t];return isRef(r)?r:new ObjectRefImpl(e,t,n)}/**
|
|
* @vue/runtime-core v3.4.38
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/const stack=[];let isWarning=!1;function warn$1(e){if(isWarning)return;isWarning=!0,pauseTracking();const t=stack.length?stack[stack.length-1].component:null,n=t&&t.appContext.config.warnHandler,r=getComponentTrace();for(var s=arguments.length,i=new Array(s>1?s-1:0),o=1;o<s;o++)i[o-1]=arguments[o];if(n)callWithErrorHandling(n,t,11,[e+i.map(a=>{var l,c;return(c=(l=a.toString)==null?void 0:l.call(a))!=null?c:JSON.stringify(a)}).join(""),t&&t.proxy,r.map(a=>{let{vnode:l}=a;return"at <"+formatComponentName(t,l.type)+">"}).join(`
|
|
`),r]);else{const a=["[Vue warn]: "+e,...i];r.length&&a.push(`
|
|
`,...formatTrace(r)),console.warn(...a)}resetTracking(),isWarning=!1}function getComponentTrace(){let e=stack[stack.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function formatTrace(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
|
|
`],...formatTraceEntry(n))}),t}function formatTraceEntry(e){let{vnode:t,recurseCount:n}=e;const r=n>0?"... ("+n+" recursive calls)":"",s=t.component?t.component.parent==null:!1,i=" at <"+formatComponentName(t.component,t.type,s),o=">"+r;return t.props?[i,...formatProps(t.props),o]:[i+o]}function formatProps(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...formatProp(r,e[r]))}),n.length>3&&t.push(" ..."),t}function formatProp(e,t,n){return isString(t)?(t=JSON.stringify(t),n?t:[e+"="+t]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[e+"="+t]:isRef(t)?(t=formatProp(e,toRaw(t.value),!0),n?t:[e+"=Ref<",t,">"]):isFunction(t)?[e+"=fn"+(t.name?"<"+t.name+">":"")]:(t=toRaw(t),n?t:[e+"=",t])}function callWithErrorHandling(e,t,n,r){try{return r?e(...r):e()}catch(s){handleError$1(s,t,n)}}function callWithAsyncErrorHandling(e,t,n,r){if(isFunction(e)){const s=callWithErrorHandling(e,t,n,r);return s&&isPromise$1(s)&&s.catch(i=>{handleError$1(i,t,n)}),s}if(isArray(e)){const s=[];for(let i=0;i<e.length;i++)s.push(callWithAsyncErrorHandling(e[i],t,n,r));return s}}function handleError$1(e,t,n,r){if(t&&t.vnode,t){let s=t.parent;const i=t.proxy,o="https://vuejs.org/error-reference/#runtime-"+n;for(;s;){const l=s.ec;if(l){for(let c=0;c<l.length;c++)if(l[c](e,i,o)===!1)return}s=s.parent}const a=t.appContext.config.errorHandler;if(a){pauseTracking(),callWithErrorHandling(a,null,10,[e,i,o]),resetTracking();return}}logError(e)}function logError(e,t,n,r){console.error(e)}let isFlushing=!1,isFlushPending=!1;const queue=[];let flushIndex=0;const pendingPostFlushCbs=[];let activePostFlushCbs=null,postFlushIndex=0;const resolvedPromise=Promise.resolve();let currentFlushPromise=null;function nextTick(e){const t=currentFlushPromise||resolvedPromise;return e?t.then(this?e.bind(this):e):t}function findInsertionIndex(e){let t=flushIndex+1,n=queue.length;for(;t<n;){const r=t+n>>>1,s=queue[r],i=getId(s);i<e||i===e&&s.pre?t=r+1:n=r}return t}function queueJob(e){(!queue.length||!queue.includes(e,isFlushing&&e.allowRecurse?flushIndex+1:flushIndex))&&(e.id==null?queue.push(e):queue.splice(findInsertionIndex(e.id),0,e),queueFlush())}function queueFlush(){!isFlushing&&!isFlushPending&&(isFlushPending=!0,currentFlushPromise=resolvedPromise.then(flushJobs))}function invalidateJob(e){const t=queue.indexOf(e);t>flushIndex&&queue.splice(t,1)}function queuePostFlushCb(e){isArray(e)?pendingPostFlushCbs.push(...e):(!activePostFlushCbs||!activePostFlushCbs.includes(e,e.allowRecurse?postFlushIndex+1:postFlushIndex))&&pendingPostFlushCbs.push(e),queueFlush()}function flushPreFlushCbs(e,t,n){for(n===void 0&&(n=isFlushing?flushIndex+1:0);n<queue.length;n++){const r=queue[n];if(r&&r.pre){if(e&&r.id!==e.uid)continue;queue.splice(n,1),n--,r()}}}function flushPostFlushCbs(e){if(pendingPostFlushCbs.length){const t=[...new Set(pendingPostFlushCbs)].sort((n,r)=>getId(n)-getId(r));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...t);return}for(activePostFlushCbs=t,postFlushIndex=0;postFlushIndex<activePostFlushCbs.length;postFlushIndex++){const n=activePostFlushCbs[postFlushIndex];n.active!==!1&&n()}activePostFlushCbs=null,postFlushIndex=0}}const getId=e=>e.id==null?1/0:e.id,comparator=(e,t)=>{const n=getId(e)-getId(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function flushJobs(e){isFlushPending=!1,isFlushing=!0,queue.sort(comparator);const t=NOOP;try{for(flushIndex=0;flushIndex<queue.length;flushIndex++){const n=queue[flushIndex];n&&n.active!==!1&&callWithErrorHandling(n,n.i,n.i?15:14)}}finally{flushIndex=0,queue.length=0,flushPostFlushCbs(),isFlushing=!1,currentFlushPromise=null,(queue.length||pendingPostFlushCbs.length)&&flushJobs()}}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(e){const t=currentRenderingInstance;return currentRenderingInstance=e,currentScopeId=e&&e.type.__scopeId||null,t}function withCtx(e,t,n){if(t===void 0&&(t=currentRenderingInstance),!t||e._n)return e;const r=function(){r._d&&setBlockTracking(-1);const i=setCurrentRenderingInstance(t);let o;try{o=e(...arguments)}finally{setCurrentRenderingInstance(i),r._d&&setBlockTracking(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function withDirectives(e,t){if(currentRenderingInstance===null)return e;const n=getComponentPublicInstance(currentRenderingInstance),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=EMPTY_OBJ]=t[s];i&&(isFunction(i)&&(i={mounted:i,updated:i}),i.deep&&traverse(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function invokeDirectiveHook(e,t,n,r){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[r];l&&(pauseTracking(),callWithAsyncErrorHandling(l,n,8,[e.el,a,e,t]),resetTracking())}}const leaveCbKey=Symbol("_leaveCb"),enterCbKey=Symbol("_enterCb");function useTransitionState(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return onMounted(()=>{e.isMounted=!0}),onBeforeUnmount(()=>{e.isUnmounting=!0}),e}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},recursiveGetSubtree=e=>{const t=e.subTree;return t.component?recursiveGetSubtree(t.component):t},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(e,t){let{slots:n}=t;const r=getCurrentInstance(),s=useTransitionState();return()=>{const i=n.default&&getTransitionRawChildren(n.default(),!0);if(!i||!i.length)return;let o=i[0];if(i.length>1){for(const w of i)if(w.type!==Comment){o=w;break}}const a=toRaw(e),{mode:l}=a;if(s.isLeaving)return emptyPlaceholder(o);const c=getKeepAliveChild(o);if(!c)return emptyPlaceholder(o);let u=resolveTransitionHooks(c,a,s,r,w=>u=w);setTransitionHooks(c,u);const f=r.subTree,v=f&&getKeepAliveChild(f);if(v&&v.type!==Comment&&!isSameVNodeType(c,v)&&recursiveGetSubtree(r).type!==Comment){const w=resolveTransitionHooks(v,a,s,r);if(setTransitionHooks(v,w),l==="out-in"&&c.type!==Comment)return s.isLeaving=!0,w.afterLeave=()=>{s.isLeaving=!1,r.update.active!==!1&&(r.effect.dirty=!0,r.update())},emptyPlaceholder(o);l==="in-out"&&c.type!==Comment&&(w.delayLeave=(D,T,P)=>{const B=getLeavingNodesForType(s,v);B[String(v.key)]=v,D[leaveCbKey]=()=>{T(),D[leaveCbKey]=void 0,delete u.delayedLeave},u.delayedLeave=P})}return o}}},BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function resolveTransitionHooks(e,t,n,r,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:v,onLeave:w,onAfterLeave:D,onLeaveCancelled:T,onBeforeAppear:P,onAppear:B,onAfterAppear:U,onAppearCancelled:j}=t,N=String(e.key),Y=getLeavingNodesForType(n,e),Q=(F,H)=>{F&&callWithAsyncErrorHandling(F,r,9,H)},x=(F,H)=>{const q=H[1];Q(F,H),isArray(F)?F.every(O=>O.length<=1)&&q():F.length<=1&&q()},Z={mode:o,persisted:a,beforeEnter(F){let H=l;if(!n.isMounted)if(i)H=P||l;else return;F[leaveCbKey]&&F[leaveCbKey](!0);const q=Y[N];q&&isSameVNodeType(e,q)&&q.el[leaveCbKey]&&q.el[leaveCbKey](),Q(H,[F])},enter(F){let H=c,q=u,O=f;if(!n.isMounted)if(i)H=B||c,q=U||u,O=j||f;else return;let W=!1;const X=F[enterCbKey]=J=>{W||(W=!0,J?Q(O,[F]):Q(q,[F]),Z.delayedLeave&&Z.delayedLeave(),F[enterCbKey]=void 0)};H?x(H,[F,X]):X()},leave(F,H){const q=String(e.key);if(F[enterCbKey]&&F[enterCbKey](!0),n.isUnmounting)return H();Q(v,[F]);let O=!1;const W=F[leaveCbKey]=X=>{O||(O=!0,H(),X?Q(T,[F]):Q(D,[F]),F[leaveCbKey]=void 0,Y[q]===e&&delete Y[q])};Y[q]=e,w?x(w,[F,W]):W()},clone(F){const H=resolveTransitionHooks(F,t,n,r,s);return s&&s(H),H}};return Z}function emptyPlaceholder(e){if(isKeepAlive(e))return e=cloneVNode(e),e.children=null,e}function getKeepAliveChild(e){if(!isKeepAlive(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&isFunction(n.default))return n.default()}}function setTransitionHooks(e,t){e.shapeFlag&6&&e.component?setTransitionHooks(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function getTransitionRawChildren(e,t,n){t===void 0&&(t=!1);let r=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:i);o.type===Fragment?(o.patchFlag&128&&s++,r=r.concat(getTransitionRawChildren(o.children,t,a))):(t||o.type!==Comment)&&r.push(a!=null?cloneVNode(o,{key:a}):o)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}const isAsyncWrapper=e=>!!e.type.__asyncLoader,isKeepAlive=e=>e.type.__isKeepAlive;function onActivated(e,t){registerKeepAliveHook(e,"a",t)}function onDeactivated(e,t){registerKeepAliveHook(e,"da",t)}function registerKeepAliveHook(e,t,n){n===void 0&&(n=currentInstance);const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(injectHook(t,r,n),n){let s=n.parent;for(;s&&s.parent;)isKeepAlive(s.parent.vnode)&&injectToKeepAliveRoot(r,t,n,s),s=s.parent}}function injectToKeepAliveRoot(e,t,n,r){const s=injectHook(t,e,r,!0);onUnmounted(()=>{remove(r[t],s)},n)}function injectHook(e,t,n,r){if(n===void 0&&(n=currentInstance),r===void 0&&(r=!1),n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=function(){pauseTracking();const o=setCurrentInstance(n);for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];const u=callWithAsyncErrorHandling(t,n,e,l);return o(),resetTracking(),u});return r?s.unshift(i):s.push(i),i}}const createHook=e=>function(t,n){n===void 0&&(n=currentInstance),(!isInSSRComponentSetup||e==="sp")&&injectHook(e,function(){return t(...arguments)},n)},onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(e,t){t===void 0&&(t=currentInstance),injectHook("ec",e,t)}const COMPONENTS="components";function resolveComponent(e,t){return resolveAsset(COMPONENTS,e,!0,t)||e}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function resolveAsset(e,t,n,r){r===void 0&&(r=!1);const s=currentRenderingInstance||currentInstance;if(s){const i=s.type;if(e===COMPONENTS){const a=getComponentName(i,!1);if(a&&(a===t||a===camelize(t)||a===capitalize(camelize(t))))return i}const o=resolve(s[e]||i[e],t)||resolve(s.appContext[e],t);return!o&&r?i:o}}function resolve(e,t){return e&&(e[t]||e[camelize(t)]||e[capitalize(camelize(t))])}function renderList(e,t,n,r){let s;const i=n&&n[r];if(isArray(e)||isString(e)){s=new Array(e.length);for(let o=0,a=e.length;o<a;o++)s[o]=t(e[o],o,void 0,i&&i[o])}else if(typeof e=="number"){s=new Array(e);for(let o=0;o<e;o++)s[o]=t(o+1,o,void 0,i&&i[o])}else if(isObject$1(e))if(e[Symbol.iterator])s=Array.from(e,(o,a)=>t(o,a,void 0,i&&i[a]));else{const o=Object.keys(e);s=new Array(o.length);for(let a=0,l=o.length;a<l;a++){const c=o[a];s[a]=t(e[c],c,a,i&&i[a])}}else s=[];return n&&(n[r]=s),s}function renderSlot(e,t,n,r,s){if(n===void 0&&(n={}),currentRenderingInstance.isCE||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&¤tRenderingInstance.parent.isCE)return t!=="default"&&(n.name=t),createVNode("slot",n,r&&r());let i=e[t];i&&i._c&&(i._d=!1),openBlock();const o=i&&ensureValidVNode(i(n)),a=createBlock(Fragment,{key:(n.key||o&&o.key||"_"+t)+(!o&&r?"_fb":"")},o||(r?r():[]),o&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function ensureValidVNode(e){return e.some(t=>isVNode(t)?!(t.type===Comment||t.type===Fragment&&!ensureValidVNode(t.children)):!0)?e:null}const getPublicInstance=e=>e?isStatefulComponent(e)?getComponentPublicInstance(e):getPublicInstance(e.parent):null,publicPropertiesMap=extend(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>getPublicInstance(e.parent),$root:e=>getPublicInstance(e.root),$emit:e=>e.emit,$options:e=>resolveMergedOptions(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,queueJob(e.update)}),$nextTick:e=>e.n||(e.n=nextTick.bind(e.proxy)),$watch:e=>instanceWatch.bind(e)}),hasSetupBinding=(e,t)=>e!==EMPTY_OBJ&&!e.__isScriptSetup&&hasOwn(e,t),PublicInstanceProxyHandlers={get(e,t){let{_:n}=e;if(t==="__v_skip")return!0;const{ctx:r,setupState:s,data:i,props:o,accessCache:a,type:l,appContext:c}=n;let u;if(t[0]!=="$"){const D=a[t];if(D!==void 0)switch(D){case 1:return s[t];case 2:return i[t];case 4:return r[t];case 3:return o[t]}else{if(hasSetupBinding(s,t))return a[t]=1,s[t];if(i!==EMPTY_OBJ&&hasOwn(i,t))return a[t]=2,i[t];if((u=n.propsOptions[0])&&hasOwn(u,t))return a[t]=3,o[t];if(r!==EMPTY_OBJ&&hasOwn(r,t))return a[t]=4,r[t];shouldCacheAccess&&(a[t]=0)}}const f=publicPropertiesMap[t];let v,w;if(f)return t==="$attrs"&&track(n.attrs,"get",""),f(n);if((v=l.__cssModules)&&(v=v[t]))return v;if(r!==EMPTY_OBJ&&hasOwn(r,t))return a[t]=4,r[t];if(w=c.config.globalProperties,hasOwn(w,t))return w[t]},set(e,t,n){let{_:r}=e;const{data:s,setupState:i,ctx:o}=r;return hasSetupBinding(i,t)?(i[t]=n,!0):s!==EMPTY_OBJ&&hasOwn(s,t)?(s[t]=n,!0):hasOwn(r.props,t)||t[0]==="$"&&t.slice(1)in r?!1:(o[t]=n,!0)},has(e,t){let{_:{data:n,setupState:r,accessCache:s,ctx:i,appContext:o,propsOptions:a}}=e,l;return!!s[t]||n!==EMPTY_OBJ&&hasOwn(n,t)||hasSetupBinding(r,t)||(l=a[0])&&hasOwn(l,t)||hasOwn(i,t)||hasOwn(publicPropertiesMap,t)||hasOwn(o.config.globalProperties,t)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:hasOwn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function normalizePropsOrEmits(e){return isArray(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let shouldCacheAccess=!0;function applyOptions(e){const t=resolveMergedOptions(e),n=e.proxy,r=e.ctx;shouldCacheAccess=!1,t.beforeCreate&&callHook$1(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:f,mounted:v,beforeUpdate:w,updated:D,activated:T,deactivated:P,beforeDestroy:B,beforeUnmount:U,destroyed:j,unmounted:N,render:Y,renderTracked:Q,renderTriggered:x,errorCaptured:Z,serverPrefetch:F,expose:H,inheritAttrs:q,components:O,directives:W,filters:X}=t;if(c&&resolveInjections(c,r),o)for(const K in o){const V=o[K];isFunction(V)&&(r[K]=V.bind(n))}if(s){const K=s.call(n,n);isObject$1(K)&&(e.data=reactive(K))}if(shouldCacheAccess=!0,i)for(const K in i){const V=i[K],re=isFunction(V)?V.bind(n,n):isFunction(V.get)?V.get.bind(n,n):NOOP,fe=!isFunction(V)&&isFunction(V.set)?V.set.bind(n):NOOP,le=computed({get:re,set:fe});Object.defineProperty(r,K,{enumerable:!0,configurable:!0,get:()=>le.value,set:se=>le.value=se})}if(a)for(const K in a)createWatcher(a[K],r,n,K);if(l){const K=isFunction(l)?l.call(n):l;Reflect.ownKeys(K).forEach(V=>{provide(V,K[V])})}u&&callHook$1(u,e,"c");function J(K,V){isArray(V)?V.forEach(re=>K(re.bind(n))):V&&K(V.bind(n))}if(J(onBeforeMount,f),J(onMounted,v),J(onBeforeUpdate,w),J(onUpdated,D),J(onActivated,T),J(onDeactivated,P),J(onErrorCaptured,Z),J(onRenderTracked,Q),J(onRenderTriggered,x),J(onBeforeUnmount,U),J(onUnmounted,N),J(onServerPrefetch,F),isArray(H))if(H.length){const K=e.exposed||(e.exposed={});H.forEach(V=>{Object.defineProperty(K,V,{get:()=>n[V],set:re=>n[V]=re})})}else e.exposed||(e.exposed={});Y&&e.render===NOOP&&(e.render=Y),q!=null&&(e.inheritAttrs=q),O&&(e.components=O),W&&(e.directives=W)}function resolveInjections(e,t,n){isArray(e)&&(e=normalizeInject(e));for(const r in e){const s=e[r];let i;isObject$1(s)?"default"in s?i=inject(s.from||r,s.default,!0):i=inject(s.from||r):i=inject(s),isRef(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function callHook$1(e,t,n){callWithAsyncErrorHandling(isArray(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function createWatcher(e,t,n,r){const s=r.includes(".")?createPathGetter(n,r):()=>n[r];if(isString(e)){const i=t[e];isFunction(i)&&watch(s,i)}else if(isFunction(e))watch(s,e.bind(n));else if(isObject$1(e))if(isArray(e))e.forEach(i=>createWatcher(i,t,n,r));else{const i=isFunction(e.handler)?e.handler.bind(n):t[e.handler];isFunction(i)&&watch(s,i,e)}}function resolveMergedOptions(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(c=>mergeOptions(l,c,o,!0)),mergeOptions(l,t,o)),isObject$1(t)&&i.set(t,l),l}function mergeOptions(e,t,n,r){r===void 0&&(r=!1);const{mixins:s,extends:i}=t;i&&mergeOptions(e,i,n,!0),s&&s.forEach(o=>mergeOptions(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=internalOptionMergeStrats[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(e,t){return t?e?function(){return extend(isFunction(e)?e.call(this,this):e,isFunction(t)?t.call(this,this):t)}:t:e}function mergeInject(e,t){return mergeObjectOptions(normalizeInject(e),normalizeInject(t))}function normalizeInject(e){if(isArray(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function mergeAsArray(e,t){return e?[...new Set([].concat(e,t))]:t}function mergeObjectOptions(e,t){return e?extend(Object.create(null),e,t):t}function mergeEmitsOrPropsOptions(e,t){return e?isArray(e)&&isArray(t)?[...new Set([...e,...t])]:extend(Object.create(null),normalizePropsOrEmits(e),normalizePropsOrEmits(t??{})):t}function mergeWatchOptions(e,t){if(!e)return t;if(!t)return e;const n=extend(Object.create(null),e);for(const r in t)n[r]=mergeAsArray(e[r],t[r]);return n}function createAppContext(){return{app:null,config:{isNativeTag:NO,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let uid$1=0;function createAppAPI(e,t){return function(r,s){s===void 0&&(s=null),isFunction(r)||(r=extend({},r)),s!=null&&!isObject$1(s)&&(s=null);const i=createAppContext(),o=new WeakSet;let a=!1;const l=i.app={_uid:uid$1++,_component:r,_props:s,_container:null,_context:i,_instance:null,version,get config(){return i.config},set config(c){},use(c){for(var u=arguments.length,f=new Array(u>1?u-1:0),v=1;v<u;v++)f[v-1]=arguments[v];return o.has(c)||(c&&isFunction(c.install)?(o.add(c),c.install(l,...f)):isFunction(c)&&(o.add(c),c(l,...f))),l},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),l},component(c,u){return u?(i.components[c]=u,l):i.components[c]},directive(c,u){return u?(i.directives[c]=u,l):i.directives[c]},mount(c,u,f){if(!a){const v=createVNode(r,s);return v.appContext=i,f===!0?f="svg":f===!1&&(f=void 0),u&&t?t(v,c):e(v,c,f),a=!0,l._container=c,c.__vue_app__=l,getComponentPublicInstance(v.component)}},unmount(){a&&(e(null,l._container),delete l._container.__vue_app__)},provide(c,u){return i.provides[c]=u,l},runWithContext(c){const u=currentApp;currentApp=l;try{return c()}finally{currentApp=u}}};return l}}let currentApp=null;function provide(e,t){if(currentInstance){let n=currentInstance.provides;const r=currentInstance.parent&¤tInstance.parent.provides;r===n&&(n=currentInstance.provides=Object.create(r)),n[e]=t}}function inject(e,t,n){n===void 0&&(n=!1);const r=currentInstance||currentRenderingInstance;if(r||currentApp){const s=currentApp?currentApp._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&isFunction(t)?t.call(r&&r.proxy):t}}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=e=>Object.getPrototypeOf(e)===internalObjectProto;function initProps(e,t,n,r){r===void 0&&(r=!1);const s={},i=createInternalObject();e.propsDefaults=Object.create(null),setFullProps(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:shallowReactive(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function updateProps(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=toRaw(s),[l]=e.propsOptions;let c=!1;if((r||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let v=u[f];if(isEmitListener(e.emitsOptions,v))continue;const w=t[v];if(l)if(hasOwn(i,v))w!==i[v]&&(i[v]=w,c=!0);else{const D=camelize(v);s[D]=resolvePropValue(l,a,D,w,e,!1)}else w!==i[v]&&(i[v]=w,c=!0)}}}else{setFullProps(e,t,s,i)&&(c=!0);let u;for(const f in a)(!t||!hasOwn(t,f)&&((u=hyphenate(f))===f||!hasOwn(t,u)))&&(l?n&&(n[f]!==void 0||n[u]!==void 0)&&(s[f]=resolvePropValue(l,a,f,void 0,e,!0)):delete s[f]);if(i!==a)for(const f in i)(!t||!hasOwn(t,f))&&(delete i[f],c=!0)}c&&trigger(e.attrs,"set","")}function setFullProps(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(isReservedProp(l))continue;const c=t[l];let u;s&&hasOwn(s,u=camelize(l))?!i||!i.includes(u)?n[u]=c:(a||(a={}))[u]=c:isEmitListener(e.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,o=!0)}if(i){const l=toRaw(n),c=a||EMPTY_OBJ;for(let u=0;u<i.length;u++){const f=i[u];n[f]=resolvePropValue(s,l,f,c[f],e,!hasOwn(c,f))}}return o}function resolvePropValue(e,t,n,r,s,i){const o=e[n];if(o!=null){const a=hasOwn(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&isFunction(l)){const{propsDefaults:c}=s;if(n in c)r=c[n];else{const u=setCurrentInstance(s);r=c[n]=l.call(null,t),u()}}else r=l}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===hyphenate(n))&&(r=!0))}return r}const mixinPropsCache=new WeakMap;function normalizePropsOptions(e,t,n){n===void 0&&(n=!1);const r=n?mixinPropsCache:t.propsCache,s=r.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!isFunction(e)){const u=f=>{l=!0;const[v,w]=normalizePropsOptions(f,t,!0);extend(o,v),w&&a.push(...w)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!l)return isObject$1(e)&&r.set(e,EMPTY_ARR),EMPTY_ARR;if(isArray(i))for(let u=0;u<i.length;u++){const f=camelize(i[u]);validatePropName(f)&&(o[f]=EMPTY_OBJ)}else if(i)for(const u in i){const f=camelize(u);if(validatePropName(f)){const v=i[u],w=o[f]=isArray(v)||isFunction(v)?{type:v}:extend({},v),D=w.type;let T=!1,P=!0;if(isArray(D))for(let B=0;B<D.length;++B){const U=D[B],j=isFunction(U)&&U.name;if(j==="Boolean"){T=!0;break}else j==="String"&&(P=!1)}else T=isFunction(D)&&D.name==="Boolean";w[0]=T,w[1]=P,(T||hasOwn(w,"default"))&&a.push(f)}}const c=[o,a];return isObject$1(e)&&r.set(e,c),c}function validatePropName(e){return e[0]!=="$"&&!isReservedProp(e)}const isInternalKey=e=>e[0]==="_"||e==="$stable",normalizeSlotValue=e=>isArray(e)?e.map(normalizeVNode):[normalizeVNode(e)],normalizeSlot=(e,t,n)=>{if(t._n)return t;const r=withCtx(function(){return normalizeSlotValue(t(...arguments))},n);return r._c=!1,r},normalizeObjectSlots=(e,t,n)=>{const r=e._ctx;for(const s in e){if(isInternalKey(s))continue;const i=e[s];if(isFunction(i))t[s]=normalizeSlot(s,i,r);else if(i!=null){const o=normalizeSlotValue(i);t[s]=()=>o}}},normalizeVNodeSlots=(e,t)=>{const n=normalizeSlotValue(t);e.slots.default=()=>n},assignSlots=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},initSlots=(e,t,n)=>{const r=e.slots=createInternalObject();if(e.vnode.shapeFlag&32){const s=t._;s?(assignSlots(r,t,n),n&&def(r,"_",s,!0)):normalizeObjectSlots(t,r)}else t&&normalizeVNodeSlots(e,t)},updateSlots=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=EMPTY_OBJ;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:assignSlots(s,t,n):(i=!t.$stable,normalizeObjectSlots(t,s)),o=t}else t&&(normalizeVNodeSlots(e,t),o={default:1});if(i)for(const a in s)!isInternalKey(a)&&o[a]==null&&delete s[a]};function setRef(e,t,n,r,s){if(s===void 0&&(s=!1),isArray(e)){e.forEach((v,w)=>setRef(v,t&&(isArray(t)?t[w]:t),n,r,s));return}if(isAsyncWrapper(r)&&!s)return;const i=r.shapeFlag&4?getComponentPublicInstance(r.component):r.el,o=s?null:i,{i:a,r:l}=e,c=t&&t.r,u=a.refs===EMPTY_OBJ?a.refs={}:a.refs,f=a.setupState;if(c!=null&&c!==l&&(isString(c)?(u[c]=null,hasOwn(f,c)&&(f[c]=null)):isRef(c)&&(c.value=null)),isFunction(l))callWithErrorHandling(l,a,12,[o,u]);else{const v=isString(l),w=isRef(l);if(v||w){const D=()=>{if(e.f){const T=v?hasOwn(f,l)?f[l]:u[l]:l.value;s?isArray(T)&&remove(T,i):isArray(T)?T.includes(i)||T.push(i):v?(u[l]=[i],hasOwn(f,l)&&(f[l]=u[l])):(l.value=[i],e.k&&(u[e.k]=l.value))}else v?(u[l]=o,hasOwn(f,l)&&(f[l]=o)):w&&(l.value=o,e.k&&(u[e.k]=o))};o?(D.id=-1,queuePostRenderEffect(D,n)):D()}}}const TeleportEndKey=Symbol("_vte"),isTeleport=e=>e.__isTeleport;function initFeatureFlags(){typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(e){return baseCreateRenderer(e)}function baseCreateRenderer(e,t){initFeatureFlags();const n=getGlobalThis();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:v,setScopeId:w=NOOP,insertStaticContent:D}=e,T=function(d,g,b,_,y,M,A,I,E){if(_===void 0&&(_=null),y===void 0&&(y=null),M===void 0&&(M=null),A===void 0&&(A=void 0),I===void 0&&(I=null),E===void 0&&(E=!!g.dynamicChildren),d===g)return;d&&!isSameVNodeType(d,g)&&(_=de(d),ie(d,y,M,!0),d=null),g.patchFlag===-2&&(E=!1,g.dynamicChildren=null);const{type:C,ref:$,shapeFlag:S}=g;switch(C){case Text:P(d,g,b,_);break;case Comment:B(d,g,b,_);break;case Static:d==null&&U(g,b,_,A);break;case Fragment:O(d,g,b,_,y,M,A,I,E);break;default:S&1?Y(d,g,b,_,y,M,A,I,E):S&6?W(d,g,b,_,y,M,A,I,E):(S&64||S&128)&&C.process(d,g,b,_,y,M,A,I,E,oe)}$!=null&&y&&setRef($,d&&d.ref,M,g||d,!g)},P=(m,d,g,b)=>{if(m==null)r(d.el=a(d.children),g,b);else{const _=d.el=m.el;d.children!==m.children&&c(_,d.children)}},B=(m,d,g,b)=>{m==null?r(d.el=l(d.children||""),g,b):d.el=m.el},U=(m,d,g,b)=>{[m.el,m.anchor]=D(m.children,d,g,b,m.el,m.anchor)},j=(m,d,g)=>{let{el:b,anchor:_}=m,y;for(;b&&b!==_;)y=v(b),r(b,d,g),b=y;r(_,d,g)},N=m=>{let{el:d,anchor:g}=m,b;for(;d&&d!==g;)b=v(d),s(d),d=b;s(g)},Y=(m,d,g,b,_,y,M,A,I)=>{d.type==="svg"?M="svg":d.type==="math"&&(M="mathml"),m==null?Q(d,g,b,_,y,M,A,I):F(m,d,_,y,M,A,I)},Q=(m,d,g,b,_,y,M,A)=>{let I,E;const{props:C,shapeFlag:$,transition:S,dirs:L}=m;if(I=m.el=o(m.type,y,C&&C.is,C),$&8?u(I,m.children):$&16&&Z(m.children,I,null,b,_,resolveChildrenNamespace(m,y),M,A),L&&invokeDirectiveHook(m,null,b,"created"),x(I,m,m.scopeId,M,b),C){for(const G in C)G!=="value"&&!isReservedProp(G)&&i(I,G,null,C[G],y,b);"value"in C&&i(I,"value",null,C.value,y),(E=C.onVnodeBeforeMount)&&invokeVNodeHook(E,b,m)}L&&invokeDirectiveHook(m,null,b,"beforeMount");const R=needTransition(_,S);R&&S.beforeEnter(I),r(I,d,g),((E=C&&C.onVnodeMounted)||R||L)&&queuePostRenderEffect(()=>{E&&invokeVNodeHook(E,b,m),R&&S.enter(I),L&&invokeDirectiveHook(m,null,b,"mounted")},_)},x=(m,d,g,b,_)=>{if(g&&w(m,g),b)for(let y=0;y<b.length;y++)w(m,b[y]);if(_){let y=_.subTree;if(d===y){const M=_.vnode;x(m,M,M.scopeId,M.slotScopeIds,_.parent)}}},Z=function(d,g,b,_,y,M,A,I,E){E===void 0&&(E=0);for(let C=E;C<d.length;C++){const $=d[C]=I?cloneIfMounted(d[C]):normalizeVNode(d[C]);T(null,$,g,b,_,y,M,A,I)}},F=(m,d,g,b,_,y,M)=>{const A=d.el=m.el;let{patchFlag:I,dynamicChildren:E,dirs:C}=d;I|=m.patchFlag&16;const $=m.props||EMPTY_OBJ,S=d.props||EMPTY_OBJ;let L;if(g&&toggleRecurse(g,!1),(L=S.onVnodeBeforeUpdate)&&invokeVNodeHook(L,g,d,m),C&&invokeDirectiveHook(d,m,g,"beforeUpdate"),g&&toggleRecurse(g,!0),($.innerHTML&&S.innerHTML==null||$.textContent&&S.textContent==null)&&u(A,""),E?H(m.dynamicChildren,E,A,g,b,resolveChildrenNamespace(d,_),y):M||re(m,d,A,null,g,b,resolveChildrenNamespace(d,_),y,!1),I>0){if(I&16)q(A,$,S,g,_);else if(I&2&&$.class!==S.class&&i(A,"class",null,S.class,_),I&4&&i(A,"style",$.style,S.style,_),I&8){const R=d.dynamicProps;for(let G=0;G<R.length;G++){const k=R[G],z=$[k],te=S[k];(te!==z||k==="value")&&i(A,k,z,te,_,g)}}I&1&&m.children!==d.children&&u(A,d.children)}else!M&&E==null&&q(A,$,S,g,_);((L=S.onVnodeUpdated)||C)&&queuePostRenderEffect(()=>{L&&invokeVNodeHook(L,g,d,m),C&&invokeDirectiveHook(d,m,g,"updated")},b)},H=(m,d,g,b,_,y,M)=>{for(let A=0;A<d.length;A++){const I=m[A],E=d[A],C=I.el&&(I.type===Fragment||!isSameVNodeType(I,E)||I.shapeFlag&70)?f(I.el):g;T(I,E,C,null,b,_,y,M,!0)}},q=(m,d,g,b,_)=>{if(d!==g){if(d!==EMPTY_OBJ)for(const y in d)!isReservedProp(y)&&!(y in g)&&i(m,y,d[y],null,_,b);for(const y in g){if(isReservedProp(y))continue;const M=g[y],A=d[y];M!==A&&y!=="value"&&i(m,y,A,M,_,b)}"value"in g&&i(m,"value",d.value,g.value,_)}},O=(m,d,g,b,_,y,M,A,I)=>{const E=d.el=m?m.el:a(""),C=d.anchor=m?m.anchor:a("");let{patchFlag:$,dynamicChildren:S,slotScopeIds:L}=d;L&&(A=A?A.concat(L):L),m==null?(r(E,g,b),r(C,g,b),Z(d.children||[],g,C,_,y,M,A,I)):$>0&&$&64&&S&&m.dynamicChildren?(H(m.dynamicChildren,S,g,_,y,M,A),(d.key!=null||_&&d===_.subTree)&&traverseStaticChildren(m,d,!0)):re(m,d,g,C,_,y,M,A,I)},W=(m,d,g,b,_,y,M,A,I)=>{d.slotScopeIds=A,m==null?d.shapeFlag&512?_.ctx.activate(d,g,b,M,I):X(d,g,b,_,y,M,I):J(m,d,I)},X=(m,d,g,b,_,y,M)=>{const A=m.component=createComponentInstance(m,b,_);if(isKeepAlive(m)&&(A.ctx.renderer=oe),setupComponent(A,!1,M),A.asyncDep){if(_&&_.registerDep(A,K,M),!m.el){const I=A.subTree=createVNode(Comment);B(null,I,d,g)}}else K(A,m,d,g,_,y,M)},J=(m,d,g)=>{const b=d.component=m.component;if(shouldUpdateComponent(m,d,g))if(b.asyncDep&&!b.asyncResolved){V(b,d,g);return}else b.next=d,invalidateJob(b.update),b.effect.dirty=!0,b.update();else d.el=m.el,b.vnode=d},K=(m,d,g,b,_,y,M)=>{const A=()=>{if(m.isMounted){let{next:C,bu:$,u:S,parent:L,vnode:R}=m;{const ae=locateNonHydratedAsyncRoot(m);if(ae){C&&(C.el=R.el,V(m,C,M)),ae.asyncDep.then(()=>{m.isUnmounted||A()});return}}let G=C,k;toggleRecurse(m,!1),C?(C.el=R.el,V(m,C,M)):C=R,$&&invokeArrayFns($),(k=C.props&&C.props.onVnodeBeforeUpdate)&&invokeVNodeHook(k,L,C,R),toggleRecurse(m,!0);const z=renderComponentRoot(m),te=m.subTree;m.subTree=z,T(te,z,f(te.el),de(te),m,_,y),C.el=z.el,G===null&&updateHOCHostEl(m,z.el),S&&queuePostRenderEffect(S,_),(k=C.props&&C.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(k,L,C,R),_)}else{let C;const{el:$,props:S}=d,{bm:L,m:R,parent:G}=m,k=isAsyncWrapper(d);if(toggleRecurse(m,!1),L&&invokeArrayFns(L),!k&&(C=S&&S.onVnodeBeforeMount)&&invokeVNodeHook(C,G,d),toggleRecurse(m,!0),$&&pe){const z=()=>{m.subTree=renderComponentRoot(m),pe($,m.subTree,m,_,null)};k?d.type.__asyncLoader().then(()=>!m.isUnmounted&&z()):z()}else{const z=m.subTree=renderComponentRoot(m);T(null,z,g,b,m,_,y),d.el=z.el}if(R&&queuePostRenderEffect(R,_),!k&&(C=S&&S.onVnodeMounted)){const z=d;queuePostRenderEffect(()=>invokeVNodeHook(C,G,z),_)}(d.shapeFlag&256||G&&isAsyncWrapper(G.vnode)&&G.vnode.shapeFlag&256)&&m.a&&queuePostRenderEffect(m.a,_),m.isMounted=!0,d=g=b=null}},I=m.effect=new ReactiveEffect(A,NOOP,()=>queueJob(E),m.scope),E=m.update=()=>{I.dirty&&I.run()};E.i=m,E.id=m.uid,toggleRecurse(m,!0),E()},V=(m,d,g)=>{d.component=m;const b=m.vnode.props;m.vnode=d,m.next=null,updateProps(m,d.props,b,g),updateSlots(m,d.children,g),pauseTracking(),flushPreFlushCbs(m),resetTracking()},re=function(d,g,b,_,y,M,A,I,E){E===void 0&&(E=!1);const C=d&&d.children,$=d?d.shapeFlag:0,S=g.children,{patchFlag:L,shapeFlag:R}=g;if(L>0){if(L&128){le(C,S,b,_,y,M,A,I,E);return}else if(L&256){fe(C,S,b,_,y,M,A,I,E);return}}R&8?($&16&&ce(C,y,M),S!==C&&u(b,S)):$&16?R&16?le(C,S,b,_,y,M,A,I,E):ce(C,y,M,!0):($&8&&u(b,""),R&16&&Z(S,b,_,y,M,A,I,E))},fe=(m,d,g,b,_,y,M,A,I)=>{m=m||EMPTY_ARR,d=d||EMPTY_ARR;const E=m.length,C=d.length,$=Math.min(E,C);let S;for(S=0;S<$;S++){const L=d[S]=I?cloneIfMounted(d[S]):normalizeVNode(d[S]);T(m[S],L,g,null,_,y,M,A,I)}E>C?ce(m,_,y,!0,!1,$):Z(d,g,b,_,y,M,A,I,$)},le=(m,d,g,b,_,y,M,A,I)=>{let E=0;const C=d.length;let $=m.length-1,S=C-1;for(;E<=$&&E<=S;){const L=m[E],R=d[E]=I?cloneIfMounted(d[E]):normalizeVNode(d[E]);if(isSameVNodeType(L,R))T(L,R,g,null,_,y,M,A,I);else break;E++}for(;E<=$&&E<=S;){const L=m[$],R=d[S]=I?cloneIfMounted(d[S]):normalizeVNode(d[S]);if(isSameVNodeType(L,R))T(L,R,g,null,_,y,M,A,I);else break;$--,S--}if(E>$){if(E<=S){const L=S+1,R=L<C?d[L].el:b;for(;E<=S;)T(null,d[E]=I?cloneIfMounted(d[E]):normalizeVNode(d[E]),g,R,_,y,M,A,I),E++}}else if(E>S)for(;E<=$;)ie(m[E],_,y,!0),E++;else{const L=E,R=E,G=new Map;for(E=R;E<=S;E++){const ee=d[E]=I?cloneIfMounted(d[E]):normalizeVNode(d[E]);ee.key!=null&&G.set(ee.key,E)}let k,z=0;const te=S-R+1;let ae=!1,_e=0;const ue=new Array(te);for(E=0;E<te;E++)ue[E]=0;for(E=L;E<=$;E++){const ee=m[E];if(z>=te){ie(ee,_,y,!0);continue}let ne;if(ee.key!=null)ne=G.get(ee.key);else for(k=R;k<=S;k++)if(ue[k-R]===0&&isSameVNodeType(ee,d[k])){ne=k;break}ne===void 0?ie(ee,_,y,!0):(ue[ne-R]=E+1,ne>=_e?_e=ne:ae=!0,T(ee,d[ne],g,null,_,y,M,A,I),z++)}const be=ae?getSequence(ue):EMPTY_ARR;for(k=be.length-1,E=te-1;E>=0;E--){const ee=R+E,ne=d[ee],ye=ee+1<C?d[ee+1].el:b;ue[E]===0?T(null,ne,g,ye,_,y,M,A,I):ae&&(k<0||E!==be[k]?se(ne,g,ye,2):k--)}}},se=function(d,g,b,_,y){y===void 0&&(y=null);const{el:M,type:A,transition:I,children:E,shapeFlag:C}=d;if(C&6){se(d.component.subTree,g,b,_);return}if(C&128){d.suspense.move(g,b,_);return}if(C&64){A.move(d,g,b,oe);return}if(A===Fragment){r(M,g,b);for(let S=0;S<E.length;S++)se(E[S],g,b,_);r(d.anchor,g,b);return}if(A===Static){j(d,g,b);return}if(_!==2&&C&1&&I)if(_===0)I.beforeEnter(M),r(M,g,b),queuePostRenderEffect(()=>I.enter(M),y);else{const{leave:S,delayLeave:L,afterLeave:R}=I,G=()=>r(M,g,b),k=()=>{S(M,()=>{G(),R&&R()})};L?L(M,G,k):k()}else r(M,g,b)},ie=function(d,g,b,_,y){_===void 0&&(_=!1),y===void 0&&(y=!1);const{type:M,props:A,ref:I,children:E,dynamicChildren:C,shapeFlag:$,patchFlag:S,dirs:L,cacheIndex:R}=d;if(S===-2&&(y=!1),I!=null&&setRef(I,null,b,d,!0),R!=null&&(g.renderCache[R]=void 0),$&256){g.ctx.deactivate(d);return}const G=$&1&&L,k=!isAsyncWrapper(d);let z;if(k&&(z=A&&A.onVnodeBeforeUnmount)&&invokeVNodeHook(z,g,d),$&6)we(d.component,b,_);else{if($&128){d.suspense.unmount(b,_);return}G&&invokeDirectiveHook(d,null,g,"beforeUnmount"),$&64?d.type.remove(d,g,b,oe,_):C&&!C.hasOnce&&(M!==Fragment||S>0&&S&64)?ce(C,g,b,!1,!0):(M===Fragment&&S&384||!y&&$&16)&&ce(E,g,b),_&&ge(d)}(k&&(z=A&&A.onVnodeUnmounted)||G)&&queuePostRenderEffect(()=>{z&&invokeVNodeHook(z,g,d),G&&invokeDirectiveHook(d,null,g,"unmounted")},b)},ge=m=>{const{type:d,el:g,anchor:b,transition:_}=m;if(d===Fragment){Ee(g,b);return}if(d===Static){N(m);return}const y=()=>{s(g),_&&!_.persisted&&_.afterLeave&&_.afterLeave()};if(m.shapeFlag&1&&_&&!_.persisted){const{leave:M,delayLeave:A}=_,I=()=>M(g,y);A?A(m.el,y,I):I()}else y()},Ee=(m,d)=>{let g;for(;m!==d;)g=v(m),s(m),m=g;s(d)},we=(m,d,g)=>{const{bum:b,scope:_,update:y,subTree:M,um:A,m:I,a:E}=m;invalidateMount(I),invalidateMount(E),b&&invokeArrayFns(b),_.stop(),y&&(y.active=!1,ie(M,m,d,g)),A&&queuePostRenderEffect(A,d),queuePostRenderEffect(()=>{m.isUnmounted=!0},d),d&&d.pendingBranch&&!d.isUnmounted&&m.asyncDep&&!m.asyncResolved&&m.suspenseId===d.pendingId&&(d.deps--,d.deps===0&&d.resolve())},ce=function(d,g,b,_,y,M){_===void 0&&(_=!1),y===void 0&&(y=!1),M===void 0&&(M=0);for(let A=M;A<d.length;A++)ie(d[A],g,b,_,y)},de=m=>{if(m.shapeFlag&6)return de(m.component.subTree);if(m.shapeFlag&128)return m.suspense.next();const d=v(m.anchor||m.el),g=d&&d[TeleportEndKey];return g?v(g):d};let me=!1;const ve=(m,d,g)=>{m==null?d._vnode&&ie(d._vnode,null,null,!0):T(d._vnode||null,m,d,null,null,null,g),d._vnode=m,me||(me=!0,flushPreFlushCbs(),flushPostFlushCbs(),me=!1)},oe={p:T,um:ie,m:se,r:ge,mt:X,mc:Z,pc:re,pbc:H,n:de,o:e};let he,pe;return t&&([he,pe]=t(oe)),{render:ve,hydrate:he,createApp:createAppAPI(ve,he)}}function resolveChildrenNamespace(e,t){let{type:n,props:r}=e;return t==="svg"&&n==="foreignObject"||t==="mathml"&&n==="annotation-xml"&&r&&r.encoding&&r.encoding.includes("html")?void 0:t}function toggleRecurse(e,t){let{effect:n,update:r}=e;n.allowRecurse=r.allowRecurse=t}function needTransition(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function traverseStaticChildren(e,t,n){n===void 0&&(n=!1);const r=e.children,s=t.children;if(isArray(r)&&isArray(s))for(let i=0;i<r.length;i++){const o=r[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=cloneIfMounted(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&traverseStaticChildren(o,a)),a.type===Text&&(a.el=o.el)}}function getSequence(e){const t=e.slice(),n=[0];let r,s,i,o,a;const l=e.length;for(r=0;r<l;r++){const c=e[r];if(c!==0){if(s=n[n.length-1],e[s]<c){t[r]=s,n.push(r);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<c?i=a+1:o=a;c<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function locateNonHydratedAsyncRoot(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:locateNonHydratedAsyncRoot(t)}function invalidateMount(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const ssrContextKey=Symbol.for("v-scx"),useSSRContext=()=>inject(ssrContextKey),INITIAL_WATCHER_VALUE={};function watch(e,t,n){return doWatch(e,t,n)}function doWatch(e,t,n){let{immediate:r,deep:s,flush:i,once:o,onTrack:a,onTrigger:l}=n===void 0?EMPTY_OBJ:n;if(t&&o){const x=t;t=function(){x(...arguments),Q()}}const c=currentInstance,u=x=>s===!0?x:traverse(x,s===!1?1:void 0);let f,v=!1,w=!1;if(isRef(e)?(f=()=>e.value,v=isShallow(e)):isReactive(e)?(f=()=>u(e),v=!0):isArray(e)?(w=!0,v=e.some(x=>isReactive(x)||isShallow(x)),f=()=>e.map(x=>{if(isRef(x))return x.value;if(isReactive(x))return u(x);if(isFunction(x))return callWithErrorHandling(x,c,2)})):isFunction(e)?t?f=()=>callWithErrorHandling(e,c,2):f=()=>(D&&D(),callWithAsyncErrorHandling(e,c,3,[T])):f=NOOP,t&&s){const x=f;f=()=>traverse(x())}let D,T=x=>{D=N.onStop=()=>{callWithErrorHandling(x,c,4),D=N.onStop=void 0}},P;if(isInSSRComponentSetup)if(T=NOOP,t?r&&callWithAsyncErrorHandling(t,c,3,[f(),w?[]:void 0,T]):f(),i==="sync"){const x=useSSRContext();P=x.__watcherHandles||(x.__watcherHandles=[])}else return NOOP;let B=w?new Array(e.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const U=()=>{if(!(!N.active||!N.dirty))if(t){const x=N.run();(s||v||(w?x.some((Z,F)=>hasChanged(Z,B[F])):hasChanged(x,B)))&&(D&&D(),callWithAsyncErrorHandling(t,c,3,[x,B===INITIAL_WATCHER_VALUE?void 0:w&&B[0]===INITIAL_WATCHER_VALUE?[]:B,T]),B=x)}else N.run()};U.allowRecurse=!!t;let j;i==="sync"?j=U:i==="post"?j=()=>queuePostRenderEffect(U,c&&c.suspense):(U.pre=!0,c&&(U.id=c.uid),j=()=>queueJob(U));const N=new ReactiveEffect(f,NOOP,j),Y=getCurrentScope(),Q=()=>{N.stop(),Y&&remove(Y.effects,N)};return t?r?U():B=N.run():i==="post"?queuePostRenderEffect(N.run.bind(N),c&&c.suspense):N.run(),P&&P.push(Q),Q}function instanceWatch(e,t,n){const r=this.proxy,s=isString(e)?e.includes(".")?createPathGetter(r,e):()=>r[e]:e.bind(r,r);let i;isFunction(t)?i=t:(i=t.handler,n=t);const o=setCurrentInstance(this),a=doWatch(s,i.bind(r),n);return o(),a}function createPathGetter(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}function traverse(e,t,n){if(t===void 0&&(t=1/0),t<=0||!isObject$1(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,isRef(e))traverse(e.value,t,n);else if(isArray(e))for(let r=0;r<e.length;r++)traverse(e[r],t,n);else if(isSet(e)||isMap(e))e.forEach(r=>{traverse(r,t,n)});else if(isPlainObject(e)){for(const r in e)traverse(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&traverse(e[r],t,n)}return e}const getModelModifiers=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[t+"Modifiers"]||e[camelize(t)+"Modifiers"]||e[hyphenate(t)+"Modifiers"];function emit(e,t){if(e.isUnmounted)return;const n=e.vnode.props||EMPTY_OBJ;for(var r=arguments.length,s=new Array(r>2?r-2:0),i=2;i<r;i++)s[i-2]=arguments[i];let o=s;const a=t.startsWith("update:"),l=a&&getModelModifiers(n,t.slice(7));l&&(l.trim&&(o=s.map(v=>isString(v)?v.trim():v)),l.number&&(o=s.map(looseToNumber)));let c,u=n[c=toHandlerKey(t)]||n[c=toHandlerKey(camelize(t))];!u&&a&&(u=n[c=toHandlerKey(hyphenate(t))]),u&&callWithAsyncErrorHandling(u,e,6,o);const f=n[c+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,callWithAsyncErrorHandling(f,e,6,o)}}function normalizeEmitsOptions(e,t,n){n===void 0&&(n=!1);const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!isFunction(e)){const l=c=>{const u=normalizeEmitsOptions(c,t,!0);u&&(a=!0,extend(o,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(isObject$1(e)&&r.set(e,null),null):(isArray(i)?i.forEach(l=>o[l]=null):extend(o,i),isObject$1(e)&&r.set(e,o),o)}function isEmitListener(e,t){return!e||!isOn(t)?!1:(t=t.slice(2).replace(/Once$/,""),hasOwn(e,t[0].toLowerCase()+t.slice(1))||hasOwn(e,hyphenate(t))||hasOwn(e,t))}function markAttrsAccessed(){}function renderComponentRoot(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:f,data:v,setupState:w,ctx:D,inheritAttrs:T}=e,P=setCurrentRenderingInstance(e);let B,U;try{if(n.shapeFlag&4){const N=s||r,Y=N;B=normalizeVNode(c.call(Y,N,u,f,w,v,D)),U=a}else{const N=t;B=normalizeVNode(N.length>1?N(f,{attrs:a,slots:o,emit:l}):N(f,null)),U=t.props?a:getFunctionalFallthrough(a)}}catch(N){blockStack.length=0,handleError$1(N,e,1),B=createVNode(Comment)}let j=B;if(U&&T!==!1){const N=Object.keys(U),{shapeFlag:Y}=j;N.length&&Y&7&&(i&&N.some(isModelListener)&&(U=filterModelListeners(U,i)),j=cloneVNode(j,U,!1,!0))}return n.dirs&&(j=cloneVNode(j,null,!1,!0),j.dirs=j.dirs?j.dirs.concat(n.dirs):n.dirs),n.transition&&(j.transition=n.transition),B=j,setCurrentRenderingInstance(P),B}const getFunctionalFallthrough=e=>{let t;for(const n in e)(n==="class"||n==="style"||isOn(n))&&((t||(t={}))[n]=e[n]);return t},filterModelListeners=(e,t)=>{const n={};for(const r in e)(!isModelListener(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function shouldUpdateComponent(e,t,n){const{props:r,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?hasPropsChanged(r,o,c):!!o;if(l&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const v=u[f];if(o[v]!==r[v]&&!isEmitListener(c,v))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?hasPropsChanged(r,o,c):!0:!!o;return!1}function hasPropsChanged(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const i=r[s];if(t[i]!==e[i]&&!isEmitListener(n,i))return!0}return!1}function updateHOCHostEl(e,t){let{vnode:n,parent:r}=e;for(;r;){const s=r.subTree;if(s.suspense&&s.suspense.activeBranch===n&&(s.el=n.el),s===n)(n=r.vnode).el=t,r=r.parent;else break}}const isSuspense=e=>e.__isSuspense;function queueEffectWithSuspense(e,t){t&&t.pendingBranch?isArray(e)?t.effects.push(...e):t.effects.push(e):queuePostFlushCb(e)}const Fragment=Symbol.for("v-fgt"),Text=Symbol.for("v-txt"),Comment=Symbol.for("v-cmt"),Static=Symbol.for("v-stc"),blockStack=[];let currentBlock=null;function openBlock(e){e===void 0&&(e=!1),blockStack.push(currentBlock=e?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(e){isBlockTreeEnabled+=e,e<0&¤tBlock&&(currentBlock.hasOnce=!0)}function setupBlock(e){return e.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(e),e}function createElementBlock(e,t,n,r,s,i){return setupBlock(createBaseVNode(e,t,n,r,s,i,!0))}function createBlock(e,t,n,r,s){return setupBlock(createVNode(e,t,n,r,s,!0))}function isVNode(e){return e?e.__v_isVNode===!0:!1}function isSameVNodeType(e,t){return e.type===t.type&&e.key===t.key}const normalizeKey=e=>{let{key:t}=e;return t??null},normalizeRef=e=>{let{ref:t,ref_key:n,ref_for:r}=e;return typeof t=="number"&&(t=""+t),t!=null?isString(t)||isRef(t)||isFunction(t)?{i:currentRenderingInstance,r:t,k:n,f:!!r}:t:null};function createBaseVNode(e,t,n,r,s,i,o,a){t===void 0&&(t=null),n===void 0&&(n=null),r===void 0&&(r=0),s===void 0&&(s=null),i===void 0&&(i=e===Fragment?0:1),o===void 0&&(o=!1),a===void 0&&(a=!1);const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&normalizeKey(t),ref:t&&normalizeRef(t),scopeId:currentScopeId,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return a?(normalizeChildren(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=isString(n)?8:16),isBlockTreeEnabled>0&&!o&¤tBlock&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&¤tBlock.push(l),l}const createVNode=_createVNode;function _createVNode(e,t,n,r,s,i){if(t===void 0&&(t=null),n===void 0&&(n=null),r===void 0&&(r=0),s===void 0&&(s=null),i===void 0&&(i=!1),(!e||e===NULL_DYNAMIC_COMPONENT)&&(e=Comment),isVNode(e)){const a=cloneVNode(e,t,!0);return n&&normalizeChildren(a,n),isBlockTreeEnabled>0&&!i&¤tBlock&&(a.shapeFlag&6?currentBlock[currentBlock.indexOf(e)]=a:currentBlock.push(a)),a.patchFlag=-2,a}if(isClassComponent(e)&&(e=e.__vccOpts),t){t=guardReactiveProps(t);let{class:a,style:l}=t;a&&!isString(a)&&(t.class=normalizeClass(a)),isObject$1(l)&&(isProxy(l)&&!isArray(l)&&(l=extend({},l)),t.style=normalizeStyle(l))}const o=isString(e)?1:isSuspense(e)?128:isTeleport(e)?64:isObject$1(e)?4:isFunction(e)?2:0;return createBaseVNode(e,t,n,r,s,o,i,!0)}function guardReactiveProps(e){return e?isProxy(e)||isInternalObject(e)?extend({},e):e:null}function cloneVNode(e,t,n,r){n===void 0&&(n=!1),r===void 0&&(r=!1);const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,c=t?mergeProps(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&normalizeKey(c),ref:t&&t.ref?n&&i?isArray(i)?i.concat(normalizeRef(t)):[i,normalizeRef(t)]:normalizeRef(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Fragment?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cloneVNode(e.ssContent),ssFallback:e.ssFallback&&cloneVNode(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&setTransitionHooks(u,l.clone(u)),u}function createTextVNode(e,t){return e===void 0&&(e=" "),t===void 0&&(t=0),createVNode(Text,null,e,t)}function createCommentVNode(e,t){return e===void 0&&(e=""),t===void 0&&(t=!1),t?(openBlock(),createBlock(Comment,null,e)):createVNode(Comment,null,e)}function normalizeVNode(e){return e==null||typeof e=="boolean"?createVNode(Comment):isArray(e)?createVNode(Fragment,null,e.slice()):typeof e=="object"?cloneIfMounted(e):createVNode(Text,null,String(e))}function cloneIfMounted(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:cloneVNode(e)}function normalizeChildren(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(isArray(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),normalizeChildren(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!isInternalObject(t)?t._ctx=currentRenderingInstance:s===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else isFunction(t)?(t={default:t,_ctx:currentRenderingInstance},n=32):(t=String(t),r&64?(n=16,t=[createTextVNode(t)]):n=8);e.children=t,e.shapeFlag|=n}function mergeProps(){const e={};for(let t=0;t<arguments.length;t++){const n=t<0||arguments.length<=t?void 0:arguments[t];for(const r in n)if(r==="class")e.class!==n.class&&(e.class=normalizeClass([e.class,n.class]));else if(r==="style")e.style=normalizeStyle([e.style,n.style]);else if(isOn(r)){const s=e[r],i=n[r];i&&s!==i&&!(isArray(s)&&s.includes(i))&&(e[r]=s?[].concat(s,i):i)}else r!==""&&(e[r]=n[r])}return e}function invokeVNodeHook(e,t,n,r){r===void 0&&(r=null),callWithAsyncErrorHandling(e,t,7,[n,r])}const emptyAppContext=createAppContext();let uid=0;function createComponentInstance(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||emptyAppContext,i={uid:uid++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new EffectScope(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:normalizePropsOptions(r,s),emitsOptions:normalizeEmitsOptions(r,s),emit:null,emitted:null,propsDefaults:EMPTY_OBJ,inheritAttrs:r.inheritAttrs,ctx:EMPTY_OBJ,data:EMPTY_OBJ,props:EMPTY_OBJ,attrs:EMPTY_OBJ,slots:EMPTY_OBJ,refs:EMPTY_OBJ,setupState:EMPTY_OBJ,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=emit.bind(null,i),e.ce&&e.ce(i),i}let currentInstance=null;const getCurrentInstance=()=>currentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const e=getGlobalThis(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};internalSetCurrentInstance=t("__VUE_INSTANCE_SETTERS__",n=>currentInstance=n),setInSSRSetupState=t("__VUE_SSR_SETTERS__",n=>isInSSRComponentSetup=n)}const setCurrentInstance=e=>{const t=currentInstance;return internalSetCurrentInstance(e),e.scope.on(),()=>{e.scope.off(),internalSetCurrentInstance(t)}},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(e){return e.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1),t&&setInSSRSetupState(t);const{props:r,children:s}=e.vnode,i=isStatefulComponent(e);initProps(e,r,i,t),initSlots(e,s,n);const o=i?setupStatefulComponent(e,t):void 0;return t&&setInSSRSetupState(!1),o}function setupStatefulComponent(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,PublicInstanceProxyHandlers);const{setup:r}=n;if(r){const s=e.setupContext=r.length>1?createSetupContext(e):null,i=setCurrentInstance(e);pauseTracking();const o=callWithErrorHandling(r,e,0,[e.props,s]);if(resetTracking(),i(),isPromise$1(o)){if(o.then(unsetCurrentInstance,unsetCurrentInstance),t)return o.then(a=>{handleSetupResult(e,a,t)}).catch(a=>{handleError$1(a,e,0)});e.asyncDep=o}else handleSetupResult(e,o,t)}else finishComponentSetup(e,t)}function handleSetupResult(e,t,n){isFunction(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:isObject$1(t)&&(e.setupState=proxyRefs(t)),finishComponentSetup(e,n)}let compile;function finishComponentSetup(e,t,n){const r=e.type;if(!e.render){if(!t&&compile&&!r.render){const s=r.template||resolveMergedOptions(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,c=extend(extend({isCustomElement:i,delimiters:a},o),l);r.render=compile(s,c)}}e.render=r.render||NOOP}{const s=setCurrentInstance(e);pauseTracking();try{applyOptions(e)}finally{resetTracking(),s()}}}const attrsProxyHandlers={get(e,t){return track(e,"get",""),e[t]}};function createSetupContext(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,attrsProxyHandlers),slots:e.slots,emit:e.emit,expose:t}}function getComponentPublicInstance(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(proxyRefs(markRaw(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in publicPropertiesMap)return publicPropertiesMap[n](e)},has(t,n){return n in t||n in publicPropertiesMap}})):e.proxy}const classifyRE=/(?:^|[-_])(\w)/g,classify=e=>e.replace(classifyRE,t=>t.toUpperCase()).replace(/[-_]/g,"");function getComponentName(e,t){return t===void 0&&(t=!0),isFunction(e)?e.displayName||e.name:e.name||t&&e.__name}function formatComponentName(e,t,n){n===void 0&&(n=!1);let r=getComponentName(t);if(!r&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&e&&e.parent){const s=i=>{for(const o in i)if(i[o]===t)return o};r=s(e.components||e.parent.type.components)||s(e.appContext.components)}return r?classify(r):n?"App":"Anonymous"}function isClassComponent(e){return isFunction(e)&&"__vccOpts"in e}const computed=(e,t)=>computed$1(e,t,isInSSRComponentSetup);function h(e,t,n){const r=arguments.length;return r===2?isObject$1(t)&&!isArray(t)?isVNode(t)?createVNode(e,null,[t]):createVNode(e,t):createVNode(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&isVNode(n)&&(n=[n]),createVNode(e,t,n))}const version="3.4.38";/**
|
|
* @vue/runtime-dom v3.4.38
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/const svgNS="http://www.w3.org/2000/svg",mathmlNS="http://www.w3.org/1998/Math/MathML",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?doc.createElementNS(svgNS,e):t==="mathml"?doc.createElementNS(mathmlNS,e):n?doc.createElement(e,{is:n}):doc.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>doc.createTextNode(e),createComment:e=>doc.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>doc.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const o=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{templateContainer.innerHTML=r==="svg"?"<svg>"+e+"</svg>":r==="mathml"?"<math>"+e+"</math>":e;const a=templateContainer.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},TRANSITION="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),Transition=(e,t)=>{let{slots:n}=t;return h(BaseTransition,resolveTransitionProps(e),n)};Transition.displayName="Transition";const DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Transition.props=extend({},BaseTransitionPropsValidators,DOMTransitionPropsValidators);const callHook=function(t,n){n===void 0&&(n=[]),isArray(t)?t.forEach(r=>r(...n)):t&&t(...n)},hasExplicitCallback=e=>e?isArray(e)?e.some(t=>t.length>1):e.length>1:!1;function resolveTransitionProps(e){const t={};for(const O in e)O in DOMTransitionPropsValidators||(t[O]=e[O]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:i=n+"-enter-from",enterActiveClass:o=n+"-enter-active",enterToClass:a=n+"-enter-to",appearFromClass:l=i,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:f=n+"-leave-from",leaveActiveClass:v=n+"-leave-active",leaveToClass:w=n+"-leave-to"}=e,D=normalizeDuration(s),T=D&&D[0],P=D&&D[1],{onBeforeEnter:B,onEnter:U,onEnterCancelled:j,onLeave:N,onLeaveCancelled:Y,onBeforeAppear:Q=B,onAppear:x=U,onAppearCancelled:Z=j}=t,F=(O,W,X)=>{removeTransitionClass(O,W?u:a),removeTransitionClass(O,W?c:o),X&&X()},H=(O,W)=>{O._isLeaving=!1,removeTransitionClass(O,f),removeTransitionClass(O,w),removeTransitionClass(O,v),W&&W()},q=O=>(W,X)=>{const J=O?x:U,K=()=>F(W,O,X);callHook(J,[W,K]),nextFrame(()=>{removeTransitionClass(W,O?l:i),addTransitionClass(W,O?u:a),hasExplicitCallback(J)||whenTransitionEnds(W,r,T,K)})};return extend(t,{onBeforeEnter(O){callHook(B,[O]),addTransitionClass(O,i),addTransitionClass(O,o)},onBeforeAppear(O){callHook(Q,[O]),addTransitionClass(O,l),addTransitionClass(O,c)},onEnter:q(!1),onAppear:q(!0),onLeave(O,W){O._isLeaving=!0;const X=()=>H(O,W);addTransitionClass(O,f),addTransitionClass(O,v),forceReflow(),nextFrame(()=>{O._isLeaving&&(removeTransitionClass(O,f),addTransitionClass(O,w),hasExplicitCallback(N)||whenTransitionEnds(O,r,P,X))}),callHook(N,[O,X])},onEnterCancelled(O){F(O,!1),callHook(j,[O])},onAppearCancelled(O){F(O,!0),callHook(Z,[O])},onLeaveCancelled(O){H(O),callHook(Y,[O])}})}function normalizeDuration(e){if(e==null)return null;if(isObject$1(e))return[NumberOf(e.enter),NumberOf(e.leave)];{const t=NumberOf(e);return[t,t]}}function NumberOf(e){return toNumber(e)}function addTransitionClass(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[vtcKey]||(e[vtcKey]=new Set)).add(t)}function removeTransitionClass(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[vtcKey];n&&(n.delete(t),n.size||(e[vtcKey]=void 0))}function nextFrame(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let endId=0;function whenTransitionEnds(e,t,n,r){const s=e._endId=++endId,i=()=>{s===e._endId&&r()};if(n)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=getTransitionInfo(e,t);if(!o)return r();const c=o+"end";let u=0;const f=()=>{e.removeEventListener(c,v),i()},v=w=>{w.target===e&&++u>=l&&f()};setTimeout(()=>{u<l&&f()},a+1),e.addEventListener(c,v)}function getTransitionInfo(e,t){const n=window.getComputedStyle(e),r=D=>(n[D]||"").split(", "),s=r(TRANSITION+"Delay"),i=r(TRANSITION+"Duration"),o=getTimeout(s,i),a=r(ANIMATION+"Delay"),l=r(ANIMATION+"Duration"),c=getTimeout(a,l);let u=null,f=0,v=0;t===TRANSITION?o>0&&(u=TRANSITION,f=o,v=i.length):t===ANIMATION?c>0&&(u=ANIMATION,f=c,v=l.length):(f=Math.max(o,c),u=f>0?o>c?TRANSITION:ANIMATION:null,v=u?u===TRANSITION?i.length:l.length:0);const w=u===TRANSITION&&/\b(transform|all)(,|$)/.test(r(TRANSITION+"Property").toString());return{type:u,timeout:f,propCount:v,hasTransform:w}}function getTimeout(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>toMs(n)+toMs(e[r])))}function toMs(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function forceReflow(){return document.body.offsetHeight}function patchClass(e,t,n){const r=e[vtcKey];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const vShowOriginalDisplay=Symbol("_vod"),vShowHidden=Symbol("_vsh"),vShow={beforeMount(e,t,n){let{value:r}=t,{transition:s}=n;e[vShowOriginalDisplay]=e.style.display==="none"?"":e.style.display,s&&r?s.beforeEnter(e):setDisplay(e,r)},mounted(e,t,n){let{value:r}=t,{transition:s}=n;s&&r&&s.enter(e)},updated(e,t,n){let{value:r,oldValue:s}=t,{transition:i}=n;!r!=!s&&(i?r?(i.beforeEnter(e),setDisplay(e,!0),i.enter(e)):i.leave(e,()=>{setDisplay(e,!1)}):setDisplay(e,r))},beforeUnmount(e,t){let{value:n}=t;setDisplay(e,n)}};function setDisplay(e,t){e.style.display=t?e[vShowOriginalDisplay]:"none",e[vShowHidden]=!t}const CSS_VAR_TEXT=Symbol(""),displayRE=/(^|;)\s*display\s*:/;function patchStyle(e,t,n){const r=e.style,s=isString(n);let i=!1;if(n&&!s){if(t)if(isString(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&setStyle(r,a,"")}else for(const o in t)n[o]==null&&setStyle(r,o,"");for(const o in n)o==="display"&&(i=!0),setStyle(r,o,n[o])}else if(s){if(t!==n){const o=r[CSS_VAR_TEXT];o&&(n+=";"+o),r.cssText=n,i=displayRE.test(n)}}else t&&e.removeAttribute("style");vShowOriginalDisplay in e&&(e[vShowOriginalDisplay]=i?r.display:"",e[vShowHidden]&&(r.display="none"))}const importantRE=/\s*!important$/;function setStyle(e,t,n){if(isArray(n))n.forEach(r=>setStyle(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=autoPrefix(e,t);importantRE.test(n)?e.setProperty(hyphenate(r),n.replace(importantRE,""),"important"):e[r]=n}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(e,t){const n=prefixCache[t];if(n)return n;let r=camelize(t);if(r!=="filter"&&r in e)return prefixCache[t]=r;r=capitalize(r);for(let s=0;s<prefixes.length;s++){const i=prefixes[s]+r;if(i in e)return prefixCache[t]=i}return t}const xlinkNS="http://www.w3.org/1999/xlink";function patchAttr(e,t,n,r,s,i){i===void 0&&(i=isSpecialBooleanAttr(t)),r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(xlinkNS,t.slice(6,t.length)):e.setAttributeNS(xlinkNS,t,n):n==null||i&&!includeBooleanAttr(n)?e.removeAttribute(t):e.setAttribute(t,i?"":isSymbol(n)?String(n):n)}function patchDOMProp(e,t,n,r){if(t==="innerHTML"||t==="textContent"){if(n==null)return;e[t]=n;return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const o=s==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?"":String(n);(o!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const o=typeof e[t];o==="boolean"?n=includeBooleanAttr(n):n==null&&o==="string"?(n="",i=!0):o==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(t)}function addEventListener(e,t,n,r){e.addEventListener(t,n,r)}function removeEventListener(e,t,n,r){e.removeEventListener(t,n,r)}const veiKey=Symbol("_vei");function patchEvent(e,t,n,r,s){s===void 0&&(s=null);const i=e[veiKey]||(e[veiKey]={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=parseName(t);if(r){const c=i[t]=createInvoker(r,s);addEventListener(e,a,c,l)}else o&&(removeEventListener(e,a,o,l),i[t]=void 0)}}const optionsModifierRE=/(?:Once|Passive|Capture)$/;function parseName(e){let t;if(optionsModifierRE.test(e)){t={};let r;for(;r=e.match(optionsModifierRE);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):hyphenate(e.slice(2)),t]}let cachedNow=0;const p=Promise.resolve(),getNow=()=>cachedNow||(p.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(r,n.value),t,5,[r])};return n.value=e,n.attached=getNow(),n}function patchStopImmediatePropagation(e,t){if(isArray(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const isNativeOn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,patchProp=(e,t,n,r,s,i)=>{const o=s==="svg";t==="class"?patchClass(e,r,o):t==="style"?patchStyle(e,n,r):isOn(t)?isModelListener(t)||patchEvent(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):shouldSetAsProp(e,t,r,o))?(patchDOMProp(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&patchAttr(e,t,r,o,i,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),patchAttr(e,t,r,o))};function shouldSetAsProp(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&isNativeOn(t)&&isFunction(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return isNativeOn(t)&&isString(n)?!1:t in e}const getModelAssigner=e=>{const t=e.props["onUpdate:modelValue"]||!1;return isArray(t)?n=>invokeArrayFns(t,n):t};function onCompositionStart(e){e.target.composing=!0}function onCompositionEnd(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const assignKey=Symbol("_assign"),vModelText={created(e,t,n){let{modifiers:{lazy:r,trim:s,number:i}}=t;e[assignKey]=getModelAssigner(n);const o=i||n.props&&n.props.type==="number";addEventListener(e,r?"change":"input",a=>{if(a.target.composing)return;let l=e.value;s&&(l=l.trim()),o&&(l=looseToNumber(l)),e[assignKey](l)}),s&&addEventListener(e,"change",()=>{e.value=e.value.trim()}),r||(addEventListener(e,"compositionstart",onCompositionStart),addEventListener(e,"compositionend",onCompositionEnd),addEventListener(e,"change",onCompositionEnd))},mounted(e,t){let{value:n}=t;e.value=n??""},beforeUpdate(e,t,n){let{value:r,oldValue:s,modifiers:{lazy:i,trim:o,number:a}}=t;if(e[assignKey]=getModelAssigner(n),e.composing)return;const l=(a||e.type==="number")&&!/^0\d/.test(e.value)?looseToNumber(e.value):e.value,c=r??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(i&&r===s||o&&e.value.trim()===c)||(e.value=c))}},systemModifiers=["ctrl","shift","alt","meta"],modifierGuards={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>systemModifiers.some(n=>e[n+"Key"]&&!t.includes(n))},withModifiers=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=function(s){for(let l=0;l<t.length;l++){const c=modifierGuards[t[l]];if(c&&c(s,t))return}for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return e(s,...o)})},keyNames={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},withKeys=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=hyphenate(s.key);if(t.some(o=>o===i||keyNames[o]===i))return e(s)})},rendererOptions=extend({patchProp},nodeOps);let renderer;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}const createApp=function(){const t=ensureRenderer().createApp(...arguments),{mount:n}=t;return t.mount=r=>{const s=normalizeContainer(r);if(!s)return;const i=t._component;!isFunction(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.innerHTML="";const o=n(s,!1,resolveRootNamespace(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function resolveRootNamespace(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function normalizeContainer(e){return isString(e)?document.querySelector(e):e}const SET_IS_LOADING="SET_IS_LOADING",SELECT_DIRECTORY="SELECT_DIRECTORY",SELECT_BROWSER_ITEM="SELECT_BROWSER_ITEM",SELECT_BROWSER_ITEMS="SELECT_BROWSER_ITEMS",UNSELECT_BROWSER_ITEM="UNSELECT_BROWSER_ITEM",UNSELECT_ALL_BROWSER_ITEMS="UNSELECT_ALL_BROWSER_ITEMS",INCREASE_GRID_SIZE="INCREASE_GRID_SIZE",DECREASE_GRID_SIZE="DECREASE_GRID_SIZE",LOAD_CONTENTS_SUCCESS="LOAD_CONTENTS_SUCCESS",LOAD_FULL_CONTENTS_SUCCESS="LOAD_FULL_CONTENTS_SUCCESS",CREATE_DIRECTORY_SUCCESS="CREATE_DIRECTORY_SUCCESS",UPLOAD_SUCCESS="UPLOAD_SUCCESS",SHOW_CREATE_FOLDER_MODAL="SHOW_CREATE_FOLDER_MODAL",HIDE_CREATE_FOLDER_MODAL="HIDE_CREATE_FOLDER_MODAL",SHOW_CONFIRM_DELETE_MODAL="SHOW_CONFIRM_DELETE_MODAL",HIDE_CONFIRM_DELETE_MODAL="HIDE_CONFIRM_DELETE_MODAL",SHOW_INFOBAR="SHOW_INFOBAR",HIDE_INFOBAR="HIDE_INFOBAR",DELETE_SUCCESS="DELETE_SUCCESS",CHANGE_LIST_VIEW="CHANGE_LIST_VIEW",SHOW_PREVIEW_MODAL="SHOW_PREVIEW_MODAL",HIDE_PREVIEW_MODAL="HIDE_PREVIEW_MODAL",SHOW_RENAME_MODAL="SHOW_RENAME_MODAL",HIDE_RENAME_MODAL="HIDE_RENAME_MODAL",RENAME_SUCCESS="RENAME_SUCCESS",SHOW_SHARE_MODAL="SHOW_SHARE_MODAL",HIDE_SHARE_MODAL="HIDE_SHARE_MODAL",SET_SEARCH_QUERY="SET_SEARCH_QUERY",UPDATE_ITEM_PROPERTIES="UPDATE_ITEM_PROPERTIES",UPDATE_SORT_BY="UPDATE_SORT_BY",UPDATE_SORT_DIRECTION="UPDATE_SORT_DIRECTION";function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(null,arguments)}function notify(e,t){let n;t.type==="message"&&(n=3e3),Joomla.renderMessages({[t.type]:[Joomla.Text._(e)]},void 0,!0,n)}const notifications={success:(e,t)=>{notify(e,_extends({type:"message",dismiss:!0},t))},error:(e,t)=>{notify(e,_extends({type:"error",dismiss:!0},t))},ask:e=>window.confirm(e)},dirname=e=>{if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e));if(e.length===0)return".";let t=e.charCodeAt(0);const n=t===47;let r=-1,s=!0;for(let i=e.length-1;i>=1;--i)if(t=e.charCodeAt(i),t===47){if(!s){r=i;break}}else s=!1;return r===-1?n?"/":".":n&&r===1?"//":e.slice(0,r)};function normalizeItem(e){return e.type==="dir"&&(e.directories=[],e.files=[]),e.directory=dirname(e.path),e.directory.indexOf(":",e.directory.length-1)!==-1&&(e.directory+="/"),e}function normalizeArray(e){const t=e.filter(r=>r.type==="dir").map(r=>normalizeItem(r)),n=e.filter(r=>r.type==="file").map(r=>normalizeItem(r));return{directories:t,files:n}}function handleError(e){const t=JSON.parse(e.response);if(t.message)notifications.error(t.message);else switch(e.status){case 409:break;case 404:notifications.error("COM_MEDIA_ERROR_NOT_FOUND");break;case 401:notifications.error("COM_MEDIA_ERROR_NOT_AUTHENTICATED");break;case 403:notifications.error("COM_MEDIA_ERROR_NOT_AUTHORIZED");break;case 500:notifications.error("COM_MEDIA_SERVER_ERROR");break;default:notifications.error("COM_MEDIA_ERROR")}throw e}class Api{constructor(){const t=Joomla.getOptions("com_media",{});if(t.apiBaseUrl===void 0)throw new TypeError("Media api baseUrl is not defined");if(t.csrfToken===void 0)throw new TypeError("Media api csrf token is not defined");this.baseUrl=t.apiBaseUrl,this.csrfToken=Joomla.getOptions("csrf.token"),this.imagesExtensions=t.imagesExtensions,this.audioExtensions=t.audioExtensions,this.videoExtensions=t.videoExtensions,this.documentExtensions=t.documentExtensions,this.mediaVersion=new Date().getTime().toString(),this.canCreate=t.canCreate||!1,this.canEdit=t.canEdit||!1,this.canDelete=t.canDelete||!1}getContents(t,n,r){return n===void 0&&(n=!1),r===void 0&&(r=!1),new Promise((s,i)=>{const o=new URL(this.baseUrl+"&task=api.files&path="+encodeURIComponent(t));n&&o.searchParams.append("url",n),r&&o.searchParams.append("content",r),Joomla.request({url:o.toString(),method:"GET",headers:{"Content-Type":"application/json"},onSuccess:a=>{s(normalizeArray(JSON.parse(a).data))},onError:a=>{i(a)}})}).catch(handleError)}createDirectory(t,n){return new Promise((r,s)=>{const i=new URL(this.baseUrl+"&task=api.files&path="+encodeURIComponent(n)),o={[this.csrfToken]:"1",name:t};Joomla.request({url:i.toString(),method:"POST",data:JSON.stringify(o),headers:{"Content-Type":"application/json"},onSuccess:a=>{notifications.success("COM_MEDIA_CREATE_NEW_FOLDER_SUCCESS"),r(normalizeItem(JSON.parse(a).data))},onError:a=>{notifications.error("COM_MEDIA_CREATE_NEW_FOLDER_ERROR"),s(a)}})}).catch(handleError)}upload(t,n,r,s){return new Promise((i,o)=>{const a=new URL(this.baseUrl+"&task=api.files&path="+encodeURIComponent(n)),l={[this.csrfToken]:"1",name:t,content:r};s===!0&&(l.override=!0),Joomla.request({url:a.toString(),method:"POST",data:JSON.stringify(l),headers:{"Content-Type":"application/json"},onSuccess:c=>{notifications.success("COM_MEDIA_UPLOAD_SUCCESS"),i(normalizeItem(JSON.parse(c).data))},onError:c=>{o(c)}})}).catch(handleError)}rename(t,n){return new Promise((r,s)=>{const i=new URL(this.baseUrl+"&task=api.files&path="+encodeURIComponent(t)),o={[this.csrfToken]:"1",newPath:n};Joomla.request({url:i.toString(),method:"PUT",data:JSON.stringify(o),headers:{"Content-Type":"application/json"},onSuccess:a=>{notifications.success("COM_MEDIA_RENAME_SUCCESS"),r(normalizeItem(JSON.parse(a).data))},onError:a=>{notifications.error("COM_MEDIA_RENAME_ERROR"),s(a)}})}).catch(handleError)}delete(t){return new Promise((n,r)=>{const s=new URL(this.baseUrl+"&task=api.files&path="+encodeURIComponent(t)),i={[this.csrfToken]:"1"};Joomla.request({url:s.toString(),method:"DELETE",data:JSON.stringify(i),headers:{"Content-Type":"application/json"},onSuccess:()=>{notifications.success("COM_MEDIA_DELETE_SUCCESS"),n()},onError:o=>{notifications.error("COM_MEDIA_DELETE_ERROR"),r(o)}})}).catch(handleError)}}const api=new Api;var navigable={methods:{navigateTo(e){this.$store.dispatch("getContents",e,!1,!1)}}},script$v={name:"MediaBrowserItemRow",mixins:[navigable],props:{item:{type:Object,default:()=>{}}},computed:{dimension(){return this.item.width?`${this.item.width}px * ${this.item.height}px`:""},isDir(){return this.item.type==="dir"},size(){return this.item.size?`${(this.item.size/1024).toFixed(2)}`:""},selected(){return!!this.isSelected()}},methods:{getURL(){return this.item.thumb_path?this.item.thumb_path.split(Joomla.getOptions("system.paths").rootFull).length>1?`${this.item.thumb_path}?${this.item.modified_date?new Date(this.item.modified_date).valueOf():api.mediaVersion}`:`${this.item.thumb_path}`:""},width(){return this.item.naturalWidth?this.item.naturalWidth:300},height(){return this.item.naturalHeight?this.item.naturalHeight:150},setSize(e){if(this.item.mime_type==="image/svg+xml"){const t=e.target;this.$store.dispatch("updateItemProperties",{item:this.item,width:t.naturalWidth?t.naturalWidth:300,height:t.naturalHeight?t.naturalHeight:150})}},onDblClick(){if(this.isDir){this.navigateTo(this.item.path);return}const e=["jpg","jpeg","png","gif","webp","avif","mp4","mp3","pdf"];this.item.extension&&e.includes(this.item.extension.toLowerCase())&&(this.$store.commit(SHOW_PREVIEW_MODAL),this.$store.dispatch("getFullContents",this.item))},isSelected(){return this.$store.state.selectedItems.some(e=>e.path===this.item.path)},onClick(e){const t={type:this.item.type,name:this.item.name,path:this.item.path,thumb:!1,fileType:this.item.mime_type?this.item.mime_type:!1,extension:this.item.extension?this.item.extension:!1};if(this.item.type==="file"&&(t.thumb=this.item.thumb?this.item.thumb:!1,t.width=this.item.width?this.item.width:0,t.height=this.item.height?this.item.height:0),window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:t})),!this.isSelected()){e.shiftKey||e.keyCode===13||this.$store.commit(UNSELECT_ALL_BROWSER_ITEMS),this.$store.commit(SELECT_BROWSER_ITEM,this.item);return}this.$store.state.selectedItems.length>1&&(this.$store.commit(UNSELECT_ALL_BROWSER_ITEMS),this.$store.commit(SELECT_BROWSER_ITEM,this.item))}}};const _hoisted_1$v={key:0},_hoisted_2$k=["src","width","height"],_hoisted_3$g=["data-type"],_hoisted_4$b={scope:"row",class:"name"},_hoisted_5$a={class:"size"},_hoisted_6$8={key:0},_hoisted_7$5={class:"dimension"},_hoisted_8$3={class:"created"},_hoisted_9$2={class:"modified"};function render$v(e,t,n,r,s,i){return openBlock(),createElementBlock("tr",{class:normalizeClass(["media-browser-item",{selected:i.selected}]),onDblclick:t[1]||(t[1]=withModifiers(o=>i.onDblClick(),["stop","prevent"])),onClick:t[2]||(t[2]=(...o)=>i.onClick&&i.onClick(...o))},[n.item.mime_type==="image/svg+xml"&&i.getURL()?(openBlock(),createElementBlock("td",_hoisted_1$v,[createBaseVNode("img",{src:i.getURL(),width:n.item.width,height:n.item.height,alt:"",style:{width:"100%",height:"auto"},onLoad:t[0]||(t[0]=(...o)=>i.setSize&&i.setSize(...o))},null,40,_hoisted_2$k)])):(openBlock(),createElementBlock("td",{key:1,class:"type","data-type":n.item.extension},null,8,_hoisted_3$g)),createBaseVNode("th",_hoisted_4$b,toDisplayString(n.item.name),1),createBaseVNode("td",_hoisted_5$a,[createTextVNode(toDisplayString(i.size),1),i.size!==""?(openBlock(),createElementBlock("span",_hoisted_6$8,"KB")):createCommentVNode("v-if",!0)]),createBaseVNode("td",_hoisted_7$5,toDisplayString(i.dimension),1),createBaseVNode("td",_hoisted_8$3,toDisplayString(n.item.create_date_formatted),1),createBaseVNode("td",_hoisted_9$2,toDisplayString(n.item.modified_date_formatted),1)],34)}script$v.render=render$v,script$v.__file="administrator/components/com_media/resources/scripts/components/browser/table/row.vue";var script$u={name:"MediaBrowserTable",components:{MediaBrowserItemRow:script$v},props:{localItems:{type:Object,default:()=>{}},currentDirectory:{type:String,default:""}},methods:{changeOrder(e){this.$store.commit(UPDATE_SORT_BY,e),this.$store.commit(UPDATE_SORT_DIRECTION,this.$store.state.sortDirection==="asc"?"desc":"asc")}}};const _hoisted_1$u={class:"table media-browser-table"},_hoisted_2$j={class:"visually-hidden"},_hoisted_3$f={class:"media-browser-table-head"},_hoisted_4$a={class:"name",scope:"col"},_hoisted_5$9={class:"size",scope:"col"},_hoisted_6$7={class:"dimension",scope:"col"},_hoisted_7$4={class:"created",scope:"col"},_hoisted_8$2={class:"modified",scope:"col"};function render$u(e,t,n,r,s,i){const o=resolveComponent("MediaBrowserItemRow");return openBlock(),createElementBlock("table",_hoisted_1$u,[createBaseVNode("caption",_hoisted_2$j,toDisplayString(e.sprintf("COM_MEDIA_BROWSER_TABLE_CAPTION",n.currentDirectory)),1),createBaseVNode("thead",_hoisted_3$f,[createBaseVNode("tr",null,[t[5]||(t[5]=createBaseVNode("th",{class:"type",scope:"col"},null,-1)),createBaseVNode("th",_hoisted_4$a,[createBaseVNode("button",{class:"btn btn-link",onClick:t[0]||(t[0]=a=>i.changeOrder("name"))},[createTextVNode(toDisplayString(e.translate("COM_MEDIA_MEDIA_NAME"))+" ",1),createBaseVNode("span",{class:normalizeClass(["ms-1",{"icon-sort":e.$store.state.sortBy!=="name","icon-caret-up":e.$store.state.sortBy==="name"&&e.$store.state.sortDirection==="asc","icon-caret-down":e.$store.state.sortBy==="name"&&e.$store.state.sortDirection==="desc"}]),"aria-hidden":"true"},null,2)])]),createBaseVNode("th",_hoisted_5$9,[createBaseVNode("button",{class:"btn btn-link",onClick:t[1]||(t[1]=a=>i.changeOrder("size"))},[createTextVNode(toDisplayString(e.translate("COM_MEDIA_MEDIA_SIZE"))+" ",1),createBaseVNode("span",{class:normalizeClass(["ms-1",{"icon-sort":e.$store.state.sortBy!=="size","icon-caret-up":e.$store.state.sortBy==="size"&&e.$store.state.sortDirection==="asc","icon-caret-down":e.$store.state.sortBy==="size"&&e.$store.state.sortDirection==="desc"}]),"aria-hidden":"true"},null,2)])]),createBaseVNode("th",_hoisted_6$7,[createBaseVNode("button",{class:"btn btn-link",onClick:t[2]||(t[2]=a=>i.changeOrder("dimension"))},[createTextVNode(toDisplayString(e.translate("COM_MEDIA_MEDIA_DIMENSION"))+" ",1),createBaseVNode("span",{class:normalizeClass(["ms-1",{"icon-sort":e.$store.state.sortBy!=="dimension","icon-caret-up":e.$store.state.sortBy==="dimension"&&e.$store.state.sortDirection==="asc","icon-caret-down":e.$store.state.sortBy==="dimension"&&e.$store.state.sortDirection==="desc"}]),"aria-hidden":"true"},null,2)])]),createBaseVNode("th",_hoisted_7$4,[createBaseVNode("button",{class:"btn btn-link",onClick:t[3]||(t[3]=a=>i.changeOrder("date_created"))},[createTextVNode(toDisplayString(e.translate("COM_MEDIA_MEDIA_DATE_CREATED"))+" ",1),createBaseVNode("span",{class:normalizeClass(["ms-1",{"icon-sort":e.$store.state.sortBy!=="date_created","icon-caret-up":e.$store.state.sortBy==="date_created"&&e.$store.state.sortDirection==="asc","icon-caret-down":e.$store.state.sortBy==="date_created"&&e.$store.state.sortDirection==="desc"}]),"aria-hidden":"true"},null,2)])]),createBaseVNode("th",_hoisted_8$2,[createBaseVNode("button",{class:"btn btn-link",onClick:t[4]||(t[4]=a=>i.changeOrder("date_modified"))},[createTextVNode(toDisplayString(e.translate("COM_MEDIA_MEDIA_DATE_MODIFIED"))+" ",1),createBaseVNode("span",{class:normalizeClass(["ms-1",{"icon-sort":e.$store.state.sortBy!=="date_modified","icon-caret-up":e.$store.state.sortBy==="date_modified"&&e.$store.state.sortDirection==="asc","icon-caret-down":e.$store.state.sortBy==="date_modified"&&e.$store.state.sortDirection==="desc"}]),"aria-hidden":"true"},null,2)])])])]),createBaseVNode("tbody",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(n.localItems,a=>(openBlock(),createBlock(o,{key:a.path,item:a},null,8,["item"]))),128))])])}script$u.render=render$u,script$u.__file="administrator/components/com_media/resources/scripts/components/browser/table/table.vue";var script$t={name:"MediaBrowserActionItemEdit",props:{onFocused:{type:Function,default:()=>{}},mainAction:{type:Function,default:()=>{}},closingAction:{type:Function,default:()=>{}}},methods:{openRenameModal(){this.mainAction()},hideActions(){this.closingAction()},focused(e){this.onFocused(e)},editItem(){this.mainAction()}}};const _hoisted_1$t={class:"action-text"};function render$t(e,t,n,r,s,i){return openBlock(),createElementBlock("button",{type:"button",class:"action-edit",onKeyup:[t[0]||(t[0]=withKeys(o=>i.editItem(),["enter"])),t[1]||(t[1]=withKeys(o=>i.editItem(),["space"])),t[5]||(t[5]=withKeys(o=>i.hideActions(),["esc"]))],onClick:t[2]||(t[2]=withModifiers(o=>i.editItem(),["stop"])),onFocus:t[3]||(t[3]=o=>i.focused(!0)),onBlur:t[4]||(t[4]=o=>i.focused(!1))},[t[6]||(t[6]=createBaseVNode("span",{class:"image-browser-action icon-pencil-alt","aria-hidden":"true"},null,-1)),createBaseVNode("span",_hoisted_1$t,toDisplayString(e.translate("COM_MEDIA_ACTION_EDIT")),1)],32)}script$t.render=render$t,script$t.__file="administrator/components/com_media/resources/scripts/components/browser/actionItems/edit.vue";var script$s={name:"MediaBrowserActionItemDelete",props:{onFocused:{type:Function,default:()=>{}},mainAction:{type:Function,default:()=>{}},closingAction:{type:Function,default:()=>{}}},methods:{openConfirmDeleteModal(){this.mainAction()},hideActions(){this.hideActions()},focused(e){this.onFocused(e)}}};const _hoisted_1$s={class:"action-text"};function render$s(e,t,n,r,s,i){return openBlock(),createElementBlock("button",{type:"button",class:"action-delete",onKeyup:[t[0]||(t[0]=withKeys(o=>i.openConfirmDeleteModal(),["enter"])),t[1]||(t[1]=withKeys(o=>i.openConfirmDeleteModal(),["space"])),t[4]||(t[4]=withKeys(o=>i.hideActions(),["esc"]))],onFocus:t[2]||(t[2]=o=>i.focused(!0)),onBlur:t[3]||(t[3]=o=>i.focused(!1)),onClick:t[5]||(t[5]=withModifiers(o=>i.openConfirmDeleteModal(),["stop"]))},[t[6]||(t[6]=createBaseVNode("span",{class:"image-browser-action icon-trash","aria-hidden":"true"},null,-1)),createBaseVNode("span",_hoisted_1$s,toDisplayString(e.translate("COM_MEDIA_ACTION_DELETE")),1)],32)}script$s.render=render$s,script$s.__file="administrator/components/com_media/resources/scripts/components/browser/actionItems/delete.vue";var script$r={name:"MediaBrowserActionItemDownload",props:{onFocused:{type:Function,default:()=>{}},mainAction:{type:Function,default:()=>{}},closingAction:{type:Function,default:()=>{}}},methods:{download(){this.mainAction()},hideActions(){this.closingAction()},focused(e){this.onFocused(e)}}};const _hoisted_1$r={class:"action-text"};function render$r(e,t,n,r,s,i){return openBlock(),createElementBlock("button",{type:"button",class:"action-download",onKeyup:[t[0]||(t[0]=withKeys(o=>i.download(),["enter"])),t[1]||(t[1]=withKeys(o=>i.download(),["space"])),t[5]||(t[5]=withKeys(o=>i.hideActions(),["esc"]))],onClick:t[2]||(t[2]=withModifiers(o=>i.download(),["stop"])),onFocus:t[3]||(t[3]=o=>i.focused(!0)),onBlur:t[4]||(t[4]=o=>i.focused(!1))},[t[6]||(t[6]=createBaseVNode("span",{class:"image-browser-action icon-download","aria-hidden":"true"},null,-1)),createBaseVNode("span",_hoisted_1$r,toDisplayString(e.translate("COM_MEDIA_ACTION_DOWNLOAD")),1)],32)}script$r.render=render$r,script$r.__file="administrator/components/com_media/resources/scripts/components/browser/actionItems/download.vue";var script$q={name:"MediaBrowserActionItemPreview",props:{onFocused:{type:Function,default:()=>{}},mainAction:{type:Function,default:()=>{}},closingAction:{type:Function,default:()=>{}}},methods:{openPreview(){this.mainAction()},hideActions(){this.closingAction()},focused(e){this.onFocused(e)}}};const _hoisted_1$q={class:"action-text"};function render$q(e,t,n,r,s,i){return openBlock(),createElementBlock("button",{type:"button",class:"action-preview",onClick:t[0]||(t[0]=withModifiers(o=>i.openPreview(),["stop"])),onKeyup:[t[1]||(t[1]=withKeys(o=>i.openPreview(),["enter"])),t[2]||(t[2]=withKeys(o=>i.openPreview(),["space"])),t[5]||(t[5]=withKeys(o=>i.hideActions(),["esc"]))],onFocus:t[3]||(t[3]=o=>i.focused(!0)),onBlur:t[4]||(t[4]=o=>i.focused(!1))},[t[6]||(t[6]=createBaseVNode("span",{class:"image-browser-action icon-search-plus","aria-hidden":"true"},null,-1)),createBaseVNode("span",_hoisted_1$q,toDisplayString(e.translate("COM_MEDIA_ACTION_PREVIEW")),1)],32)}script$q.render=render$q,script$q.__file="administrator/components/com_media/resources/scripts/components/browser/actionItems/preview.vue";var script$p={name:"MediaBrowserActionItemRename",props:{onFocused:{type:Function,default:()=>{}},mainAction:{type:Function,default:()=>{}},closingAction:{type:Function,default:()=>{}}},methods:{openRenameModal(){this.mainAction()},hideActions(){this.closingAction()},focused(e){this.onFocused(e)}}};const _hoisted_1$p={class:"action-text"};function render$p(e,t,n,r,s,i){return openBlock(),createElementBlock("button",{ref:"actionRenameButton",type:"button",class:"action-rename",onClick:t[0]||(t[0]=withModifiers(o=>i.openRenameModal(),["stop"])),onKeyup:[t[1]||(t[1]=withKeys(o=>i.openRenameModal(),["enter"])),t[2]||(t[2]=withKeys(o=>i.openRenameModal(),["space"])),t[5]||(t[5]=withKeys(o=>i.hideActions(),["esc"]))],onFocus:t[3]||(t[3]=o=>i.focused(!0)),onBlur:t[4]||(t[4]=o=>i.focused(!1))},[t[6]||(t[6]=createBaseVNode("span",{class:"image-browser-action fa fa-i-cursor","aria-hidden":"true"},null,-1)),createBaseVNode("span",_hoisted_1$p,toDisplayString(e.translate("COM_MEDIA_ACTION_RENAME")),1)],544)}script$p.render=render$p,script$p.__file="administrator/components/com_media/resources/scripts/components/browser/actionItems/rename.vue";var script$o={name:"MediaBrowserActionItemShare",props:{onFocused:{type:Function,default:()=>{}},mainAction:{type:Function,default:()=>{}},closingAction:{type:Function,default:()=>{}}},methods:{openShareUrlModal(){this.mainAction()},hideActions(){this.closingAction()},focused(e){this.onFocused(e)}}};const _hoisted_1$o={class:"action-text"};function render$o(e,t,n,r,s,i){return openBlock(),createElementBlock("button",{type:"button",class:"action-url",onClick:t[0]||(t[0]=withModifiers(o=>i.openShareUrlModal(),["stop"])),onKeyup:[t[1]||(t[1]=withKeys(o=>i.openShareUrlModal(),["enter"])),t[2]||(t[2]=withKeys(o=>i.openShareUrlModal(),["space"])),t[5]||(t[5]=withKeys(o=>i.hideActions(),["esc"]))],onFocus:t[3]||(t[3]=o=>i.focused(!0)),onBlur:t[4]||(t[4]=o=>i.focused(!1))},[t[6]||(t[6]=createBaseVNode("span",{class:"image-browser-action icon-link","aria-hidden":"true"},null,-1)),createBaseVNode("span",_hoisted_1$o,toDisplayString(e.translate("COM_MEDIA_ACTION_SHARE")),1)],32)}script$o.render=render$o,script$o.__file="administrator/components/com_media/resources/scripts/components/browser/actionItems/share.vue";var script$n={name:"MediaBrowserActionItemToggle",props:{mainAction:{type:Function,default:()=>{}}},emits:["on-focused"],methods:{openActions(){this.mainAction()},focused(e){this.$emit("on-focused",e)}}};const _hoisted_1$n=["aria-label","title"];function render$n(e,t,n,r,s,i){return openBlock(),createElementBlock("button",{type:"button",class:"action-toggle","aria-label":e.sprintf("COM_MEDIA_MANAGE_ITEM",e.$parent.$props.item.name),title:e.sprintf("COM_MEDIA_MANAGE_ITEM",e.$parent.$props.item.name),onKeyup:[t[1]||(t[1]=withKeys(o=>i.openActions(),["enter"])),t[4]||(t[4]=withKeys(o=>i.openActions(),["space"]))],onFocus:t[2]||(t[2]=o=>i.focused(!0)),onBlur:t[3]||(t[3]=o=>i.focused(!1))},[createBaseVNode("span",{class:"image-browser-action icon-ellipsis-h","aria-hidden":"true",onClick:t[0]||(t[0]=withModifiers(o=>i.openActions(),["stop"]))})],40,_hoisted_1$n)}script$n.render=render$n,script$n.__file="administrator/components/com_media/resources/scripts/components/browser/actionItems/toggle.vue";var script$m={name:"MediaBrowserActionItemsContainer",components:{MediaBrowserActionItemEdit:script$t,MediaBrowserActionItemDelete:script$s,MediaBrowserActionItemDownload:script$r,MediaBrowserActionItemPreview:script$q,MediaBrowserActionItemRename:script$p,MediaBrowserActionItemShare:script$o,MediaBrowserActionItemToggle:script$n},props:{item:{type:Object,default:()=>{}},edit:{type:Function,default:()=>{}},previewable:{type:Boolean,default:!1},downloadable:{type:Boolean,default:!1},shareable:{type:Boolean,default:!1}},emits:["toggle-settings"],data(){return{showActions:!1}},computed:{canEdit(){return api.canEdit&&(typeof this.item.canEdit<"u"?this.item.canEdit:!0)},canDelete(){return api.canDelete&&(typeof this.item.canDelete<"u"?this.item.canDelete:!0)},canOpenEditView(){return["jpg","jpeg","png"].includes(this.item.extension.toLowerCase())}},watch:{"$store.state.showRenameModal":function(e){!e&&this.$refs.actionToggle&&this.$store.state.selectedItems.find(t=>t.name===this.item.name)!==void 0&&this.$refs.actionToggle.$el.focus()}},methods:{hideActions(){this.showActions=!1,this.$parent.$parent.$data.actionsActive=!1},openPreview(){this.$store.commit(SHOW_PREVIEW_MODAL),this.$store.dispatch("getFullContents",this.item)},download(){this.$store.dispatch("download",this.item)},openConfirmDeleteModal(){this.$store.commit(UNSELECT_ALL_BROWSER_ITEMS),this.$store.commit(SELECT_BROWSER_ITEM,this.item),this.$store.commit(SHOW_CONFIRM_DELETE_MODAL)},openRenameModal(){this.hideActions(),this.$store.commit(SELECT_BROWSER_ITEM,this.item),this.$store.commit(SHOW_RENAME_MODAL)},openShareUrlModal(){this.$store.commit(SELECT_BROWSER_ITEM,this.item),this.$store.commit(SHOW_SHARE_MODAL)},openActions(){this.showActions=!0,this.$parent.$parent.$data.actionsActive=!0;const e=[...this.$el.parentElement.querySelectorAll(".media-browser-actions-list button")];e.length&&(e.forEach((t,n)=>{n===0?t.tabIndex=0:t.tabIndex=-1}),e[0].focus())},openLastActions(){this.showActions=!0,this.$parent.$parent.$data.actionsActive=!0;const e=[...this.$el.parentElement.querySelectorAll(".media-browser-actions-list button")];e.length&&(e.forEach((t,n)=>{n===e.length?t.tabIndex=0:t.tabIndex=-1}),this.$nextTick(()=>e[e.length-1].focus()))},focusNext(e){const t=e.target,n=[...t.parentElement.querySelectorAll("button")],r=n[n.length-1];t.tabIndex=-1,t===r?(n[0].focus(),n[0].tabIndex=0):(t.nextElementSibling.focus(),t.nextElementSibling.tabIndex=0)},focusPrev(e){const t=e.target,n=[...t.parentElement.querySelectorAll("button")],r=n[0];t.tabIndex=-1,t===r?(n[n.length-1].focus(),n[n.length-1].tabIndex=0):(t.previousElementSibling.focus(),t.previousElementSibling.tabIndex=0)},focusFirst(e){const n=[...e.target.parentElement.querySelectorAll("button")];n[0].focus(),n.forEach((r,s)=>{s===0?r.tabIndex=0:r.tabIndex=-1})},focusLast(e){const n=[...e.target.parentElement.querySelectorAll("button")];n[n.length-1].focus(),n.forEach((r,s)=>{s===n.length?r.tabIndex=0:r.tabIndex=-1})},editItem(){this.edit()},focused(e){this.$emit("toggle-settings",e)}}};const _hoisted_1$m=["aria-label","title"],_hoisted_2$i=["aria-label"],_hoisted_3$e={"aria-hidden":"true",class:"media-browser-actions-item-name"};function render$m(e,t,n,r,s,i){const o=resolveComponent("MediaBrowserActionItemToggle"),a=resolveComponent("MediaBrowserActionItemPreview"),l=resolveComponent("MediaBrowserActionItemDownload"),c=resolveComponent("MediaBrowserActionItemRename"),u=resolveComponent("MediaBrowserActionItemEdit"),f=resolveComponent("MediaBrowserActionItemShare"),v=resolveComponent("MediaBrowserActionItemDelete");return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("span",{class:"media-browser-select","aria-label":e.translate("COM_MEDIA_TOGGLE_SELECT_ITEM"),title:e.translate("COM_MEDIA_TOGGLE_SELECT_ITEM"),tabindex:"0",onFocusin:t[0]||(t[0]=w=>i.focused(!0)),onFocusout:t[1]||(t[1]=w=>i.focused(!1))},null,40,_hoisted_1$m),createBaseVNode("div",{class:normalizeClass(["media-browser-actions",{active:s.showActions}])},[createVNode(o,{ref:"actionToggle","main-action":i.openActions,onOnFocused:i.focused,onKeyup:[t[2]||(t[2]=withKeys(w=>i.openLastActions(),["up"])),t[3]||(t[3]=withKeys(w=>i.openActions(),["down"])),t[4]||(t[4]=withKeys(w=>i.openLastActions(),["end"])),t[5]||(t[5]=withKeys(w=>i.openActions(),["home"]))],onKeydown:[t[6]||(t[6]=withKeys(withModifiers(()=>{},["prevent"]),["up"])),t[7]||(t[7]=withKeys(withModifiers(()=>{},["prevent"]),["down"])),t[8]||(t[8]=withKeys(withModifiers(()=>{},["prevent"]),["home"])),t[9]||(t[9]=withKeys(withModifiers(()=>{},["prevent"]),["end"]))]},null,8,["main-action","onOnFocused"]),s.showActions?(openBlock(),createElementBlock("div",{key:0,ref:"actionList",class:"media-browser-actions-list",role:"toolbar","aria-orientation":"vertical","aria-label":e.sprintf("COM_MEDIA_ACTIONS_TOOLBAR_LABEL",e.$parent.$props.item.name)},[createBaseVNode("span",_hoisted_3$e,[createBaseVNode("strong",null,toDisplayString(e.$parent.$props.item.name),1)]),n.previewable?(openBlock(),createBlock(a,{key:0,ref:"actionPreview","on-focused":i.focused,"main-action":i.openPreview,"closing-action":i.hideActions,onKeydown:[t[10]||(t[10]=withKeys(withModifiers(()=>{},["prevent"]),["up"])),t[11]||(t[11]=withKeys(withModifiers(()=>{},["prevent"]),["down"])),t[12]||(t[12]=withKeys(withModifiers(()=>{},["prevent"]),["home"])),t[13]||(t[13]=withKeys(withModifiers(()=>{},["prevent"]),["end"])),withKeys(i.hideActions,["tab"])],onKeyup:[withKeys(i.focusPrev,["up"]),withKeys(i.focusNext,["down"]),withKeys(i.focusLast,["end"]),withKeys(i.focusFirst,["home"]),withKeys(i.hideActions,["esc"])]},null,8,["on-focused","main-action","closing-action","onKeyup","onKeydown"])):createCommentVNode("v-if",!0),n.downloadable?(openBlock(),createBlock(l,{key:1,ref:"actionDownload","on-focused":i.focused,"main-action":i.download,"closing-action":i.hideActions,onKeydown:[t[14]||(t[14]=withKeys(withModifiers(()=>{},["prevent"]),["up"])),t[15]||(t[15]=withKeys(withModifiers(()=>{},["prevent"]),["down"])),withKeys(i.hideActions,["tab"]),t[16]||(t[16]=withKeys(withModifiers(()=>{},["prevent"]),["home"])),t[17]||(t[17]=withKeys(withModifiers(()=>{},["prevent"]),["end"]))],onKeyup:[withKeys(i.focusPrev,["up"]),withKeys(i.focusNext,["down"]),withKeys(i.hideActions,["esc"]),withKeys(i.focusLast,["end"]),withKeys(i.focusFirst,["home"])]},null,8,["on-focused","main-action","closing-action","onKeyup","onKeydown"])):createCommentVNode("v-if",!0),i.canEdit?(openBlock(),createBlock(c,{key:2,ref:"actionRename","on-focused":i.focused,"main-action":i.openRenameModal,"closing-action":i.hideActions,onKeydown:[t[18]||(t[18]=withKeys(withModifiers(()=>{},["prevent"]),["up"])),t[19]||(t[19]=withKeys(withModifiers(()=>{},["prevent"]),["down"])),withKeys(i.hideActions,["tab"]),t[20]||(t[20]=withKeys(withModifiers(()=>{},["prevent"]),["home"])),t[21]||(t[21]=withKeys(withModifiers(()=>{},["prevent"]),["end"]))],onKeyup:[withKeys(i.focusPrev,["up"]),withKeys(i.focusNext,["down"]),withKeys(i.hideActions,["esc"]),withKeys(i.focusLast,["end"]),withKeys(i.focusFirst,["home"])]},null,8,["on-focused","main-action","closing-action","onKeyup","onKeydown"])):createCommentVNode("v-if",!0),i.canEdit&&i.canOpenEditView?(openBlock(),createBlock(u,{key:3,ref:"actionEdit","on-focused":i.focused,"main-action":i.editItem,"closing-action":i.hideActions,onKeydown:[t[22]||(t[22]=withKeys(withModifiers(()=>{},["prevent"]),["up"])),t[23]||(t[23]=withKeys(withModifiers(()=>{},["prevent"]),["down"])),withKeys(i.hideActions,["tab"]),t[24]||(t[24]=withKeys(withModifiers(()=>{},["prevent"]),["home"])),t[25]||(t[25]=withKeys(withModifiers(()=>{},["prevent"]),["end"]))],onKeyup:[withKeys(i.focusPrev,["up"]),withKeys(i.focusNext,["down"]),withKeys(i.hideActions,["esc"]),withKeys(i.focusLast,["end"]),withKeys(i.focusFirst,["home"])]},null,8,["on-focused","main-action","closing-action","onKeyup","onKeydown"])):createCommentVNode("v-if",!0),n.shareable?(openBlock(),createBlock(f,{key:4,ref:"actionShare","on-focused":i.focused,"main-action":i.openShareUrlModal,"closing-action":i.hideActions,onKeydown:[t[26]||(t[26]=withKeys(withModifiers(()=>{},["prevent"]),["up"])),t[27]||(t[27]=withKeys(withModifiers(()=>{},["prevent"]),["down"])),withKeys(i.hideActions,["tab"]),t[28]||(t[28]=withKeys(withModifiers(()=>{},["prevent"]),["home"])),t[29]||(t[29]=withKeys(withModifiers(()=>{},["prevent"]),["end"]))],onKeyup:[withKeys(i.focusPrev,["up"]),withKeys(i.focusNext,["down"]),withKeys(i.hideActions,["esc"]),withKeys(i.focusLast,["end"]),withKeys(i.focusFirst,["home"])]},null,8,["on-focused","main-action","closing-action","onKeyup","onKeydown"])):createCommentVNode("v-if",!0),i.canDelete?(openBlock(),createBlock(v,{key:5,ref:"actionDelete","on-focused":i.focused,"main-action":i.openConfirmDeleteModal,"hide-actions":i.hideActions,onKeydown:[t[30]||(t[30]=withKeys(withModifiers(()=>{},["prevent"]),["up"])),t[31]||(t[31]=withKeys(withModifiers(()=>{},["prevent"]),["down"])),withKeys(i.hideActions,["tab"]),t[32]||(t[32]=withKeys(withModifiers(()=>{},["prevent"]),["home"])),t[33]||(t[33]=withKeys(withModifiers(()=>{},["prevent"]),["end"]))],onKeyup:[withKeys(i.focusPrev,["up"]),withKeys(i.focusNext,["down"]),withKeys(i.hideActions,["esc"]),withKeys(i.focusLast,["end"]),withKeys(i.focusFirst,["home"])]},null,8,["on-focused","main-action","hide-actions","onKeyup","onKeydown"])):createCommentVNode("v-if",!0)],8,_hoisted_2$i)):createCommentVNode("v-if",!0)],2)],64)}script$m.render=render$m,script$m.__file="administrator/components/com_media/resources/scripts/components/browser/actionItems/actionItemsContainer.vue";var script$l={name:"MediaBrowserItemDirectory",components:{MediaBrowserActionItemsContainer:script$m},mixins:[navigable],props:{item:{type:Object,default:()=>{}}},emits:["toggle-settings"],data(){return{showActions:!1}},methods:{onPreviewDblClick(){this.navigateTo(this.item.path),window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{type:this.item.type,name:this.item.name,path:this.item.path}}))},hideActions(){this.$refs.container&&this.$refs.container.hideActions()},toggleSettings(e){this.$emit("toggle-settings",e)}}};const _hoisted_1$l={class:"media-browser-item-info"};function render$l(e,t,n,r,s,i){const o=resolveComponent("MediaBrowserActionItemsContainer");return openBlock(),createElementBlock("div",{class:"media-browser-item-directory",onMouseleave:t[2]||(t[2]=a=>i.hideActions())},[createBaseVNode("div",{class:"media-browser-item-preview",tabindex:"0",onDblclick:t[0]||(t[0]=withModifiers(a=>i.onPreviewDblClick(),["stop","prevent"])),onKeyup:t[1]||(t[1]=withKeys(a=>i.onPreviewDblClick(),["enter"]))},t[3]||(t[3]=[createBaseVNode("div",{class:"file-background"},[createBaseVNode("div",{class:"folder-icon"},[createBaseVNode("span",{class:"icon-folder"})])],-1)]),32),createBaseVNode("div",_hoisted_1$l,toDisplayString(n.item.name),1),createVNode(o,{ref:"container",item:n.item,onToggleSettings:i.toggleSettings},null,8,["item","onToggleSettings"])],32)}script$l.render=render$l,script$l.__file="administrator/components/com_media/resources/scripts/components/browser/items/directory.vue";var script$k={name:"MediaBrowserItemFile",components:{MediaBrowserActionItemsContainer:script$m},props:{item:{type:Object,default:()=>{}},focused:{type:Boolean,default:!1}},emits:["toggle-settings"],data(){return{showActions:!1}},methods:{hideActions(){this.$refs.container&&this.$refs.container.hideActions()},openPreview(){this.$refs.container.openPreview()},toggleSettings(e){this.$emit("toggle-settings",e)}}};const _hoisted_1$k={class:"media-browser-item-info"},_hoisted_2$h=["aria-label","title"];function render$k(e,t,n,r,s,i){const o=resolveComponent("MediaBrowserActionItemsContainer");return openBlock(),createElementBlock("div",{class:"media-browser-item-file",onMouseleave:t[0]||(t[0]=a=>i.hideActions())},[t[1]||(t[1]=createBaseVNode("div",{class:"media-browser-item-preview"},[createBaseVNode("div",{class:"file-background"},[createBaseVNode("div",{class:"file-icon"},[createBaseVNode("span",{class:"icon-file-alt"})])])],-1)),createBaseVNode("div",_hoisted_1$k,toDisplayString(n.item.name)+" "+toDisplayString(n.item.filetype),1),createBaseVNode("span",{class:"media-browser-select","aria-label":e.translate("COM_MEDIA_TOGGLE_SELECT_ITEM"),title:e.translate("COM_MEDIA_TOGGLE_SELECT_ITEM")},null,8,_hoisted_2$h),createVNode(o,{ref:"container",item:n.item,previewable:!0,downloadable:!0,shareable:!0,onToggleSettings:i.toggleSettings},null,8,["item","onToggleSettings"])],32)}script$k.render=render$k,script$k.__file="administrator/components/com_media/resources/scripts/components/browser/items/file.vue";var script$j={name:"MediaBrowserItemImage",components:{MediaBrowserActionItemsContainer:script$m},props:{item:{type:Object,required:!0},focused:{type:Boolean,required:!0,default:!1}},emits:["toggle-settings"],data(){return{showActions:{type:Boolean,default:!1}}},computed:{getURL(){return this.item.thumb_path?this.item.thumb_path.split(Joomla.getOptions("system.paths").rootFull).length>1?`${this.item.thumb_path}?${this.item.modified_date?new Date(this.item.modified_date).valueOf():api.mediaVersion}`:`${this.item.thumb_path}`:""},width(){return this.item.width>0?this.item.width:null},height(){return this.item.height>0?this.item.height:null},loading(){return this.item.width>0?"lazy":null},altTag(){return this.item.name}},methods:{canEdit(){return["jpg","jpeg","png"].includes(this.item.extension.toLowerCase())},hideActions(){this.$refs.container&&this.$refs.container.hideActions()},openPreview(){this.$refs.container.openPreview()},editItem(){const e=`${Joomla.getOptions("com_media").editViewUrl}&path=`;window.location.href=e+this.item.path},toggleSettings(e){this.$emit("toggle-settings",e)},setSize(e){if(this.item.mime_type==="image/svg+xml"){const t=e.target;this.$store.dispatch("updateItemProperties",{item:this.item,width:t.naturalWidth?t.naturalWidth:300,height:t.naturalHeight?t.naturalHeight:150})}}}};const _hoisted_1$j=["title"],_hoisted_2$g={class:"image-background"},_hoisted_3$d=["src","alt","loading","width","height"],_hoisted_4$9={key:1,class:"icon-eye-slash image-placeholder","aria-hidden":"true"},_hoisted_5$8=["title"],_hoisted_6$6=["aria-label","title"];function render$j(e,t,n,r,s,i){const o=resolveComponent("MediaBrowserActionItemsContainer");return openBlock(),createElementBlock("div",{class:"media-browser-image",tabindex:"0",onDblclick:t[1]||(t[1]=a=>i.openPreview()),onMouseleave:t[2]||(t[2]=a=>i.hideActions()),onKeyup:t[3]||(t[3]=withKeys(a=>i.openPreview(),["enter"]))},[createBaseVNode("div",{class:"media-browser-item-preview",title:n.item.name},[createBaseVNode("div",_hoisted_2$g,[i.getURL?(openBlock(),createElementBlock("img",{key:0,class:"image-cropped",src:i.getURL,alt:i.altTag,loading:i.loading,width:i.width,height:i.height,onLoad:t[0]||(t[0]=(...a)=>i.setSize&&i.setSize(...a))},null,40,_hoisted_3$d)):createCommentVNode("v-if",!0),i.getURL?createCommentVNode("v-if",!0):(openBlock(),createElementBlock("span",_hoisted_4$9))])],8,_hoisted_1$j),createBaseVNode("div",{class:"media-browser-item-info",title:n.item.name},toDisplayString(n.item.name)+" "+toDisplayString(n.item.filetype),9,_hoisted_5$8),createBaseVNode("span",{class:"media-browser-select","aria-label":e.translate("COM_MEDIA_TOGGLE_SELECT_ITEM"),title:e.translate("COM_MEDIA_TOGGLE_SELECT_ITEM")},null,8,_hoisted_6$6),createVNode(o,{ref:"container",item:n.item,edit:i.editItem,previewable:!0,downloadable:!0,shareable:!0,onToggleSettings:i.toggleSettings},null,8,["item","edit","onToggleSettings"])],32)}script$j.render=render$j,script$j.__file="administrator/components/com_media/resources/scripts/components/browser/items/image.vue";var script$i={name:"MediaBrowserItemVideo",components:{MediaBrowserActionItemsContainer:script$m},props:{item:{type:Object,default:()=>{}},focused:{type:Boolean,default:!1}},emits:["toggle-settings"],data(){return{showActions:!1}},methods:{hideActions(){this.$refs.container&&this.$refs.container.hideActions()},openPreview(){this.$refs.container.openPreview()},toggleSettings(e){this.$emit("toggle-settings",e)}}};const _hoisted_1$i={class:"media-browser-item-info"};function render$i(e,t,n,r,s,i){const o=resolveComponent("MediaBrowserActionItemsContainer");return openBlock(),createElementBlock("div",{class:"media-browser-image",onDblclick:t[0]||(t[0]=a=>i.openPreview()),onMouseleave:t[1]||(t[1]=a=>i.hideActions())},[t[2]||(t[2]=createBaseVNode("div",{class:"media-browser-item-preview"},[createBaseVNode("div",{class:"file-background"},[createBaseVNode("div",{class:"file-icon"},[createBaseVNode("span",{class:"fas fa-file-video"})])])],-1)),createBaseVNode("div",_hoisted_1$i,toDisplayString(n.item.name)+" "+toDisplayString(n.item.filetype),1),createVNode(o,{ref:"container",item:n.item,previewable:!0,downloadable:!0,shareable:!0,onToggleSettings:i.toggleSettings},null,8,["item","onToggleSettings"])],32)}script$i.render=render$i,script$i.__file="administrator/components/com_media/resources/scripts/components/browser/items/video.vue";var script$h={name:"MediaBrowserItemAudio",components:{MediaBrowserActionItemsContainer:script$m},props:{item:{type:Object,default:()=>{}},focused:{type:Boolean,default:!1}},emits:["toggle-settings"],data(){return{showActions:!1}},methods:{hideActions(){this.$refs.container&&this.$refs.container.hideActions()},openPreview(){this.$refs.container.openPreview()},toggleSettings(e){this.$emit("toggle-settings",e)}}};const _hoisted_1$h={class:"media-browser-item-info"};function render$h(e,t,n,r,s,i){const o=resolveComponent("MediaBrowserActionItemsContainer");return openBlock(),createElementBlock("div",{class:"media-browser-audio",tabindex:"0",onDblclick:t[0]||(t[0]=a=>i.openPreview()),onMouseleave:t[1]||(t[1]=a=>i.hideActions()),onKeyup:t[2]||(t[2]=withKeys(a=>i.openPreview(),["enter"]))},[t[3]||(t[3]=createBaseVNode("div",{class:"media-browser-item-preview"},[createBaseVNode("div",{class:"file-background"},[createBaseVNode("div",{class:"file-icon"},[createBaseVNode("span",{class:"fas fa-file-audio"})])])],-1)),createBaseVNode("div",_hoisted_1$h,toDisplayString(n.item.name)+" "+toDisplayString(n.item.filetype),1),createVNode(o,{ref:"container",item:n.item,previewable:!0,downloadable:!0,shareable:!0,onToggleSettings:i.toggleSettings},null,8,["item","onToggleSettings"])],32)}script$h.render=render$h,script$h.__file="administrator/components/com_media/resources/scripts/components/browser/items/audio.vue";var script$g={name:"MediaBrowserItemDocument",components:{MediaBrowserActionItemsContainer:script$m},props:{item:{type:Object,default:()=>{}},focused:{type:Boolean,default:!1}},emits:["toggle-settings"],data(){return{showActions:!1}},methods:{hideActions(){this.$refs.container&&this.$refs.container.hideActions()},openPreview(){this.$refs.container.openPreview()},toggleSettings(e){this.$emit("toggle-settings",e)}}};const _hoisted_1$g={class:"media-browser-item-info"},_hoisted_2$f=["aria-label","title"];function render$g(e,t,n,r,s,i){const o=resolveComponent("MediaBrowserActionItemsContainer");return openBlock(),createElementBlock("div",{class:"media-browser-doc",onDblclick:t[0]||(t[0]=a=>i.openPreview()),onMouseleave:t[1]||(t[1]=a=>i.hideActions())},[t[2]||(t[2]=createBaseVNode("div",{class:"media-browser-item-preview"},[createBaseVNode("div",{class:"file-background"},[createBaseVNode("div",{class:"file-icon"},[createBaseVNode("span",{class:"fas fa-file"})])])],-1)),createBaseVNode("div",_hoisted_1$g,toDisplayString(n.item.name)+" "+toDisplayString(n.item.filetype),1),createBaseVNode("span",{class:"media-browser-select","aria-label":e.translate("COM_MEDIA_TOGGLE_SELECT_ITEM"),title:e.translate("COM_MEDIA_TOGGLE_SELECT_ITEM")},null,8,_hoisted_2$f),createVNode(o,{ref:"container",item:n.item,previewable:!0,downloadable:!0,shareable:!0,onToggleSettings:i.toggleSettings},null,8,["item","onToggleSettings"])],32)}script$g.render=render$g,script$g.__file="administrator/components/com_media/resources/scripts/components/browser/items/document.vue";var MediaBrowserItem={props:{item:{type:Object,default:()=>{}}},data(){return{hoverActive:!1,actionsActive:!1}},methods:{itemType(){return this.item.type==="dir"?script$l:this.item.extension&&api.imagesExtensions.includes(this.item.extension.toLowerCase())?script$j:this.item.extension&&api.videoExtensions.includes(this.item.extension.toLowerCase())?script$i:this.item.extension&&api.audioExtensions.includes(this.item.extension.toLowerCase())?script$h:this.item.extension&&api.documentExtensions.includes(this.item.extension.toLowerCase())?script$g:script$k},styles(){return{width:"calc("+this.$store.state.gridSize+"% - 20px)"}},isSelected(){return this.$store.state.selectedItems.some(e=>e.path===this.item.path)},isHoverActive(){return this.hoverActive},hasActions(){return this.actionsActive},mouseover(){this.hoverActive=!0},mouseleave(){this.hoverActive=!1},handleClick(e){if(this.item.path&&this.item.type==="file"&&window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{type:this.item.type,name:this.item.name,path:this.item.path,thumb:this.item.thumb,fileType:this.item.mime_type?this.item.mime_type:!1,extension:this.item.extension?this.item.extension:!1,width:this.item.width?this.item.width:0,height:this.item.height?this.item.height:0}})),this.item.type==="dir"&&window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{type:this.item.type,name:this.item.name,path:this.item.path}})),!this.isSelected()){e.shiftKey||e.keyCode===13||this.$store.commit(UNSELECT_ALL_BROWSER_ITEMS),this.$store.commit(SELECT_BROWSER_ITEM,this.item);return}this.$store.dispatch("toggleBrowserItemSelect",this.item),window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{}})),this.$store.state.selectedItems.length>1&&(this.$store.commit(UNSELECT_ALL_BROWSER_ITEMS),this.$store.commit(SELECT_BROWSER_ITEM,this.item))},toggleSettings(e){this["mouse"+(e?"over":"leave")]()}},render(){return h("div",{class:{"media-browser-item":!0,selected:this.isSelected(),active:this.isHoverActive(),actions:this.hasActions()},onClick:this.handleClick,onMouseover:this.mouseover,onMouseleave:this.mouseleave},[h(this.itemType(),{item:this.item,onToggleSettings:this.toggleSettings,focused:!1})])}},script$f={name:"MediaInfobar",computed:{item(){const{selectedItems:e}=this.$store.state;return e.length===1?e[0]:e.length>1?e.slice(-1)[0]:this.$store.getters.getSelectedDirectory},showInfoBar(){return this.$store.state.showInfoBar}},methods:{hideInfoBar(){this.$store.commit(HIDE_INFOBAR)}}};const _hoisted_1$f={key:0,class:"media-infobar"},_hoisted_2$e={key:0,class:"text-center"},_hoisted_3$c={key:1},_hoisted_4$8={key:0},_hoisted_5$7={key:1},_hoisted_6$5={key:2},_hoisted_7$3={key:3},_hoisted_8$1={key:4},_hoisted_9$1={key:5},_hoisted_10$1={key:6};function render$f(e,t,n,r,s,i){return openBlock(),createBlock(Transition,{name:"infobar"},{default:withCtx(()=>[i.showInfoBar&&i.item?(openBlock(),createElementBlock("div",_hoisted_1$f,[createBaseVNode("span",{class:"infobar-close",onClick:t[0]||(t[0]=o=>i.hideInfoBar())},"\xD7"),createBaseVNode("h2",null,toDisplayString(i.item.name),1),i.item.path==="/"?(openBlock(),createElementBlock("div",_hoisted_2$e,t[1]||(t[1]=[createBaseVNode("span",{class:"icon-file placeholder-icon"},null,-1),createTextVNode(" Select file or folder to view its details. ")]))):(openBlock(),createElementBlock("dl",_hoisted_3$c,[createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_FOLDER")),1),createBaseVNode("dd",null,toDisplayString(i.item.directory),1),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_TYPE")),1),i.item.type==="file"?(openBlock(),createElementBlock("dd",_hoisted_4$8,toDisplayString(e.translate("COM_MEDIA_FILE")),1)):i.item.type==="dir"?(openBlock(),createElementBlock("dd",_hoisted_5$7,toDisplayString(e.translate("COM_MEDIA_FOLDER")),1)):(openBlock(),createElementBlock("dd",_hoisted_6$5," - ")),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_DATE_CREATED")),1),createBaseVNode("dd",null,toDisplayString(i.item.create_date_formatted),1),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_DATE_MODIFIED")),1),createBaseVNode("dd",null,toDisplayString(i.item.modified_date_formatted),1),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_DIMENSION")),1),i.item.width||i.item.height?(openBlock(),createElementBlock("dd",_hoisted_7$3,toDisplayString(i.item.width)+"px * "+toDisplayString(i.item.height)+"px ",1)):(openBlock(),createElementBlock("dd",_hoisted_8$1," - ")),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_SIZE")),1),i.item.size?(openBlock(),createElementBlock("dd",_hoisted_9$1,toDisplayString((i.item.size/1024).toFixed(2))+" KB ",1)):(openBlock(),createElementBlock("dd",_hoisted_10$1," - ")),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_MIME_TYPE")),1),createBaseVNode("dd",null,toDisplayString(i.item.mime_type),1),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_EXTENSION")),1),createBaseVNode("dd",null,toDisplayString(i.item.extension||"-"),1)]))])):createCommentVNode("v-if",!0)]),_:1})}script$f.render=render$f,script$f.__file="administrator/components/com_media/resources/scripts/components/infobar/infobar.vue";function sortArray(e,t,n){return e.sort((r,s)=>t==="name"?n==="asc"?r.name.toUpperCase().localeCompare(s.name.toUpperCase(),"en",{sensitivity:"base"}):s.name.toUpperCase().localeCompare(r.name.toUpperCase(),"en",{sensitivity:"base"}):t==="size"?n==="asc"?parseInt(r.size,10)-parseInt(s.size,10):parseInt(s.size,10)-parseInt(r.size,10):t==="dimension"?n==="asc"?parseInt(r.width,10)*parseInt(r.height,10)-parseInt(s.width,10)*parseInt(s.height,10):parseInt(s.width,10)*parseInt(s.height,10)-parseInt(r.width,10)*parseInt(r.height,10):t==="date_created"?n==="asc"?new Date(r.create_date)-new Date(s.create_date):new Date(s.create_date)-new Date(r.create_date):t==="date_modified"?n==="asc"?new Date(r.modified_date)-new Date(s.modified_date):new Date(s.modified_date)-new Date(r.modified_date):e)}var script$e={name:"MediaBrowser",components:{MediaBrowserTable:script$u,MediaInfobar:script$f,MediaBrowserItem},computed:{localItems(){const e=sortArray(this.$store.getters.getSelectedDirectoryDirectories.slice(0),this.$store.state.sortBy,this.$store.state.sortDirection),t=sortArray(this.$store.getters.getSelectedDirectoryFiles.slice(0),this.$store.state.sortBy,this.$store.state.sortDirection);return[...e.filter(n=>n.name.toLowerCase().includes(this.$store.state.search.toLowerCase())),...t.filter(n=>n.name.toLowerCase().includes(this.$store.state.search.toLowerCase()))]},getHeight(){return{height:this.$store.state.listView==="table"&&!this.isEmpty?"unset":"100%"}},mediaBrowserStyles(){return{width:this.$store.state.showInfoBar?"75%":"100%",height:this.$store.state.listView==="table"&&!this.isEmpty?"unset":"100%"}},isEmptySearch(){return this.$store.state.search!==""&&this.localItems.length===0},isEmpty(){return![...this.$store.getters.getSelectedDirectoryDirectories,...this.$store.getters.getSelectedDirectoryFiles].length&&!this.$store.state.isLoading},listView(){return this.$store.state.listView},mediaBrowserGridItemsClass(){return{[`media-browser-items-${this.$store.state.gridSize}`]:!0}},isModal(){return Joomla.getOptions("com_media",{}).isModal},currentDirectory(){const e=this.$store.state.selectedDirectory.split("/").filter(n=>n.length!==0);if(e.length!==1)return e[e.length-1];let t="";return this.$store.state.disks.forEach(n=>{n.drives.forEach(r=>{r.root===`${e[0]}/`&&(t=r.displayName)})}),t}},created(){document.body.addEventListener("click",this.unselectAllBrowserItems,!1)},beforeUnmount(){document.body.removeEventListener("click",this.unselectAllBrowserItems,!1)},methods:{unselectAllBrowserItems(e){const t=e.target.id!==void 0&&e.target.id==="mediaDelete",n=this.$refs.browserItems&&!this.$refs.browserItems.contains(e.target)||e.target===this.$refs.browserItems,r=this.$refs.infobar!==void 0&&!this.$refs.infobar.$el.contains(e.target);n&&r&&!t&&(this.$store.commit(UNSELECT_ALL_BROWSER_ITEMS),window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{name:"",path:"",thumb:!1,fileType:!1,extension:!1}})))},onDragEnter(e){return e.stopPropagation(),!1},onDragOver(e){return e.preventDefault(),document.querySelector(".media-dragoutline").classList.add("active"),!1},upload(e){const t=new FileReader;t.onload=n=>{const{result:r}=n.target,s=r.indexOf("base64")+7,i=r.slice(s,r.length);this.$store.dispatch("uploadFile",{name:e.name,parent:this.$store.state.selectedDirectory,content:i})},t.readAsDataURL(e)},onDrop(e){e.preventDefault(),e.dataTransfer&&e.dataTransfer.files&&e.dataTransfer.files.length>0&&Array.from(e.dataTransfer.files).forEach(t=>{document.querySelector(".media-dragoutline").classList.remove("active"),this.upload(t)}),document.querySelector(".media-dragoutline").classList.remove("active")},onDragLeave(e){return e.stopPropagation(),e.preventDefault(),document.querySelector(".media-dragoutline").classList.remove("active"),!1}}};const _hoisted_1$e={key:0,class:"pt-1"},_hoisted_2$d={class:"alert alert-info m-3"},_hoisted_3$b={class:"visually-hidden"},_hoisted_4$7={key:1,class:"text-center",style:{display:"grid","justify-content":"center","align-content":"center","margin-top":"-1rem",color:"var(--gray-200)",height:"100%"}},_hoisted_5$6={class:"media-dragoutline"},_hoisted_6$4={key:3,class:"media-browser-grid"};function render$e(e,t,n,r,s,i){const o=resolveComponent("MediaBrowserTable"),a=resolveComponent("MediaBrowserItem"),l=resolveComponent("MediaInfobar");return openBlock(),createElementBlock("div",{ref:"browserItems",class:"media-browser",style:normalizeStyle(i.getHeight),onDragenter:t[0]||(t[0]=(...c)=>i.onDragEnter&&i.onDragEnter(...c)),onDrop:t[1]||(t[1]=(...c)=>i.onDrop&&i.onDrop(...c)),onDragover:t[2]||(t[2]=(...c)=>i.onDragOver&&i.onDragOver(...c)),onDragleave:t[3]||(t[3]=(...c)=>i.onDragLeave&&i.onDragLeave(...c))},[i.isEmptySearch?(openBlock(),createElementBlock("div",_hoisted_1$e,[createBaseVNode("div",_hoisted_2$d,[t[4]||(t[4]=createBaseVNode("span",{class:"icon-info-circle","aria-hidden":"true"},null,-1)),createBaseVNode("span",_hoisted_3$b,toDisplayString(e.translate("NOTICE")),1),createTextVNode(" "+toDisplayString(e.translate("JGLOBAL_NO_MATCHING_RESULTS")),1)])])):createCommentVNode("v-if",!0),i.isEmpty?(openBlock(),createElementBlock("div",_hoisted_4$7,[t[5]||(t[5]=createBaseVNode("span",{class:"fa-8x icon-cloud-upload upload-icon","aria-hidden":"true"},null,-1)),createBaseVNode("p",null,toDisplayString(e.translate("COM_MEDIA_DROP_FILE")),1)])):createCommentVNode("v-if",!0),createBaseVNode("div",_hoisted_5$6,[t[6]||(t[6]=createBaseVNode("span",{class:"icon-cloud-upload upload-icon","aria-hidden":"true"},null,-1)),createBaseVNode("p",null,toDisplayString(e.translate("COM_MEDIA_DROP_FILE")),1)]),i.listView==="table"&&!i.isEmpty&&!i.isEmptySearch?(openBlock(),createBlock(o,{key:2,"local-items":i.localItems,"current-directory":i.currentDirectory,style:normalizeStyle(i.mediaBrowserStyles)},null,8,["local-items","current-directory","style"])):createCommentVNode("v-if",!0),i.listView==="grid"&&!i.isEmpty?(openBlock(),createElementBlock("div",_hoisted_6$4,[createBaseVNode("div",{class:normalizeClass(["media-browser-items",i.mediaBrowserGridItemsClass]),style:normalizeStyle(i.mediaBrowserStyles)},[(openBlock(!0),createElementBlock(Fragment,null,renderList(i.localItems,c=>(openBlock(),createBlock(a,{key:c.path,item:c},null,8,["item"]))),128))],6)])):createCommentVNode("v-if",!0),createVNode(l,{ref:"infobar"},null,512)],36)}script$e.render=render$e,script$e.__file="administrator/components/com_media/resources/scripts/components/browser/browser.vue";var script$d={name:"MediaTree",mixins:[navigable],props:{root:{type:String,required:!0},level:{type:Number,required:!0},parentIndex:{type:Number,required:!0}},emits:["move-focus-to-parent"],computed:{directories(){return this.$store.state.directories.filter(e=>e.directory===this.root).sort((e,t)=>e.name.toUpperCase()<t.name.toUpperCase()?-1:1)}},methods:{isActive(e){return e.path===this.$store.state.selectedDirectory},getTabindex(e){return this.isActive(e)?0:-1},onItemClick(e){this.navigateTo(e.path),window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{type:e.type,name:e.name,path:e.path}}))},hasChildren(e){return e.directories.length>0},isOpen(e){return this.$store.state.selectedDirectory.includes(e.path)},iconClass(e){return{fas:!1,"icon-folder":!this.isOpen(e),"icon-folder-open":this.isOpen(e)}},setFocusToFirstChild(){this.$refs[`${this.root}0`][0].focus()},moveFocusToNextElement(e){e+1!==this.directories.length&&this.$refs[this.root+(e+1)][0].focus()},moveFocusToPreviousElement(e){e!==0&&this.$refs[this.root+(e-1)][0].focus()},moveFocusToChildElement(e){this.hasChildren(e)&&this.$refs[e.path][0].setFocusToFirstChild()},moveFocusToParentElement(){this.$emit("move-focus-to-parent",this.parentIndex)},restoreFocus(e){this.$refs[this.root+e][0].focus()}}};const _hoisted_1$d={class:"media-tree",role:"group"},_hoisted_2$c=["aria-level","aria-setsize","aria-posinset","tabindex","onClick","onKeyup"],_hoisted_3$a={class:"item-icon"},_hoisted_4$6={class:"item-name"};function render$d(e,t,n,r,s,i){const o=resolveComponent("MediaTree");return openBlock(),createElementBlock("ul",_hoisted_1$d,[(openBlock(!0),createElementBlock(Fragment,null,renderList(i.directories,(a,l)=>(openBlock(),createElementBlock("li",{key:a.path,class:normalizeClass(["media-tree-item",{active:i.isActive(a)}]),role:"none"},[createBaseVNode("a",{ref_for:!0,ref:n.root+l,role:"treeitem","aria-level":n.level,"aria-setsize":i.directories.length,"aria-posinset":l,tabindex:i.getTabindex(a),onClick:withModifiers(c=>i.onItemClick(a),["stop","prevent"]),onKeyup:[withKeys(c=>i.moveFocusToPreviousElement(l),["up"]),withKeys(c=>i.moveFocusToNextElement(l),["down"]),withKeys(c=>i.onItemClick(a),["enter"]),withKeys(c=>i.moveFocusToChildElement(a),["right"]),t[0]||(t[0]=withKeys(c=>i.moveFocusToParentElement(),["left"]))]},[createBaseVNode("span",_hoisted_3$a,[createBaseVNode("span",{class:normalizeClass(i.iconClass(a))},null,2)]),createBaseVNode("span",_hoisted_4$6,toDisplayString(a.name),1)],40,_hoisted_2$c),createVNode(Transition,{name:"slide-fade"},{default:withCtx(()=>[i.hasChildren(a)?withDirectives((openBlock(),createBlock(o,{key:0,ref_for:!0,ref:a.path,"aria-expanded":i.isOpen(a)?"true":"false",root:a.path,level:n.level+1,"parent-index":l,onMoveFocusToParent:i.restoreFocus},null,8,["aria-expanded","root","level","parent-index","onMoveFocusToParent"])),[[vShow,i.isOpen(a)]]):createCommentVNode("v-if",!0)]),_:2},1024)],2))),128))])}script$d.render=render$d,script$d.__file="administrator/components/com_media/resources/scripts/components/tree/tree.vue";var script$c={name:"MediaDrive",components:{MediaTree:script$d},mixins:[navigable],props:{drive:{type:Object,default:()=>{}},total:{type:Number,default:0},diskId:{type:String,default:""},counter:{type:Number,default:0}},computed:{isActive(){return this.$store.state.selectedDirectory===this.drive.root},getTabindex(){return this.isActive?0:-1}},methods:{onDriveClick(){this.navigateTo(this.drive.root),window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{type:"dir",path:this.drive.root}}))},moveFocusToChildElement(e){this.$refs[e].setFocusToFirstChild()},restoreFocus(){this.$refs["drive-root"].focus()}}};const _hoisted_1$c=["aria-labelledby"],_hoisted_2$b=["aria-setsize","tabindex"],_hoisted_3$9={class:"item-name"};function render$c(e,t,n,r,s,i){const o=resolveComponent("MediaTree");return openBlock(),createElementBlock("div",{class:"media-drive",onClick:t[2]||(t[2]=withModifiers(a=>i.onDriveClick(),["stop","prevent"]))},[createBaseVNode("ul",{class:"media-tree",role:"tree","aria-labelledby":n.diskId},[createBaseVNode("li",{class:normalizeClass({active:i.isActive,"media-tree-item":!0,"media-drive-name":!0}),role:"none"},[createBaseVNode("a",{ref:"drive-root",role:"treeitem","aria-level":"1","aria-setsize":n.counter,"aria-posinset":1,tabindex:i.getTabindex,onKeyup:[t[0]||(t[0]=withKeys(a=>i.moveFocusToChildElement(n.drive.root),["right"])),t[1]||(t[1]=withKeys((...a)=>i.onDriveClick&&i.onDriveClick(...a),["enter"]))]},[createBaseVNode("span",_hoisted_3$9,toDisplayString(n.drive.displayName),1)],40,_hoisted_2$b),createVNode(o,{ref:n.drive.root,root:n.drive.root,level:2,"parent-index":0,onMoveFocusToParent:i.restoreFocus},null,8,["root","onMoveFocusToParent"])],2)],8,_hoisted_1$c)])}script$c.render=render$c,script$c.__file="administrator/components/com_media/resources/scripts/components/tree/drive.vue";var script$b={name:"MediaDisk",components:{MediaDrive:script$c},props:{disk:{type:Object,default:()=>{}},uid:{type:String,default:""}},computed:{diskId(){return`disk-${this.uid+1}`}}};const _hoisted_1$b={class:"media-disk"},_hoisted_2$a=["id"];function render$b(e,t,n,r,s,i){const o=resolveComponent("MediaDrive");return openBlock(),createElementBlock("div",_hoisted_1$b,[createBaseVNode("h2",{id:i.diskId,class:"media-disk-name"},toDisplayString(n.disk.displayName),9,_hoisted_2$a),(openBlock(!0),createElementBlock(Fragment,null,renderList(n.disk.drives,(a,l)=>(openBlock(),createBlock(o,{key:l,"disk-id":i.diskId,counter:l,drive:a,total:n.disk.drives.length},null,8,["disk-id","counter","drive","total"]))),128))])}script$b.render=render$b,script$b.__file="administrator/components/com_media/resources/scripts/components/tree/disk.vue";var script$a={name:"MediaBreadcrumb",mixins:[navigable],computed:{crumbs(){const e=[],t=this.$store.state.selectedDirectory.split(":/");if(t.length){const n=this.findDrive(t[0]);if(!n)return[];e.push(n);let r=`${t[0]}:`;t[1].split("/").filter(s=>s.length!==0).forEach((s,i)=>{r=`${r}/${s}`,e.push({name:s,index:i+1,path:r})})}return e},isLast(e){return this.crumbs.indexOf(e)===this.crumbs.length-1}},methods:{onCrumbClick(e){const t=this.crumbs.find(n=>n.index===e);t&&(this.navigateTo(t.path),window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{type:"dir",name:t.name,path:t.path}})))},findDrive(e){let t=null;return this.$store.state.disks.forEach(n=>{n.drives.forEach(r=>{r.root.startsWith(e)&&(t={name:r.displayName,path:r.root,index:0})})}),t}}};const _hoisted_1$a=["aria-label"],_hoisted_2$9=["aria-current","onClick"];function render$a(e,t,n,r,s,i){return openBlock(),createElementBlock("nav",{class:"media-breadcrumb","aria-label":e.translate("COM_MEDIA_BREADCRUMB_LABEL")},[createBaseVNode("ol",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(i.crumbs,(o,a)=>(openBlock(),createElementBlock("li",{key:a,class:"media-breadcrumb-item"},[createBaseVNode("a",{href:"#","aria-current":a===Object.keys(i.crumbs).length-1?"page":void 0,onClick:withModifiers(l=>i.onCrumbClick(a),["stop","prevent"])},toDisplayString(o.name),9,_hoisted_2$9)]))),128))])],8,_hoisted_1$a)}script$a.render=render$a,script$a.__file="administrator/components/com_media/resources/scripts/components/breadcrumb/breadcrumb.vue";var script$9={name:"MediaToolbar",components:{MediaBreadcrumb:script$a},data(){return{sortingOptions:!1}},computed:{toggleListViewBtnIcon(){return this.isGridView?"icon-list":"icon-th"},isLoading(){return this.$store.state.isLoading},atLeastOneItemSelected(){return this.$store.state.selectedItems.length>0},isGridView(){return this.$store.state.listView==="grid"},allItemsSelected(){return this.$store.getters.getSelectedDirectoryContents.length===this.$store.state.selectedItems.length},search(){return this.$store.state.search}},watch:{"$store.state.selectedItems":function(){this.allItemsSelected||(this.$refs.mediaToolbarSelectAll.checked=!1)}},methods:{toggleInfoBar(){this.$store.state.showInfoBar?this.$store.commit(HIDE_INFOBAR):this.$store.commit(SHOW_INFOBAR)},decreaseGridSize(){this.isGridSize("sm")||this.$store.commit(DECREASE_GRID_SIZE)},increaseGridSize(){this.isGridSize("xl")||this.$store.commit(INCREASE_GRID_SIZE)},changeListView(){this.$store.state.listView==="grid"?this.$store.commit(CHANGE_LIST_VIEW,"table"):this.$store.commit(CHANGE_LIST_VIEW,"grid")},toggleSelectAll(){this.allItemsSelected?this.$store.commit(UNSELECT_ALL_BROWSER_ITEMS):(this.$store.commit(SELECT_BROWSER_ITEMS,this.$store.getters.getSelectedDirectoryContents),window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{}})))},isGridSize(e){return this.$store.state.gridSize===e},changeSearch(e){this.$store.commit(SET_SEARCH_QUERY,e.target.value)},showSortOptions(){this.sortingOptions=!this.sortingOptions},changeOrderDirection(){this.$store.commit(UPDATE_SORT_DIRECTION,this.$refs.orderdirection.value)},changeOrderBy(){this.$store.commit(UPDATE_SORT_BY,this.$refs.orderby.value)}}};const _hoisted_1$9=["aria-label"],_hoisted_2$8={key:0,class:"media-loader"},_hoisted_3$8={class:"media-view-icons"},_hoisted_4$5=["aria-label"],_hoisted_5$5={class:"media-view-search-input",role:"search"},_hoisted_6$3={for:"media_search",class:"visually-hidden"},_hoisted_7$2=["placeholder","value"],_hoisted_8={class:"media-view-icons"},_hoisted_9=["aria-label"],_hoisted_10=["aria-label"],_hoisted_11=["aria-label"],_hoisted_12=["aria-label"],_hoisted_13=["aria-label"],_hoisted_14={key:0,class:"row g-3 pt-2 pb-2 pe-3 justify-content-end",style:{"border-inline-start":"1px solid var(--template-bg-dark-7)","margin-left":"0"}},_hoisted_15={class:"col-3"},_hoisted_16=["aria-label","value"],_hoisted_17={value:"name"},_hoisted_18={value:"size"},_hoisted_19={value:"dimension"},_hoisted_20={value:"date_created"},_hoisted_21={value:"date_modified"},_hoisted_22={class:"col-3"},_hoisted_23=["aria-label","value"],_hoisted_24={value:"asc"},_hoisted_25={value:"desc"};function render$9(e,t,n,r,s,i){const o=resolveComponent("MediaBreadcrumb");return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",{class:"media-toolbar",role:"toolbar","aria-label":e.translate("COM_MEDIA_TOOLBAR_LABEL")},[i.isLoading?(openBlock(),createElementBlock("div",_hoisted_2$8)):createCommentVNode("v-if",!0),createBaseVNode("div",_hoisted_3$8,[createBaseVNode("input",{ref:"mediaToolbarSelectAll",type:"checkbox",class:"media-toolbar-icon media-toolbar-select-all","aria-label":e.translate("COM_MEDIA_SELECT_ALL"),onClick:t[0]||(t[0]=withModifiers((...a)=>i.toggleSelectAll&&i.toggleSelectAll(...a),["stop"]))},null,8,_hoisted_4$5)]),createVNode(o),createBaseVNode("div",_hoisted_5$5,[createBaseVNode("label",_hoisted_6$3,toDisplayString(e.translate("COM_MEDIA_SEARCH")),1),createBaseVNode("input",{id:"media_search",class:"form-control",type:"text",placeholder:e.translate("COM_MEDIA_SEARCH"),value:i.search,onInput:t[1]||(t[1]=(...a)=>i.changeSearch&&i.changeSearch(...a))},null,40,_hoisted_7$2)]),createBaseVNode("div",_hoisted_8,[i.isGridView?(openBlock(),createElementBlock("button",{key:0,type:"button",class:normalizeClass(["media-toolbar-icon",{active:s.sortingOptions}]),"aria-label":e.translate("COM_MEDIA_CHANGE_ORDERING"),onClick:t[2]||(t[2]=a=>i.showSortOptions())},t[9]||(t[9]=[createBaseVNode("span",{class:"fas fa-sort-amount-down-alt","aria-hidden":"true"},null,-1)]),10,_hoisted_9)):createCommentVNode("v-if",!0),i.isGridView?(openBlock(),createElementBlock("button",{key:1,type:"button",class:normalizeClass(["media-toolbar-icon media-toolbar-decrease-grid-size",{disabled:i.isGridSize("sm")}]),"aria-label":e.translate("COM_MEDIA_DECREASE_GRID"),onClick:t[3]||(t[3]=withModifiers(a=>i.decreaseGridSize(),["stop","prevent"]))},t[10]||(t[10]=[createBaseVNode("span",{class:"icon-search-minus","aria-hidden":"true"},null,-1)]),10,_hoisted_10)):createCommentVNode("v-if",!0),i.isGridView?(openBlock(),createElementBlock("button",{key:2,type:"button",class:normalizeClass(["media-toolbar-icon media-toolbar-increase-grid-size",{disabled:i.isGridSize("xl")}]),"aria-label":e.translate("COM_MEDIA_INCREASE_GRID"),onClick:t[4]||(t[4]=withModifiers(a=>i.increaseGridSize(),["stop","prevent"]))},t[11]||(t[11]=[createBaseVNode("span",{class:"icon-search-plus","aria-hidden":"true"},null,-1)]),10,_hoisted_11)):createCommentVNode("v-if",!0),createBaseVNode("button",{type:"button",class:"media-toolbar-icon media-toolbar-list-view","aria-label":e.translate("COM_MEDIA_TOGGLE_LIST_VIEW"),onClick:t[5]||(t[5]=withModifiers(a=>i.changeListView(),["stop","prevent"]))},[createBaseVNode("span",{class:normalizeClass(i.toggleListViewBtnIcon),"aria-hidden":"true"},null,2)],8,_hoisted_12),createBaseVNode("button",{type:"button",class:"media-toolbar-icon media-toolbar-info","aria-label":e.translate("COM_MEDIA_TOGGLE_INFO"),onClick:t[6]||(t[6]=withModifiers((...a)=>i.toggleInfoBar&&i.toggleInfoBar(...a),["stop","prevent"]))},t[12]||(t[12]=[createBaseVNode("span",{class:"icon-info","aria-hidden":"true"},null,-1)]),8,_hoisted_13)])],8,_hoisted_1$9),i.isGridView&&s.sortingOptions?(openBlock(),createElementBlock("div",_hoisted_14,[createBaseVNode("div",_hoisted_15,[createBaseVNode("select",{ref:"orderby",class:"form-select","aria-label":e.translate("COM_MEDIA_ORDER_BY"),value:e.$store.state.sortBy,onChange:t[7]||(t[7]=a=>i.changeOrderBy())},[createBaseVNode("option",_hoisted_17,toDisplayString(e.translate("COM_MEDIA_MEDIA_NAME")),1),createBaseVNode("option",_hoisted_18,toDisplayString(e.translate("COM_MEDIA_MEDIA_SIZE")),1),createBaseVNode("option",_hoisted_19,toDisplayString(e.translate("COM_MEDIA_MEDIA_DIMENSION")),1),createBaseVNode("option",_hoisted_20,toDisplayString(e.translate("COM_MEDIA_MEDIA_DATE_CREATED")),1),createBaseVNode("option",_hoisted_21,toDisplayString(e.translate("COM_MEDIA_MEDIA_DATE_MODIFIED")),1)],40,_hoisted_16)]),createBaseVNode("div",_hoisted_22,[createBaseVNode("select",{ref:"orderdirection",class:"form-select","aria-label":e.translate("COM_MEDIA_ORDER_DIRECTION"),value:e.$store.state.sortDirection,onChange:t[8]||(t[8]=a=>i.changeOrderDirection())},[createBaseVNode("option",_hoisted_24,toDisplayString(e.translate("COM_MEDIA_ORDER_ASC")),1),createBaseVNode("option",_hoisted_25,toDisplayString(e.translate("COM_MEDIA_ORDER_DESC")),1)],40,_hoisted_23)])])):createCommentVNode("v-if",!0)],64)}script$9.render=render$9,script$9.__file="administrator/components/com_media/resources/scripts/components/toolbar/toolbar.vue";var script$8={name:"MediaUpload",props:{accept:{type:String,default:""},extensions:{type:Function,default:()=>[]},name:{type:String,default:"file"},multiple:{type:Boolean,default:!0}},created(){MediaManager.Event.listen("onClickUpload",()=>this.chooseFiles())},methods:{chooseFiles(){this.$refs.fileInput.click()},upload(e){e.preventDefault();const{files:t}=e.target;Array.from(t).forEach(n=>{const r=new FileReader;r.onload=s=>{const{result:i}=s.target,o=i.indexOf("base64")+7,a=i.slice(o,i.length);this.$store.dispatch("uploadFile",{name:n.name,parent:this.$store.state.selectedDirectory,content:a})},r.readAsDataURL(n)})}}};const _hoisted_1$8=["name","multiple","accept"];function render$8(e,t,n,r,s,i){return openBlock(),createElementBlock("input",{ref:"fileInput",type:"file",class:"hidden",name:n.name,multiple:n.multiple,accept:n.accept,onChange:t[0]||(t[0]=(...o)=>i.upload&&i.upload(...o))},null,40,_hoisted_1$8)}script$8.render=render$8,script$8.__file="administrator/components/com_media/resources/scripts/components/upload/upload.vue";var FOCUS_GROUP="data-focus-lock",FOCUS_DISABLED="data-focus-lock-disabled",FOCUS_ALLOW="data-no-focus-lock",FOCUS_AUTO="data-autofocus-inside",FOCUS_NO_AUTOFOCUS="data-no-autofocus",allConstants=Object.freeze({__proto__:null,FOCUS_GROUP,FOCUS_DISABLED,FOCUS_ALLOW,FOCUS_AUTO,FOCUS_NO_AUTOFOCUS}),toArray=function(t){for(var n=Array(t.length),r=0;r<t.length;++r)n[r]=t[r];return n},asArray=function(t){return Array.isArray(t)?t:[t]},getFirst=function(t){return Array.isArray(t)?t[0]:t},isElementHidden=function(t){if(t.nodeType!==Node.ELEMENT_NODE)return!1;var n=window.getComputedStyle(t,null);return!n||!n.getPropertyValue?!1:n.getPropertyValue("display")==="none"||n.getPropertyValue("visibility")==="hidden"},getParentNode=function(t){return t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?t.parentNode.host:t.parentNode},isTopNode=function(t){return t===document||t&&t.nodeType===Node.DOCUMENT_NODE},isInert=function(t){return t.hasAttribute("inert")},isVisibleUncached=function(t,n){return!t||isTopNode(t)||!isElementHidden(t)&&!isInert(t)&&n(getParentNode(t))},_isVisibleCached=function(t,n){var r=t.get(n);if(r!==void 0)return r;var s=isVisibleUncached(n,_isVisibleCached.bind(void 0,t));return t.set(n,s),s},isAutoFocusAllowedUncached=function(t,n){return t&&!isTopNode(t)?isAutoFocusAllowed(t)?n(getParentNode(t)):!1:!0},_isAutoFocusAllowedCached=function(t,n){var r=t.get(n);if(r!==void 0)return r;var s=isAutoFocusAllowedUncached(n,_isAutoFocusAllowedCached.bind(void 0,t));return t.set(n,s),s},getDataset=function(t){return t.dataset},isHTMLButtonElement=function(t){return t.tagName==="BUTTON"},isHTMLInputElement=function(t){return t.tagName==="INPUT"},isRadioElement=function(t){return isHTMLInputElement(t)&&t.type==="radio"},notHiddenInput=function(t){return!((isHTMLInputElement(t)||isHTMLButtonElement(t))&&(t.type==="hidden"||t.disabled))},isAutoFocusAllowed=function(t){var n=t.getAttribute(FOCUS_NO_AUTOFOCUS);return![!0,"true",""].includes(n)},isGuard=function(t){var n;return!!(t&&(!((n=getDataset(t))===null||n===void 0)&&n.focusGuard))},isNotAGuard=function(t){return!isGuard(t)},isDefined=function(t){return!!t},tabSort=function(t,n){var r=Math.max(0,t.tabIndex),s=Math.max(0,n.tabIndex),i=r-s,o=t.index-n.index;if(i){if(!r)return 1;if(!s)return-1}return i||o},getTabIndex=function(t){return t.tabIndex<0&&!t.hasAttribute("tabindex")?0:t.tabIndex},orderByTabIndex=function(t,n,r){return toArray(t).map(function(s,i){var o=getTabIndex(s);return{node:s,index:i,tabIndex:r&&o===-1?(s.dataset||{}).focusGuard?0:-1:o}}).filter(function(s){return!n||s.tabIndex>=0}).sort(tabSort)},tabbables=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],queryTabbables=tabbables.join(","),queryGuardTabbables="".concat(queryTabbables,", [data-focus-guard]"),_getFocusablesWithShadowDom=function(t,n){return toArray((t.shadowRoot||t).children).reduce(function(r,s){return r.concat(s.matches(n?queryGuardTabbables:queryTabbables)?[s]:[],_getFocusablesWithShadowDom(s))},[])},getFocusablesWithIFrame=function(t,n){var r;return t instanceof HTMLIFrameElement&&(!((r=t.contentDocument)===null||r===void 0)&&r.body)?getFocusables([t.contentDocument.body],n):[t]},getFocusables=function(t,n){return t.reduce(function(r,s){var i,o=_getFocusablesWithShadowDom(s,n),a=(i=[]).concat.apply(i,o.map(function(l){return getFocusablesWithIFrame(l,n)}));return r.concat(a,s.parentNode?toArray(s.parentNode.querySelectorAll(queryTabbables)).filter(function(l){return l===s}):[])},[])},getParentAutofocusables=function(t){var n=t.querySelectorAll("[".concat(FOCUS_AUTO,"]"));return toArray(n).map(function(r){return getFocusables([r])}).reduce(function(r,s){return r.concat(s)},[])},filterFocusable=function(t,n){return toArray(t).filter(function(r){return _isVisibleCached(n,r)}).filter(function(r){return notHiddenInput(r)})},filterAutoFocusable=function(t,n){return n===void 0&&(n=new Map),toArray(t).filter(function(r){return _isAutoFocusAllowedCached(n,r)})},getFocusableNodes=function(t,n){return orderByTabIndex(filterFocusable(getFocusables(t),n),!1)},parentAutofocusables=function(t,n){return filterFocusable(getParentAutofocusables(t),n)},_contains=function(t,n){return t.shadowRoot?_contains(t.shadowRoot,n):Object.getPrototypeOf(t).contains!==void 0&&Object.getPrototypeOf(t).contains.call(t,n)?!0:toArray(t.children).some(function(r){var s;if(r instanceof HTMLIFrameElement){var i=(s=r.contentDocument)===null||s===void 0?void 0:s.body;return i?_contains(i,n):!1}return _contains(r,n)})},filterNested=function(t){for(var n=new Set,r=t.length,s=0;s<r;s+=1)for(var i=s+1;i<r;i+=1){var o=t[s].compareDocumentPosition(t[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&n.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&n.add(s)}return t.filter(function(a,l){return!n.has(l)})},_getTopParent=function(t){return t.parentNode?_getTopParent(t.parentNode):t},getAllAffectedNodes=function(t){var n=asArray(t);return n.filter(Boolean).reduce(function(r,s){var i=s.getAttribute(FOCUS_GROUP);return r.push.apply(r,i?filterNested(toArray(_getTopParent(s).querySelectorAll("[".concat(FOCUS_GROUP,'="').concat(i,'"]:not([').concat(FOCUS_DISABLED,'="disabled"])')))):[s]),r},[])},safeProbe=function(t){try{return t()}catch{return}},_getActiveElement=function(t){if(t===void 0&&(t=document),!(!t||!t.activeElement)){var n=t.activeElement;return n.shadowRoot?_getActiveElement(n.shadowRoot):n instanceof HTMLIFrameElement&&safeProbe(function(){return n.contentWindow.document})?_getActiveElement(n.contentWindow.document):n}},focusInFrame=function(t,n){return t===n},focusInsideIframe=function(t,n){return!!toArray(t.querySelectorAll("iframe")).some(function(r){return focusInFrame(r,n)})},focusInside=function(t,n){return n===void 0&&(n=_getActiveElement(getFirst(t).ownerDocument)),!n||n.dataset&&n.dataset.focusGuard?!1:getAllAffectedNodes(t).some(function(r){return _contains(r,n)||focusInsideIframe(r,n)})},focusIsHidden=function(t){t===void 0&&(t=document);var n=_getActiveElement(t);return n?toArray(t.querySelectorAll("[".concat(FOCUS_ALLOW,"]"))).some(function(r){return _contains(r,n)}):!1},findSelectedRadio=function(t,n){return n.filter(isRadioElement).filter(function(r){return r.name===t.name}).filter(function(r){return r.checked})[0]||t},correctNode=function(t,n){return isRadioElement(t)&&t.name?findSelectedRadio(t,n):t},correctNodes=function(t){var n=new Set;return t.forEach(function(r){return n.add(correctNode(r,t))}),t.filter(function(r){return n.has(r)})},pickFirstFocus=function(t){return t[0]&&t.length>1?correctNode(t[0],t):t[0]},pickFocusable=function(t,n){return t.indexOf(correctNode(n,t))},NEW_FOCUS="NEW_FOCUS",newFocus=function(t,n,r,s,i){var o=t.length,a=t[0],l=t[o-1],c=isGuard(s);if(!(s&&t.indexOf(s)>=0)){var u=s!==void 0?r.indexOf(s):-1,f=i?r.indexOf(i):u,v=i?t.indexOf(i):-1;if(u===-1)return v!==-1?v:NEW_FOCUS;if(v===-1)return NEW_FOCUS;var w=u-f,D=r.indexOf(a),T=r.indexOf(l),P=correctNodes(r),B=s!==void 0?P.indexOf(s):-1,U=B-(i?P.indexOf(i):u);if(!w&&v>=0||n.length===0)return v;var j=pickFocusable(t,n[0]),N=pickFocusable(t,n[n.length-1]);if(u<=D&&c&&Math.abs(w)>1)return N;if(u>=T&&c&&Math.abs(w)>1)return j;if(w&&Math.abs(U)>1)return v;if(u<=D)return N;if(u>T)return j;if(w)return Math.abs(w)>1?v:(o+v+w)%o}},findAutoFocused=function(t){return function(n){var r,s=(r=getDataset(n))===null||r===void 0?void 0:r.autofocus;return n.autofocus||s!==void 0&&s!=="false"||t.indexOf(n)>=0}},pickAutofocus=function(t,n,r){var s=t.map(function(o){var a=o.node;return a}),i=filterAutoFocusable(s.filter(findAutoFocused(r)));return i&&i.length?pickFirstFocus(i):pickFirstFocus(filterAutoFocusable(n))},_getParents=function(t,n){return n===void 0&&(n=[]),n.push(t),t.parentNode&&_getParents(t.parentNode.host||t.parentNode,n),n},getCommonParent=function(t,n){for(var r=_getParents(t),s=_getParents(n),i=0;i<r.length;i+=1){var o=r[i];if(s.indexOf(o)>=0)return o}return!1},getTopCommonParent=function(t,n,r){var s=asArray(t),i=asArray(n),o=s[0],a=!1;return i.filter(Boolean).forEach(function(l){a=getCommonParent(a||l,l)||a,r.filter(Boolean).forEach(function(c){var u=getCommonParent(o,c);u&&(!a||_contains(u,a)?a=u:a=getCommonParent(u,a))})}),a},allParentAutofocusables=function(t,n){return t.reduce(function(r,s){return r.concat(parentAutofocusables(s,n))},[])},reorderNodes=function(t,n){var r=new Map;return n.forEach(function(s){return r.set(s.node,s)}),t.map(function(s){return r.get(s)}).filter(isDefined)},focusSolver=function(t,n){var r=_getActiveElement(asArray(t).length>0?document:getFirst(t).ownerDocument),s=getAllAffectedNodes(t).filter(isNotAGuard),i=getTopCommonParent(r||t,t,s),o=new Map,a=getFocusableNodes(s,o),l=a.filter(function(T){var P=T.node;return isNotAGuard(P)});if(l[0]){var c=getFocusableNodes([i],o).map(function(T){var P=T.node;return P}),u=reorderNodes(c,l),f=u.map(function(T){var P=T.node;return P}),v=u.filter(function(T){var P=T.tabIndex;return P>=0}).map(function(T){var P=T.node;return P}),w=newFocus(f,v,c,r,n);if(w===NEW_FOCUS){var D=pickAutofocus(a,v,allParentAutofocusables(s,o))||pickAutofocus(a,f,allParentAutofocusables(s,o));if(D)return{node:D};console.warn("focus-lock: cannot find any node to move focus into");return}return w===void 0?w:u[w]}},focusOn=function(t,n){t&&("focus"in t&&t.focus(n),"contentWindow"in t&&t.contentWindow&&t.contentWindow.focus())},guardCount=0,lockDisabled=!1,moveFocusInside=function(t,n,r){r===void 0&&(r={});var s=focusSolver(t,n);if(!lockDisabled&&s){if(guardCount>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),lockDisabled=!0,setTimeout(function(){lockDisabled=!1},1);return}guardCount++,focusOn(s.node,r.focusOptions),guardCount--}},constants=allConstants,deprecated_default_moveFocusInside=moveFocusInside;function deferAction(e){const t=window.setImmediate;typeof t<"u"?t(e):setTimeout(e,1)}let lastActiveTrap=0,lastActiveFocus=null,focusWasOutsideWindow=!1;const focusOnBody=()=>document&&document.activeElement===document.body,isFreeFocus=()=>focusOnBody()||focusIsHidden(),activateTrap=()=>{let e=!1;if(lastActiveTrap){const{observed:t,onActivation:n}=lastActiveTrap;(focusWasOutsideWindow||!isFreeFocus()||!lastActiveFocus)&&(t&&!focusInside(t)&&(n(),e=deprecated_default_moveFocusInside(t,lastActiveFocus)),focusWasOutsideWindow=!1,lastActiveFocus=document&&document.activeElement)}return e},reducePropsToState=e=>e.filter(({disabled:t})=>!t).slice(-1)[0],handleStateChangeOnClient=e=>{lastActiveTrap!==e&&(lastActiveTrap=null),lastActiveTrap=e,e&&(activateTrap(),deferAction(activateTrap))};let instances=[];const emitChange=()=>{handleStateChangeOnClient(reducePropsToState(instances))},onTrap=e=>{activateTrap()&&e&&(e.stopPropagation(),e.preventDefault())},onBlur=()=>{deferAction(activateTrap)},onWindowBlur=()=>{focusWasOutsideWindow=!0},attachHandler=()=>{document.addEventListener("focusin",onTrap,!0),document.addEventListener("focusout",onBlur),window.addEventListener("blur",onWindowBlur)},detachHandler=()=>{document.removeEventListener("focusin",onTrap,!0),document.removeEventListener("focusout",onBlur),window.removeEventListener("blur",onWindowBlur)};var script$7={name:"Lock",props:{returnFocus:{type:Boolean},disabled:{type:Boolean},noFocusGuards:{type:[Boolean,String],default:!1},group:{type:String}},setup(e){const{returnFocus:t,disabled:n,noFocusGuards:r,group:s}=toRefs(e),i=ref(null),o=ref({}),a=ref(""),l=computed(()=>({[constants.FOCUS_GROUP]:s.value})),c=computed(()=>r.value!==!0),u=computed(()=>c.value&&r.value!=="tail");watch(n,()=>{o.value.disabled=n.value,emitChange()});let f;return onMounted(()=>{const v=getCurrentInstance();v&&(o.value.instance=v.proxy,o.value.observed=i.value.querySelector("[data-lock]"),o.value.disabled=n.value,o.value.onActivation=()=>{f=f||document&&document.activeElement},instances.length||attachHandler(),instances.push(o.value),emitChange())}),onUnmounted(()=>{const v=getCurrentInstance();v&&(instances=instances.filter(({instance:w})=>w!==v.proxy),instances.length||detachHandler(),t.value&&f&&f.focus&&f.focus(),emitChange())}),{groupAttr:l,hasLeadingGuards:c,hasTailingGuards:u,hidden:a,onBlur:()=>deferAction(emitChange),rootEl:i}}};const _hoisted_1$7={ref:"rootEl"},_hoisted_2$7=["tabIndex"],_hoisted_3$7=["tabIndex"];function render$7(e,t,n,r,s,i){return openBlock(),createElementBlock("div",_hoisted_1$7,[r.hasLeadingGuards?(openBlock(),createElementBlock("div",{key:0,tabIndex:n.disabled?-1:0,style:normalizeStyle(r.hidden),"aria-hidden":"true"},null,12,_hoisted_2$7)):createCommentVNode("v-if",!0),createBaseVNode("div",mergeProps({onFocusout:t[0]||(t[0]=(...o)=>r.onBlur&&r.onBlur(...o))},r.groupAttr,{"data-lock":""}),[renderSlot(e.$slots,"default")],16),r.hasTailingGuards?(openBlock(),createElementBlock("div",{key:1,tabIndex:n.disabled?-1:0,style:normalizeStyle(r.hidden),"aria-hidden":"true"},null,12,_hoisted_3$7)):createCommentVNode("v-if",!0)],512)}script$7.render=render$7,script$7.__file="node_modules/vue-focus-lock/src/Lock.vue";var script$6={name:"MediaModal",components:{Lock:script$7},props:{showClose:{type:Boolean,default:!0},size:{type:String,default:""},labelElement:{type:String,required:!0}},emits:["close"],computed:{modalClass(){return{"modal-sm":this.size==="sm"}}},mounted(){document.addEventListener("keydown",this.onKeyDown)},beforeUnmount(){document.removeEventListener("keydown",this.onKeyDown)},methods:{close(){this.$emit("close")},onKeyDown(e){e.keyCode===27&&this.close()}}};const _hoisted_1$6=["aria-labelledby"],_hoisted_2$6={class:"modal-content"},_hoisted_3$6={class:"modal-header"},_hoisted_4$4={class:"modal-body"},_hoisted_5$4={class:"modal-footer"};function render$6(e,t,n,r,s,i){const o=resolveComponent("Lock");return openBlock(),createElementBlock("div",{class:"media-modal-backdrop",onClick:t[2]||(t[2]=a=>i.close())},[createBaseVNode("div",{class:"modal",style:{display:"flex"},onClick:t[1]||(t[1]=withModifiers(()=>{},["stop"]))},[createVNode(o,null,{default:withCtx(()=>[createBaseVNode("div",{class:normalizeClass(["modal-dialog",i.modalClass]),role:"dialog","aria-labelledby":n.labelElement},[createBaseVNode("div",_hoisted_2$6,[createBaseVNode("div",_hoisted_3$6,[renderSlot(e.$slots,"header"),renderSlot(e.$slots,"backdrop-close"),n.showClose?(openBlock(),createElementBlock("button",{key:0,type:"button",class:"btn-close","aria-label":"Close",onClick:t[0]||(t[0]=a=>i.close())})):createCommentVNode("v-if",!0)]),createBaseVNode("div",_hoisted_4$4,[renderSlot(e.$slots,"body")]),createBaseVNode("div",_hoisted_5$4,[renderSlot(e.$slots,"footer")])])],10,_hoisted_1$6)]),_:3})])])}script$6.render=render$6,script$6.__file="administrator/components/com_media/resources/scripts/components/modals/modal.vue";var script$5={name:"MediaCreateFolderModal",components:{MediaModal:script$6},data(){return{folder:""}},watch:{"$store.state.showCreateFolderModal":function(e){this.$nextTick(()=>{e&&this.$refs.input&&this.$refs.input.focus()})}},methods:{isValid(){return this.folder},close(){this.reset(),this.$store.commit(HIDE_CREATE_FOLDER_MODAL)},save(){this.isValid()&&(this.$store.dispatch("createDirectory",{name:this.folder,parent:this.$store.state.selectedDirectory}),this.reset())},reset(){this.folder=""}}};const _hoisted_1$5={id:"createFolderTitle",class:"modal-title"},_hoisted_2$5={class:"p-3"},_hoisted_3$5={class:"form-group"},_hoisted_4$3={for:"folder"},_hoisted_5$3=["disabled"];function render$5(e,t,n,r,s,i){const o=resolveComponent("MediaModal");return e.$store.state.showCreateFolderModal?(openBlock(),createBlock(o,{key:0,size:"md","label-element":"createFolderTitle",onClose:t[5]||(t[5]=a=>i.close())},{header:withCtx(()=>[createBaseVNode("h3",_hoisted_1$5,toDisplayString(e.translate("COM_MEDIA_CREATE_NEW_FOLDER")),1)]),body:withCtx(()=>[createBaseVNode("div",_hoisted_2$5,[createBaseVNode("form",{class:"form",novalidate:"",onSubmit:t[2]||(t[2]=withModifiers((...a)=>i.save&&i.save(...a),["prevent"]))},[createBaseVNode("div",_hoisted_3$5,[createBaseVNode("label",_hoisted_4$3,toDisplayString(e.translate("COM_MEDIA_FOLDER_NAME")),1),withDirectives(createBaseVNode("input",{id:"folder",ref:"input","onUpdate:modelValue":t[0]||(t[0]=a=>s.folder=a),class:"form-control",type:"text",required:"",autocomplete:"off",onInput:t[1]||(t[1]=a=>s.folder=a.target.value)},null,544),[[vModelText,s.folder,void 0,{trim:!0}]])])],32)])]),footer:withCtx(()=>[createBaseVNode("div",null,[createBaseVNode("button",{class:"btn btn-secondary",onClick:t[3]||(t[3]=a=>i.close())},toDisplayString(e.translate("JCANCEL")),1),createBaseVNode("button",{class:"btn btn-success",disabled:!i.isValid(),onClick:t[4]||(t[4]=a=>i.save())},toDisplayString(e.translate("JACTION_CREATE")),9,_hoisted_5$3)])]),_:1})):createCommentVNode("v-if",!0)}script$5.render=render$5,script$5.__file="administrator/components/com_media/resources/scripts/components/modals/create-folder-modal.vue";var script$4={name:"MediaPreviewModal",components:{MediaModal:script$6},computed:{item(){return this.$store.state.selectedItem?this.$store.state.selectedItem:this.$store.state.previewItem},getHashedURL(){return this.item.adapter.startsWith("local-")?`${this.item.url}?${api.mediaVersion}`:this.item.url},style(){return this.item.mime_type!=="image/svg+xml"?null:"width: clamp(300px, 1000px, 75vw)"}},methods:{close(){this.$store.commit(HIDE_PREVIEW_MODAL)},isImage(){return this.item.mime_type.indexOf("image/")===0},isVideo(){return this.item.mime_type.indexOf("video/")===0},isAudio(){return this.item.mime_type.indexOf("audio/")===0},isDoc(){return this.item.mime_type.indexOf("application/")===0}}};const _hoisted_1$4={id:"previewTitle",class:"modal-title text-light"},_hoisted_2$4={class:"image-background"},_hoisted_3$4=["src"],_hoisted_4$2={key:1,controls:""},_hoisted_5$2=["src","type"],_hoisted_6$2=["type","data"],_hoisted_7$1=["src","type"];function render$4(e,t,n,r,s,i){const o=resolveComponent("MediaModal");return e.$store.state.showPreviewModal&&i.item?(openBlock(),createBlock(o,{key:0,size:"md",class:"media-preview-modal","label-element":"previewTitle","show-close":!1,onClose:t[1]||(t[1]=a=>i.close())},{header:withCtx(()=>[createBaseVNode("h3",_hoisted_1$4,toDisplayString(i.item.name),1)]),body:withCtx(()=>[createBaseVNode("div",_hoisted_2$4,[i.isAudio()?(openBlock(),createElementBlock("audio",{key:0,controls:"",src:i.item.url},null,8,_hoisted_3$4)):createCommentVNode("v-if",!0),i.isVideo()?(openBlock(),createElementBlock("video",_hoisted_4$2,[createBaseVNode("source",{src:i.item.url,type:i.item.mime_type},null,8,_hoisted_5$2)])):createCommentVNode("v-if",!0),i.isDoc()?(openBlock(),createElementBlock("object",{key:2,type:i.item.mime_type,data:i.item.url,width:"800",height:"600"},null,8,_hoisted_6$2)):createCommentVNode("v-if",!0),i.isImage()?(openBlock(),createElementBlock("img",{key:3,src:i.getHashedURL,type:i.item.mime_type,style:normalizeStyle(i.style)},null,12,_hoisted_7$1)):createCommentVNode("v-if",!0)])]),"backdrop-close":withCtx(()=>[createBaseVNode("button",{type:"button",class:"media-preview-close",onClick:t[0]||(t[0]=a=>i.close())},t[2]||(t[2]=[createBaseVNode("span",{class:"icon-times"},null,-1)]))]),_:1})):createCommentVNode("v-if",!0)}script$4.render=render$4,script$4.__file="administrator/components/com_media/resources/scripts/components/modals/preview-modal.vue";var script$3={name:"MediaRenameModal",components:{MediaModal:script$6},computed:{item(){return this.$store.state.selectedItems[this.$store.state.selectedItems.length-1]},name(){return this.item.name.replace(`.${this.item.extension}`,"")},extension(){return this.item.extension}},updated(){this.$nextTick(()=>this.$refs.nameField?this.$refs.nameField.focus():null)},methods:{isValid(){return this.item.name.length>0},close(){this.$store.commit(HIDE_RENAME_MODAL)},save(){if(!this.isValid())return;let e=this.$refs.nameField.value;this.extension.length&&(e+=`.${this.item.extension}`);let t=this.item.directory;t.substr(-1)!=="/"&&(t+="/"),this.$store.dispatch("renameItem",{item:this.item,newPath:t+e,newName:e})}}};const _hoisted_1$3={id:"renameTitle",class:"modal-title"},_hoisted_2$3={class:"form-group p-3"},_hoisted_3$3={for:"name"},_hoisted_4$1=["placeholder","value"],_hoisted_5$1={key:0,class:"input-group-text"},_hoisted_6$1=["disabled"];function render$3(e,t,n,r,s,i){const o=resolveComponent("MediaModal");return e.$store.state.showRenameModal?(openBlock(),createBlock(o,{key:0,size:"sm","show-close":!1,"label-element":"renameTitle",onClose:t[5]||(t[5]=a=>i.close())},{header:withCtx(()=>[createBaseVNode("h3",_hoisted_1$3,toDisplayString(e.translate("COM_MEDIA_RENAME")),1)]),body:withCtx(()=>[createBaseVNode("div",null,[createBaseVNode("form",{class:"form",novalidate:"",onSubmit:t[0]||(t[0]=withModifiers((...a)=>i.save&&i.save(...a),["prevent"]))},[createBaseVNode("div",_hoisted_2$3,[createBaseVNode("label",_hoisted_3$3,toDisplayString(e.translate("COM_MEDIA_NAME")),1),createBaseVNode("div",{class:normalizeClass({"input-group":i.extension.length})},[createBaseVNode("input",{id:"name",ref:"nameField",class:"form-control",type:"text",placeholder:e.translate("COM_MEDIA_NAME"),value:i.name,required:"",autocomplete:"off"},null,8,_hoisted_4$1),i.extension.length?(openBlock(),createElementBlock("span",_hoisted_5$1,toDisplayString(i.extension),1)):createCommentVNode("v-if",!0)],2)])],32)])]),footer:withCtx(()=>[createBaseVNode("div",null,[createBaseVNode("button",{type:"button",class:"btn btn-secondary",onClick:t[1]||(t[1]=a=>i.close()),onKeyup:t[2]||(t[2]=withKeys(a=>i.close(),["enter"]))},toDisplayString(e.translate("JCANCEL")),33),createBaseVNode("button",{type:"button",class:"btn btn-success",disabled:!i.isValid(),onClick:t[3]||(t[3]=a=>i.save()),onKeyup:t[4]||(t[4]=withKeys(a=>i.save(),["enter"]))},toDisplayString(e.translate("JAPPLY")),41,_hoisted_6$1)])]),_:1})):createCommentVNode("v-if",!0)}script$3.render=render$3,script$3.__file="administrator/components/com_media/resources/scripts/components/modals/rename-modal.vue";const Translate={translate:e=>Joomla.Text._(e,e),sprintf:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];const i=Translate.translate(t);let o=0;return i.replace(/%((%)|s|d)/g,a=>{let l=r[o];return a==="%d"&&(l=parseFloat(l),Number.isNaN(l)&&(l=0)),o+=1,l})},install:e=>e.mixin({methods:{translate(t){return Translate.translate(t)},sprintf(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return Translate.sprintf(t,r)}}})};var script$2={name:"MediaShareModal",components:{MediaModal:script$6},computed:{item(){return this.$store.state.selectedItems[this.$store.state.selectedItems.length-1]},url(){return this.$store.state.previewItem&&Object.prototype.hasOwnProperty.call(this.$store.state.previewItem,"url")?this.$store.state.previewItem.url:null}},methods:{close(){this.$store.commit(HIDE_SHARE_MODAL),this.$store.commit(LOAD_FULL_CONTENTS_SUCCESS,null)},generateUrl(){this.$store.dispatch("getFullContents",this.item)},copyToClipboard(){this.$refs.urlText.focus(),this.$refs.urlText.select();try{document.execCommand("copy")}catch{window.alert(Translate("COM_MEDIA_SHARE_COPY_FAILED_ERROR"))}}}};const _hoisted_1$2={id:"shareTitle",class:"modal-title"},_hoisted_2$2={class:"p-3"},_hoisted_3$2={class:"desc"},_hoisted_4={key:0,class:"control"},_hoisted_5={key:1,class:"control"},_hoisted_6={class:"input-group"},_hoisted_7=["title"];function render$2(e,t,n,r,s,i){const o=resolveComponent("MediaModal");return e.$store.state.showShareModal?(openBlock(),createBlock(o,{key:0,size:"md","show-close":!1,"label-element":"shareTitle",onClose:t[4]||(t[4]=a=>i.close())},{header:withCtx(()=>[createBaseVNode("h3",_hoisted_1$2,toDisplayString(e.translate("COM_MEDIA_SHARE")),1)]),body:withCtx(()=>[createBaseVNode("div",_hoisted_2$2,[createBaseVNode("div",_hoisted_3$2,[createTextVNode(toDisplayString(e.translate("COM_MEDIA_SHARE_DESC"))+" ",1),i.url?(openBlock(),createElementBlock("div",_hoisted_5,[createBaseVNode("span",_hoisted_6,[withDirectives(createBaseVNode("input",{id:"url",ref:"urlText","onUpdate:modelValue":t[1]||(t[1]=a=>i.url=a),readonly:"",type:"url",class:"form-control input-xxlarge",placeholder:"URL",autocomplete:"off"},null,512),[[vModelText,i.url]]),createBaseVNode("button",{class:"btn btn-secondary",type:"button",title:e.translate("COM_MEDIA_SHARE_COPY"),onClick:t[2]||(t[2]=(...a)=>i.copyToClipboard&&i.copyToClipboard(...a))},t[5]||(t[5]=[createBaseVNode("span",{class:"icon-clipboard","aria-hidden":"true"},null,-1)]),8,_hoisted_7)])])):(openBlock(),createElementBlock("div",_hoisted_4,[createBaseVNode("button",{class:"btn btn-success w-100",type:"button",onClick:t[0]||(t[0]=(...a)=>i.generateUrl&&i.generateUrl(...a))},toDisplayString(e.translate("COM_MEDIA_ACTION_SHARE")),1)]))])])]),footer:withCtx(()=>[createBaseVNode("div",null,[createBaseVNode("button",{class:"btn btn-secondary",onClick:t[3]||(t[3]=a=>i.close())},toDisplayString(e.translate("JCANCEL")),1)])]),_:1})):createCommentVNode("v-if",!0)}script$2.render=render$2,script$2.__file="administrator/components/com_media/resources/scripts/components/modals/share-modal.vue";var script$1={name:"MediaShareModal",components:{MediaModal:script$6},computed:{item(){return this.$store.state.selectedItems[this.$store.state.selectedItems.length-1]}},methods:{deleteItem(){this.$store.dispatch("deleteSelectedItems"),this.$store.commit(HIDE_CONFIRM_DELETE_MODAL)},close(){this.$store.commit(HIDE_CONFIRM_DELETE_MODAL)}}};const _hoisted_1$1={id:"confirmDeleteTitle",class:"modal-title"},_hoisted_2$1={class:"p-3"},_hoisted_3$1={class:"desc"};function render$1(e,t,n,r,s,i){const o=resolveComponent("MediaModal");return e.$store.state.showConfirmDeleteModal?(openBlock(),createBlock(o,{key:0,size:"md","show-close":!1,"label-element":"confirmDeleteTitle",onClose:t[2]||(t[2]=a=>i.close())},{header:withCtx(()=>[createBaseVNode("h3",_hoisted_1$1,toDisplayString(e.translate("COM_MEDIA_CONFIRM_DELETE_MODAL_HEADING")),1)]),body:withCtx(()=>[createBaseVNode("div",_hoisted_2$1,[createBaseVNode("div",_hoisted_3$1,toDisplayString(e.translate("JGLOBAL_CONFIRM_DELETE")),1)])]),footer:withCtx(()=>[createBaseVNode("div",null,[createBaseVNode("button",{class:"btn btn-success",onClick:t[0]||(t[0]=a=>i.close())},toDisplayString(e.translate("JCANCEL")),1),createBaseVNode("button",{id:"media-delete-item",class:"btn btn-danger",onClick:t[1]||(t[1]=a=>i.deleteItem())},toDisplayString(e.translate("COM_MEDIA_CONFIRM_DELETE_MODAL")),1)])]),_:1})):createCommentVNode("v-if",!0)}script$1.render=render$1,script$1.__file="administrator/components/com_media/resources/scripts/components/modals/confirm-delete-modal.vue";var script={name:"MediaApp",components:{MediaBrowser:script$e,MediaDisk:script$b,MediaToolbar:script$9,MediaUpload:script$8,MediaCreateFolderModal:script$5,MediaPreviewModal:script$4,MediaRenameModal:script$3,MediaShareModal:script$2,MediaConfirmDeleteModal:script$1},data(){return{fullHeight:""}},computed:{disks(){return this.$store.state.disks}},created(){MediaManager.Event.listen("onClickCreateFolder",()=>this.$store.commit(SHOW_CREATE_FOLDER_MODAL)),MediaManager.Event.listen("onClickDelete",()=>{this.$store.state.selectedItems.length>0?this.$store.commit(SHOW_CONFIRM_DELETE_MODAL):notifications.error("COM_MEDIA_PLEASE_SELECT_ITEM")})},mounted(){this.$nextTick(()=>{this.setFullHeight(),window.addEventListener("resize",this.setFullHeight)}),this.$store.dispatch("getContents",this.$store.state.selectedDirectory,!1,!1)},beforeUnmount(){window.removeEventListener("resize",this.setFullHeight)},methods:{setFullHeight(){this.fullHeight=`${window.innerHeight-this.$el.getBoundingClientRect().top}px`}}};const _hoisted_1={class:"media-container"},_hoisted_2={class:"media-sidebar"},_hoisted_3={class:"media-main"};function render(e,t,n,r,s,i){const o=resolveComponent("MediaDisk"),a=resolveComponent("MediaToolbar"),l=resolveComponent("MediaBrowser"),c=resolveComponent("MediaUpload"),u=resolveComponent("MediaCreateFolderModal"),f=resolveComponent("MediaPreviewModal"),v=resolveComponent("MediaRenameModal"),w=resolveComponent("MediaShareModal"),D=resolveComponent("MediaConfirmDeleteModal");return openBlock(),createElementBlock("div",_hoisted_1,[createBaseVNode("div",_hoisted_2,[(openBlock(!0),createElementBlock(Fragment,null,renderList(i.disks,(T,P)=>(openBlock(),createBlock(o,{key:P.toString(),uid:P.toString(),disk:T},null,8,["uid","disk"]))),128))]),createBaseVNode("div",_hoisted_3,[createVNode(a),createVNode(l)]),createVNode(c),createVNode(u),createVNode(f),createVNode(v),createVNode(w),createVNode(D)])}script.render=render,script.__file="administrator/components/com_media/resources/scripts/components/app.vue";class Event$1{constructor(){this.events={}}fire(t,n){n===void 0&&(n=null),this.events[t]&&this.events[t].forEach(r=>r(n))}listen(t,n){this.events[t]=this.events[t]||[],this.events[t].push(n)}}function getDevtoolsGlobalHook(){return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__}function getTarget(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const isProxyAvailable=typeof Proxy=="function",HOOK_SETUP="devtools-plugin:setup",HOOK_PLUGIN_SETTINGS_SET="plugin:settings:set";let supported,perf;function isPerformanceSupported(){var e;return supported!==void 0||(typeof window<"u"&&window.performance?(supported=!0,perf=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(supported=!0,perf=globalThis.perf_hooks.performance):supported=!1),supported}function now(){return isPerformanceSupported()?perf.now():Date.now()}class ApiProxy{constructor(t,n){var r=this;this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const s={};if(t.settings)for(const a in t.settings){const l=t.settings[a];s[a]=l.defaultValue}const i="__vue-devtools-plugin-settings__"+t.id;let o=Object.assign({},s);try{const a=localStorage.getItem(i),l=JSON.parse(a);Object.assign(o,l)}catch{}this.fallbacks={getSettings(){return o},setSettings(a){try{localStorage.setItem(i,JSON.stringify(a))}catch{}o=a},now(){return now()}},n&&n.on(HOOK_PLUGIN_SETTINGS_SET,(a,l)=>{a===this.plugin.id&&this.fallbacks.setSettings(l)}),this.proxiedOn=new Proxy({},{get:(a,l)=>this.target?this.target.on[l]:function(){for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];r.onQueue.push({method:l,args:u})}}),this.proxiedTarget=new Proxy({},{get:(a,l)=>this.target?this.target[l]:l==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(l)?function(){for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];return r.targetQueue.push({method:l,args:u,resolve:()=>{}}),r.fallbacks[l](...u)}:function(){for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];return new Promise(v=>{r.targetQueue.push({method:l,args:u,resolve:v})})}})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function setupDevtoolsPlugin(e,t){const n=e,r=getTarget(),s=getDevtoolsGlobalHook(),i=isProxyAvailable&&n.enableEarlyProxy;if(s&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!i))s.emit(HOOK_SETUP,e,t);else{const o=i?new ApiProxy(n,s):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:o}),o&&t(o.proxiedTarget)}}/*!
|
|
* vuex v4.1.0
|
|
* (c) 2022 Evan You
|
|
* @license MIT
|
|
*/var storeKey="store";function forEachValue(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function isObject(e){return e!==null&&typeof e=="object"}function isPromise(e){return e&&typeof e.then=="function"}function partial(e,t){return function(){return e(t)}}function genericSubscribe(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function resetStore(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;installModule(e,n,[],e._modules.root,!0),resetStoreState(e,n,t)}function resetStoreState(e,t,n){var r=e._state,s=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var i=e._wrappedGetters,o={},a={},l=effectScope(!0);l.run(function(){forEachValue(i,function(c,u){o[u]=partial(c,e),a[u]=computed(function(){return o[u]()}),Object.defineProperty(e.getters,u,{get:function(){return a[u].value},enumerable:!0})})}),e._state=reactive({data:t}),e._scope=l,e.strict&&enableStrictMode(e),r&&n&&e._withCommit(function(){r.data=null}),s&&s.stop()}function installModule(e,t,n,r,s){var i=!n.length,o=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[o],e._modulesNamespaceMap[o]=r),!i&&!s){var a=getNestedState(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit(function(){a[l]=r.state})}var c=r.context=makeLocalContext(e,o,n);r.forEachMutation(function(u,f){var v=o+f;registerMutation(e,v,u,c)}),r.forEachAction(function(u,f){var v=u.root?f:o+f,w=u.handler||u;registerAction(e,v,w,c)}),r.forEachGetter(function(u,f){var v=o+f;registerGetter(e,v,u,c)}),r.forEachChild(function(u,f){installModule(e,t,n.concat(f),u,s)})}function makeLocalContext(e,t,n){var r=t==="",s={dispatch:r?e.dispatch:function(i,o,a){var l=unifyObjectStyle(i,o,a),c=l.payload,u=l.options,f=l.type;return(!u||!u.root)&&(f=t+f),e.dispatch(f,c)},commit:r?e.commit:function(i,o,a){var l=unifyObjectStyle(i,o,a),c=l.payload,u=l.options,f=l.type;(!u||!u.root)&&(f=t+f),e.commit(f,c,u)}};return Object.defineProperties(s,{getters:{get:r?function(){return e.getters}:function(){return makeLocalGetters(e,t)}},state:{get:function(){return getNestedState(e.state,n)}}}),s}function makeLocalGetters(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach(function(s){if(s.slice(0,r)===t){var i=s.slice(r);Object.defineProperty(n,i,{get:function(){return e.getters[s]},enumerable:!0})}}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function registerMutation(e,t,n,r){var s=e._mutations[t]||(e._mutations[t]=[]);s.push(function(o){n.call(e,r.state,o)})}function registerAction(e,t,n,r){var s=e._actions[t]||(e._actions[t]=[]);s.push(function(o){var a=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},o);return isPromise(a)||(a=Promise.resolve(a)),e._devtoolHook?a.catch(function(l){throw e._devtoolHook.emit("vuex:error",l),l}):a})}function registerGetter(e,t,n,r){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(i){return n(r.state,r.getters,i.state,i.getters)})}function enableStrictMode(e){watch(function(){return e._state.data},function(){},{deep:!0,flush:"sync"})}function getNestedState(e,t){return t.reduce(function(n,r){return n[r]},e)}function unifyObjectStyle(e,t,n){return isObject(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var LABEL_VUEX_BINDINGS="vuex bindings",MUTATIONS_LAYER_ID="vuex:mutations",ACTIONS_LAYER_ID="vuex:actions",INSPECTOR_ID="vuex",actionId=0;function addDevtools(e,t){setupDevtoolsPlugin({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[LABEL_VUEX_BINDINGS]},function(n){n.addTimelineLayer({id:MUTATIONS_LAYER_ID,label:"Vuex Mutations",color:COLOR_LIME_500}),n.addTimelineLayer({id:ACTIONS_LAYER_ID,label:"Vuex Actions",color:COLOR_LIME_500}),n.addInspector({id:INSPECTOR_ID,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(r){if(r.app===e&&r.inspectorId===INSPECTOR_ID)if(r.filter){var s=[];flattenStoreForInspectorTree(s,t._modules.root,r.filter,""),r.rootNodes=s}else r.rootNodes=[formatStoreForInspectorTree(t._modules.root,"")]}),n.on.getInspectorState(function(r){if(r.app===e&&r.inspectorId===INSPECTOR_ID){var s=r.nodeId;makeLocalGetters(t,s),r.state=formatStoreForInspectorState(getStoreModule(t._modules,s),s==="root"?t.getters:t._makeLocalGettersCache,s)}}),n.on.editInspectorState(function(r){if(r.app===e&&r.inspectorId===INSPECTOR_ID){var s=r.nodeId,i=r.path;s!=="root"&&(i=s.split("/").filter(Boolean).concat(i)),t._withCommit(function(){r.set(t._state.data,i,r.state.value)})}}),t.subscribe(function(r,s){var i={};r.payload&&(i.payload=r.payload),i.state=s,n.notifyComponentUpdate(),n.sendInspectorTree(INSPECTOR_ID),n.sendInspectorState(INSPECTOR_ID),n.addTimelineEvent({layerId:MUTATIONS_LAYER_ID,event:{time:Date.now(),title:r.type,data:i}})}),t.subscribeAction({before:function(s,i){var o={};s.payload&&(o.payload=s.payload),s._id=actionId++,s._time=Date.now(),o.state=i,n.addTimelineEvent({layerId:ACTIONS_LAYER_ID,event:{time:s._time,title:s.type,groupId:s._id,subtitle:"start",data:o}})},after:function(s,i){var o={},a=Date.now()-s._time;o.duration={_custom:{type:"duration",display:a+"ms",tooltip:"Action duration",value:a}},s.payload&&(o.payload=s.payload),o.state=i,n.addTimelineEvent({layerId:ACTIONS_LAYER_ID,event:{time:Date.now(),title:s.type,groupId:s._id,subtitle:"end",data:o}})}})})}var COLOR_LIME_500=8702998,COLOR_DARK=6710886,COLOR_WHITE=16777215,TAG_NAMESPACED={label:"namespaced",textColor:COLOR_WHITE,backgroundColor:COLOR_DARK};function extractNameFromPath(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function formatStoreForInspectorTree(e,t){return{id:t||"root",label:extractNameFromPath(t),tags:e.namespaced?[TAG_NAMESPACED]:[],children:Object.keys(e._children).map(function(n){return formatStoreForInspectorTree(e._children[n],t+n+"/")})}}function flattenStoreForInspectorTree(e,t,n,r){r.includes(n)&&e.push({id:r||"root",label:r.endsWith("/")?r.slice(0,r.length-1):r||"Root",tags:t.namespaced?[TAG_NAMESPACED]:[]}),Object.keys(t._children).forEach(function(s){flattenStoreForInspectorTree(e,t._children[s],n,r+s+"/")})}function formatStoreForInspectorState(e,t,n){t=n==="root"?t:t[n];var r=Object.keys(t),s={state:Object.keys(e.state).map(function(o){return{key:o,editable:!0,value:e.state[o]}})};if(r.length){var i=transformPathsToObjectTree(t);s.getters=Object.keys(i).map(function(o){return{key:o.endsWith("/")?extractNameFromPath(o):o,editable:!1,value:canThrow(function(){return i[o]})}})}return s}function transformPathsToObjectTree(e){var t={};return Object.keys(e).forEach(function(n){var r=n.split("/");if(r.length>1){var s=t,i=r.pop();r.forEach(function(o){s[o]||(s[o]={_custom:{value:{},display:o,tooltip:"Module",abstract:!0}}),s=s[o]._custom.value}),s[i]=canThrow(function(){return e[n]})}else t[n]=canThrow(function(){return e[n]})}),t}function getStoreModule(e,t){var n=t.split("/").filter(function(r){return r});return n.reduce(function(r,s,i){var o=r[s];if(!o)throw new Error('Missing module "'+s+'" for path "'+t+'".');return i===n.length-1?o:o._children},t==="root"?e:e.root._children)}function canThrow(e){try{return e()}catch(t){return t}}var Module=function(t,n){this.runtime=n,this._children=Object.create(null),this._rawModule=t;var r=t.state;this.state=(typeof r=="function"?r():r)||{}},prototypeAccessors$1={namespaced:{configurable:!0}};prototypeAccessors$1.namespaced.get=function(){return!!this._rawModule.namespaced},Module.prototype.addChild=function(t,n){this._children[t]=n},Module.prototype.removeChild=function(t){delete this._children[t]},Module.prototype.getChild=function(t){return this._children[t]},Module.prototype.hasChild=function(t){return t in this._children},Module.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},Module.prototype.forEachChild=function(t){forEachValue(this._children,t)},Module.prototype.forEachGetter=function(t){this._rawModule.getters&&forEachValue(this._rawModule.getters,t)},Module.prototype.forEachAction=function(t){this._rawModule.actions&&forEachValue(this._rawModule.actions,t)},Module.prototype.forEachMutation=function(t){this._rawModule.mutations&&forEachValue(this._rawModule.mutations,t)},Object.defineProperties(Module.prototype,prototypeAccessors$1);var ModuleCollection=function(t){this.register([],t,!1)};ModuleCollection.prototype.get=function(t){return t.reduce(function(n,r){return n.getChild(r)},this.root)},ModuleCollection.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(r,s){return n=n.getChild(s),r+(n.namespaced?s+"/":"")},"")},ModuleCollection.prototype.update=function(t){update([],this.root,t)},ModuleCollection.prototype.register=function(t,n,r){var s=this;r===void 0&&(r=!0);var i=new Module(n,r);if(t.length===0)this.root=i;else{var o=this.get(t.slice(0,-1));o.addChild(t[t.length-1],i)}n.modules&&forEachValue(n.modules,function(a,l){s.register(t.concat(l),a,r)})},ModuleCollection.prototype.unregister=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1],s=n.getChild(r);s&&s.runtime&&n.removeChild(r)},ModuleCollection.prototype.isRegistered=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1];return n?n.hasChild(r):!1};function update(e,t,n){if(t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return;update(e.concat(r),t.getChild(r),n.modules[r])}}function createStore(e){return new Store(e)}var Store=function(t){var n=this;t===void 0&&(t={});var r=t.plugins;r===void 0&&(r=[]);var s=t.strict;s===void 0&&(s=!1);var i=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new ModuleCollection(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=i;var o=this,a=this,l=a.dispatch,c=a.commit;this.dispatch=function(v,w){return l.call(o,v,w)},this.commit=function(v,w,D){return c.call(o,v,w,D)},this.strict=s;var u=this._modules.root.state;installModule(this,u,[],this._modules.root),resetStoreState(this,u),r.forEach(function(f){return f(n)})},prototypeAccessors={state:{configurable:!0}};Store.prototype.install=function(t,n){t.provide(n||storeKey,this),t.config.globalProperties.$store=this;var r=this._devtools!==void 0?this._devtools:!1;r&&addDevtools(t,this)},prototypeAccessors.state.get=function(){return this._state.data},prototypeAccessors.state.set=function(e){},Store.prototype.commit=function(t,n,r){var s=this,i=unifyObjectStyle(t,n,r),o=i.type,a=i.payload,l={type:o,payload:a},c=this._mutations[o];c&&(this._withCommit(function(){c.forEach(function(f){f(a)})}),this._subscribers.slice().forEach(function(u){return u(l,s.state)}))},Store.prototype.dispatch=function(t,n){var r=this,s=unifyObjectStyle(t,n),i=s.type,o=s.payload,a={type:i,payload:o},l=this._actions[i];if(l){try{this._actionSubscribers.slice().filter(function(u){return u.before}).forEach(function(u){return u.before(a,r.state)})}catch{}var c=l.length>1?Promise.all(l.map(function(u){return u(o)})):l[0](o);return new Promise(function(u,f){c.then(function(v){try{r._actionSubscribers.filter(function(w){return w.after}).forEach(function(w){return w.after(a,r.state)})}catch{}u(v)},function(v){try{r._actionSubscribers.filter(function(w){return w.error}).forEach(function(w){return w.error(a,r.state,v)})}catch{}f(v)})})}},Store.prototype.subscribe=function(t,n){return genericSubscribe(t,this._subscribers,n)},Store.prototype.subscribeAction=function(t,n){var r=typeof t=="function"?{before:t}:t;return genericSubscribe(r,this._actionSubscribers,n)},Store.prototype.watch=function(t,n,r){var s=this;return watch(function(){return t(s.state,s.getters)},n,Object.assign({},r))},Store.prototype.replaceState=function(t){var n=this;this._withCommit(function(){n._state.data=t})},Store.prototype.registerModule=function(t,n,r){r===void 0&&(r={}),typeof t=="string"&&(t=[t]),this._modules.register(t,n),installModule(this,this.state,t,this._modules.get(t),r.preserveState),resetStoreState(this,this.state)},Store.prototype.unregisterModule=function(t){var n=this;typeof t=="string"&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var r=getNestedState(n.state,t.slice(0,-1));delete r[t[t.length-1]]}),resetStore(this)},Store.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),this._modules.isRegistered(t)},Store.prototype.hotUpdate=function(t){this._modules.update(t),resetStore(this,!0)},Store.prototype._withCommit=function(t){var n=this._committing;this._committing=!0,t(),this._committing=n},Object.defineProperties(Store.prototype,prototypeAccessors);var isMergeableObject=function(t){return isNonNullObject(t)&&!isSpecial(t)};function isNonNullObject(e){return!!e&&typeof e=="object"}function isSpecial(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||isReactElement(e)}var canUseSymbol=typeof Symbol=="function"&&Symbol.for,REACT_ELEMENT_TYPE=canUseSymbol?Symbol.for("react.element"):60103;function isReactElement(e){return e.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(e){return Array.isArray(e)?[]:{}}function cloneUnlessOtherwiseSpecified(e,t){return t.clone!==!1&&t.isMergeableObject(e)?deepmerge(emptyTarget(e),e,t):e}function defaultArrayMerge(e,t,n){return e.concat(t).map(function(r){return cloneUnlessOtherwiseSpecified(r,n)})}function getMergeFunction(e,t){if(!t.customMerge)return deepmerge;var n=t.customMerge(e);return typeof n=="function"?n:deepmerge}function getEnumerableOwnPropertySymbols(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function getKeys(e){return Object.keys(e).concat(getEnumerableOwnPropertySymbols(e))}function propertyIsOnObject(e,t){try{return t in e}catch{return!1}}function propertyIsUnsafe(e,t){return propertyIsOnObject(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function mergeObject(e,t,n){var r={};return n.isMergeableObject(e)&&getKeys(e).forEach(function(s){r[s]=cloneUnlessOtherwiseSpecified(e[s],n)}),getKeys(t).forEach(function(s){propertyIsUnsafe(e,s)||(propertyIsOnObject(e,s)&&n.isMergeableObject(t[s])?r[s]=getMergeFunction(s,n)(e[s],t[s],n):r[s]=cloneUnlessOtherwiseSpecified(t[s],n))}),r}function deepmerge(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||defaultArrayMerge,n.isMergeableObject=n.isMergeableObject||isMergeableObject,n.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var r=Array.isArray(t),s=Array.isArray(e),i=r===s;return i?r?n.arrayMerge(e,t,n):mergeObject(e,t,n):cloneUnlessOtherwiseSpecified(t,n)}deepmerge.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,s){return deepmerge(r,s,n)},{})};var deepmerge_1=deepmerge,cjs=deepmerge_1;let MockStorage;MockStorage=class{get length(){return Object.keys(this).length}key(e){return Object.keys(this)[e]}setItem(e,t){this[e]=t.toString()}getItem(e){return this[e]}removeItem(e){delete this[e]}clear(){for(let e of Object.keys(this))delete this[e]}};class SimplePromiseQueue{constructor(){this._queue=[],this._flushing=!1}enqueue(t){return this._queue.push(t),this._flushing?Promise.resolve():this.flushQueue()}flushQueue(){this._flushing=!0;const t=()=>{const n=this._queue.shift();if(n)return n.then(t);this._flushing=!1};return Promise.resolve(t())}}const options$1={replaceArrays:{arrayMerge:(e,t,n)=>t},concatArrays:{arrayMerge:(e,t,n)=>e.concat(...t)}};function merge(e,t,n){return cjs(e,t,options$1[n])}let FlattedJSON=JSON;class VuexPersistence{constructor(t){this._mutex=new SimplePromiseQueue,this.subscriber=r=>s=>r.subscribe(s),typeof t>"u"&&(t={}),this.key=t.key!=null?t.key:"vuex",this.subscribed=!1,this.supportCircular=t.supportCircular||!1,this.supportCircular&&(FlattedJSON=require("flatted")),this.mergeOption=t.mergeOption||"replaceArrays";let n=!0;try{window.localStorage.getItem("")}catch{n=!1}if(t.storage)this.storage=t.storage;else if(n)this.storage=window.localStorage;else if(MockStorage)this.storage=new MockStorage;else throw new Error("Neither 'window' is defined, nor 'MockStorage' is available");this.reducer=t.reducer!=null?t.reducer:t.modules==null?r=>r:r=>t.modules.reduce((s,i)=>merge(s,{[i]:r[i]},this.mergeOption),{}),this.filter=t.filter||(r=>!0),this.strictMode=t.strictMode||!1,this.RESTORE_MUTATION=function(s,i){const o=merge(s,i||{},this.mergeOption);for(const a of Object.keys(o))this._vm.$set(s,a,o[a])},this.asyncStorage=t.asyncStorage||!1,this.asyncStorage?(this.restoreState=t.restoreState!=null?t.restoreState:(r,s)=>s.getItem(r).then(i=>typeof i=="string"?this.supportCircular?FlattedJSON.parse(i||"{}"):JSON.parse(i||"{}"):i||{}),this.saveState=t.saveState!=null?t.saveState:(r,s,i)=>i.setItem(r,this.asyncStorage?merge({},s||{},this.mergeOption):this.supportCircular?FlattedJSON.stringify(s):JSON.stringify(s)),this.plugin=r=>{r.restored=this.restoreState(this.key,this.storage).then(s=>{this.strictMode?r.commit("RESTORE_MUTATION",s):r.replaceState(merge(r.state,s||{},this.mergeOption)),this.subscriber(r)((i,o)=>{this.filter(i)&&this._mutex.enqueue(this.saveState(this.key,this.reducer(o),this.storage))}),this.subscribed=!0})}):(this.restoreState=t.restoreState!=null?t.restoreState:(r,s)=>{const i=s.getItem(r);return typeof i=="string"?this.supportCircular?FlattedJSON.parse(i||"{}"):JSON.parse(i||"{}"):i||{}},this.saveState=t.saveState!=null?t.saveState:(r,s,i)=>i.setItem(r,this.supportCircular?FlattedJSON.stringify(s):JSON.stringify(s)),this.plugin=r=>{const s=this.restoreState(this.key,this.storage);this.strictMode?r.commit("RESTORE_MUTATION",s):r.replaceState(merge(r.state,s||{},this.mergeOption)),this.subscriber(r)((i,o)=>{this.filter(i)&&this.saveState(this.key,this.reducer(o),this.storage)}),this.subscribed=!0})}}var VuexPersistence$1=VuexPersistence;const persistedStateOptions={storage:window.sessionStorage,key:"joomla.mediamanager",reducer:e=>({selectedDirectory:e.selectedDirectory,showInfoBar:e.showInfoBar,listView:e.listView,gridSize:e.gridSize,search:e.search,sortBy:e.sortBy,sortDirection:e.sortDirection})},options=Joomla.getOptions("com_media",{});if(options.providers===void 0||options.providers.length===0)throw new TypeError("Media providers are not defined.");const getDrives=(e,t)=>e.map(n=>({root:t+"-"+n+":/",displayName:n})),loadedDisks=options.providers.map(e=>({displayName:e.displayName,drives:getDrives(e.adapterNames,e.name)})),defaultDisk=loadedDisks.find(e=>e.drives.length>0&&e.drives[0]!==void 0);if(!defaultDisk)throw new TypeError("No default media drive was found");const storedState=JSON.parse(persistedStateOptions.storage.getItem(persistedStateOptions.key));function setSession(e){persistedStateOptions.storage.setItem(persistedStateOptions.key,JSON.stringify(_extends({},storedState,{selectedDirectory:e})))}function getCurrentPath(){let e=options.currentPath;if(!e&&storedState&&storedState.selectedDirectory&&(e=storedState.selectedDirectory),!e)return setSession(defaultDisk.drives[0].root),defaultDisk.drives[0].root;const t=e.split(":/");return!t.length||!Object.values(loadedDisks).map(r=>r.drives).flat().find(r=>r.root.startsWith(t[0]))?(setSession(defaultDisk.drives[0].root),defaultDisk.drives[0].root):(setSession(e),e)}var state={isLoading:!1,disks:loadedDisks,directories:loadedDisks.map(()=>({path:defaultDisk.drives[0].root,name:defaultDisk.displayName,directories:[],files:[],directory:null})),files:[],selectedDirectory:getCurrentPath(),selectedItems:[],showInfoBar:!1,listView:"grid",gridSize:"md",showConfirmDeleteModal:!1,showCreateFolderModal:!1,showPreviewModal:!1,showShareModal:!1,showRenameModal:!1,previewItem:null,search:"",sortBy:storedState&&storedState.sortBy?storedState.sortBy:"name",sortDirection:storedState&&storedState.sortDirection?storedState.sortDirection:"asc"};const getSelectedDirectory=e=>e.directories.find(t=>t.path===e.selectedDirectory),getSelectedDirectoryDirectories=e=>e.directories.filter(t=>t.directory===e.selectedDirectory),getSelectedDirectoryFiles=e=>e.files.filter(t=>t.directory===e.selectedDirectory),getSelectedDirectoryContents=(e,t)=>[...t.getSelectedDirectoryDirectories,...t.getSelectedDirectoryFiles];var getters=Object.freeze({__proto__:null,getSelectedDirectory,getSelectedDirectoryDirectories,getSelectedDirectoryFiles,getSelectedDirectoryContents});const updateUrlPath=e=>{const t=e===null?"":e,n=new URL(window.location.href);n.searchParams.has("path")?window.history.pushState(null,"",n.href.replace(/\b(path=).*?(&|$)/,"$1"+t+"$2")):window.history.pushState(null,"",n.href+(n.href.indexOf("?")>0?"&":"?")+"path="+t)},getContents=(e,t)=>{updateUrlPath(t),e.commit(SET_IS_LOADING,!0),api.getContents(t,!1,!1).then(n=>{e.commit(LOAD_CONTENTS_SUCCESS,n),e.commit(UNSELECT_ALL_BROWSER_ITEMS),e.commit(SELECT_DIRECTORY,t),e.commit(SET_IS_LOADING,!1)}).catch(n=>{throw e.commit(SET_IS_LOADING,!1),new Error(n)})},getFullContents=(e,t)=>{e.commit(SET_IS_LOADING,!0),api.getContents(t.path,!0,!0).then(n=>{e.commit(LOAD_FULL_CONTENTS_SUCCESS,n.files[0]),e.commit(SET_IS_LOADING,!1)}).catch(n=>{throw e.commit(SET_IS_LOADING,!1),new Error(n)})},download=(e,t)=>{api.getContents(t.path,!1,!0).then(n=>{const r=n.files[0],s=document.createElement("a");s.href="data:"+r.mime_type+";base64,"+r.content,s.download=r.name,document.body.appendChild(s),s.click(),document.body.removeChild(s)}).catch(n=>{throw new Error(n)})},toggleBrowserItemSelect=(e,t)=>{const n=t;e.state.selectedItems.some(s=>s.path===n.path)?e.commit(UNSELECT_BROWSER_ITEM,n):e.commit(SELECT_BROWSER_ITEM,n)},createDirectory=(e,t)=>{api.canCreate&&(e.commit(SET_IS_LOADING,!0),api.createDirectory(t.name,t.parent).then(n=>{e.commit(CREATE_DIRECTORY_SUCCESS,n),e.commit(HIDE_CREATE_FOLDER_MODAL),e.commit(SET_IS_LOADING,!1)}).catch(n=>{throw e.commit(SET_IS_LOADING,!1),new Error(n)}))},uploadFile=(e,t)=>{api.canCreate&&(e.commit(SET_IS_LOADING,!0),api.upload(t.name,t.parent,t.content,t.override||!1).then(n=>{e.commit(UPLOAD_SUCCESS,n),e.commit(SET_IS_LOADING,!1)}).catch(n=>{e.commit(SET_IS_LOADING,!1),n.status===409&¬ifications.ask(Translate.sprintf("COM_MEDIA_FILE_EXISTS_AND_OVERRIDE",t.name),{})&&(t.override=!0,uploadFile(e,t))}))},renameItem=(e,t)=>{api.canEdit&&(typeof t.item.canEdit<"u"&&t.item.canEdit===!1||(e.commit(SET_IS_LOADING,!0),api.rename(t.item.path,t.newPath).then(n=>{e.commit(RENAME_SUCCESS,{item:n,oldPath:t.item.path,newName:t.newName}),e.commit(HIDE_RENAME_MODAL),e.commit(SET_IS_LOADING,!1)}).catch(n=>{throw e.commit(SET_IS_LOADING,!1),new Error(n)})))},deleteSelectedItems=e=>{if(!api.canDelete)return;e.commit(SET_IS_LOADING,!0);const{selectedItems:t,search:n}=e.state;t.length>0&&t.forEach(r=>{typeof r.canDelete<"u"&&r.canDelete===!1||n&&!r.name.toLowerCase().includes(n.toLowerCase())||api.delete(r.path).then(()=>{e.commit(DELETE_SUCCESS,r),e.commit(UNSELECT_ALL_BROWSER_ITEMS),e.commit(SET_IS_LOADING,!1)}).catch(s=>{throw e.commit(SET_IS_LOADING,!1),new Error(s)})})},updateItemProperties=(e,t)=>e.commit(UPDATE_ITEM_PROPERTIES,t);var actions=Object.freeze({__proto__:null,getContents,getFullContents,download,toggleBrowserItemSelect,createDirectory,uploadFile,renameItem,deleteSelectedItems,updateItemProperties});const gridItemSizes=["sm","md","lg","xl"];var mutations={[SELECT_DIRECTORY]:(e,t)=>{e.selectedDirectory=t,e.search=""},[LOAD_CONTENTS_SUCCESS]:(e,t)=>{function n(o){const a=o.split("/");let l=dirname(o);return l.indexOf(":",l.length-1)!==-1&&(l+="/"),{path:o,name:a[a.length-1],directories:[],files:[],directory:l!=="."?l:null,type:"dir",mime_type:"directory"}}function r(o){if(!e.directories.some(l=>l.path===o)){const l=n(o);l.directories=e.directories.filter(c=>c.directory===l.path).map(c=>c.path),e.directories.push(l),l.directory&&r(l.directory)}}function s(o,a){const l=e.directories.find(f=>f.path===a.directory),c=e.directories.indexOf(l);let u=e.directories.findIndex(f=>f.path===a.path);u===-1&&(u=e.directories.length),e.directories.splice(u,1,a),c!==-1&&e.directories.splice(c,1,_extends({},l,{directories:[...l.directories,a.path]}))}function i(o,a){const l=e.directories.find(f=>f.path===a.directory),c=e.directories.indexOf(l);let u=e.files.findIndex(f=>f.path===a.path);u===-1&&(u=e.files.length),e.files.splice(u,1,a),c!==-1&&e.directories.splice(c,1,_extends({},l,{files:[...l.files,a.path]}))}r(e.selectedDirectory),t.directories.forEach(o=>s(null,o)),t.files.forEach(o=>i(null,o))},[UPLOAD_SUCCESS]:(e,t)=>{const n=t;if(!e.files.some(i=>i.path===n.path)){const i=e.directories.find(a=>a.path===n.directory),o=e.directories.indexOf(i);e.files.push(n),e.directories.splice(o,1,_extends({},i,{files:[...i.files,n.path]}))}if(window.location===window.parent.location||!e.files.length)return;const s=e.files.find(i=>i.name===n.name);s&&(e.selectedItems=[s],window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{type:s.type,name:s.name,path:s.path,thumb:s.thumb,fileType:s.mime_type?s.mime_type:!1,extension:s.extension?s.extension:!1,width:s.width?s.width:0,height:s.height?s.height:0}})))},[CREATE_DIRECTORY_SUCCESS]:(e,t)=>{const n=t;if(!e.directories.some(s=>s.path===n.path)){const s=e.directories.find(o=>o.path===n.directory),i=e.directories.indexOf(s);e.directories.push(n),e.directories.splice(i,1,_extends({},s,{directories:[...s.directories,n.path]}))}},[RENAME_SUCCESS]:(e,t)=>{e.selectedItems[e.selectedItems.length-1].name=t.newName;const{item:n}=t,{oldPath:r}=t;if(n.type==="file"){const s=e.files.findIndex(i=>i.path===r);e.files.splice(s,1,n)}else{const s=e.directories.findIndex(i=>i.path===r);e.directories.splice(s,1,n)}},[DELETE_SUCCESS]:(e,t)=>{const n=t;n.type==="file"&&e.files.splice(e.files.findIndex(r=>r.path===n.path),1),n.type==="dir"&&e.directories.splice(e.directories.findIndex(r=>r.path===n.path),1)},[SELECT_BROWSER_ITEM]:(e,t)=>{e.selectedItems.push(t)},[SELECT_BROWSER_ITEMS]:(e,t)=>{e.selectedItems=t},[UNSELECT_BROWSER_ITEM]:(e,t)=>{const n=t;e.selectedItems.splice(e.selectedItems.findIndex(r=>r.path===n.path),1)},[UNSELECT_ALL_BROWSER_ITEMS]:e=>{e.selectedItems=[]},[SHOW_CREATE_FOLDER_MODAL]:e=>{e.showCreateFolderModal=!0},[HIDE_CREATE_FOLDER_MODAL]:e=>{e.showCreateFolderModal=!1},[SHOW_INFOBAR]:e=>{e.showInfoBar=!0},[HIDE_INFOBAR]:e=>{e.showInfoBar=!1},[CHANGE_LIST_VIEW]:(e,t)=>{e.listView=t},[LOAD_FULL_CONTENTS_SUCCESS]:(e,t)=>{e.previewItem=t},[SHOW_PREVIEW_MODAL]:e=>{e.showPreviewModal=!0},[HIDE_PREVIEW_MODAL]:e=>{e.showPreviewModal=!1},[SET_IS_LOADING]:(e,t)=>{e.isLoading=t},[SHOW_RENAME_MODAL]:e=>{e.showRenameModal=!0},[HIDE_RENAME_MODAL]:e=>{e.showRenameModal=!1},[SHOW_SHARE_MODAL]:e=>{e.showShareModal=!0},[HIDE_SHARE_MODAL]:e=>{e.showShareModal=!1},[INCREASE_GRID_SIZE]:e=>{const t=gridItemSizes.indexOf(e.gridSize);t>=0&&t<gridItemSizes.length-1&&(e.gridSize=gridItemSizes[t+1])},[DECREASE_GRID_SIZE]:e=>{const t=gridItemSizes.indexOf(e.gridSize);t>0&&t<gridItemSizes.length&&(e.gridSize=gridItemSizes[t-1])},[SET_SEARCH_QUERY]:(e,t)=>{e.search=t},[SHOW_CONFIRM_DELETE_MODAL]:e=>{e.showConfirmDeleteModal=!0},[HIDE_CONFIRM_DELETE_MODAL]:e=>{e.showConfirmDeleteModal=!1},[UPDATE_ITEM_PROPERTIES]:(e,t)=>{const{item:n,width:r,height:s}=t,i=e.files.findIndex(o=>o.path===n.path);e.files[i].width=r,e.files[i].height=s},[UPDATE_SORT_BY]:(e,t)=>{e.sortBy=t},[UPDATE_SORT_DIRECTION]:(e,t)=>{e.sortDirection=t==="asc"?"asc":"desc"}},store=createStore({state,getters,actions,mutations,plugins:[new VuexPersistence$1(persistedStateOptions).plugin],strict:!1});window.MediaManager=window.MediaManager||{},window.MediaManager.Event=new Event$1,createApp(script).use(store).use(Translate).mount("#com-media");
|