function makeMap$2(e,t){const o=Object.create(null),n=e.split(",");for(let e=0;e!!o[e.toLowerCase()]:e=>!!o[e]}const NOOP$1=()=>{},extend$2=Object.assign,hasOwnProperty$1=Object.prototype.hasOwnProperty,hasOwn$1=(e,t)=>hasOwnProperty$1.call(e,t),isArray$2=Array.isArray,isMap$1=e=>"[object Map]"===toTypeString$1(e),isFunction$2=e=>"function"==typeof e,isString$2=e=>"string"==typeof e,isSymbol=e=>"symbol"==typeof e,isObject$3=e=>null!==e&&"object"==typeof e,objectToString$1=Object.prototype.toString,toTypeString$1=e=>objectToString$1.call(e),toRawType=e=>toTypeString$1(e).slice(8,-1),isIntegerKey=e=>"string"==typeof e&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,hasChanged$1=(e,t)=>!Object.is(e,t),def$1=(e,t,o)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:o})},toNumber$2=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let activeEffectScope;class EffectScope{constructor(e){void 0===e&&(e=!1),this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!e&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}run(e){if(this.active){const t=activeEffectScope;try{return activeEffectScope=this,e()}finally{activeEffectScope=t}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(e){if(this.active){let t,o;for(t=0,o=this.effects.length;t{const t=new Set(e);return t.w=0,t.n=0,t},wasTracked=e=>(e.w&trackOpBit)>0,newTracked=e=>(e.n&trackOpBit)>0,initDepMarkers=e=>{let{deps:t}=e;if(t.length)for(let e=0;e{const{deps:t}=e;if(t.length){let o=0;for(let n=0;n{("length"===o||o>=e)&&a.push(t)}))}else switch(void 0!==o&&a.push(s.get(o)),t){case"add":isArray$2(e)?isIntegerKey(o)&&a.push(s.get("length")):(a.push(s.get(ITERATE_KEY)),isMap$1(e)&&a.push(s.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray$2(e)||(a.push(s.get(ITERATE_KEY)),isMap$1(e)&&a.push(s.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap$1(e)&&a.push(s.get(ITERATE_KEY))}if(1===a.length)a[0]&&triggerEffects(a[0]);else{const e=[];for(const t of a)t&&e.push(...t);triggerEffects(createDep(e))}}function triggerEffects(e,t){const o=isArray$2(e)?e:[...e];for(const e of o)e.computed&&triggerEffect(e);for(const e of o)e.computed||triggerEffect(e)}function triggerEffect(e,t){(e!==activeEffect||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const isNonTrackableKeys=makeMap$2("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(isSymbol)),get=createGetter(),shallowGet=createGetter(!1,!0),readonlyGet=createGetter(!0),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(){const e=toRaw(this);for(let t=0,o=this.length;t{e[t]=function(){pauseTracking();for(var e=arguments.length,o=new Array(e),n=0;n!0,deleteProperty:(e,t)=>!0},shallowReactiveHandlers=extend$2({},mutableHandlers,{get:shallowGet,set:shallowSet}),toShallow=e=>e,getProto=e=>Reflect.getPrototypeOf(e);function get$1(e,t,o,n){void 0===o&&(o=!1),void 0===n&&(n=!1);const i=toRaw(e=e.__v_raw),r=toRaw(t);o||(t!==r&&track(i,"get",t),track(i,"get",r));const{has:s}=getProto(i),a=n?toShallow:o?toReadonly:toReactive;return s.call(i,t)?a(e.get(t)):s.call(i,r)?a(e.get(r)):void(e!==i&&e.get(t))}function has$1(e,t){void 0===t&&(t=!1);const o=this.__v_raw,n=toRaw(o),i=toRaw(e);return t||(e!==i&&track(n,"has",e),track(n,"has",i)),e===i?o.has(e):o.has(e)||o.has(i)}function size(e,t){return void 0===t&&(t=!1),e=e.__v_raw,!t&&track(toRaw(e),"iterate",ITERATE_KEY),Reflect.get(e,"size",e)}function add(e){e=toRaw(e);const t=toRaw(this);return getProto(t).has.call(t,e)||(t.add(e),trigger(t,"add",e,e)),this}function set$1(e,t){t=toRaw(t);const o=toRaw(this),{has:n,get:i}=getProto(o);let r=n.call(o,e);r||(e=toRaw(e),r=n.call(o,e));const s=i.call(o,e);return o.set(e,t),r?hasChanged$1(t,s)&&trigger(o,"set",e,t):trigger(o,"add",e,t),this}function deleteEntry(e){const t=toRaw(this),{has:o,get:n}=getProto(t);let i=o.call(t,e);i||(e=toRaw(e),i=o.call(t,e)),n&&n.call(t,e);const r=t.delete(e);return i&&trigger(t,"delete",e,void 0),r}function clear(){const e=toRaw(this),t=0!==e.size,o=e.clear();return t&&trigger(e,"clear",void 0,void 0),o}function createForEach(e,t){return function(o,n){const i=this,r=i.__v_raw,s=toRaw(r),a=t?toShallow:e?toReadonly:toReactive;return!e&&track(s,"iterate",ITERATE_KEY),r.forEach(((e,t)=>o.call(n,a(e),a(t),i)))}}function createIterableMethod(e,t,o){return function(){const n=this.__v_raw,i=toRaw(n),r=isMap$1(i),s="entries"===e||e===Symbol.iterator&&r,a="keys"===e&&r,c=n[e](...arguments),l=o?toShallow:t?toReadonly:toReactive;return!t&&track(i,"iterate",a?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:s?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(e){return function(){return"delete"!==e&&this}}function createInstrumentations(){const e={get(e){return get$1(this,e)},get size(){return size(this)},has:has$1,add:add,set:set$1,delete:deleteEntry,clear:clear,forEach:createForEach(!1,!1)},t={get(e){return get$1(this,e,!1,!0)},get size(){return size(this)},has:has$1,add:add,set:set$1,delete:deleteEntry,clear:clear,forEach:createForEach(!1,!0)},o={get(e){return get$1(this,e,!0)},get size(){return size(this,!0)},has(e){return has$1.call(this,e,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},n={get(e){return get$1(this,e,!0,!0)},get size(){return size(this,!0)},has(e){return has$1.call(this,e,!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),o[i]=createIterableMethod(i,!0,!1),t[i]=createIterableMethod(i,!1,!0),n[i]=createIterableMethod(i,!0,!0)})),[e,o,t,n]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(e,t){const o=t?e?shallowReadonlyInstrumentations:shallowInstrumentations:e?readonlyInstrumentations:mutableInstrumentations;return(t,n,i)=>"__v_isReactive"===n?!e:"__v_isReadonly"===n?e:"__v_raw"===n?t:Reflect.get(hasOwn$1(o,n)&&n in t?o:t,n,i)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},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 createReactiveObject(e,t,o,n,i){if(!isObject$3(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=i.get(e);if(r)return r;const s=getTargetType(e);if(0===s)return e;const a=new Proxy(e,2===s?n:o);return i.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 isReactive(e)||isReadonly(e)}function toRaw(e){const t=e&&e.__v_raw;return t?toRaw(t):e}function markRaw(e){return def$1(e,"__v_skip",!0),e}const toReactive=e=>isObject$3(e)?reactive(e):e,toReadonly=e=>isObject$3(e)?readonly(e):e;function trackRefValue(e){shouldTrack&&activeEffect&&trackEffects((e=toRaw(e)).dep||(e.dep=createDep()))}function triggerRefValue(e,t){(e=toRaw(e)).dep&&triggerEffects(e.dep)}function isRef(e){return!(!e||!0!==e.__v_isRef)}function ref(e){return createRef(e,!1)}function createRef(e,t){return isRef(e)?e:new RefImpl(e,t)}class RefImpl{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:toRaw(e),this._value=t?e:toReactive(e)}get value(){return trackRefValue(this),this._value}set value(e){const t=this.__v_isShallow||isShallow(e)||isReadonly(e);e=t?e:toRaw(e),hasChanged$1(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:toReactive(e),triggerRefValue(this))}}function unref(e){return isRef(e)?e.value:e}const shallowUnwrapHandlers={get:(e,t,o)=>unref(Reflect.get(e,t,o)),set:(e,t,o,n)=>{const i=e[t];return isRef(i)&&!isRef(o)?(i.value=o,!0):Reflect.set(e,t,o,n)}};function proxyRefs(e){return isReactive(e)?e:new Proxy(e,shallowUnwrapHandlers)}function toRefs(e){const t=isArray$2(e)?new Array(e.length):{};for(const o in e)t[o]=toRef(e,o);return t}class ObjectRefImpl{constructor(e,t,o){this._object=e,this._key=t,this._defaultValue=o,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function toRef(e,t,o){const n=e[t];return isRef(n)?n:new ObjectRefImpl(e,t,o)}var _a;class ComputedRefImpl{constructor(e,t,o,n){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[_a]=!1,this._dirty=!0,this.effect=new ReactiveEffect(e,(()=>{this._dirty||(this._dirty=!0,triggerRefValue(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=o}get value(){const e=toRaw(this);return trackRefValue(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function computed$1(e,t,o){let n,i;void 0===o&&(o=!1);const r="function"==typeof e;r?(n=e,i=NOOP$1):(n=e.get,i=e.set);return new ComputedRefImpl(n,i,r||!i,o)}function makeMap$1(e,t){const o=Object.create(null),n=e.split(",");for(let e=0;e!!o[e.toLowerCase()]:e=>!!o[e]}function normalizeStyle(e){if(isArray$1(e)){const t={};for(let o=0;o{if(e){const o=e.split(propertyDelimiterRE);o.length>1&&(t[o[0].trim()]=o[1].trim())}})),t}function normalizeClass(e){let t="";if(isString$1(e))t=e;else if(isArray$1(e))for(let o=0;oisString$1(e)?e:null==e?"":isArray$1(e)||isObject$2(e)&&(e.toString===objectToString||!isFunction$1(e.toString))?JSON.stringify(e,replacer,2):String(e),replacer=(e,t)=>t&&t.__v_isRef?replacer(e,t.value):isMap(t)?{["Map("+t.size+")"]:[...t.entries()].reduce(((e,t)=>{let[o,n]=t;return e[o+" =>"]=n,e}),{})}:isSet(t)?{["Set("+t.size+")"]:[...t.values()]}:!isObject$2(t)||isArray$1(t)||isPlainObject(t)?t:String(t),EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,onRE$1=/^on[^a-z]/,isOn$1=e=>onRE$1.test(e),isModelListener$1=e=>e.startsWith("onUpdate:"),extend$1=Object.assign,remove=(e,t)=>{const o=e.indexOf(t);o>-1&&e.splice(o,1)},hasOwnProperty=Object.prototype.hasOwnProperty,hasOwn=(e,t)=>hasOwnProperty.call(e,t),isArray$1=Array.isArray,isMap=e=>"[object Map]"===toTypeString(e),isSet=e=>"[object Set]"===toTypeString(e),isFunction$1=e=>"function"==typeof e,isString$1=e=>"string"==typeof e,isObject$2=e=>null!==e&&"object"==typeof e,isPromise$1=e=>isObject$2(e)&&isFunction$1(e.then)&&isFunction$1(e.catch),objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>"[object Object]"===toTypeString(e),isReservedProp=makeMap$1(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction$1=e=>{const t=Object.create(null);return o=>t[o]||(t[o]=e(o))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction$1((e=>e.replace(camelizeRE,((e,t)=>t?t.toUpperCase():"")))),hyphenateRE$1=/\B([A-Z])/g,hyphenate$1=cacheStringFunction$1((e=>e.replace(hyphenateRE$1,"-$1").toLowerCase())),capitalize$1=cacheStringFunction$1((e=>e.charAt(0).toUpperCase()+e.slice(1))),toHandlerKey=cacheStringFunction$1((e=>e?"on"+capitalize$1(e):"")),hasChanged=(e,t)=>!Object.is(e,t),invokeArrayFns$1=(e,t)=>{for(let o=0;o{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:o})},toNumber$1=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function warn(e){}function callWithErrorHandling(e,t,o,n){let i;try{i=n?e(...n):e()}catch(e){handleError$1(e,t,o)}return i}function callWithAsyncErrorHandling(e,t,o,n){if(isFunction$1(e)){const i=callWithErrorHandling(e,t,o,n);return i&&isPromise$1(i)&&i.catch((e=>{handleError$1(e,t,o)})),i}const i=[];for(let r=0;r>>1;getId(queue[n])flushIndex&&queue.splice(t,1)}function queuePostFlushCb(e){isArray$1(e)?pendingPostFlushCbs.push(...e):activePostFlushCbs&&activePostFlushCbs.includes(e,e.allowRecurse?postFlushIndex+1:postFlushIndex)||pendingPostFlushCbs.push(e),queueFlush()}function flushPreFlushCbs(e,t){for(void 0===t&&(t=isFlushing?flushIndex+1:0);tgetId(e)-getId(t))),postFlushIndex=0;postFlushIndexnull==e.id?1/0:e.id,comparator=(e,t)=>{const o=getId(e)-getId(t);if(0===o){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return o};function flushJobs(e){isFlushPending=!1,isFlushing=!0,queue.sort(comparator);try{for(flushIndex=0;flushIndex2?n-2:0),r=2;risString$1(e)?e.trim():e))),t&&(s=i.map(toNumber$1))}let l,d=o[l=toHandlerKey(t)]||o[l=toHandlerKey(camelize(t))];!d&&a&&(d=o[l=toHandlerKey(hyphenate$1(t))]),d&&callWithAsyncErrorHandling(d,e,6,s);const u=o[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,callWithAsyncErrorHandling(u,e,6,s)}}function normalizeEmitsOptions(e,t,o){void 0===o&&(o=!1);const n=t.emitsCache,i=n.get(e);if(void 0!==i)return i;const r=e.emits;let s={},a=!1;if(!isFunction$1(e)){const n=e=>{const o=normalizeEmitsOptions(e,t,!0);o&&(a=!0,extend$1(s,o))};!o&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}return r||a?(isArray$1(r)?r.forEach((e=>s[e]=null)):extend$1(s,r),isObject$2(e)&&n.set(e,s),s):(isObject$2(e)&&n.set(e,null),null)}function isEmitListener(e,t){return!(!e||!isOn$1(t))&&(t=t.slice(2).replace(/Once$/,""),hasOwn(e,t[0].toLowerCase()+t.slice(1))||hasOwn(e,hyphenate$1(t))||hasOwn(e,t))}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,o){if(void 0===t&&(t=currentRenderingInstance),!t)return e;if(e._n)return e;const n=function o(){o._d&&setBlockTracking(-1);const n=setCurrentRenderingInstance(t);let i;try{i=e(...arguments)}finally{setCurrentRenderingInstance(n),o._d&&setBlockTracking(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function markAttrsAccessed(){}function renderComponentRoot(e){const{type:t,vnode:o,proxy:n,withProxy:i,props:r,propsOptions:[s],slots:a,attrs:c,emit:l,render:d,renderCache:u,data:p,setupState:h,ctx:m,inheritAttrs:f}=e;let _,g;const v=setCurrentRenderingInstance(e);try{if(4&o.shapeFlag){const e=i||n;_=normalizeVNode(d.call(e,e,u,r,h,p,m)),g=c}else{const e=t;0,_=normalizeVNode(e.length>1?e(r,{attrs:c,slots:a,emit:l}):e(r,null)),g=t.props?c:getFunctionalFallthrough(c)}}catch(t){blockStack.length=0,handleError$1(t,e,1),_=createVNode(Comment)}let y=_;if(g&&!1!==f){const e=Object.keys(g),{shapeFlag:t}=y;e.length&&7&t&&(s&&e.some(isModelListener$1)&&(g=filterModelListeners(g,s)),y=cloneVNode(y,g))}return o.dirs&&(y=cloneVNode(y),y.dirs=y.dirs?y.dirs.concat(o.dirs):o.dirs),o.transition&&(y.transition=o.transition),_=y,setCurrentRenderingInstance(v),_}const getFunctionalFallthrough=e=>{let t;for(const o in e)("class"===o||"style"===o||isOn$1(o))&&((t||(t={}))[o]=e[o]);return t},filterModelListeners=(e,t)=>{const o={};for(const n in e)isModelListener$1(n)&&n.slice(9)in t||(o[n]=e[n]);return o};function shouldUpdateComponent(e,t,o){const{props:n,children:i,component:r}=e,{props:s,children:a,patchFlag:c}=t,l=r.emitsOptions;if(t.dirs||t.transition)return!0;if(!(o&&c>=0))return!(!i&&!a||a&&a.$stable)||n!==s&&(n?!s||hasPropsChanged(n,s,l):!!s);if(1024&c)return!0;if(16&c)return n?hasPropsChanged(n,s,l):!!s;if(8&c){const e=t.dynamicProps;for(let t=0;te.__isSuspense;function queueEffectWithSuspense(e,t){t&&t.pendingBranch?isArray$1(e)?t.effects.push(...e):t.effects.push(e):queuePostFlushCb(e)}function provide(e,t){if(currentInstance){let o=currentInstance.provides;const n=currentInstance.parent&¤tInstance.parent.provides;n===o&&(o=currentInstance.provides=Object.create(n)),o[e]=t}else;}function inject(e,t,o){void 0===o&&(o=!1);const n=currentInstance||currentRenderingInstance;if(n){const i=null==n.parent?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return o&&isFunction$1(t)?t.call(n.proxy):t}}const INITIAL_WATCHER_VALUE={};function watch(e,t,o){return doWatch(e,t,o)}function doWatch(e,t,o){let{immediate:n,deep:i,flush:r,onTrack:s,onTrigger:a}=void 0===o?EMPTY_OBJ:o;const c=currentInstance;let l,d,u=!1,p=!1;if(isRef(e)?(l=()=>e.value,u=isShallow(e)):isReactive(e)?(l=()=>e,i=!0):isArray$1(e)?(p=!0,u=e.some((e=>isReactive(e)||isShallow(e))),l=()=>e.map((e=>isRef(e)?e.value:isReactive(e)?traverse(e):isFunction$1(e)?callWithErrorHandling(e,c,2):void 0))):l=isFunction$1(e)?t?()=>callWithErrorHandling(e,c,2):()=>{if(!c||!c.isUnmounted)return d&&d(),callWithAsyncErrorHandling(e,c,3,[m])}:NOOP,t&&i){const e=l;l=()=>traverse(e())}let h,m=e=>{d=v.onStop=()=>{callWithErrorHandling(e,c,4)}};if(isInSSRComponentSetup){if(m=NOOP,t?n&&callWithAsyncErrorHandling(t,c,3,[l(),p?[]:void 0,m]):l(),"sync"!==r)return NOOP;{const e=useSSRContext();h=e.__watcherHandles||(e.__watcherHandles=[])}}let f=p?new Array(e.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const _=()=>{if(v.active)if(t){const e=v.run();(i||u||(p?e.some(((e,t)=>hasChanged(e,f[t]))):hasChanged(e,f)))&&(d&&d(),callWithAsyncErrorHandling(t,c,3,[e,f===INITIAL_WATCHER_VALUE?void 0:p&&f[0]===INITIAL_WATCHER_VALUE?[]:f,m]),f=e)}else v.run()};let g;_.allowRecurse=!!t,"sync"===r?g=_:"post"===r?g=()=>queuePostRenderEffect(_,c&&c.suspense):(_.pre=!0,c&&(_.id=c.uid),g=()=>queueJob(_));const v=new ReactiveEffect(l,g);t?n?_():f=v.run():"post"===r?queuePostRenderEffect(v.run.bind(v),c&&c.suspense):v.run();const y=()=>{v.stop(),c&&c.scope&&remove(c.scope.effects,v)};return h&&h.push(y),y}function instanceWatch(e,t,o){const n=this.proxy,i=isString$1(e)?e.includes(".")?createPathGetter(n,e):()=>n[e]:e.bind(n,n);let r;isFunction$1(t)?r=t:(r=t.handler,o=t);const s=currentInstance;setCurrentInstance(this);const a=doWatch(i,r.bind(n),o);return s?setCurrentInstance(s):unsetCurrentInstance(),a}function createPathGetter(e,t){const o=t.split(".");return()=>{let t=e;for(let e=0;e{traverse(e,t)}));else if(isPlainObject(e))for(const o in e)traverse(e[o],t);return e}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],BaseTransitionImpl={name:"BaseTransition",props:{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},setup(e,t){let{slots:o}=t;const n=getCurrentInstance(),i=useTransitionState();let r;return()=>{const t=o.default&&getTransitionRawChildren(o.default(),!0);if(!t||!t.length)return;let s=t[0];if(t.length>1)for(const e of t)if(e.type!==Comment){s=e;break}const a=toRaw(e),{mode:c}=a;if(i.isLeaving)return emptyPlaceholder(s);const l=getKeepAliveChild(s);if(!l)return emptyPlaceholder(s);const d=resolveTransitionHooks(l,a,i,n);setTransitionHooks(l,d);const u=n.subTree,p=u&&getKeepAliveChild(u);let h=!1;const{getTransitionKey:m}=l.type;if(m){const e=m();void 0===r?r=e:e!==r&&(r=e,h=!0)}if(p&&p.type!==Comment&&(!isSameVNodeType(l,p)||h)){const e=resolveTransitionHooks(p,a,i,n);if(setTransitionHooks(p,e),"out-in"===c)return i.isLeaving=!0,e.afterLeave=()=>{i.isLeaving=!1,!1!==n.update.active&&n.update()},emptyPlaceholder(s);"in-out"===c&&l.type!==Comment&&(e.delayLeave=(e,t,o)=>{getLeavingNodesForType(i,p)[String(p.key)]=p,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete d.delayedLeave},d.delayedLeave=o})}return s}}},BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(e,t){const{leavingVNodes:o}=e;let n=o.get(t.type);return n||(n=Object.create(null),o.set(t.type,n)),n}function resolveTransitionHooks(e,t,o,n){const{appear:i,mode:r,persisted:s=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:l,onEnterCancelled:d,onBeforeLeave:u,onLeave:p,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:f,onAppear:_,onAfterAppear:g,onAppearCancelled:v}=t,y=String(e.key),E=getLeavingNodesForType(o,e),S=(e,t)=>{e&&callWithAsyncErrorHandling(e,n,9,t)},b=(e,t)=>{const o=t[1];S(e,t),isArray$1(e)?e.every((e=>e.length<=1))&&o():e.length<=1&&o()},w={mode:r,persisted:s,beforeEnter(t){let n=a;if(!o.isMounted){if(!i)return;n=f||a}t._leaveCb&&t._leaveCb(!0);const r=E[y];r&&isSameVNodeType(e,r)&&r.el._leaveCb&&r.el._leaveCb(),S(n,[t])},enter(e){let t=c,n=l,r=d;if(!o.isMounted){if(!i)return;t=_||c,n=g||l,r=v||d}let s=!1;const a=e._enterCb=t=>{s||(s=!0,S(t?r:n,[e]),w.delayedLeave&&w.delayedLeave(),e._enterCb=void 0)};t?b(t,[e,a]):a()},leave(t,n){const i=String(e.key);if(t._enterCb&&t._enterCb(!0),o.isUnmounting)return n();S(u,[t]);let r=!1;const s=t._leaveCb=o=>{r||(r=!0,n(),S(o?m:h,[t]),t._leaveCb=void 0,E[i]===e&&delete E[i])};E[i]=e,p?b(p,[t,s]):s()},clone:e=>resolveTransitionHooks(e,t,o,n)};return w}function emptyPlaceholder(e){if(isKeepAlive(e))return(e=cloneVNode(e)).children=null,e}function getKeepAliveChild(e){return isKeepAlive(e)?e.children?e.children[0]:void 0:e}function setTransitionHooks(e,t){6&e.shapeFlag&&e.component?setTransitionHooks(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function getTransitionRawChildren(e,t,o){void 0===t&&(t=!1);let n=[],i=0;for(let r=0;r1)for(let e=0;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,o){void 0===o&&(o=currentInstance);const n=e.__wdc||(e.__wdc=()=>{let t=o;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(injectHook(t,n,o),o){let e=o.parent;for(;e&&e.parent;)isKeepAlive(e.parent.vnode)&&injectToKeepAliveRoot(n,t,o,e),e=e.parent}}function injectToKeepAliveRoot(e,t,o,n){const i=injectHook(t,e,n,!0);onUnmounted((()=>{remove(n[t],i)}),o)}function injectHook(e,t,o,n){if(void 0===o&&(o=currentInstance),void 0===n&&(n=!1),o){const i=o[e]||(o[e]=[]),r=t.__weh||(t.__weh=function(){if(o.isUnmounted)return;pauseTracking(),setCurrentInstance(o);for(var n=arguments.length,i=new Array(n),r=0;rfunction(t,o){return void 0===o&&(o=currentInstance),(!isInSSRComponentSetup||"sp"===e)&&injectHook(e,(function(){return t(...arguments)}),o)},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){void 0===t&&(t=currentInstance),injectHook("ec",e,t)}function withDirectives(e,t){const o=currentRenderingInstance;if(null===o)return e;const n=getExposeProxy(o)||o.proxy,i=e.dirs||(e.dirs=[]);for(let e=0;et(e,o,void 0,r&&r[o])));else{const o=Object.keys(e);i=new Array(o.length);for(let n=0,s=o.length;n!isVNode(e)||e.type!==Comment&&!(e.type===Fragment&&!ensureValidVNode(e.children))))?e:null}const getPublicInstance=e=>e?isStatefulComponent(e)?getExposeProxy(e)||e.proxy:getPublicInstance(e.parent):null,publicPropertiesMap=extend$1(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=()=>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{_:o}=e;const{ctx:n,setupState:i,data:r,props:s,accessCache:a,type:c,appContext:l}=o;let d;if("$"!==t[0]){const e=a[t];if(void 0!==e)switch(e){case 1:return i[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(hasSetupBinding(i,t))return a[t]=1,i[t];if(r!==EMPTY_OBJ&&hasOwn(r,t))return a[t]=2,r[t];if((d=o.propsOptions[0])&&hasOwn(d,t))return a[t]=3,s[t];if(n!==EMPTY_OBJ&&hasOwn(n,t))return a[t]=4,n[t];shouldCacheAccess&&(a[t]=0)}}const u=publicPropertiesMap[t];let p,h;return u?("$attrs"===t&&track(o,"get",t),u(o)):(p=c.__cssModules)&&(p=p[t])?p:n!==EMPTY_OBJ&&hasOwn(n,t)?(a[t]=4,n[t]):(h=l.config.globalProperties,hasOwn(h,t)?h[t]:void 0)},set(e,t,o){let{_:n}=e;const{data:i,setupState:r,ctx:s}=n;return hasSetupBinding(r,t)?(r[t]=o,!0):i!==EMPTY_OBJ&&hasOwn(i,t)?(i[t]=o,!0):!hasOwn(n.props,t)&&(("$"!==t[0]||!(t.slice(1)in n))&&(s[t]=o,!0))},has(e,t){let o,{_:{data:n,setupState:i,accessCache:r,ctx:s,appContext:a,propsOptions:c}}=e;return!!r[t]||n!==EMPTY_OBJ&&hasOwn(n,t)||hasSetupBinding(i,t)||(o=c[0])&&hasOwn(o,t)||hasOwn(s,t)||hasOwn(publicPropertiesMap,t)||hasOwn(a.config.globalProperties,t)},defineProperty(e,t,o){return null!=o.get?e._.accessCache[t]=0:hasOwn(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};let shouldCacheAccess=!0;function applyOptions(e){const t=resolveMergedOptions(e),o=e.proxy,n=e.ctx;shouldCacheAccess=!1,t.beforeCreate&&callHook$1(t.beforeCreate,e,"bc");const{data:i,computed:r,methods:s,watch:a,provide:c,inject:l,created:d,beforeMount:u,mounted:p,beforeUpdate:h,updated:m,activated:f,deactivated:_,beforeDestroy:g,beforeUnmount:v,destroyed:y,unmounted:E,render:S,renderTracked:b,renderTriggered:w,errorCaptured:C,serverPrefetch:A,expose:I,inheritAttrs:$,components:O,directives:M,filters:T}=t;if(l&&resolveInjections(l,n,null,e.appContext.config.unwrapInjectedRef),s)for(const e in s){const t=s[e];isFunction$1(t)&&(n[e]=t.bind(o))}if(i){const t=i.call(o,o);isObject$2(t)&&(e.data=reactive(t))}if(shouldCacheAccess=!0,r)for(const e in r){const t=r[e],i=isFunction$1(t)?t.bind(o,o):isFunction$1(t.get)?t.get.bind(o,o):NOOP,s=!isFunction$1(t)&&isFunction$1(t.set)?t.set.bind(o):NOOP,a=computed({get:i,set:s});Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(a)for(const e in a)createWatcher(a[e],n,o,e);if(c){const e=isFunction$1(c)?c.call(o):c;Reflect.ownKeys(e).forEach((t=>{provide(t,e[t])}))}function k(e,t){isArray$1(t)?t.forEach((t=>e(t.bind(o)))):t&&e(t.bind(o))}if(d&&callHook$1(d,e,"c"),k(onBeforeMount,u),k(onMounted,p),k(onBeforeUpdate,h),k(onUpdated,m),k(onActivated,f),k(onDeactivated,_),k(onErrorCaptured,C),k(onRenderTracked,b),k(onRenderTriggered,w),k(onBeforeUnmount,v),k(onUnmounted,E),k(onServerPrefetch,A),isArray$1(I))if(I.length){const t=e.exposed||(e.exposed={});I.forEach((e=>{Object.defineProperty(t,e,{get:()=>o[e],set:t=>o[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===NOOP&&(e.render=S),null!=$&&(e.inheritAttrs=$),O&&(e.components=O),M&&(e.directives=M)}function resolveInjections(e,t,o,n){void 0===n&&(n=!1),isArray$1(e)&&(e=normalizeInject(e));for(const o in e){const i=e[o];let r;r=isObject$2(i)?"default"in i?inject(i.from||o,i.default,!0):inject(i.from||o):inject(i),isRef(r)&&n?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[o]=r}}function callHook$1(e,t,o){callWithAsyncErrorHandling(isArray$1(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,o)}function createWatcher(e,t,o,n){const i=n.includes(".")?createPathGetter(o,n):()=>o[n];if(isString$1(e)){const o=t[e];isFunction$1(o)&&watch(i,o)}else if(isFunction$1(e))watch(i,e.bind(o));else if(isObject$2(e))if(isArray$1(e))e.forEach((e=>createWatcher(e,t,o,n)));else{const n=isFunction$1(e.handler)?e.handler.bind(o):t[e.handler];isFunction$1(n)&&watch(i,n,e)}}function resolveMergedOptions(e){const t=e.type,{mixins:o,extends:n}=t,{mixins:i,optionsCache:r,config:{optionMergeStrategies:s}}=e.appContext,a=r.get(t);let c;return a?c=a:i.length||o||n?(c={},i.length&&i.forEach((e=>mergeOptions(c,e,s,!0))),mergeOptions(c,t,s)):c=t,isObject$2(t)&&r.set(t,c),c}function mergeOptions(e,t,o,n){void 0===n&&(n=!1);const{mixins:i,extends:r}=t;r&&mergeOptions(e,r,o,!0),i&&i.forEach((t=>mergeOptions(e,t,o,!0)));for(const i in t)if(n&&"expose"===i);else{const n=internalOptionMergeStrats[i]||o&&o[i];e[i]=n?n(e[i],t[i]):t[i]}return e}const internalOptionMergeStrats={data:mergeDataFn,props:mergeObjectOptions,emits:mergeObjectOptions,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$1(isFunction$1(e)?e.call(this,this):e,isFunction$1(t)?t.call(this,this):t)}:t:e}function mergeInject(e,t){return mergeObjectOptions(normalizeInject(e),normalizeInject(t))}function normalizeInject(e){if(isArray$1(e)){const t={};for(let o=0;o0)||16&s){let n;setFullProps(e,t,i,r)&&(l=!0);for(const r in a)t&&(hasOwn(t,r)||(n=hyphenate$1(r))!==r&&hasOwn(t,n))||(c?!o||void 0===o[r]&&void 0===o[n]||(i[r]=resolvePropValue(c,a,r,void 0,e,!0)):delete i[r]);if(r!==a)for(const e in r)t&&hasOwn(t,e)||(delete r[e],l=!0)}else if(8&s){const o=e.vnode.dynamicProps;for(let n=0;n{c=!0;const[o,n]=normalizePropsOptions(e,t,!0);extend$1(s,o),n&&a.push(...n)};!o&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!r&&!c)return isObject$2(e)&&n.set(e,EMPTY_ARR),EMPTY_ARR;if(isArray$1(r))for(let e=0;e-1,n[1]=o<0||e-1||hasOwn(n,"default"))&&a.push(t)}}}const l=[s,a];return isObject$2(e)&&n.set(e,l),l}function validatePropName(e){return"$"!==e[0]}function getType(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function isSameType(e,t){return getType(e)===getType(t)}function getTypeIndex(e,t){return isArray$1(t)?t.findIndex((t=>isSameType(t,e))):isFunction$1(t)&&isSameType(t,e)?0:-1}const isInternalKey=e=>"_"===e[0]||"$stable"===e,normalizeSlotValue=e=>isArray$1(e)?e.map(normalizeVNode):[normalizeVNode(e)],normalizeSlot=(e,t,o)=>{if(t._n)return t;const n=withCtx((function(){return normalizeSlotValue(t(...arguments))}),o);return n._c=!1,n},normalizeObjectSlots=(e,t,o)=>{const n=e._ctx;for(const o in e){if(isInternalKey(o))continue;const i=e[o];if(isFunction$1(i))t[o]=normalizeSlot(0,i,n);else if(null!=i){const e=normalizeSlotValue(i);t[o]=()=>e}}},normalizeVNodeSlots=(e,t)=>{const o=normalizeSlotValue(t);e.slots.default=()=>o},initSlots=(e,t)=>{if(32&e.vnode.shapeFlag){const o=t._;o?(e.slots=toRaw(t),def(t,"_",o)):normalizeObjectSlots(t,e.slots={})}else e.slots={},t&&normalizeVNodeSlots(e,t);def(e.slots,InternalObjectKey,1)},updateSlots=(e,t,o)=>{const{vnode:n,slots:i}=e;let r=!0,s=EMPTY_OBJ;if(32&n.shapeFlag){const e=t._;e?o&&1===e?r=!1:(extend$1(i,t),o||1!==e||delete i._):(r=!t.$stable,normalizeObjectSlots(t,i)),s=t}else t&&(normalizeVNodeSlots(e,t),s={default:1});if(r)for(const e in i)isInternalKey(e)||e in s||delete i[e]};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=0;function createAppAPI(e,t){return function(o,n){void 0===n&&(n=null),isFunction$1(o)||(o=Object.assign({},o)),null==n||isObject$2(n)||(n=null);const i=createAppContext(),r=new Set;let s=!1;const a=i.app={_uid:uid++,_component:o,_props:n,_container:null,_context:i,_instance:null,version:version,get config(){return i.config},set config(e){},use(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;n(i.mixins.includes(e)||i.mixins.push(e),a),component:(e,t)=>t?(i.components[e]=t,a):i.components[e],directive:(e,t)=>t?(i.directives[e]=t,a):i.directives[e],mount(r,c,l){if(!s){const d=createVNode(o,n);return d.appContext=i,c&&t?t(d,r):e(d,r,l),s=!0,a._container=r,r.__vue_app__=a,getExposeProxy(d.component)||d.component.proxy}},unmount(){s&&(e(null,a._container),delete a._container.__vue_app__)},provide:(e,t)=>(i.provides[e]=t,a)};return a}}function setRef(e,t,o,n,i){if(void 0===i&&(i=!1),isArray$1(e))return void e.forEach(((e,r)=>setRef(e,t&&(isArray$1(t)?t[r]:t),o,n,i)));if(isAsyncWrapper(n)&&!i)return;const r=4&n.shapeFlag?getExposeProxy(n.component)||n.component.proxy:n.el,s=i?null:r,{i:a,r:c}=e,l=t&&t.r,d=a.refs===EMPTY_OBJ?a.refs={}:a.refs,u=a.setupState;if(null!=l&&l!==c&&(isString$1(l)?(d[l]=null,hasOwn(u,l)&&(u[l]=null)):isRef(l)&&(l.value=null)),isFunction$1(c))callWithErrorHandling(c,a,12,[s,d]);else{const t=isString$1(c),n=isRef(c);if(t||n){const a=()=>{if(e.f){const o=t?hasOwn(u,c)?u[c]:d[c]:c.value;i?isArray$1(o)&&remove(o,r):isArray$1(o)?o.includes(r)||o.push(r):t?(d[c]=[r],hasOwn(u,c)&&(u[c]=d[c])):(c.value=[r],e.k&&(d[e.k]=c.value))}else t?(d[c]=s,hasOwn(u,c)&&(u[c]=s)):n&&(c.value=s,e.k&&(d[e.k]=s))};s?(a.id=-1,queuePostRenderEffect(a,o)):a()}}}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(e){return baseCreateRenderer(e)}function baseCreateRenderer(e,t){getGlobalThis().__VUE__=!0;const{insert:o,remove:n,patchProp:i,createElement:r,createText:s,createComment:a,setText:c,setElementText:l,parentNode:d,nextSibling:u,setScopeId:p=NOOP,insertStaticContent:h}=e,m=function(e,t,o,n,i,r,s,a,c){if(void 0===n&&(n=null),void 0===i&&(i=null),void 0===r&&(r=null),void 0===s&&(s=!1),void 0===a&&(a=null),void 0===c&&(c=!!t.dynamicChildren),e===t)return;e&&!isSameVNodeType(e,t)&&(n=P(e),R(e,i,r,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:l,ref:d,shapeFlag:u}=t;switch(l){case Text:f(e,t,o,n);break;case Comment:_(e,t,o,n);break;case Static:null==e&&g(t,o,n,s);break;case Fragment:A(e,t,o,n,i,r,s,a,c);break;default:1&u?v(e,t,o,n,i,r,s,a,c):6&u?I(e,t,o,n,i,r,s,a,c):(64&u||128&u)&&l.process(e,t,o,n,i,r,s,a,c,H)}null!=d&&i&&setRef(d,e&&e.ref,r,t||e,!t)},f=(e,t,n,i)=>{if(null==e)o(t.el=s(t.children),n,i);else{const o=t.el=e.el;t.children!==e.children&&c(o,t.children)}},_=(e,t,n,i)=>{null==e?o(t.el=a(t.children||""),n,i):t.el=e.el},g=(e,t,o,n)=>{[e.el,e.anchor]=h(e.children,t,o,n,e.el,e.anchor)},v=(e,t,o,n,i,r,s,a,c)=>{s=s||"svg"===t.type,null==e?y(t,o,n,i,r,s,a,c):b(e,t,i,r,s,a,c)},y=(e,t,n,s,a,c,d,u)=>{let p,h;const{type:m,props:f,shapeFlag:_,transition:g,dirs:v}=e;if(p=e.el=r(e.type,c,f&&f.is,f),8&_?l(p,e.children):16&_&&S(e.children,p,null,s,a,c&&"foreignObject"!==m,d,u),v&&invokeDirectiveHook(e,null,s,"created"),f){for(const t in f)"value"===t||isReservedProp(t)||i(p,t,null,f[t],c,e.children,s,a,L);"value"in f&&i(p,"value",null,f.value),(h=f.onVnodeBeforeMount)&&invokeVNodeHook(h,s,e)}E(p,e,e.scopeId,d,s),v&&invokeDirectiveHook(e,null,s,"beforeMount");const y=(!a||a&&!a.pendingBranch)&&g&&!g.persisted;y&&g.beforeEnter(p),o(p,t,n),((h=f&&f.onVnodeMounted)||y||v)&&queuePostRenderEffect((()=>{h&&invokeVNodeHook(h,s,e),y&&g.enter(p),v&&invokeDirectiveHook(e,null,s,"mounted")}),a)},E=(e,t,o,n,i)=>{if(o&&p(e,o),n)for(let t=0;t{const c=t.el=e.el;let{patchFlag:d,dynamicChildren:u,dirs:p}=t;d|=16&e.patchFlag;const h=e.props||EMPTY_OBJ,m=t.props||EMPTY_OBJ;let f;o&&toggleRecurse(o,!1),(f=m.onVnodeBeforeUpdate)&&invokeVNodeHook(f,o,t,e),p&&invokeDirectiveHook(t,e,o,"beforeUpdate"),o&&toggleRecurse(o,!0);const _=r&&"foreignObject"!==t.type;if(u?w(e.dynamicChildren,u,c,o,n,_,s):a||k(e,t,c,null,o,n,_,s,!1),d>0){if(16&d)C(c,t,h,m,o,n,r);else if(2&d&&h.class!==m.class&&i(c,"class",null,m.class,r),4&d&&i(c,"style",h.style,m.style,r),8&d){const s=t.dynamicProps;for(let t=0;t{f&&invokeVNodeHook(f,o,t,e),p&&invokeDirectiveHook(t,e,o,"updated")}),n)},w=(e,t,o,n,i,r,s)=>{for(let a=0;a{if(o!==n){if(o!==EMPTY_OBJ)for(const c in o)isReservedProp(c)||c in n||i(e,c,o[c],null,a,t.children,r,s,L);for(const c in n){if(isReservedProp(c))continue;const l=n[c],d=o[c];l!==d&&"value"!==c&&i(e,c,d,l,a,t.children,r,s,L)}"value"in n&&i(e,"value",o.value,n.value)}},A=(e,t,n,i,r,a,c,l,d)=>{const u=t.el=e?e.el:s(""),p=t.anchor=e?e.anchor:s("");let{patchFlag:h,dynamicChildren:m,slotScopeIds:f}=t;f&&(l=l?l.concat(f):f),null==e?(o(u,n,i),o(p,n,i),S(t.children,n,p,r,a,c,l,d)):h>0&&64&h&&m&&e.dynamicChildren?(w(e.dynamicChildren,m,n,r,a,c,l),(null!=t.key||r&&t===r.subTree)&&traverseStaticChildren(e,t,!0)):k(e,t,n,p,r,a,c,l,d)},I=(e,t,o,n,i,r,s,a,c)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?i.ctx.activate(t,o,n,s,c):$(t,o,n,i,r,s,c):O(e,t,c)},$=(e,t,o,n,i,r,s)=>{const a=e.component=createComponentInstance(e,n,i);if(isKeepAlive(e)&&(a.ctx.renderer=H),setupComponent(a),a.asyncDep){if(i&&i.registerDep(a,M),!e.el){const e=a.subTree=createVNode(Comment);_(null,e,t,o)}}else M(a,e,t,o,i,r,s)},O=(e,t,o)=>{const n=t.component=e.component;if(shouldUpdateComponent(e,t,o)){if(n.asyncDep&&!n.asyncResolved)return void T(n,t,o);n.next=t,invalidateJob(n.update),n.update()}else t.el=e.el,n.vnode=t},M=(e,t,o,n,i,r,s)=>{const a=e.effect=new ReactiveEffect((()=>{if(e.isMounted){let t,{next:o,bu:n,u:a,parent:c,vnode:l}=e,u=o;toggleRecurse(e,!1),o?(o.el=l.el,T(e,o,s)):o=l,n&&invokeArrayFns$1(n),(t=o.props&&o.props.onVnodeBeforeUpdate)&&invokeVNodeHook(t,c,o,l),toggleRecurse(e,!0);const p=renderComponentRoot(e),h=e.subTree;e.subTree=p,m(h,p,d(h.el),P(h),e,i,r),o.el=p.el,null===u&&updateHOCHostEl(e,p.el),a&&queuePostRenderEffect(a,i),(t=o.props&&o.props.onVnodeUpdated)&&queuePostRenderEffect((()=>invokeVNodeHook(t,c,o,l)),i)}else{let s;const{el:a,props:c}=t,{bm:l,m:d,parent:u}=e,p=isAsyncWrapper(t);if(toggleRecurse(e,!1),l&&invokeArrayFns$1(l),!p&&(s=c&&c.onVnodeBeforeMount)&&invokeVNodeHook(s,u,t),toggleRecurse(e,!0),a&&K){const o=()=>{e.subTree=renderComponentRoot(e),K(a,e.subTree,e,i,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&o())):o()}else{const s=e.subTree=renderComponentRoot(e);m(null,s,o,n,e,i,r),t.el=s.el}if(d&&queuePostRenderEffect(d,i),!p&&(s=c&&c.onVnodeMounted)){const e=t;queuePostRenderEffect((()=>invokeVNodeHook(s,u,e)),i)}(256&t.shapeFlag||u&&isAsyncWrapper(u.vnode)&&256&u.vnode.shapeFlag)&&e.a&&queuePostRenderEffect(e.a,i),e.isMounted=!0,t=o=n=null}}),(()=>queueJob(c)),e.scope),c=e.update=()=>a.run();c.id=e.uid,toggleRecurse(e,!0),c()},T=(e,t,o)=>{t.component=e;const n=e.vnode.props;e.vnode=t,e.next=null,updateProps(e,t.props,n,o),updateSlots(e,t.children,o),pauseTracking(),flushPreFlushCbs(),resetTracking()},k=function(e,t,o,n,i,r,s,a,c){void 0===c&&(c=!1);const d=e&&e.children,u=e?e.shapeFlag:0,p=t.children,{patchFlag:h,shapeFlag:m}=t;if(h>0){if(128&h)return void D(d,p,o,n,i,r,s,a,c);if(256&h)return void N(d,p,o,n,i,r,s,a,c)}8&m?(16&u&&L(d,i,r),p!==d&&l(o,p)):16&u?16&m?D(d,p,o,n,i,r,s,a,c):L(d,i,r,!0):(8&u&&l(o,""),16&m&&S(p,o,n,i,r,s,a,c))},N=(e,t,o,n,i,r,s,a,c)=>{t=t||EMPTY_ARR;const l=(e=e||EMPTY_ARR).length,d=t.length,u=Math.min(l,d);let p;for(p=0;pd?L(e,i,r,!0,!1,u):S(t,o,n,i,r,s,a,c,u)},D=(e,t,o,n,i,r,s,a,c)=>{let l=0;const d=t.length;let u=e.length-1,p=d-1;for(;l<=u&&l<=p;){const n=e[l],d=t[l]=c?cloneIfMounted(t[l]):normalizeVNode(t[l]);if(!isSameVNodeType(n,d))break;m(n,d,o,null,i,r,s,a,c),l++}for(;l<=u&&l<=p;){const n=e[u],l=t[p]=c?cloneIfMounted(t[p]):normalizeVNode(t[p]);if(!isSameVNodeType(n,l))break;m(n,l,o,null,i,r,s,a,c),u--,p--}if(l>u){if(l<=p){const e=p+1,u=ep)for(;l<=u;)R(e[l],i,r,!0),l++;else{const h=l,f=l,_=new Map;for(l=f;l<=p;l++){const e=t[l]=c?cloneIfMounted(t[l]):normalizeVNode(t[l]);null!=e.key&&_.set(e.key,l)}let g,v=0;const y=p-f+1;let E=!1,S=0;const b=new Array(y);for(l=0;l=y){R(n,i,r,!0);continue}let d;if(null!=n.key)d=_.get(n.key);else for(g=f;g<=p;g++)if(0===b[g-f]&&isSameVNodeType(n,t[g])){d=g;break}void 0===d?R(n,i,r,!0):(b[d-f]=l+1,d>=S?S=d:E=!0,m(n,t[d],o,null,i,r,s,a,c),v++)}const w=E?getSequence(b):EMPTY_ARR;for(g=w.length-1,l=y-1;l>=0;l--){const e=f+l,u=t[e],p=e+1{let i,{el:r,anchor:s}=e;for(;r&&r!==s;)i=u(r),o(r,t,n),r=i;o(s,t,n)})(t,n,i);if(2!==r&&1&p&&l)if(0===r)l.beforeEnter(a),o(a,n,i),queuePostRenderEffect((()=>l.enter(a)),s);else{const{leave:e,delayLeave:t,afterLeave:r}=l,s=()=>o(a,n,i),c=()=>{e(a,(()=>{s(),r&&r()}))};t?t(a,s,c):c()}else o(a,n,i)},R=function(e,t,o,n,i){void 0===n&&(n=!1),void 0===i&&(i=!1);const{type:r,props:s,ref:a,children:c,dynamicChildren:l,shapeFlag:d,patchFlag:u,dirs:p}=e;if(null!=a&&setRef(a,null,o,e,!0),256&d)return void t.ctx.deactivate(e);const h=1&d&&p,m=!isAsyncWrapper(e);let f;if(m&&(f=s&&s.onVnodeBeforeUnmount)&&invokeVNodeHook(f,t,e),6&d)V(e.component,o,n);else{if(128&d)return void e.suspense.unmount(o,n);h&&invokeDirectiveHook(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,o,i,H,n):l&&(r!==Fragment||u>0&&64&u)?L(l,t,o,!1,!0):(r===Fragment&&384&u||!i&&16&d)&&L(c,t,o),n&&x(e)}(m&&(f=s&&s.onVnodeUnmounted)||h)&&queuePostRenderEffect((()=>{f&&invokeVNodeHook(f,t,e),h&&invokeDirectiveHook(e,null,t,"unmounted")}),o)},x=e=>{const{type:t,el:o,anchor:i,transition:r}=e;if(t===Fragment)return void F(o,i);if(t===Static)return void(e=>{let t,{el:o,anchor:i}=e;for(;o&&o!==i;)t=u(o),n(o),o=t;n(i)})(e);const s=()=>{n(o),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:n}=r,i=()=>t(o,s);n?n(e.el,s,i):i()}else s()},F=(e,t)=>{let o;for(;e!==t;)o=u(e),n(e),e=o;n(t)},V=(e,t,o)=>{const{bum:n,scope:i,update:r,subTree:s,um:a}=e;n&&invokeArrayFns$1(n),i.stop(),r&&(r.active=!1,R(s,e,t,o)),a&&queuePostRenderEffect(a,t),queuePostRenderEffect((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},L=function(e,t,o,n,i,r){void 0===n&&(n=!1),void 0===i&&(i=!1),void 0===r&&(r=0);for(let s=r;s6&e.shapeFlag?P(e.component.subTree):128&e.shapeFlag?e.suspense.next():u(e.anchor||e.el),U=(e,t,o)=>{null==e?t._vnode&&R(t._vnode,null,null,!0):m(t._vnode||null,e,t,null,null,null,o),flushPreFlushCbs(),flushPostFlushCbs(),t._vnode=e},H={p:m,um:R,m:B,r:x,mt:$,mc:S,pc:k,pbc:w,n:P,o:e};let j,K;return t&&([j,K]=t(H)),{render:U,hydrate:j,createApp:createAppAPI(U,j)}}function toggleRecurse(e,t){let{effect:o,update:n}=e;o.allowRecurse=n.allowRecurse=t}function traverseStaticChildren(e,t,o){void 0===o&&(o=!1);const n=e.children,i=t.children;if(isArray$1(n)&&isArray$1(i))for(let e=0;e>1,e[o[a]]0&&(t[n]=o[r-1]),o[r]=n)}}for(r=o.length,s=o[r-1];r-- >0;)o[r]=s,s=t[s];return o}const isTeleport=e=>e.__isTeleport,Fragment=Symbol(void 0),Text=Symbol(void 0),Comment=Symbol(void 0),Static=Symbol(void 0),blockStack=[];let currentBlock=null;function openBlock(e){void 0===e&&(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}function setupBlock(e){return e.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(e),e}function createElementBlock(e,t,o,n,i,r){return setupBlock(createBaseVNode(e,t,o,n,i,r,!0))}function createBlock(e,t,o,n,i){return setupBlock(createVNode(e,t,o,n,i,!0))}function isVNode(e){return!!e&&!0===e.__v_isVNode}function isSameVNodeType(e,t){return e.type===t.type&&e.key===t.key}const InternalObjectKey="__vInternal",normalizeKey=e=>{let{key:t}=e;return null!=t?t:null},normalizeRef=e=>{let{ref:t,ref_key:o,ref_for:n}=e;return null!=t?isString$1(t)||isRef(t)||isFunction$1(t)?{i:currentRenderingInstance,r:t,k:o,f:!!n}:t:null};function createBaseVNode(e,t,o,n,i,r,s,a){void 0===t&&(t=null),void 0===o&&(o=null),void 0===n&&(n=0),void 0===i&&(i=null),void 0===r&&(r=e===Fragment?0:1),void 0===s&&(s=!1),void 0===a&&(a=!1);const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&normalizeKey(t),ref:t&&normalizeRef(t),scopeId:currentScopeId,slotScopeIds:null,children:o,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return a?(normalizeChildren(c,o),128&r&&e.normalize(c)):o&&(c.shapeFlag|=isString$1(o)?8:16),isBlockTreeEnabled>0&&!s&¤tBlock&&(c.patchFlag>0||6&r)&&32!==c.patchFlag&¤tBlock.push(c),c}const createVNode=_createVNode;function _createVNode(e,t,o,n,i,r){if(void 0===t&&(t=null),void 0===o&&(o=null),void 0===n&&(n=0),void 0===i&&(i=null),void 0===r&&(r=!1),e&&e!==NULL_DYNAMIC_COMPONENT||(e=Comment),isVNode(e)){const n=cloneVNode(e,t,!0);return o&&normalizeChildren(n,o),isBlockTreeEnabled>0&&!r&¤tBlock&&(6&n.shapeFlag?currentBlock[currentBlock.indexOf(e)]=n:currentBlock.push(n)),n.patchFlag|=-2,n}if(isClassComponent(e)&&(e=e.__vccOpts),t){t=guardReactiveProps(t);let{class:e,style:o}=t;e&&!isString$1(e)&&(t.class=normalizeClass(e)),isObject$2(o)&&(isProxy(o)&&!isArray$1(o)&&(o=extend$1({},o)),t.style=normalizeStyle(o))}return createBaseVNode(e,t,o,n,i,isString$1(e)?1:isSuspense(e)?128:isTeleport(e)?64:isObject$2(e)?4:isFunction$1(e)?2:0,r,!0)}function guardReactiveProps(e){return e?isProxy(e)||InternalObjectKey in e?extend$1({},e):e:null}function cloneVNode(e,t,o){void 0===o&&(o=!1);const{props:n,ref:i,patchFlag:r,children:s}=e,a=t?mergeProps(n||{},t):n;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&normalizeKey(a),ref:t&&t.ref?o&&i?isArray$1(i)?i.concat(normalizeRef(t)):[i,normalizeRef(t)]:normalizeRef(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Fragment?-1===r?16:16|r:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,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}}function createTextVNode(e,t){return void 0===e&&(e=" "),void 0===t&&(t=0),createVNode(Text,null,e,t)}function createCommentVNode(e,t){return void 0===e&&(e=""),void 0===t&&(t=!1),t?(openBlock(),createBlock(Comment,null,e)):createVNode(Comment,null,e)}function normalizeVNode(e){return null==e||"boolean"==typeof e?createVNode(Comment):isArray$1(e)?createVNode(Fragment,null,e.slice()):"object"==typeof e?cloneIfMounted(e):createVNode(Text,null,String(e))}function cloneIfMounted(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:cloneVNode(e)}function normalizeChildren(e,t){let o=0;const{shapeFlag:n}=e;if(null==t)t=null;else if(isArray$1(t))o=16;else if("object"==typeof t){if(65&n){const o=t.default;return void(o&&(o._c&&(o._d=!1),normalizeChildren(e,o()),o._c&&(o._d=!0)))}{o=32;const n=t._;n||InternalObjectKey in t?3===n&¤tRenderingInstance&&(1===currentRenderingInstance.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=currentRenderingInstance}}else isFunction$1(t)?(t={default:t,_ctx:currentRenderingInstance},o=32):(t=String(t),64&n?(o=16,t=[createTextVNode(t)]):o=8);e.children=t,e.shapeFlag|=o}function mergeProps(){const e={};for(let t=0;tcurrentInstance||currentRenderingInstance,setCurrentInstance=e=>{currentInstance=e,e.scope.on()},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),currentInstance=null};function isStatefulComponent(e){return 4&e.vnode.shapeFlag}let compile,isInSSRComponentSetup=!1;function setupComponent(e,t){void 0===t&&(t=!1),isInSSRComponentSetup=t;const{props:o,children:n}=e.vnode,i=isStatefulComponent(e);initProps(e,o,i,t),initSlots(e,n);const r=i?setupStatefulComponent(e,t):void 0;return isInSSRComponentSetup=!1,r}function setupStatefulComponent(e,t){const o=e.type;e.accessCache=Object.create(null),e.proxy=markRaw(new Proxy(e.ctx,PublicInstanceProxyHandlers));const{setup:n}=o;if(n){const o=e.setupContext=n.length>1?createSetupContext(e):null;setCurrentInstance(e),pauseTracking();const i=callWithErrorHandling(n,e,0,[e.props,o]);if(resetTracking(),unsetCurrentInstance(),isPromise$1(i)){if(i.then(unsetCurrentInstance,unsetCurrentInstance),t)return i.then((o=>{handleSetupResult(e,o,t)})).catch((t=>{handleError$1(t,e,0)}));e.asyncDep=i}else handleSetupResult(e,i,t)}else finishComponentSetup(e,t)}function handleSetupResult(e,t,o){isFunction$1(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:isObject$2(t)&&(e.setupState=proxyRefs(t)),finishComponentSetup(e,o)}function finishComponentSetup(e,t,o){const n=e.type;if(!e.render){if(!t&&compile&&!n.render){const t=n.template||resolveMergedOptions(e).template;if(t){const{isCustomElement:o,compilerOptions:i}=e.appContext.config,{delimiters:r,compilerOptions:s}=n,a=extend$1(extend$1({isCustomElement:o,delimiters:r},i),s);n.render=compile(t,a)}}e.render=n.render||NOOP}setCurrentInstance(e),pauseTracking(),applyOptions(e),resetTracking(),unsetCurrentInstance()}function createAttrsProxy(e){return new Proxy(e.attrs,{get:(t,o)=>(track(e,"get","$attrs"),t[o])})}function createSetupContext(e){const t=t=>{e.exposed=t||{}};let o;return{get attrs(){return o||(o=createAttrsProxy(e))},slots:e.slots,emit:e.emit,expose:t}}function getExposeProxy(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(proxyRefs(markRaw(e.exposed)),{get:(t,o)=>o in t?t[o]:o in publicPropertiesMap?publicPropertiesMap[o](e):void 0,has:(e,t)=>t in e||t in publicPropertiesMap}))}function getComponentName(e,t){return void 0===t&&(t=!0),isFunction$1(e)?e.displayName||e.name:e.name||t&&e.__name}function isClassComponent(e){return isFunction$1(e)&&"__vccOpts"in e}const computed=(e,t)=>computed$1(e,t,isInSSRComponentSetup);function h(e,t,o){const n=arguments.length;return 2===n?isObject$2(t)&&!isArray$1(t)?isVNode(t)?createVNode(e,null,[t]):createVNode(e,t):createVNode(e,null,t):(n>3?o=Array.prototype.slice.call(arguments,2):3===n&&isVNode(o)&&(o=[o]),createVNode(e,t,o))}const ssrContextKey=Symbol(""),useSSRContext=()=>inject(ssrContextKey),version="3.2.45";function makeMap(e,t){const o=Object.create(null),n=e.split(",");for(let e=0;e!!o[e.toLowerCase()]:e=>!!o[e]}const specialBooleanAttrs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",isSpecialBooleanAttr=makeMap(specialBooleanAttrs);function includeBooleanAttr(e){return!!e||""===e}const onRE=/^on[^a-z]/,isOn=e=>onRE.test(e),isModelListener=e=>e.startsWith("onUpdate:"),extend=Object.assign,isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isObject$1=e=>null!==e&&"object"==typeof e,cacheStringFunction=e=>{const t=Object.create(null);return o=>t[o]||(t[o]=e(o))},hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction((e=>e.replace(hyphenateRE,"-$1").toLowerCase())),capitalize=cacheStringFunction((e=>e.charAt(0).toUpperCase()+e.slice(1))),invokeArrayFns=(e,t)=>{for(let o=0;o{const t=parseFloat(e);return isNaN(t)?e:t},svgNS="http://www.w3.org/2000/svg",doc="undefined"!=typeof document?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,n)=>{const i=t?doc.createElementNS(svgNS,e):doc.createElement(e,o?{is:o}:void 0);return"select"===e&&n&&null!=n.multiple&&i.setAttribute("multiple",n.multiple),i},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,o,n,i,r){const s=o?o.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),o),i!==r&&(i=i.nextSibling););else{templateContainer.innerHTML=n?""+e+"":e;const i=templateContainer.content;if(n){const e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,o)}return[s?s.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}};function patchClass(e,t,o){const n=e._vtc;n&&(t=(t?[t,...n]:[...n]).join(" ")),null==t?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}function patchStyle(e,t,o){const n=e.style,i=isString(o);if(o&&!i){for(const e in o)setStyle(n,e,o[e]);if(t&&!isString(t))for(const e in t)null==o[e]&&setStyle(n,e,"")}else{const r=n.display;i?t!==o&&(n.cssText=o):t&&e.removeAttribute("style"),"_vod"in e&&(n.display=r)}}const importantRE=/\s*!important$/;function setStyle(e,t,o){if(isArray(o))o.forEach((o=>setStyle(e,t,o)));else if(null==o&&(o=""),t.startsWith("--"))e.setProperty(t,o);else{const n=autoPrefix(e,t);importantRE.test(o)?e.setProperty(hyphenate(n),o.replace(importantRE,""),"important"):e[n]=o}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(e,t){const o=prefixCache[t];if(o)return o;let n=camelize(t);if("filter"!==n&&n in e)return prefixCache[t]=n;n=capitalize(n);for(let o=0;ocachedNow||(p.then((()=>cachedNow=0)),cachedNow=Date.now());function createInvoker(e,t){const o=e=>{if(e._vts){if(e._vts<=o.attached)return}else e._vts=Date.now();callWithAsyncErrorHandling(patchStopImmediatePropagation(e,o.value),t,5,[e])};return o.value=e,o.attached=getNow(),o}function patchStopImmediatePropagation(e,t){if(isArray(t)){const o=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{o.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}const nativeOnRE=/^on[a-z]/,patchProp=function(e,t,o,n,i,r,s,a,c){void 0===i&&(i=!1),"class"===t?patchClass(e,n,i):"style"===t?patchStyle(e,o,n):isOn(t)?isModelListener(t)||patchEvent(e,t,o,n,s):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):shouldSetAsProp(e,t,n,i))?patchDOMProp(e,t,n,r,s,a,c):("true-value"===t?e._trueValue=n:"false-value"===t&&(e._falseValue=n),patchAttr(e,t,n,i))};function shouldSetAsProp(e,t,o,n){return n?"innerHTML"===t||"textContent"===t||!!(t in e&&nativeOnRE.test(t)&&isFunction(o)):"spellcheck"!==t&&"draggable"!==t&&"translate"!==t&&("form"!==t&&(("list"!==t||"INPUT"!==e.tagName)&&(("type"!==t||"TEXTAREA"!==e.tagName)&&((!nativeOnRE.test(t)||!isString(o))&&t in e))))}const TRANSITION="transition",ANIMATION="animation",Transition=(e,t)=>{let{slots:o}=t;return h(BaseTransition,resolveTransitionProps(e),o)};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({},BaseTransition.props,DOMTransitionPropsValidators);const callHook=function(e,t){void 0===t&&(t=[]),isArray(e)?e.forEach((e=>e(...t))):e&&e(...t)},hasExplicitCallback=e=>!!e&&(isArray(e)?e.some((e=>e.length>1)):e.length>1);function resolveTransitionProps(e){const t={};for(const o in e)o in DOMTransitionPropsValidators||(t[o]=e[o]);if(!1===e.css)return t;const{name:o="v",type:n,duration:i,enterFromClass:r=o+"-enter-from",enterActiveClass:s=o+"-enter-active",enterToClass:a=o+"-enter-to",appearFromClass:c=r,appearActiveClass:l=s,appearToClass:d=a,leaveFromClass:u=o+"-leave-from",leaveActiveClass:p=o+"-leave-active",leaveToClass:h=o+"-leave-to"}=e,m=normalizeDuration(i),f=m&&m[0],_=m&&m[1],{onBeforeEnter:g,onEnter:v,onEnterCancelled:y,onLeave:E,onLeaveCancelled:S,onBeforeAppear:b=g,onAppear:w=v,onAppearCancelled:C=y}=t,A=(e,t,o)=>{removeTransitionClass(e,t?d:a),removeTransitionClass(e,t?l:s),o&&o()},I=(e,t)=>{e._isLeaving=!1,removeTransitionClass(e,u),removeTransitionClass(e,h),removeTransitionClass(e,p),t&&t()},$=e=>(t,o)=>{const i=e?w:v,s=()=>A(t,e,o);callHook(i,[t,s]),nextFrame((()=>{removeTransitionClass(t,e?c:r),addTransitionClass(t,e?d:a),hasExplicitCallback(i)||whenTransitionEnds(t,n,f,s)}))};return extend(t,{onBeforeEnter(e){callHook(g,[e]),addTransitionClass(e,r),addTransitionClass(e,s)},onBeforeAppear(e){callHook(b,[e]),addTransitionClass(e,c),addTransitionClass(e,l)},onEnter:$(!1),onAppear:$(!0),onLeave(e,t){e._isLeaving=!0;const o=()=>I(e,t);addTransitionClass(e,u),forceReflow(),addTransitionClass(e,p),nextFrame((()=>{e._isLeaving&&(removeTransitionClass(e,u),addTransitionClass(e,h),hasExplicitCallback(E)||whenTransitionEnds(e,n,_,o))})),callHook(E,[e,o])},onEnterCancelled(e){A(e,!1),callHook(y,[e])},onAppearCancelled(e){A(e,!0),callHook(C,[e])},onLeaveCancelled(e){I(e),callHook(S,[e])}})}function normalizeDuration(e){if(null==e)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((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function removeTransitionClass(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:o}=e;o&&(o.delete(t),o.size||(e._vtc=void 0))}function nextFrame(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let endId=0;function whenTransitionEnds(e,t,o,n){const i=e._endId=++endId,r=()=>{i===e._endId&&n()};if(o)return setTimeout(r,o);const{type:s,timeout:a,propCount:c}=getTransitionInfo(e,t);if(!s)return n();const l=s+"end";let d=0;const u=()=>{e.removeEventListener(l,p),r()},p=t=>{t.target===e&&++d>=c&&u()};setTimeout((()=>{d(o[e]||"").split(", "),i=n(TRANSITION+"Delay"),r=n(TRANSITION+"Duration"),s=getTimeout(i,r),a=n(ANIMATION+"Delay"),c=n(ANIMATION+"Duration"),l=getTimeout(a,c);let d=null,u=0,p=0;t===TRANSITION?s>0&&(d=TRANSITION,u=s,p=r.length):t===ANIMATION?l>0&&(d=ANIMATION,u=l,p=c.length):(u=Math.max(s,l),d=u>0?s>l?TRANSITION:ANIMATION:null,p=d?d===TRANSITION?r.length:c.length:0);return{type:d,timeout:u,propCount:p,hasTransform:d===TRANSITION&&/\b(transform|all)(,|$)/.test(n(TRANSITION+"Property").toString())}}function getTimeout(e,t){for(;e.lengthtoMs(t)+toMs(e[o]))))}function toMs(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function forceReflow(){return document.body.offsetHeight}const getModelAssigner=e=>{const t=e.props["onUpdate:modelValue"]||!1;return isArray(t)?e=>invokeArrayFns(t,e):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 vModelText={created(e,t,o){let{modifiers:{lazy:n,trim:i,number:r}}=t;e._assign=getModelAssigner(o);const s=r||o.props&&"number"===o.props.type;addEventListener(e,n?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;i&&(o=o.trim()),s&&(o=toNumber(o)),e._assign(o)})),i&&addEventListener(e,"change",(()=>{e.value=e.value.trim()})),n||(addEventListener(e,"compositionstart",onCompositionStart),addEventListener(e,"compositionend",onCompositionEnd),addEventListener(e,"change",onCompositionEnd))},mounted(e,t){let{value:o}=t;e.value=null==o?"":o},beforeUpdate(e,t,o){let{value:n,modifiers:{lazy:i,trim:r,number:s}}=t;if(e._assign=getModelAssigner(o),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(i)return;if(r&&e.value.trim()===n)return;if((s||"number"===e.type)&&toNumber(e.value)===n)return}const a=null==n?"":n;e.value!==a&&(e.value=a)}},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&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>systemModifiers.some((o=>e[o+"Key"]&&!t.includes(o)))},withModifiers=(e,t)=>function(o){for(let e=0;e1?n-1:0),r=1;ro=>{if(!("key"in o))return;const n=hyphenate(o.key);return t.some((e=>e===n||keyNames[e]===n))?e(o):void 0},vShow={beforeMount(e,t,o){let{value:n}=t,{transition:i}=o;e._vod="none"===e.style.display?"":e.style.display,i&&n?i.beforeEnter(e):setDisplay(e,n)},mounted(e,t,o){let{value:n}=t,{transition:i}=o;i&&n&&i.enter(e)},updated(e,t,o){let{value:n,oldValue:i}=t,{transition:r}=o;!n!=!i&&(r?n?(r.beforeEnter(e),setDisplay(e,!0),r.enter(e)):r.leave(e,(()=>{setDisplay(e,!1)})):setDisplay(e,n))},beforeUnmount(e,t){let{value:o}=t;setDisplay(e,o)}};function setDisplay(e,t){e.style.display=t?e._vod:"none"}const rendererOptions=extend({patchProp:patchProp},nodeOps);let renderer;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}const createApp=function(){const e=ensureRenderer().createApp(...arguments),{mount:t}=e;return e.mount=o=>{const n=normalizeContainer(o);if(!n)return;const i=e._component;isFunction(i)||i.render||i.template||(i.template=n.innerHTML),n.innerHTML="";const r=t(n,!1,n instanceof SVGElement);return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),r},e};function normalizeContainer(e){if(isString(e)){return document.querySelector(e)}return 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{notify(e,_extends({type:"message",dismiss:!0},t))},error:(e,t)=>{notify(e,_extends({type:"error",dismiss:!0},t))},ask:e=>window.confirm(e)};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"dir"===this.item.type},size(){return this.item.size?`${(this.item.size/1024).toFixed(2)}`:""},selected(){return!!this.isSelected()}},methods:{onDblClick(){if(this.isDir)return void this.navigateTo(this.item.path);this.item.extension&&["jpg","jpeg","png","gif","webp","mp4","mp3","pdf"].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={path:!1,thumb:!1,fileType:!!this.item.mime_type&&this.item.mime_type,extension:!!this.item.extension&&this.item.extension};if("file"===this.item.type&&(t.path=this.item.path,t.thumb=!!this.item.thumb&&this.item.thumb,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())return e.shiftKey||13===e.keyCode||this.$store.commit(UNSELECT_ALL_BROWSER_ITEMS),void this.$store.commit(SELECT_BROWSER_ITEM,this.item);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=["data-type"],_hoisted_2$t={scope:"row",class:"name"},_hoisted_3$j={class:"size"},_hoisted_4$b={key:0},_hoisted_5$a={class:"dimension"},_hoisted_6$8={class:"created"},_hoisted_7$6={class:"modified"};function render$v(e,t,o,n,i,r){return openBlock(),createElementBlock("tr",{class:normalizeClass(["media-browser-item",{selected:r.selected}]),onDblclick:t[0]||(t[0]=withModifiers((e=>r.onDblClick()),["stop","prevent"])),onClick:t[1]||(t[1]=(...e)=>r.onClick&&r.onClick(...e))},[createBaseVNode("td",{class:"type","data-type":o.item.extension},null,8,_hoisted_1$v),createBaseVNode("th",_hoisted_2$t,toDisplayString(o.item.name),1),createBaseVNode("td",_hoisted_3$j,[createTextVNode(toDisplayString(r.size),1),""!==r.size?(openBlock(),createElementBlock("span",_hoisted_4$b,"KB")):createCommentVNode("v-if",!0)]),createBaseVNode("td",_hoisted_5$a,toDisplayString(r.dimension),1),createBaseVNode("td",_hoisted_6$8,toDisplayString(o.item.create_date_formatted),1),createBaseVNode("td",_hoisted_7$6,toDisplayString(o.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,"asc"===this.$store.state.sortDirection?"desc":"asc")}}};const _hoisted_1$u={class:"table media-browser-table"},_hoisted_2$s={class:"visually-hidden"},_hoisted_3$i={class:"media-browser-table-head"},_hoisted_4$a=createBaseVNode("th",{class:"type",scope:"col"},null,-1),_hoisted_5$9={class:"name",scope:"col"},_hoisted_6$7={class:"size",scope:"col"},_hoisted_7$5={class:"dimension",scope:"col"},_hoisted_8$5={class:"created",scope:"col"},_hoisted_9$5={class:"modified",scope:"col"};function render$u(e,t,o,n,i,r){const s=resolveComponent("MediaBrowserItemRow");return openBlock(),createElementBlock("table",_hoisted_1$u,[createBaseVNode("caption",_hoisted_2$s,toDisplayString(e.sprintf("COM_MEDIA_BROWSER_TABLE_CAPTION",o.currentDirectory)),1),createBaseVNode("thead",_hoisted_3$i,[createBaseVNode("tr",null,[_hoisted_4$a,createBaseVNode("th",_hoisted_5$9,[createBaseVNode("button",{class:"btn btn-link",onClick:t[0]||(t[0]=e=>r.changeOrder("name"))},[createTextVNode(toDisplayString(e.translate("COM_MEDIA_MEDIA_NAME"))+" ",1),createBaseVNode("span",{class:normalizeClass(["ms-1",{"icon-sort":"name"!==e.$store.state.sortBy,"icon-caret-up":"name"===e.$store.state.sortBy&&"asc"===e.$store.state.sortDirection,"icon-caret-down":"name"===e.$store.state.sortBy&&"desc"===e.$store.state.sortDirection}]),"aria-hidden":"true"},null,2)])]),createBaseVNode("th",_hoisted_6$7,[createBaseVNode("button",{class:"btn btn-link",onClick:t[1]||(t[1]=e=>r.changeOrder("size"))},[createTextVNode(toDisplayString(e.translate("COM_MEDIA_MEDIA_SIZE"))+" ",1),createBaseVNode("span",{class:normalizeClass(["ms-1",{"icon-sort":"size"!==e.$store.state.sortBy,"icon-caret-up":"size"===e.$store.state.sortBy&&"asc"===e.$store.state.sortDirection,"icon-caret-down":"size"===e.$store.state.sortBy&&"desc"===e.$store.state.sortDirection}]),"aria-hidden":"true"},null,2)])]),createBaseVNode("th",_hoisted_7$5,[createBaseVNode("button",{class:"btn btn-link",onClick:t[2]||(t[2]=e=>r.changeOrder("dimension"))},[createTextVNode(toDisplayString(e.translate("COM_MEDIA_MEDIA_DIMENSION"))+" ",1),createBaseVNode("span",{class:normalizeClass(["ms-1",{"icon-sort":"dimension"!==e.$store.state.sortBy,"icon-caret-up":"dimension"===e.$store.state.sortBy&&"asc"===e.$store.state.sortDirection,"icon-caret-down":"dimension"===e.$store.state.sortBy&&"desc"===e.$store.state.sortDirection}]),"aria-hidden":"true"},null,2)])]),createBaseVNode("th",_hoisted_8$5,[createBaseVNode("button",{class:"btn btn-link",onClick:t[3]||(t[3]=e=>r.changeOrder("date_created"))},[createTextVNode(toDisplayString(e.translate("COM_MEDIA_MEDIA_DATE_CREATED"))+" ",1),createBaseVNode("span",{class:normalizeClass(["ms-1",{"icon-sort":"date_created"!==e.$store.state.sortBy,"icon-caret-up":"date_created"===e.$store.state.sortBy&&"asc"===e.$store.state.sortDirection,"icon-caret-down":"date_created"===e.$store.state.sortBy&&"desc"===e.$store.state.sortDirection}]),"aria-hidden":"true"},null,2)])]),createBaseVNode("th",_hoisted_9$5,[createBaseVNode("button",{class:"btn btn-link",onClick:t[4]||(t[4]=e=>r.changeOrder("date_modified"))},[createTextVNode(toDisplayString(e.translate("COM_MEDIA_MEDIA_DATE_MODIFIED"))+" ",1),createBaseVNode("span",{class:normalizeClass(["ms-1",{"icon-sort":"date_modified"!==e.$store.state.sortBy,"icon-caret-up":"date_modified"===e.$store.state.sortBy&&"asc"===e.$store.state.sortDirection,"icon-caret-down":"date_modified"===e.$store.state.sortBy&&"desc"===e.$store.state.sortDirection}]),"aria-hidden":"true"},null,2)])])])]),createBaseVNode("tbody",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(o.localItems,(e=>(openBlock(),createBlock(s,{key:e.path,item:e},null,8,["item"])))),128))])])}script$u.render=render$u,script$u.__file="administrator/components/com_media/resources/scripts/components/browser/table/table.vue";const dirname=e=>{if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e));if(0===e.length)return".";let t=e.charCodeAt(0);const o=47===t;let n=-1,i=!0;for(let o=e.length-1;o>=1;--o)if(t=e.charCodeAt(o),47===t){if(!i){n=o;break}}else i=!1;return-1===n?o?"/":".":o&&1===n?"//":e.slice(0,n)};function normalizeItem(e){return"dir"===e.type&&(e.directories=[],e.files=[]),e.directory=dirname(e.path),-1!==e.directory.indexOf(":",e.directory.length-1)&&(e.directory+="/"),e}function normalizeArray(e){return{directories:e.filter((e=>"dir"===e.type)).map((e=>normalizeItem(e))),files:e.filter((e=>"file"===e.type)).map((e=>normalizeItem(e)))}}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 e=Joomla.getOptions("com_media",{});if(void 0===e.apiBaseUrl)throw new TypeError("Media api baseUrl is not defined");if(void 0===e.csrfToken)throw new TypeError("Media api csrf token is not defined");this.baseUrl=e.apiBaseUrl,this.csrfToken=Joomla.getOptions("csrf.token"),this.imagesExtensions=e.imagesExtensions,this.audioExtensions=e.audioExtensions,this.videoExtensions=e.videoExtensions,this.documentExtensions=e.documentExtensions,this.mediaVersion=(new Date).getTime().toString(),this.canCreate=e.canCreate||!1,this.canEdit=e.canEdit||!1,this.canDelete=e.canDelete||!1}getContents(e,t,o){return void 0===t&&(t=!1),void 0===o&&(o=!1),new Promise(((n,i)=>{const r=new URL(this.baseUrl+"&task=api.files&path="+encodeURIComponent(e));t&&r.searchParams.append("url",t),o&&r.searchParams.append("content",o),Joomla.request({url:r.toString(),method:"GET",headers:{"Content-Type":"application/json"},onSuccess:e=>{n(normalizeArray(JSON.parse(e).data))},onError:e=>{i(e)}})})).catch(handleError)}createDirectory(e,t){return new Promise(((o,n)=>{const i=new URL(this.baseUrl+"&task=api.files&path="+encodeURIComponent(t)),r={[this.csrfToken]:"1",name:e};Joomla.request({url:i.toString(),method:"POST",data:JSON.stringify(r),headers:{"Content-Type":"application/json"},onSuccess:e=>{notifications.success("COM_MEDIA_CREATE_NEW_FOLDER_SUCCESS"),o(normalizeItem(JSON.parse(e).data))},onError:e=>{notifications.error("COM_MEDIA_CREATE_NEW_FOLDER_ERROR"),n(e)}})})).catch(handleError)}upload(e,t,o,n){return new Promise(((i,r)=>{const s=new URL(this.baseUrl+"&task=api.files&path="+encodeURIComponent(t)),a={[this.csrfToken]:"1",name:e,content:o};!0===n&&(a.override=!0),Joomla.request({url:s.toString(),method:"POST",data:JSON.stringify(a),headers:{"Content-Type":"application/json"},onSuccess:e=>{notifications.success("COM_MEDIA_UPLOAD_SUCCESS"),i(normalizeItem(JSON.parse(e).data))},onError:e=>{r(e)}})})).catch(handleError)}rename(e,t){return new Promise(((o,n)=>{const i=new URL(this.baseUrl+"&task=api.files&path="+encodeURIComponent(e)),r={[this.csrfToken]:"1",newPath:t};Joomla.request({url:i.toString(),method:"PUT",data:JSON.stringify(r),headers:{"Content-Type":"application/json"},onSuccess:e=>{notifications.success("COM_MEDIA_RENAME_SUCCESS"),o(normalizeItem(JSON.parse(e).data))},onError:e=>{notifications.error("COM_MEDIA_RENAME_ERROR"),n(e)}})})).catch(handleError)}delete(e){return new Promise(((t,o)=>{const n=new URL(this.baseUrl+"&task=api.files&path="+encodeURIComponent(e)),i={[this.csrfToken]:"1"};Joomla.request({url:n.toString(),method:"DELETE",data:JSON.stringify(i),headers:{"Content-Type":"application/json"},onSuccess:()=>{notifications.success("COM_MEDIA_DELETE_SUCCESS"),t()},onError:e=>{notifications.error("COM_MEDIA_DELETE_ERROR"),o(e)}})})).catch(handleError)}}const api=new Api;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=createBaseVNode("span",{class:"image-browser-action icon-pencil-alt","aria-hidden":"true"},null,-1),_hoisted_2$r={class:"action-text"};function render$t(e,t,o,n,i,r){return openBlock(),createElementBlock("button",{type:"button",class:"action-edit",onKeyup:[t[0]||(t[0]=withKeys((e=>r.editItem()),["enter"])),t[1]||(t[1]=withKeys((e=>r.editItem()),["space"])),t[5]||(t[5]=withKeys((e=>r.hideActions()),["esc"]))],onClick:t[2]||(t[2]=withModifiers((e=>r.editItem()),["stop"])),onFocus:t[3]||(t[3]=e=>r.focused(!0)),onBlur:t[4]||(t[4]=e=>r.focused(!1))},[_hoisted_1$t,createBaseVNode("span",_hoisted_2$r,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=createBaseVNode("span",{class:"image-browser-action icon-trash","aria-hidden":"true"},null,-1),_hoisted_2$q={class:"action-text"};function render$s(e,t,o,n,i,r){return openBlock(),createElementBlock("button",{type:"button",class:"action-delete",onKeyup:[t[0]||(t[0]=withKeys((e=>r.openConfirmDeleteModal()),["enter"])),t[1]||(t[1]=withKeys((e=>r.openConfirmDeleteModal()),["space"])),t[4]||(t[4]=withKeys((e=>r.hideActions()),["esc"]))],onFocus:t[2]||(t[2]=e=>r.focused(!0)),onBlur:t[3]||(t[3]=e=>r.focused(!1)),onClick:t[5]||(t[5]=withModifiers((e=>r.openConfirmDeleteModal()),["stop"]))},[_hoisted_1$s,createBaseVNode("span",_hoisted_2$q,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=createBaseVNode("span",{class:"image-browser-action icon-download","aria-hidden":"true"},null,-1),_hoisted_2$p={class:"action-text"};function render$r(e,t,o,n,i,r){return openBlock(),createElementBlock("button",{type:"button",class:"action-download",onKeyup:[t[0]||(t[0]=withKeys((e=>r.download()),["enter"])),t[1]||(t[1]=withKeys((e=>r.download()),["space"])),t[5]||(t[5]=withKeys((e=>r.hideActions()),["esc"]))],onClick:t[2]||(t[2]=withModifiers((e=>r.download()),["stop"])),onFocus:t[3]||(t[3]=e=>r.focused(!0)),onBlur:t[4]||(t[4]=e=>r.focused(!1))},[_hoisted_1$r,createBaseVNode("span",_hoisted_2$p,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=createBaseVNode("span",{class:"image-browser-action icon-search-plus","aria-hidden":"true"},null,-1),_hoisted_2$o={class:"action-text"};function render$q(e,t,o,n,i,r){return openBlock(),createElementBlock("button",{type:"button",class:"action-preview",onClick:t[0]||(t[0]=withModifiers((e=>r.openPreview()),["stop"])),onKeyup:[t[1]||(t[1]=withKeys((e=>r.openPreview()),["enter"])),t[2]||(t[2]=withKeys((e=>r.openPreview()),["space"])),t[5]||(t[5]=withKeys((e=>r.hideActions()),["esc"]))],onFocus:t[3]||(t[3]=e=>r.focused(!0)),onBlur:t[4]||(t[4]=e=>r.focused(!1))},[_hoisted_1$q,createBaseVNode("span",_hoisted_2$o,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=createBaseVNode("span",{class:"image-browser-action fa fa-i-cursor","aria-hidden":"true"},null,-1),_hoisted_2$n={class:"action-text"};function render$p(e,t,o,n,i,r){return openBlock(),createElementBlock("button",{ref:"actionRenameButton",type:"button",class:"action-rename",onClick:t[0]||(t[0]=withModifiers((e=>r.openRenameModal()),["stop"])),onKeyup:[t[1]||(t[1]=withKeys((e=>r.openRenameModal()),["enter"])),t[2]||(t[2]=withKeys((e=>r.openRenameModal()),["space"])),t[5]||(t[5]=withKeys((e=>r.hideActions()),["esc"]))],onFocus:t[3]||(t[3]=e=>r.focused(!0)),onBlur:t[4]||(t[4]=e=>r.focused(!1))},[_hoisted_1$p,createBaseVNode("span",_hoisted_2$n,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=createBaseVNode("span",{class:"image-browser-action icon-link","aria-hidden":"true"},null,-1),_hoisted_2$m={class:"action-text"};function render$o(e,t,o,n,i,r){return openBlock(),createElementBlock("button",{type:"button",class:"action-url",onClick:t[0]||(t[0]=withModifiers((e=>r.openShareUrlModal()),["stop"])),onKeyup:[t[1]||(t[1]=withKeys((e=>r.openShareUrlModal()),["enter"])),t[2]||(t[2]=withKeys((e=>r.openShareUrlModal()),["space"])),t[5]||(t[5]=withKeys((e=>r.hideActions()),["esc"]))],onFocus:t[3]||(t[3]=e=>r.focused(!0)),onBlur:t[4]||(t[4]=e=>r.focused(!1))},[_hoisted_1$o,createBaseVNode("span",_hoisted_2$m,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,o,n,i,r){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((e=>r.openActions()),["enter"])),t[4]||(t[4]=withKeys((e=>r.openActions()),["space"]))],onFocus:t[2]||(t[2]=e=>r.focused(!0)),onBlur:t[3]||(t[3]=e=>r.focused(!1))},[createBaseVNode("span",{class:"image-browser-action icon-ellipsis-h","aria-hidden":"true",onClick:t[0]||(t[0]=withModifiers((e=>r.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:()=>({showActions:!1}),computed:{canEdit(){return api.canEdit&&(void 0===this.item.canEdit||this.item.canEdit)},canDelete(){return api.canDelete&&(void 0===this.item.canDelete||this.item.canDelete)},canOpenEditView(){return["jpg","jpeg","png"].includes(this.item.extension.toLowerCase())}},watch:{"$store.state.showRenameModal":function(e){!e&&this.$refs.actionToggle&&void 0!==this.$store.state.selectedItems.find((e=>e.name===this.item.name))&&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(((e,t)=>{e.tabIndex=0===t?0:-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,o)=>{o===e.length?t.tabIndex=0:t.tabIndex=-1})),this.$nextTick((()=>e[e.length-1].focus())))},focusNext(e){const t=e.target,o=[...t.parentElement.querySelectorAll("button")],n=o[o.length-1];t.tabIndex=-1,t===n?(o[0].focus(),o[0].tabIndex=0):(t.nextElementSibling.focus(),t.nextElementSibling.tabIndex=0)},focusPrev(e){const t=e.target,o=[...t.parentElement.querySelectorAll("button")],n=o[0];t.tabIndex=-1,t===n?(o[o.length-1].focus(),o[o.length-1].tabIndex=0):(t.previousElementSibling.focus(),t.previousElementSibling.tabIndex=0)},focusFirst(e){const t=[...e.target.parentElement.querySelectorAll("button")];t[0].focus(),t.forEach(((e,t)=>{e.tabIndex=0===t?0:-1}))},focusLast(e){const t=[...e.target.parentElement.querySelectorAll("button")];t[t.length-1].focus(),t.forEach(((e,o)=>{o===t.length?e.tabIndex=0:e.tabIndex=-1}))},editItem(){this.edit()},focused(e){this.$emit("toggle-settings",e)}}};const _hoisted_1$m=["aria-label","title"],_hoisted_2$l=["aria-label"],_hoisted_3$h={"aria-hidden":"true",class:"media-browser-actions-item-name"};function render$m(e,t,o,n,i,r){const s=resolveComponent("MediaBrowserActionItemToggle"),a=resolveComponent("MediaBrowserActionItemPreview"),c=resolveComponent("MediaBrowserActionItemDownload"),l=resolveComponent("MediaBrowserActionItemRename"),d=resolveComponent("MediaBrowserActionItemEdit"),u=resolveComponent("MediaBrowserActionItemShare"),p=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]=e=>r.focused(!0)),onFocusout:t[1]||(t[1]=e=>r.focused(!1))},null,40,_hoisted_1$m),createBaseVNode("div",{class:normalizeClass(["media-browser-actions",{active:i.showActions}])},[createVNode(s,{ref:"actionToggle","main-action":r.openActions,onOnFocused:r.focused,onKeyup:[t[2]||(t[2]=withKeys((e=>r.openLastActions()),["up"])),t[3]||(t[3]=withKeys((e=>r.openActions()),["down"])),t[4]||(t[4]=withKeys((e=>r.openLastActions()),["end"])),t[5]||(t[5]=withKeys((e=>r.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"]),i.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$h,[createBaseVNode("strong",null,toDisplayString(e.$parent.$props.item.name),1)]),o.previewable?(openBlock(),createBlock(a,{key:0,ref:"actionPreview","on-focused":r.focused,"main-action":r.openPreview,"closing-action":r.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(r.hideActions,["tab"])],onKeyup:[withKeys(r.focusPrev,["up"]),withKeys(r.focusNext,["down"]),withKeys(r.focusLast,["end"]),withKeys(r.focusFirst,["home"]),withKeys(r.hideActions,["esc"])]},null,8,["on-focused","main-action","closing-action","onKeyup","onKeydown"])):createCommentVNode("v-if",!0),o.downloadable?(openBlock(),createBlock(c,{key:1,ref:"actionDownload","on-focused":r.focused,"main-action":r.download,"closing-action":r.hideActions,onKeydown:[t[14]||(t[14]=withKeys(withModifiers((()=>{}),["prevent"]),["up"])),t[15]||(t[15]=withKeys(withModifiers((()=>{}),["prevent"]),["down"])),withKeys(r.hideActions,["tab"]),t[16]||(t[16]=withKeys(withModifiers((()=>{}),["prevent"]),["home"])),t[17]||(t[17]=withKeys(withModifiers((()=>{}),["prevent"]),["end"]))],onKeyup:[withKeys(r.focusPrev,["up"]),withKeys(r.focusNext,["down"]),withKeys(r.hideActions,["esc"]),withKeys(r.focusLast,["end"]),withKeys(r.focusFirst,["home"])]},null,8,["on-focused","main-action","closing-action","onKeyup","onKeydown"])):createCommentVNode("v-if",!0),r.canEdit?(openBlock(),createBlock(l,{key:2,ref:"actionRename","on-focused":r.focused,"main-action":r.openRenameModal,"closing-action":r.hideActions,onKeydown:[t[18]||(t[18]=withKeys(withModifiers((()=>{}),["prevent"]),["up"])),t[19]||(t[19]=withKeys(withModifiers((()=>{}),["prevent"]),["down"])),withKeys(r.hideActions,["tab"]),t[20]||(t[20]=withKeys(withModifiers((()=>{}),["prevent"]),["home"])),t[21]||(t[21]=withKeys(withModifiers((()=>{}),["prevent"]),["end"]))],onKeyup:[withKeys(r.focusPrev,["up"]),withKeys(r.focusNext,["down"]),withKeys(r.hideActions,["esc"]),withKeys(r.focusLast,["end"]),withKeys(r.focusFirst,["home"])]},null,8,["on-focused","main-action","closing-action","onKeyup","onKeydown"])):createCommentVNode("v-if",!0),r.canEdit&&r.canOpenEditView?(openBlock(),createBlock(d,{key:3,ref:"actionEdit","on-focused":r.focused,"main-action":r.editItem,"closing-action":r.hideActions,onKeydown:[t[22]||(t[22]=withKeys(withModifiers((()=>{}),["prevent"]),["up"])),t[23]||(t[23]=withKeys(withModifiers((()=>{}),["prevent"]),["down"])),withKeys(r.hideActions,["tab"]),t[24]||(t[24]=withKeys(withModifiers((()=>{}),["prevent"]),["home"])),t[25]||(t[25]=withKeys(withModifiers((()=>{}),["prevent"]),["end"]))],onKeyup:[withKeys(r.focusPrev,["up"]),withKeys(r.focusNext,["down"]),withKeys(r.hideActions,["esc"]),withKeys(r.focusLast,["end"]),withKeys(r.focusFirst,["home"])]},null,8,["on-focused","main-action","closing-action","onKeyup","onKeydown"])):createCommentVNode("v-if",!0),o.shareable?(openBlock(),createBlock(u,{key:4,ref:"actionShare","on-focused":r.focused,"main-action":r.openShareUrlModal,"closing-action":r.hideActions,onKeydown:[t[26]||(t[26]=withKeys(withModifiers((()=>{}),["prevent"]),["up"])),t[27]||(t[27]=withKeys(withModifiers((()=>{}),["prevent"]),["down"])),withKeys(r.hideActions,["tab"]),t[28]||(t[28]=withKeys(withModifiers((()=>{}),["prevent"]),["home"])),t[29]||(t[29]=withKeys(withModifiers((()=>{}),["prevent"]),["end"]))],onKeyup:[withKeys(r.focusPrev,["up"]),withKeys(r.focusNext,["down"]),withKeys(r.hideActions,["esc"]),withKeys(r.focusLast,["end"]),withKeys(r.focusFirst,["home"])]},null,8,["on-focused","main-action","closing-action","onKeyup","onKeydown"])):createCommentVNode("v-if",!0),r.canDelete?(openBlock(),createBlock(p,{key:5,ref:"actionDelete","on-focused":r.focused,"main-action":r.openConfirmDeleteModal,"hide-actions":r.hideActions,onKeydown:[t[30]||(t[30]=withKeys(withModifiers((()=>{}),["prevent"]),["up"])),t[31]||(t[31]=withKeys(withModifiers((()=>{}),["prevent"]),["down"])),withKeys(r.hideActions,["tab"]),t[32]||(t[32]=withKeys(withModifiers((()=>{}),["prevent"]),["home"])),t[33]||(t[33]=withKeys(withModifiers((()=>{}),["prevent"]),["end"]))],onKeyup:[withKeys(r.focusPrev,["up"]),withKeys(r.focusNext,["down"]),withKeys(r.hideActions,["esc"]),withKeys(r.focusLast,["end"]),withKeys(r.focusFirst,["home"])]},null,8,["on-focused","main-action","hide-actions","onKeyup","onKeydown"])):createCommentVNode("v-if",!0)],8,_hoisted_2$l)):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:()=>({showActions:!1}),methods:{onPreviewDblClick(){this.navigateTo(this.item.path)},hideActions(){this.$refs.container&&this.$refs.container.hideActions()},toggleSettings(e){this.$emit("toggle-settings",e)}}};const _hoisted_1$l=createBaseVNode("div",{class:"file-background"},[createBaseVNode("div",{class:"folder-icon"},[createBaseVNode("span",{class:"icon-folder"})])],-1),_hoisted_2$k=[_hoisted_1$l],_hoisted_3$g={class:"media-browser-item-info"};function render$l(e,t,o,n,i,r){const s=resolveComponent("MediaBrowserActionItemsContainer");return openBlock(),createElementBlock("div",{class:"media-browser-item-directory",onMouseleave:t[2]||(t[2]=e=>r.hideActions())},[createBaseVNode("div",{class:"media-browser-item-preview",tabindex:"0",onDblclick:t[0]||(t[0]=withModifiers((e=>r.onPreviewDblClick()),["stop","prevent"])),onKeyup:t[1]||(t[1]=withKeys((e=>r.onPreviewDblClick()),["enter"]))},_hoisted_2$k,32),createBaseVNode("div",_hoisted_3$g,toDisplayString(o.item.name),1),createVNode(s,{ref:"container",item:o.item,onToggleSettings:r.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:()=>({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=createBaseVNode("div",{class:"media-browser-item-preview"},[createBaseVNode("div",{class:"file-background"},[createBaseVNode("div",{class:"file-icon"},[createBaseVNode("span",{class:"icon-file-alt"})])])],-1),_hoisted_2$j={class:"media-browser-item-info"},_hoisted_3$f=["aria-label","title"];function render$k(e,t,o,n,i,r){const s=resolveComponent("MediaBrowserActionItemsContainer");return openBlock(),createElementBlock("div",{class:"media-browser-item-file",onMouseleave:t[0]||(t[0]=e=>r.hideActions())},[_hoisted_1$k,createBaseVNode("div",_hoisted_2$j,toDisplayString(o.item.name)+" "+toDisplayString(o.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_3$f),createVNode(s,{ref:"container",item:o.item,previewable:!0,downloadable:!0,shareable:!0,onToggleSettings:r.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:()=>({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("image/svg+xml"===this.item.mime_type){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$i={class:"image-background"},_hoisted_3$e=["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,o,n,i,r){const s=resolveComponent("MediaBrowserActionItemsContainer");return openBlock(),createElementBlock("div",{class:"media-browser-image",tabindex:"0",onDblclick:t[1]||(t[1]=e=>r.openPreview()),onMouseleave:t[2]||(t[2]=e=>r.hideActions()),onKeyup:t[3]||(t[3]=withKeys((e=>r.openPreview()),["enter"]))},[createBaseVNode("div",{class:"media-browser-item-preview",title:o.item.name},[createBaseVNode("div",_hoisted_2$i,[r.getURL?(openBlock(),createElementBlock("img",{key:0,class:"image-cropped",src:r.getURL,alt:r.altTag,loading:r.loading,width:r.width,height:r.height,onLoad:t[0]||(t[0]=(...e)=>r.setSize&&r.setSize(...e))},null,40,_hoisted_3$e)):createCommentVNode("v-if",!0),r.getURL?createCommentVNode("v-if",!0):(openBlock(),createElementBlock("span",_hoisted_4$9))])],8,_hoisted_1$j),createBaseVNode("div",{class:"media-browser-item-info",title:o.item.name},toDisplayString(o.item.name)+" "+toDisplayString(o.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(s,{ref:"container",item:o.item,edit:r.editItem,previewable:!0,downloadable:!0,shareable:!0,onToggleSettings:r.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:()=>({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=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),_hoisted_2$h={class:"media-browser-item-info"};function render$i(e,t,o,n,i,r){const s=resolveComponent("MediaBrowserActionItemsContainer");return openBlock(),createElementBlock("div",{class:"media-browser-image",onDblclick:t[0]||(t[0]=e=>r.openPreview()),onMouseleave:t[1]||(t[1]=e=>r.hideActions())},[_hoisted_1$i,createBaseVNode("div",_hoisted_2$h,toDisplayString(o.item.name)+" "+toDisplayString(o.item.filetype),1),createVNode(s,{ref:"container",item:o.item,previewable:!0,downloadable:!0,shareable:!0,onToggleSettings:r.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:()=>({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=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),_hoisted_2$g={class:"media-browser-item-info"};function render$h(e,t,o,n,i,r){const s=resolveComponent("MediaBrowserActionItemsContainer");return openBlock(),createElementBlock("div",{class:"media-browser-audio",tabindex:"0",onDblclick:t[0]||(t[0]=e=>r.openPreview()),onMouseleave:t[1]||(t[1]=e=>r.hideActions()),onKeyup:t[2]||(t[2]=withKeys((e=>r.openPreview()),["enter"]))},[_hoisted_1$h,createBaseVNode("div",_hoisted_2$g,toDisplayString(o.item.name)+" "+toDisplayString(o.item.filetype),1),createVNode(s,{ref:"container",item:o.item,previewable:!0,downloadable:!0,shareable:!0,onToggleSettings:r.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:()=>({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=createBaseVNode("div",{class:"media-browser-item-preview"},[createBaseVNode("div",{class:"file-background"},[createBaseVNode("div",{class:"file-icon"},[createBaseVNode("span",{class:"fas fa-file-pdf"})])])],-1),_hoisted_2$f={class:"media-browser-item-info"},_hoisted_3$d=["aria-label","title"];function render$g(e,t,o,n,i,r){const s=resolveComponent("MediaBrowserActionItemsContainer");return openBlock(),createElementBlock("div",{class:"media-browser-doc",onDblclick:t[0]||(t[0]=e=>r.openPreview()),onMouseleave:t[1]||(t[1]=e=>r.hideActions())},[_hoisted_1$g,createBaseVNode("div",_hoisted_2$f,toDisplayString(o.item.name)+" "+toDisplayString(o.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_3$d),createVNode(s,{ref:"container",item:o.item,previewable:!0,downloadable:!0,shareable:!0,onToggleSettings:r.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:()=>({hoverActive:!1,actionsActive:!1}),methods:{itemType(){return"dir"===this.item.type?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&&"file"===this.item.type&&window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{path:this.item.path,thumb:this.item.thumb,fileType:!!this.item.mime_type&&this.item.mime_type,extension:!!this.item.extension&&this.item.extension,width:this.item.width?this.item.width:0,height:this.item.height?this.item.height:0}})),"dir"===this.item.type&&window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{}})),!this.isSelected())return e.shiftKey||13===e.keyCode||this.$store.commit(UNSELECT_ALL_BROWSER_ITEMS),void this.$store.commit(SELECT_BROWSER_ITEM,this.item);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 1===e.length?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=createBaseVNode("span",{class:"icon-file placeholder-icon"},null,-1),_hoisted_4$8={key:1},_hoisted_5$7={key:0},_hoisted_6$5={key:1},_hoisted_7$4={key:2},_hoisted_8$4={key:3},_hoisted_9$4={key:4},_hoisted_10$1={key:5},_hoisted_11$1={key:6};function render$f(e,t,o,n,i,r){return openBlock(),createBlock(Transition,{name:"infobar"},{default:withCtx((()=>[r.showInfoBar&&r.item?(openBlock(),createElementBlock("div",_hoisted_1$f,[createBaseVNode("span",{class:"infobar-close",onClick:t[0]||(t[0]=e=>r.hideInfoBar())},"×"),createBaseVNode("h2",null,toDisplayString(r.item.name),1),"/"===r.item.path?(openBlock(),createElementBlock("div",_hoisted_2$e,[_hoisted_3$c,createTextVNode(" Select file or folder to view its details. ")])):(openBlock(),createElementBlock("dl",_hoisted_4$8,[createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_FOLDER")),1),createBaseVNode("dd",null,toDisplayString(r.item.directory),1),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_TYPE")),1),"file"===r.item.type?(openBlock(),createElementBlock("dd",_hoisted_5$7,toDisplayString(e.translate("COM_MEDIA_FILE")),1)):"dir"===r.item.type?(openBlock(),createElementBlock("dd",_hoisted_6$5,toDisplayString(e.translate("COM_MEDIA_FOLDER")),1)):(openBlock(),createElementBlock("dd",_hoisted_7$4," - ")),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_DATE_CREATED")),1),createBaseVNode("dd",null,toDisplayString(r.item.create_date_formatted),1),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_DATE_MODIFIED")),1),createBaseVNode("dd",null,toDisplayString(r.item.modified_date_formatted),1),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_DIMENSION")),1),r.item.width||r.item.height?(openBlock(),createElementBlock("dd",_hoisted_8$4,toDisplayString(r.item.width)+"px * "+toDisplayString(r.item.height)+"px ",1)):(openBlock(),createElementBlock("dd",_hoisted_9$4," - ")),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_SIZE")),1),r.item.size?(openBlock(),createElementBlock("dd",_hoisted_10$1,toDisplayString((r.item.size/1024).toFixed(2))+" KB ",1)):(openBlock(),createElementBlock("dd",_hoisted_11$1," - ")),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_MIME_TYPE")),1),createBaseVNode("dd",null,toDisplayString(r.item.mime_type),1),createBaseVNode("dt",null,toDisplayString(e.translate("COM_MEDIA_MEDIA_EXTENSION")),1),createBaseVNode("dd",null,toDisplayString(r.item.extension||"-"),1)]))])):createCommentVNode("v-if",!0)])),_:1})}function sortArray(e,t,o){return e.sort(((n,i)=>"name"===t?"asc"===o?n.name.toUpperCase().localeCompare(i.name.toUpperCase(),"en",{sensitivity:"base"}):i.name.toUpperCase().localeCompare(n.name.toUpperCase(),"en",{sensitivity:"base"}):"size"===t?"asc"===o?parseInt(n.size,10)-parseInt(i.size,10):parseInt(i.size,10)-parseInt(n.size,10):"dimension"===t?"asc"===o?parseInt(n.width,10)*parseInt(n.height,10)-parseInt(i.width,10)*parseInt(i.height,10):parseInt(i.width,10)*parseInt(i.height,10)-parseInt(n.width,10)*parseInt(n.height,10):"date_created"===t?"asc"===o?new Date(n.create_date)-new Date(i.create_date):new Date(i.create_date)-new Date(n.create_date):"date_modified"===t?"asc"===o?new Date(n.modified_date)-new Date(i.modified_date):new Date(i.modified_date)-new Date(n.modified_date):e))}script$f.render=render$f,script$f.__file="administrator/components/com_media/resources/scripts/components/infobar/infobar.vue";var script$e={name:"MediaBrowser",components:{MediaBrowserTable:script$u,MediaInfobar:script$f,MediaBrowserItem: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((e=>e.name.toLowerCase().includes(this.$store.state.search.toLowerCase()))),...t.filter((e=>e.name.toLowerCase().includes(this.$store.state.search.toLowerCase())))]},getHeight(){return{height:"table"!==this.$store.state.listView||this.isEmpty?"100%":"unset"}},mediaBrowserStyles(){return{width:this.$store.state.showInfoBar?"75%":"100%",height:"table"!==this.$store.state.listView||this.isEmpty?"100%":"unset"}},isEmptySearch(){return""!==this.$store.state.search&&0===this.localItems.length},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:()=>Joomla.getOptions("com_media",{}).isModal,currentDirectory(){const e=this.$store.state.selectedDirectory.split("/").filter((e=>0!==e.length));if(1!==e.length)return e[e.length-1];let t="";return this.$store.state.disks.forEach((o=>{o.drives.forEach((o=>{o.root===`${e[0]}/`&&(t=o.displayName)}))})),t}},created(){document.body.addEventListener("click",this.unselectAllBrowserItems,!1)},beforeUnmount(){document.body.removeEventListener("click",this.unselectAllBrowserItems,!1)},methods:{unselectAllBrowserItems(e){const t=!(void 0===e.target.id||"mediaDelete"!==e.target.id),o=this.$refs.browserItems&&!this.$refs.browserItems.contains(e.target)||e.target===this.$refs.browserItems,n=void 0!==this.$refs.infobar&&!this.$refs.infobar.$el.contains(e.target);o&&n&&!t&&(this.$store.commit(UNSELECT_ALL_BROWSER_ITEMS),window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{path:"",thumb:!1,fileType:!1,extension:!1}})))},onDragEnter:e=>(e.stopPropagation(),!1),onDragOver:e=>(e.preventDefault(),document.querySelector(".media-dragoutline").classList.add("active"),!1),upload(e){const t=new FileReader;t.onload=t=>{const{result:o}=t.target,n=o.indexOf("base64")+7,i=o.slice(n,o.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((e=>{document.querySelector(".media-dragoutline").classList.remove("active"),this.upload(e)})),document.querySelector(".media-dragoutline").classList.remove("active")},onDragLeave:e=>(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=createBaseVNode("span",{class:"icon-info-circle","aria-hidden":"true"},null,-1),_hoisted_4$7={class:"visually-hidden"},_hoisted_5$6={key:1,class:"text-center",style:{display:"grid","justify-content":"center","align-content":"center","margin-top":"-1rem",color:"var(--gray-200)",height:"100%"}},_hoisted_6$4=createBaseVNode("span",{class:"fa-8x icon-cloud-upload upload-icon","aria-hidden":"true"},null,-1),_hoisted_7$3={class:"media-dragoutline"},_hoisted_8$3=createBaseVNode("span",{class:"icon-cloud-upload upload-icon","aria-hidden":"true"},null,-1),_hoisted_9$3={key:3,class:"media-browser-grid"};function render$e(e,t,o,n,i,r){const s=resolveComponent("MediaBrowserTable"),a=resolveComponent("MediaBrowserItem"),c=resolveComponent("MediaInfobar");return openBlock(),createElementBlock("div",{ref:"browserItems",class:"media-browser",style:normalizeStyle(r.getHeight),onDragenter:t[0]||(t[0]=(...e)=>r.onDragEnter&&r.onDragEnter(...e)),onDrop:t[1]||(t[1]=(...e)=>r.onDrop&&r.onDrop(...e)),onDragover:t[2]||(t[2]=(...e)=>r.onDragOver&&r.onDragOver(...e)),onDragleave:t[3]||(t[3]=(...e)=>r.onDragLeave&&r.onDragLeave(...e))},[r.isEmptySearch?(openBlock(),createElementBlock("div",_hoisted_1$e,[createBaseVNode("div",_hoisted_2$d,[_hoisted_3$b,createBaseVNode("span",_hoisted_4$7,toDisplayString(e.translate("NOTICE")),1),createTextVNode(" "+toDisplayString(e.translate("JGLOBAL_NO_MATCHING_RESULTS")),1)])])):createCommentVNode("v-if",!0),r.isEmpty?(openBlock(),createElementBlock("div",_hoisted_5$6,[_hoisted_6$4,createBaseVNode("p",null,toDisplayString(e.translate("COM_MEDIA_DROP_FILE")),1)])):createCommentVNode("v-if",!0),createBaseVNode("div",_hoisted_7$3,[_hoisted_8$3,createBaseVNode("p",null,toDisplayString(e.translate("COM_MEDIA_DROP_FILE")),1)]),"table"!==r.listView||r.isEmpty||r.isEmptySearch?createCommentVNode("v-if",!0):(openBlock(),createBlock(s,{key:2,"local-items":r.localItems,"current-directory":r.currentDirectory,style:normalizeStyle(r.mediaBrowserStyles)},null,8,["local-items","current-directory","style"])),"grid"!==r.listView||r.isEmpty?createCommentVNode("v-if",!0):(openBlock(),createElementBlock("div",_hoisted_9$3,[createBaseVNode("div",{class:normalizeClass(["media-browser-items",r.mediaBrowserGridItemsClass]),style:normalizeStyle(r.mediaBrowserStyles)},[(openBlock(!0),createElementBlock(Fragment,null,renderList(r.localItems,(e=>(openBlock(),createBlock(a,{key:e.path,item:e},null,8,["item"])))),128))],6)])),createVNode(c,{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()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){0!==e&&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,o,n,i,r){const s=resolveComponent("MediaTree");return openBlock(),createElementBlock("ul",_hoisted_1$d,[(openBlock(!0),createElementBlock(Fragment,null,renderList(r.directories,((e,n)=>(openBlock(),createElementBlock("li",{key:e.path,class:normalizeClass(["media-tree-item",{active:r.isActive(e)}]),role:"none"},[createBaseVNode("a",{ref_for:!0,ref:o.root+n,role:"treeitem","aria-level":o.level,"aria-setsize":r.directories.length,"aria-posinset":n,tabindex:r.getTabindex(e),onClick:withModifiers((t=>r.onItemClick(e)),["stop","prevent"]),onKeyup:[withKeys((e=>r.moveFocusToPreviousElement(n)),["up"]),withKeys((e=>r.moveFocusToNextElement(n)),["down"]),withKeys((t=>r.onItemClick(e)),["enter"]),withKeys((t=>r.moveFocusToChildElement(e)),["right"]),t[0]||(t[0]=withKeys((e=>r.moveFocusToParentElement()),["left"]))]},[createBaseVNode("span",_hoisted_3$a,[createBaseVNode("span",{class:normalizeClass(r.iconClass(e))},null,2)]),createBaseVNode("span",_hoisted_4$6,toDisplayString(e.name),1)],40,_hoisted_2$c),createVNode(Transition,{name:"slide-fade"},{default:withCtx((()=>[r.hasChildren(e)?withDirectives((openBlock(),createBlock(s,{key:0,ref_for:!0,ref:e.path,"aria-expanded":r.isOpen(e)?"true":"false",root:e.path,level:o.level+1,"parent-index":n,onMoveFocusToParent:r.restoreFocus},null,8,["aria-expanded","root","level","parent-index","onMoveFocusToParent"])),[[vShow,r.isOpen(e)]]):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)},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,o,n,i,r){const s=resolveComponent("MediaTree");return openBlock(),createElementBlock("div",{class:"media-drive",onClick:t[2]||(t[2]=withModifiers((e=>r.onDriveClick()),["stop","prevent"]))},[createBaseVNode("ul",{class:"media-tree",role:"tree","aria-labelledby":o.diskId},[createBaseVNode("li",{class:normalizeClass({active:r.isActive,"media-tree-item":!0,"media-drive-name":!0}),role:"none"},[createBaseVNode("a",{ref:"drive-root",role:"treeitem","aria-level":"1","aria-setsize":o.counter,"aria-posinset":1,tabindex:r.getTabindex,onKeyup:[t[0]||(t[0]=withKeys((e=>r.moveFocusToChildElement(o.drive.root)),["right"])),t[1]||(t[1]=withKeys(((...e)=>r.onDriveClick&&r.onDriveClick(...e)),["enter"]))]},[createBaseVNode("span",_hoisted_3$9,toDisplayString(o.drive.displayName),1)],40,_hoisted_2$b),createVNode(s,{ref:o.drive.root,root:o.drive.root,level:2,"parent-index":0,onMoveFocusToParent:r.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,o,n,i,r){const s=resolveComponent("MediaDrive");return openBlock(),createElementBlock("div",_hoisted_1$b,[createBaseVNode("h2",{id:r.diskId,class:"media-disk-name"},toDisplayString(o.disk.displayName),9,_hoisted_2$a),(openBlock(!0),createElementBlock(Fragment,null,renderList(o.disk.drives,((e,t)=>(openBlock(),createBlock(s,{key:t,"disk-id":r.diskId,counter:t,drive:e,total:o.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 o=this.findDrive(t[0]);if(!o)return[];e.push(o);let n=`${t[0]}:`;t[1].split("/").filter((e=>0!==e.length)).forEach(((t,o)=>{n=`${n}/${t}`,e.push({name:t,index:o+1,path:n})}))}return e},isLast(e){return this.crumbs.indexOf(e)===this.crumbs.length-1}},methods:{onCrumbClick(e){const t=this.crumbs.find((t=>t.index===e));t&&(this.navigateTo(t.path),window.parent.document.dispatchEvent(new CustomEvent("onMediaFileSelected",{bubbles:!0,cancelable:!1,detail:{}})))},findDrive(e){let t=null;return this.$store.state.disks.forEach((o=>{o.drives.forEach((o=>{o.root.startsWith(e)&&(t={name:o.displayName,path:o.root,index:0})}))})),t}}};const _hoisted_1$a=["aria-label"],_hoisted_2$9=["aria-current","onClick"];function render$a(e,t,o,n,i,r){return openBlock(),createElementBlock("nav",{class:"media-breadcrumb","aria-label":e.translate("COM_MEDIA_BREADCRUMB_LABEL")},[createBaseVNode("ol",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(r.crumbs,((e,t)=>(openBlock(),createElementBlock("li",{key:t,class:"media-breadcrumb-item"},[createBaseVNode("a",{href:"#","aria-current":t===Object.keys(r.crumbs).length-1?"page":void 0,onClick:withModifiers((e=>r.onCrumbClick(t)),["stop","prevent"])},toDisplayString(e.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:()=>({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"grid"===this.$store.state.listView},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(){"grid"===this.$store.state.listView?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$2={class:"media-view-icons"},_hoisted_9$2=["aria-label"],_hoisted_10=createBaseVNode("span",{class:"fas fa-sort-amount-down-alt","aria-hidden":"true"},null,-1),_hoisted_11=[_hoisted_10],_hoisted_12=["aria-label"],_hoisted_13=createBaseVNode("span",{class:"icon-search-minus","aria-hidden":"true"},null,-1),_hoisted_14=[_hoisted_13],_hoisted_15=["aria-label"],_hoisted_16=createBaseVNode("span",{class:"icon-search-plus","aria-hidden":"true"},null,-1),_hoisted_17=[_hoisted_16],_hoisted_18=["aria-label"],_hoisted_19=["aria-label"],_hoisted_20=createBaseVNode("span",{class:"icon-info","aria-hidden":"true"},null,-1),_hoisted_21=[_hoisted_20],_hoisted_22={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_23={class:"col-3"},_hoisted_24=["aria-label","value"],_hoisted_25={value:"name"},_hoisted_26={value:"size"},_hoisted_27={value:"dimension"},_hoisted_28={value:"date_created"},_hoisted_29={value:"date_modified"},_hoisted_30={class:"col-3"},_hoisted_31=["aria-label","value"],_hoisted_32={value:"asc"},_hoisted_33={value:"desc"};function render$9(e,t,o,n,i,r){const s=resolveComponent("MediaBreadcrumb");return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",{class:"media-toolbar",role:"toolbar","aria-label":e.translate("COM_MEDIA_TOOLBAR_LABEL")},[r.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(((...e)=>r.toggleSelectAll&&r.toggleSelectAll(...e)),["stop"]))},null,8,_hoisted_4$5)]),createVNode(s),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:r.search,onInput:t[1]||(t[1]=(...e)=>r.changeSearch&&r.changeSearch(...e))},null,40,_hoisted_7$2)]),createBaseVNode("div",_hoisted_8$2,[r.isGridView?(openBlock(),createElementBlock("button",{key:0,type:"button",class:normalizeClass(["media-toolbar-icon",{active:i.sortingOptions}]),"aria-label":e.translate("COM_MEDIA_CHANGE_ORDERING"),onClick:t[2]||(t[2]=e=>r.showSortOptions())},_hoisted_11,10,_hoisted_9$2)):createCommentVNode("v-if",!0),r.isGridView?(openBlock(),createElementBlock("button",{key:1,type:"button",class:normalizeClass(["media-toolbar-icon media-toolbar-decrease-grid-size",{disabled:r.isGridSize("sm")}]),"aria-label":e.translate("COM_MEDIA_DECREASE_GRID"),onClick:t[3]||(t[3]=withModifiers((e=>r.decreaseGridSize()),["stop","prevent"]))},_hoisted_14,10,_hoisted_12)):createCommentVNode("v-if",!0),r.isGridView?(openBlock(),createElementBlock("button",{key:2,type:"button",class:normalizeClass(["media-toolbar-icon media-toolbar-increase-grid-size",{disabled:r.isGridSize("xl")}]),"aria-label":e.translate("COM_MEDIA_INCREASE_GRID"),onClick:t[4]||(t[4]=withModifiers((e=>r.increaseGridSize()),["stop","prevent"]))},_hoisted_17,10,_hoisted_15)):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((e=>r.changeListView()),["stop","prevent"]))},[createBaseVNode("span",{class:normalizeClass(r.toggleListViewBtnIcon),"aria-hidden":"true"},null,2)],8,_hoisted_18),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(((...e)=>r.toggleInfoBar&&r.toggleInfoBar(...e)),["stop","prevent"]))},_hoisted_21,8,_hoisted_19)])],8,_hoisted_1$9),r.isGridView&&i.sortingOptions?(openBlock(),createElementBlock("div",_hoisted_22,[createBaseVNode("div",_hoisted_23,[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]=e=>r.changeOrderBy())},[createBaseVNode("option",_hoisted_25,toDisplayString(e.translate("COM_MEDIA_MEDIA_NAME")),1),createBaseVNode("option",_hoisted_26,toDisplayString(e.translate("COM_MEDIA_MEDIA_SIZE")),1),createBaseVNode("option",_hoisted_27,toDisplayString(e.translate("COM_MEDIA_MEDIA_DIMENSION")),1),createBaseVNode("option",_hoisted_28,toDisplayString(e.translate("COM_MEDIA_MEDIA_DATE_CREATED")),1),createBaseVNode("option",_hoisted_29,toDisplayString(e.translate("COM_MEDIA_MEDIA_DATE_MODIFIED")),1)],40,_hoisted_24)]),createBaseVNode("div",_hoisted_30,[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]=e=>r.changeOrderDirection())},[createBaseVNode("option",_hoisted_32,toDisplayString(e.translate("COM_MEDIA_ORDER_ASC")),1),createBaseVNode("option",_hoisted_33,toDisplayString(e.translate("COM_MEDIA_ORDER_DESC")),1)],40,_hoisted_31)])])):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((e=>{const t=new FileReader;t.onload=t=>{const{result:o}=t.target,n=o.indexOf("base64")+7,i=o.slice(n,o.length);this.$store.dispatch("uploadFile",{name:e.name,parent:this.$store.state.selectedDirectory,content:i})},t.readAsDataURL(e)}))}}};const _hoisted_1$8=["name","multiple","accept"];function render$8(e,t,o,n,i,r){return openBlock(),createElementBlock("input",{ref:"fileInput",type:"file",class:"hidden",name:o.name,multiple:o.multiple,accept:o.accept,onChange:t[0]||(t[0]=(...e)=>r.upload&&r.upload(...e))},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",toArray=function(e){for(var t=Array(e.length),o=0;o=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 e(t,o){return toArray((t.shadowRoot||t).children).reduce((function(t,n){return t.concat(n.matches(o?queryGuardTabbables:queryTabbables)?[n]:[],e(n))}),[])},getFocusablesWithIFrame=function(e,t){var o;return e instanceof HTMLIFrameElement&&(null===(o=e.contentDocument)||void 0===o?void 0:o.body)?getFocusables([e.contentDocument.body],t):[e]},getFocusables=function(e,t){return e.reduce((function(e,o){var n,i=getFocusablesWithShadowDom(o,t),r=(n=[]).concat.apply(n,i.map((function(e){return getFocusablesWithIFrame(e,t)})));return e.concat(r,o.parentNode?toArray(o.parentNode.querySelectorAll(queryTabbables)).filter((function(e){return e===o})):[])}),[])},getParentAutofocusables=function(e){var t=e.querySelectorAll("[".concat(FOCUS_AUTO,"]"));return toArray(t).map((function(e){return getFocusables([e])})).reduce((function(e,t){return e.concat(t)}),[])},filterFocusable=function(e,t){return toArray(e).filter((function(e){return isVisibleCached(t,e)})).filter((function(e){return notHiddenInput(e)}))},filterAutoFocusable=function(e,t){return void 0===t&&(t=new Map),toArray(e).filter((function(e){return isAutoFocusAllowedCached(t,e)}))},getTabbableNodes=function(e,t,o){return orderByTabIndex(filterFocusable(getFocusables(e,o),t),!0,o)},getAllTabbableNodes=function(e,t){return orderByTabIndex(filterFocusable(getFocusables(e),t),!1)},parentAutofocusables=function(e,t){return filterFocusable(getParentAutofocusables(e),t)},contains=function e(t,o){return t.shadowRoot?e(t.shadowRoot,o):!(void 0===Object.getPrototypeOf(t).contains||!Object.getPrototypeOf(t).contains.call(t,o))||toArray(t.children).some((function(t){var n;if(t instanceof HTMLIFrameElement){var i=null===(n=t.contentDocument)||void 0===n?void 0:n.body;return!!i&&e(i,o)}return e(t,o)}))},filterNested=function(e){for(var t=new Set,o=e.length,n=0;n0&&t.add(i),(r&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(n)}return e.filter((function(e,o){return!t.has(o)}))},getTopParent=function e(t){return t.parentNode?e(t.parentNode):t},getAllAffectedNodes=function(e){return asArray(e).filter(Boolean).reduce((function(e,t){var o=t.getAttribute(FOCUS_GROUP);return e.push.apply(e,o?filterNested(toArray(getTopParent(t).querySelectorAll("[".concat(FOCUS_GROUP,'="').concat(o,'"]:not([').concat(FOCUS_DISABLED,'="disabled"])')))):[t]),e}),[])},safeProbe=function(e){try{return e()}catch(e){return}},getActiveElement=function e(t){if(void 0===t&&(t=document),t&&t.activeElement){var o=t.activeElement;return o.shadowRoot?e(o.shadowRoot):o instanceof HTMLIFrameElement&&safeProbe((function(){return o.contentWindow.document}))?e(o.contentWindow.document):o}},focusInFrame=function(e,t){return e===t},focusInsideIframe=function(e,t){return Boolean(toArray(e.querySelectorAll("iframe")).some((function(e){return focusInFrame(e,t)})))},focusInside=function(e,t){return void 0===t&&(t=getActiveElement(getFirst(e).ownerDocument)),!(!t||t.dataset&&t.dataset.focusGuard)&&getAllAffectedNodes(e).some((function(e){return contains(e,t)||focusInsideIframe(e,t)}))},focusIsHidden=function(e){void 0===e&&(e=document);var t=getActiveElement(e);return!!t&&toArray(e.querySelectorAll("[".concat(FOCUS_ALLOW,"]"))).some((function(e){return contains(e,t)}))},findSelectedRadio=function(e,t){return t.filter(isRadioElement).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e},correctNode=function(e,t){return isRadioElement(e)&&e.name?findSelectedRadio(e,t):e},correctNodes=function(e){var t=new Set;return e.forEach((function(o){return t.add(correctNode(o,e))})),e.filter((function(e){return t.has(e)}))},pickFirstFocus=function(e){return e[0]&&e.length>1?correctNode(e[0],e):e[0]},pickFocusable=function(e,t){return e.length>1?e.indexOf(correctNode(e[t],e)):t},NEW_FOCUS="NEW_FOCUS",newFocus=function(e,t,o,n){var i=e.length,r=e[0],s=e[i-1],a=isGuard(o);if(!(o&&e.indexOf(o)>=0)){var c=void 0!==o?t.indexOf(o):-1,l=n?t.indexOf(n):c,d=n?e.indexOf(n):-1,u=c-l,p=t.indexOf(r),h=t.indexOf(s),m=correctNodes(t),f=(void 0!==o?m.indexOf(o):-1)-(n?m.indexOf(n):c),_=pickFocusable(e,0),g=pickFocusable(e,i-1);return-1===c||-1===d?NEW_FOCUS:!u&&d>=0?d:c<=p&&a&&Math.abs(u)>1?g:c>=h&&a&&Math.abs(u)>1?_:u&&Math.abs(f)>1?d:c<=p?g:c>h?_:u?Math.abs(u)>1?d:(i+d+u)%i:void 0}},findAutoFocused=function(e){return function(t){var o,n=null===(o=getDataset(t))||void 0===o?void 0:o.autofocus;return t.autofocus||void 0!==n&&"false"!==n||e.indexOf(t)>=0}},pickAutofocus=function(e,t,o){var n=e.map((function(e){return e.node})),i=filterAutoFocusable(n.filter(findAutoFocused(o)));return i&&i.length?pickFirstFocus(i):pickFirstFocus(filterAutoFocusable(t))},getParents=function e(t,o){return void 0===o&&(o=[]),o.push(t),t.parentNode&&e(t.parentNode.host||t.parentNode,o),o},getCommonParent=function(e,t){for(var o=getParents(e),n=getParents(t),i=0;i=0)return r}return!1},getTopCommonParent=function(e,t,o){var n=asArray(e),i=asArray(t),r=n[0],s=!1;return i.filter(Boolean).forEach((function(e){s=getCommonParent(s||e,e)||s,o.filter(Boolean).forEach((function(e){var t=getCommonParent(r,e);t&&(s=!s||contains(t,s)?t:getCommonParent(t,s))}))})),s},allParentAutofocusables=function(e,t){return e.reduce((function(e,o){return e.concat(parentAutofocusables(o,t))}),[])},reorderNodes=function(e,t){var o=new Map;return t.forEach((function(e){return o.set(e.node,e)})),e.map((function(e){return o.get(e)})).filter(isDefined)},getFocusMerge=function(e,t){var o=getActiveElement(asArray(e).length>0?document:getFirst(e).ownerDocument),n=getAllAffectedNodes(e).filter(isNotAGuard),i=getTopCommonParent(o||e,e,n),r=new Map,s=getAllTabbableNodes(n,r),a=getTabbableNodes(n,r).filter((function(e){var t=e.node;return isNotAGuard(t)}));if(a[0]||(a=s)[0]){var c=getAllTabbableNodes([i],r).map((function(e){return e.node})),l=reorderNodes(c,a),d=l.map((function(e){return e.node})),u=newFocus(d,c,o,t);if(u===NEW_FOCUS){var p=pickAutofocus(s,d,allParentAutofocusables(n,r));return p?{node:p}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===u?u:l[u]}},focusOn=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},guardCount=0,lockDisabled=!1,setFocus=function(e,t,o){void 0===o&&(o={});var n=getFocusMerge(e,t);if(!lockDisabled&&n){if(guardCount>2)return 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,void setTimeout((function(){lockDisabled=!1}),1);guardCount++,focusOn(n.node,o.focusOptions),guardCount--}},moveFocusInside=setFocus;function deferAction(e){const t=window.setImmediate;void 0!==t?t(e):setTimeout(e,1)}let lastActiveTrap=0,lastActiveFocus=null,focusWasOutsideWindow=!1;const focusOnBody=()=>document&&document.activeElement===document.body,isFreeFocus=()=>document&&document.activeElement===document.body||focusIsHidden(),activateTrap=()=>{let e=!1;if(lastActiveTrap){const{observed:t,onActivation:o}=lastActiveTrap;!focusWasOutsideWindow&&(document&&document.activeElement===document.body||focusIsHidden())&&lastActiveFocus||(t&&!focusInside(t)&&(o(),e=moveFocusInside(t,lastActiveFocus)),focusWasOutsideWindow=!1,lastActiveFocus=document&&document.activeElement)}return e},reducePropsToState=e=>e.filter((({disabled:e})=>!e)).slice(-1)[0],handleStateChangeOnClient=e=>{lastActiveTrap!==e&&(lastActiveTrap=null),lastActiveTrap=e,e&&(activateTrap(),deferAction(activateTrap))};let instances=[];const emitChange=()=>{var e;e=instances.filter((({disabled:e})=>!e)).slice(-1)[0],lastActiveTrap!==e&&(lastActiveTrap=null),lastActiveTrap=e,e&&(activateTrap(),deferAction(activateTrap))},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:o,noFocusGuards:n,group:i}=toRefs(e),r=ref(null),s=ref({}),a=ref(""),c=computed((()=>({[FOCUS_GROUP]:i.value}))),l=computed((()=>!0!==n.value)),d=computed((()=>l.value&&"tail"!==n.value));let u;return watch(o,(()=>{s.value.disabled=o.value,emitChange()})),onMounted((()=>{const e=getCurrentInstance();e&&(s.value.instance=e.proxy,s.value.observed=r.value.querySelector("[data-lock]"),s.value.disabled=o.value,s.value.onActivation=()=>{u=u||document&&document.activeElement},instances.length||(document.addEventListener("focusin",onTrap,!0),document.addEventListener("focusout",onBlur),window.addEventListener("blur",onWindowBlur)),instances.push(s.value),emitChange())})),onUnmounted((()=>{const e=getCurrentInstance();e&&(instances=instances.filter((({instance:t})=>t!==e.proxy)),instances.length||(document.removeEventListener("focusin",onTrap,!0),document.removeEventListener("focusout",onBlur),window.removeEventListener("blur",onWindowBlur)),t.value&&u&&u.focus&&u.focus(),emitChange())})),{groupAttr:c,hasLeadingGuards:l,hasTailingGuards:d,hidden:a,onBlur:()=>deferAction(emitChange),rootEl:r}}};const _hoisted_1$7={ref:"rootEl"},_hoisted_2$7=["tabIndex"],_hoisted_3$7=["tabIndex"];function render$7(e,t,o,n,i,r){return openBlock(),createElementBlock("div",_hoisted_1$7,[n.hasLeadingGuards?(openBlock(),createElementBlock("div",{key:0,tabIndex:o.disabled?-1:0,style:normalizeStyle(n.hidden),"aria-hidden":"true"},null,12,_hoisted_2$7)):createCommentVNode("v-if",!0),createBaseVNode("div",mergeProps({onFocusout:t[0]||(t[0]=(...e)=>n.onBlur&&n.onBlur(...e))},n.groupAttr,{"data-lock":""}),[renderSlot(e.$slots,"default")],16),n.hasTailingGuards?(openBlock(),createElementBlock("div",{key:1,tabIndex:o.disabled?-1:0,style:normalizeStyle(n.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":"sm"===this.size}}},mounted(){document.addEventListener("keydown",this.onKeyDown)},beforeUnmount(){document.removeEventListener("keydown",this.onKeyDown)},methods:{close(){this.$emit("close")},onKeyDown(e){27===e.keyCode&&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,o,n,i,r){const s=resolveComponent("Lock");return openBlock(),createElementBlock("div",{class:"media-modal-backdrop",onClick:t[2]||(t[2]=e=>r.close())},[createBaseVNode("div",{class:"modal",style:{display:"flex"},onClick:t[1]||(t[1]=withModifiers((()=>{}),["stop"]))},[createVNode(s,null,{default:withCtx((()=>[createBaseVNode("div",{class:normalizeClass(["modal-dialog",r.modalClass]),role:"dialog","aria-labelledby":o.labelElement},[createBaseVNode("div",_hoisted_2$6,[createBaseVNode("div",_hoisted_3$6,[renderSlot(e.$slots,"header"),renderSlot(e.$slots,"backdrop-close"),o.showClose?(openBlock(),createElementBlock("button",{key:0,type:"button",class:"btn-close","aria-label":"Close",onClick:t[0]||(t[0]=e=>r.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:()=>({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,o,n,i,r){const s=resolveComponent("MediaModal");return e.$store.state.showCreateFolderModal?(openBlock(),createBlock(s,{key:0,size:"md","label-element":"createFolderTitle",onClose:t[5]||(t[5]=e=>r.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(((...e)=>r.save&&r.save(...e)),["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]=e=>i.folder=e),class:"form-control",type:"text",required:"",autocomplete:"off",onInput:t[1]||(t[1]=e=>i.folder=e.target.value)},null,544),[[vModelText,i.folder,void 0,{trim:!0}]])])],32)])])),footer:withCtx((()=>[createBaseVNode("div",null,[createBaseVNode("button",{class:"btn btn-secondary",onClick:t[3]||(t[3]=e=>r.close())},toDisplayString(e.translate("JCANCEL")),1),createBaseVNode("button",{class:"btn btn-success",disabled:!r.isValid(),onClick:t[4]||(t[4]=e=>r.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"image/svg+xml"!==this.item.mime_type?null:"width: clamp(300px, 1000px, 75vw)"}},methods:{close(){this.$store.commit(HIDE_PREVIEW_MODAL)},isImage(){return 0===this.item.mime_type.indexOf("image/")},isVideo(){return 0===this.item.mime_type.indexOf("video/")},isAudio(){return 0===this.item.mime_type.indexOf("audio/")},isDoc(){return 0===this.item.mime_type.indexOf("application/")}}};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"],_hoisted_8$1=createBaseVNode("span",{class:"icon-times"},null,-1),_hoisted_9$1=[_hoisted_8$1];function render$4(e,t,o,n,i,r){const s=resolveComponent("MediaModal");return e.$store.state.showPreviewModal&&r.item?(openBlock(),createBlock(s,{key:0,size:"md",class:"media-preview-modal","label-element":"previewTitle","show-close":!1,onClose:t[1]||(t[1]=e=>r.close())},{header:withCtx((()=>[createBaseVNode("h3",_hoisted_1$4,toDisplayString(r.item.name),1)])),body:withCtx((()=>[createBaseVNode("div",_hoisted_2$4,[r.isAudio()?(openBlock(),createElementBlock("audio",{key:0,controls:"",src:r.item.url},null,8,_hoisted_3$4)):createCommentVNode("v-if",!0),r.isVideo()?(openBlock(),createElementBlock("video",_hoisted_4$2,[createBaseVNode("source",{src:r.item.url,type:r.item.mime_type},null,8,_hoisted_5$2)])):createCommentVNode("v-if",!0),r.isDoc()?(openBlock(),createElementBlock("object",{key:2,type:r.item.mime_type,data:r.item.url,width:"800",height:"600"},null,8,_hoisted_6$2)):createCommentVNode("v-if",!0),r.isImage()?(openBlock(),createElementBlock("img",{key:3,src:r.getHashedURL,type:r.item.mime_type,style:normalizeStyle(r.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]=e=>r.close())},_hoisted_9$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,o,n,i,r){const s=resolveComponent("MediaModal");return e.$store.state.showRenameModal?(openBlock(),createBlock(s,{key:0,size:"sm","show-close":!1,"label-element":"renameTitle",onClose:t[5]||(t[5]=e=>r.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(((...e)=>r.save&&r.save(...e)),["prevent"]))},[createBaseVNode("div",_hoisted_2$3,[createBaseVNode("label",_hoisted_3$3,toDisplayString(e.translate("COM_MEDIA_NAME")),1),createBaseVNode("div",{class:normalizeClass({"input-group":r.extension.length})},[createBaseVNode("input",{id:"name",ref:"nameField",class:"form-control",type:"text",placeholder:e.translate("COM_MEDIA_NAME"),value:r.name,required:"",autocomplete:"off"},null,8,_hoisted_4$1),r.extension.length?(openBlock(),createElementBlock("span",_hoisted_5$1,toDisplayString(r.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]=e=>r.close()),onKeyup:t[2]||(t[2]=withKeys((e=>r.close()),["enter"]))},toDisplayString(e.translate("JCANCEL")),33),createBaseVNode("button",{type:"button",class:"btn btn-success",disabled:!r.isValid(),onClick:t[3]||(t[3]=e=>r.save()),onKeyup:t[4]||(t[4]=withKeys((e=>r.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(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;n{let t=o[r];return"%d"===e&&(t=parseFloat(t),Number.isNaN(t)&&(t=0)),r+=1,t}))},install:e=>e.mixin({methods:{translate:e=>Translate.translate(e),sprintf(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;nr.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),r.url?(openBlock(),createElementBlock("div",_hoisted_5,[createBaseVNode("span",_hoisted_6,[withDirectives(createBaseVNode("input",{id:"url",ref:"urlText","onUpdate:modelValue":t[1]||(t[1]=e=>r.url=e),readonly:"",type:"url",class:"form-control input-xxlarge",placeholder:"URL",autocomplete:"off"},null,512),[[vModelText,r.url]]),createBaseVNode("button",{class:"btn btn-secondary",type:"button",title:e.translate("COM_MEDIA_SHARE_COPY"),onClick:t[2]||(t[2]=(...e)=>r.copyToClipboard&&r.copyToClipboard(...e))},_hoisted_9,8,_hoisted_7)])])):(openBlock(),createElementBlock("div",_hoisted_4,[createBaseVNode("button",{class:"btn btn-success w-100",type:"button",onClick:t[0]||(t[0]=(...e)=>r.generateUrl&&r.generateUrl(...e))},toDisplayString(e.translate("COM_MEDIA_ACTION_SHARE")),1)]))])])])),footer:withCtx((()=>[createBaseVNode("div",null,[createBaseVNode("button",{class:"btn btn-secondary",onClick:t[3]||(t[3]=e=>r.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,o,n,i,r){const s=resolveComponent("MediaModal");return e.$store.state.showConfirmDeleteModal?(openBlock(),createBlock(s,{key:0,size:"md","show-close":!1,"label-element":"confirmDeleteTitle",onClose:t[2]||(t[2]=e=>r.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]=e=>r.close())},toDisplayString(e.translate("JCANCEL")),1),createBaseVNode("button",{id:"media-delete-item",class:"btn btn-danger",onClick:t[1]||(t[1]=e=>r.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:()=>({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,o,n,i,r){const s=resolveComponent("MediaDisk"),a=resolveComponent("MediaToolbar"),c=resolveComponent("MediaBrowser"),l=resolveComponent("MediaUpload"),d=resolveComponent("MediaCreateFolderModal"),u=resolveComponent("MediaPreviewModal"),p=resolveComponent("MediaRenameModal"),h=resolveComponent("MediaShareModal"),m=resolveComponent("MediaConfirmDeleteModal");return openBlock(),createElementBlock("div",_hoisted_1,[createBaseVNode("div",_hoisted_2,[(openBlock(!0),createElementBlock(Fragment,null,renderList(r.disks,((e,t)=>(openBlock(),createBlock(s,{key:t.toString(),uid:t.toString(),disk:e},null,8,["uid","disk"])))),128))]),createBaseVNode("div",_hoisted_3,[createVNode(a),createVNode(c)]),createVNode(l),createVNode(d),createVNode(u),createVNode(p),createVNode(h),createVNode(m)])}script.render=render,script.__file="administrator/components/com_media/resources/scripts/components/app.vue";class Event$1{constructor(){this.events={}}fire(e,t){void 0===t&&(t=null),this.events[e]&&this.events[e].forEach((e=>e(t)))}listen(e,t){this.events[e]=this.events[e]||[],this.events[e].push(t)}}function getDevtoolsGlobalHook(){return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__}function getTarget(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}}const isProxyAvailable="function"==typeof Proxy,HOOK_SETUP="devtools-plugin:setup",HOOK_PLUGIN_SETTINGS_SET="plugin:settings:set";let supported,perf;function isPerformanceSupported(){var e;return void 0!==supported||("undefined"!=typeof window&&window.performance?(supported=!0,perf=window.performance):"undefined"!=typeof global&&(null===(e=global.perf_hooks)||void 0===e?void 0:e.performance)?(supported=!0,perf=global.perf_hooks.performance):supported=!1),supported}function now(){return isPerformanceSupported()?perf.now():Date.now()}class ApiProxy{constructor(e,t){var o=this;this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const t in e.settings){const o=e.settings[t];n[t]=o.defaultValue}const i="__vue-devtools-plugin-settings__"+e.id;let r=Object.assign({},n);try{const e=localStorage.getItem(i),t=JSON.parse(e);Object.assign(r,t)}catch(e){}this.fallbacks={getSettings:()=>r,setSettings(e){try{localStorage.setItem(i,JSON.stringify(e))}catch(e){}r=e},now:()=>now()},t&&t.on("plugin:settings:set",((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:function(){for(var e=arguments.length,n=new Array(e),i=0;ithis.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?function(){for(var e=arguments.length,n=new Array(e),i=0;i{}}),o.fallbacks[t](...n)}:function(){for(var e=arguments.length,n=new Array(e),i=0;i{o.targetQueue.push({method:t,args:n,resolve:e})}))}})}async setRealTarget(e){this.target=e;for(const e of this.onQueue)this.target.on[e.method](...e.args);for(const e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}}function setupDevtoolsPlugin(e,t){const o=e,n=getTarget(),i=getDevtoolsGlobalHook(),r=isProxyAvailable&&o.enableEarlyProxy;if(!i||!n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&r){const e=r?new ApiProxy(o,i):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:o,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}else i.emit(HOOK_SETUP,e,t)}var storeKey="store";function forEachValue(e,t){Object.keys(e).forEach((function(o){return t(e[o],o)}))}function isObject(e){return null!==e&&"object"==typeof e}function isPromise(e){return e&&"function"==typeof e.then}function partial(e,t){return function(){return e(t)}}function genericSubscribe(e,t,o){return t.indexOf(e)<0&&(o&&o.prepend?t.unshift(e):t.push(e)),function(){var o=t.indexOf(e);o>-1&&t.splice(o,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 o=e.state;installModule(e,o,[],e._modules.root,!0),resetStoreState(e,o,t)}function resetStoreState(e,t,o){var n=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var r=e._wrappedGetters,s={},a={},c=effectScope(!0);c.run((function(){forEachValue(r,(function(t,o){s[o]=partial(t,e),a[o]=computed((function(){return s[o]()})),Object.defineProperty(e.getters,o,{get:function(){return a[o].value},enumerable:!0})}))})),e._state=reactive({data:t}),e._scope=c,e.strict&&enableStrictMode(e),n&&o&&e._withCommit((function(){n.data=null})),i&&i.stop()}function installModule(e,t,o,n,i){var r=!o.length,s=e._modules.getNamespace(o);if(n.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=n),!r&&!i){var a=getNestedState(t,o.slice(0,-1)),c=o[o.length-1];e._withCommit((function(){a[c]=n.state}))}var l=n.context=makeLocalContext(e,s,o);n.forEachMutation((function(t,o){registerMutation(e,s+o,t,l)})),n.forEachAction((function(t,o){var n=t.root?o:s+o,i=t.handler||t;registerAction(e,n,i,l)})),n.forEachGetter((function(t,o){registerGetter(e,s+o,t,l)})),n.forEachChild((function(n,r){installModule(e,t,o.concat(r),n,i)}))}function makeLocalContext(e,t,o){var n=""===t,i={dispatch:n?e.dispatch:function(o,n,i){var r=unifyObjectStyle(o,n,i),s=r.payload,a=r.options,c=r.type;return a&&a.root||(c=t+c),e.dispatch(c,s)},commit:n?e.commit:function(o,n,i){var r=unifyObjectStyle(o,n,i),s=r.payload,a=r.options,c=r.type;a&&a.root||(c=t+c),e.commit(c,s,a)}};return Object.defineProperties(i,{getters:{get:n?function(){return e.getters}:function(){return makeLocalGetters(e,t)}},state:{get:function(){return getNestedState(e.state,o)}}}),i}function makeLocalGetters(e,t){if(!e._makeLocalGettersCache[t]){var o={},n=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,n)===t){var r=i.slice(n);Object.defineProperty(o,r,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=o}return e._makeLocalGettersCache[t]}function registerMutation(e,t,o,n){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){o.call(e,n.state,t)}))}function registerAction(e,t,o,n){(e._actions[t]||(e._actions[t]=[])).push((function(t){var i=o.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},t);return isPromise(i)||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}function registerGetter(e,t,o,n){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return o(n.state,n.getters,e.state,e.getters)})}function enableStrictMode(e){watch((function(){return e._state.data}),(function(){}),{deep:!0,flush:"sync"})}function getNestedState(e,t){return t.reduce((function(e,t){return e[t]}),e)}function unifyObjectStyle(e,t,o){return isObject(e)&&e.type&&(o=t,t=e,e=e.type),{type:e,payload:t,options:o}}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(o){o.addTimelineLayer({id:MUTATIONS_LAYER_ID,label:"Vuex Mutations",color:COLOR_LIME_500}),o.addTimelineLayer({id:ACTIONS_LAYER_ID,label:"Vuex Actions",color:COLOR_LIME_500}),o.addInspector({id:INSPECTOR_ID,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),o.on.getInspectorTree((function(o){if(o.app===e&&o.inspectorId===INSPECTOR_ID)if(o.filter){var n=[];flattenStoreForInspectorTree(n,t._modules.root,o.filter,""),o.rootNodes=n}else o.rootNodes=[formatStoreForInspectorTree(t._modules.root,"")]})),o.on.getInspectorState((function(o){if(o.app===e&&o.inspectorId===INSPECTOR_ID){var n=o.nodeId;makeLocalGetters(t,n),o.state=formatStoreForInspectorState(getStoreModule(t._modules,n),"root"===n?t.getters:t._makeLocalGettersCache,n)}})),o.on.editInspectorState((function(o){if(o.app===e&&o.inspectorId===INSPECTOR_ID){var n=o.nodeId,i=o.path;"root"!==n&&(i=n.split("/").filter(Boolean).concat(i)),t._withCommit((function(){o.set(t._state.data,i,o.state.value)}))}})),t.subscribe((function(e,t){var n={};e.payload&&(n.payload=e.payload),n.state=t,o.notifyComponentUpdate(),o.sendInspectorTree(INSPECTOR_ID),o.sendInspectorState(INSPECTOR_ID),o.addTimelineEvent({layerId:MUTATIONS_LAYER_ID,event:{time:Date.now(),title:e.type,data:n}})})),t.subscribeAction({before:function(e,t){var n={};e.payload&&(n.payload=e.payload),e._id=actionId++,e._time=Date.now(),n.state=t,o.addTimelineEvent({layerId:ACTIONS_LAYER_ID,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:n}})},after:function(e,t){var n={},i=Date.now()-e._time;n.duration={_custom:{type:"duration",display:i+"ms",tooltip:"Action duration",value:i}},e.payload&&(n.payload=e.payload),n.state=t,o.addTimelineEvent({layerId:ACTIONS_LAYER_ID,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:n}})}})}))}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&&"root"!==e?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(o){return formatStoreForInspectorTree(e._children[o],t+o+"/")}))}}function flattenStoreForInspectorTree(e,t,o,n){n.includes(o)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:t.namespaced?[TAG_NAMESPACED]:[]}),Object.keys(t._children).forEach((function(i){flattenStoreForInspectorTree(e,t._children[i],o,n+i+"/")}))}function formatStoreForInspectorState(e,t,o){t="root"===o?t:t[o];var n=Object.keys(t),i={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(n.length){var r=transformPathsToObjectTree(t);i.getters=Object.keys(r).map((function(e){return{key:e.endsWith("/")?extractNameFromPath(e):e,editable:!1,value:canThrow((function(){return r[e]}))}}))}return i}function transformPathsToObjectTree(e){var t={};return Object.keys(e).forEach((function(o){var n=o.split("/");if(n.length>1){var i=t,r=n.pop();n.forEach((function(e){i[e]||(i[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),i=i[e]._custom.value})),i[r]=canThrow((function(){return e[o]}))}else t[o]=canThrow((function(){return e[o]}))})),t}function getStoreModule(e,t){var o=t.split("/").filter((function(e){return e}));return o.reduce((function(e,n,i){var r=e[n];if(!r)throw new Error('Missing module "'+n+'" for path "'+t+'".');return i===o.length-1?r:r._children}),"root"===t?e:e.root._children)}function canThrow(e){try{return e()}catch(e){return e}}var Module=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var o=e.state;this.state=("function"==typeof o?o():o)||{}},prototypeAccessors$1={namespaced:{configurable:!0}};prototypeAccessors$1.namespaced.get=function(){return!!this._rawModule.namespaced},Module.prototype.addChild=function(e,t){this._children[e]=t},Module.prototype.removeChild=function(e){delete this._children[e]},Module.prototype.getChild=function(e){return this._children[e]},Module.prototype.hasChild=function(e){return e in this._children},Module.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Module.prototype.forEachChild=function(e){forEachValue(this._children,e)},Module.prototype.forEachGetter=function(e){this._rawModule.getters&&forEachValue(this._rawModule.getters,e)},Module.prototype.forEachAction=function(e){this._rawModule.actions&&forEachValue(this._rawModule.actions,e)},Module.prototype.forEachMutation=function(e){this._rawModule.mutations&&forEachValue(this._rawModule.mutations,e)},Object.defineProperties(Module.prototype,prototypeAccessors$1);var ModuleCollection=function(e){this.register([],e,!1)};function update(e,t,o){if(t.update(o),o.modules)for(var n in o.modules){if(!t.getChild(n))return;update(e.concat(n),t.getChild(n),o.modules[n])}}function createStore(e){return new Store(e)}ModuleCollection.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},ModuleCollection.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,o){return e+((t=t.getChild(o)).namespaced?o+"/":"")}),"")},ModuleCollection.prototype.update=function(e){update([],this.root,e)},ModuleCollection.prototype.register=function(e,t,o){var n=this;void 0===o&&(o=!0);var i=new Module(t,o);0===e.length?this.root=i:this.get(e.slice(0,-1)).addChild(e[e.length-1],i);t.modules&&forEachValue(t.modules,(function(t,i){n.register(e.concat(i),t,o)}))},ModuleCollection.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),o=e[e.length-1],n=t.getChild(o);n&&n.runtime&&t.removeChild(o)},ModuleCollection.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),o=e[e.length-1];return!!t&&t.hasChild(o)};var Store=function(e){var t=this;void 0===e&&(e={});var o=e.plugins;void 0===o&&(o=[]);var n=e.strict;void 0===n&&(n=!1);var i=e.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(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=i;var r=this,s=this.dispatch,a=this.commit;this.dispatch=function(e,t){return s.call(r,e,t)},this.commit=function(e,t,o){return a.call(r,e,t,o)},this.strict=n;var c=this._modules.root.state;installModule(this,c,[],this._modules.root),resetStoreState(this,c),o.forEach((function(e){return e(t)}))},prototypeAccessors={state:{configurable:!0}};Store.prototype.install=function(e,t){e.provide(t||storeKey,this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&addDevtools(e,this)},prototypeAccessors.state.get=function(){return this._state.data},prototypeAccessors.state.set=function(e){},Store.prototype.commit=function(e,t,o){var n=this,i=unifyObjectStyle(e,t,o),r=i.type,s=i.payload,a={type:r,payload:s},c=this._mutations[r];c&&(this._withCommit((function(){c.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(a,n.state)})))},Store.prototype.dispatch=function(e,t){var o=this,n=unifyObjectStyle(e,t),i=n.type,r=n.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,o.state)}))}catch(e){}var c=a.length>1?Promise.all(a.map((function(e){return e(r)}))):a[0](r);return new Promise((function(e,t){c.then((function(t){try{o._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,o.state)}))}catch(e){}e(t)}),(function(e){try{o._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,o.state,e)}))}catch(e){}t(e)}))}))}},Store.prototype.subscribe=function(e,t){return genericSubscribe(e,this._subscribers,t)},Store.prototype.subscribeAction=function(e,t){return genericSubscribe("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},Store.prototype.watch=function(e,t,o){var n=this;return watch((function(){return e(n.state,n.getters)}),t,Object.assign({},o))},Store.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Store.prototype.registerModule=function(e,t,o){void 0===o&&(o={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),installModule(this,this.state,e,this._modules.get(e),o.preserveState),resetStoreState(this,this.state)},Store.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete getNestedState(t.state,e.slice(0,-1))[e[e.length-1]]})),resetStore(this)},Store.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},Store.prototype.hotUpdate=function(e){this._modules.update(e),resetStore(this,!0)},Store.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Store.prototype,prototypeAccessors);var isMergeableObject=function(e){return isNonNullObject(e)&&!isSpecial(e)};function isNonNullObject(e){return!!e&&"object"==typeof e}function isSpecial(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||isReactElement(e)}var canUseSymbol="function"==typeof Symbol&&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!1!==t.clone&&t.isMergeableObject(e)?deepmerge(emptyTarget(e),e,t):e}function defaultArrayMerge(e,t,o){return e.concat(t).map((function(e){return cloneUnlessOtherwiseSpecified(e,o)}))}function getMergeFunction(e,t){if(!t.customMerge)return deepmerge;var o=t.customMerge(e);return"function"==typeof o?o: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(e){return!1}}function propertyIsUnsafe(e,t){return propertyIsOnObject(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function mergeObject(e,t,o){var n={};return o.isMergeableObject(e)&&getKeys(e).forEach((function(t){n[t]=cloneUnlessOtherwiseSpecified(e[t],o)})),getKeys(t).forEach((function(i){propertyIsUnsafe(e,i)||(propertyIsOnObject(e,i)&&o.isMergeableObject(t[i])?n[i]=getMergeFunction(i,o)(e[i],t[i],o):n[i]=cloneUnlessOtherwiseSpecified(t[i],o))})),n}function deepmerge(e,t,o){(o=o||{}).arrayMerge=o.arrayMerge||defaultArrayMerge,o.isMergeableObject=o.isMergeableObject||isMergeableObject,o.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var n=Array.isArray(t);return n===Array.isArray(e)?n?o.arrayMerge(e,t,o):mergeObject(e,t,o):cloneUnlessOtherwiseSpecified(t,o)}deepmerge.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,o){return deepmerge(e,o,t)}),{})};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(e){return this._queue.push(e),this._flushing?Promise.resolve():this.flushQueue()}flushQueue(){this._flushing=!0;const e=()=>{const t=this._queue.shift();if(t)return t.then(e);this._flushing=!1};return Promise.resolve(e())}}const options$1={replaceArrays:{arrayMerge:(e,t,o)=>t},concatArrays:{arrayMerge:(e,t,o)=>e.concat(...t)}};function merge(e,t,o){return cjs(e,t,options$1[o])}let FlattedJSON=JSON;class VuexPersistence{constructor(e){this._mutex=new SimplePromiseQueue,this.subscriber=e=>t=>e.subscribe(t),void 0===e&&(e={}),this.key=null!=e.key?e.key:"vuex",this.subscribed=!1,this.supportCircular=e.supportCircular||!1,this.supportCircular&&(FlattedJSON=require("flatted")),this.mergeOption=e.mergeOption||"replaceArrays";let t=!0;try{window.localStorage.getItem("")}catch(e){t=!1}if(e.storage)this.storage=e.storage;else if(t)this.storage=window.localStorage;else{if(!MockStorage)throw new Error("Neither 'window' is defined, nor 'MockStorage' is available");this.storage=new MockStorage}this.reducer=null!=e.reducer?e.reducer:null==e.modules?e=>e:t=>e.modules.reduce(((e,o)=>merge(e,{[o]:t[o]},this.mergeOption)),{}),this.filter=e.filter||(e=>!0),this.strictMode=e.strictMode||!1,this.RESTORE_MUTATION=function(e,t){const o=merge(e,t||{},this.mergeOption);for(const t of Object.keys(o))this._vm.$set(e,t,o[t])},this.asyncStorage=e.asyncStorage||!1,this.asyncStorage?(this.restoreState=null!=e.restoreState?e.restoreState:(e,t)=>t.getItem(e).then((e=>"string"==typeof e?this.supportCircular?FlattedJSON.parse(e||"{}"):JSON.parse(e||"{}"):e||{})),this.saveState=null!=e.saveState?e.saveState:(e,t,o)=>o.setItem(e,this.asyncStorage?merge({},t||{},this.mergeOption):this.supportCircular?FlattedJSON.stringify(t):JSON.stringify(t)),this.plugin=e=>{e.restored=this.restoreState(this.key,this.storage).then((t=>{this.strictMode?e.commit("RESTORE_MUTATION",t):e.replaceState(merge(e.state,t||{},this.mergeOption)),this.subscriber(e)(((e,t)=>{this.filter(e)&&this._mutex.enqueue(this.saveState(this.key,this.reducer(t),this.storage))})),this.subscribed=!0}))}):(this.restoreState=null!=e.restoreState?e.restoreState:(e,t)=>{const o=t.getItem(e);return"string"==typeof o?this.supportCircular?FlattedJSON.parse(o||"{}"):JSON.parse(o||"{}"):o||{}},this.saveState=null!=e.saveState?e.saveState:(e,t,o)=>o.setItem(e,this.supportCircular?FlattedJSON.stringify(t):JSON.stringify(t)),this.plugin=e=>{const t=this.restoreState(this.key,this.storage);this.strictMode?e.commit("RESTORE_MUTATION",t):e.replaceState(merge(e.state,t||{},this.mergeOption)),this.subscriber(e)(((e,t)=>{this.filter(e)&&this.saveState(this.key,this.reducer(t),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(void 0===options.providers||0===options.providers.length)throw new TypeError("Media providers are not defined.");const getDrives=(e,t)=>e.map((e=>({root:t+"-"+e+":/",displayName:e}))),loadedDisks=options.providers.map((e=>{return{displayName:e.displayName,drives:(t=e.adapterNames,o=e.name,t.map((e=>({root:o+"-"+e+":/",displayName:e}))))};var t,o})),defaultDisk=loadedDisks.find((e=>e.drives.length>0&&void 0!==e.drives[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(":/");if(!t.length)return setSession(defaultDisk.drives[0].root),defaultDisk.drives[0].root;return Object.values(loadedDisks).map((e=>e.drives)).flat().find((e=>e.root.startsWith(t[0])))?(setSession(e),e):(setSession(defaultDisk.drives[0].root),defaultDisk.drives[0].root)}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:getSelectedDirectory,getSelectedDirectoryDirectories:getSelectedDirectoryDirectories,getSelectedDirectoryFiles:getSelectedDirectoryFiles,getSelectedDirectoryContents:getSelectedDirectoryContents});const updateUrlPath=e=>{const t=null===e?"":e,o=new URL(window.location.href);o.searchParams.has("path")?window.history.pushState(null,"",o.href.replace(/\b(path=).*?(&|$)/,"$1"+t+"$2")):window.history.pushState(null,"",o.href+(o.href.indexOf("?")>0?"&":"?")+"path="+t)},getContents=(e,t)=>{updateUrlPath(t),e.commit(SET_IS_LOADING,!0),api.getContents(t,!1,!1).then((o=>{e.commit(LOAD_CONTENTS_SUCCESS,o),e.commit(UNSELECT_ALL_BROWSER_ITEMS),e.commit(SELECT_DIRECTORY,t),e.commit(SET_IS_LOADING,!1)})).catch((t=>{throw e.commit(SET_IS_LOADING,!1),new Error(t)}))},getFullContents=(e,t)=>{e.commit(SET_IS_LOADING,!0),api.getContents(t.path,!0,!0).then((t=>{e.commit(LOAD_FULL_CONTENTS_SUCCESS,t.files[0]),e.commit(SET_IS_LOADING,!1)})).catch((t=>{throw e.commit(SET_IS_LOADING,!1),new Error(t)}))},download=(e,t)=>{api.getContents(t.path,!1,!0).then((e=>{const t=e.files[0],o=document.createElement("a");o.href="data:"+t.mime_type+";base64,"+t.content,o.download=t.name,document.body.appendChild(o),o.click(),document.body.removeChild(o)})).catch((e=>{throw new Error(e)}))},toggleBrowserItemSelect=(e,t)=>{const o=t;e.state.selectedItems.some((e=>e.path===o.path))?e.commit(UNSELECT_BROWSER_ITEM,o):e.commit(SELECT_BROWSER_ITEM,o)},createDirectory=(e,t)=>{api.canCreate&&(e.commit(SET_IS_LOADING,!0),api.createDirectory(t.name,t.parent).then((t=>{e.commit(CREATE_DIRECTORY_SUCCESS,t),e.commit(HIDE_CREATE_FOLDER_MODAL),e.commit(SET_IS_LOADING,!1)})).catch((t=>{throw e.commit(SET_IS_LOADING,!1),new Error(t)})))},uploadFile=(e,t)=>{api.canCreate&&(e.commit(SET_IS_LOADING,!0),api.upload(t.name,t.parent,t.content,t.override||!1).then((t=>{e.commit(UPLOAD_SUCCESS,t),e.commit(SET_IS_LOADING,!1)})).catch((o=>{e.commit(SET_IS_LOADING,!1),409===o.status&¬ifications.ask(Translate.sprintf("COM_MEDIA_FILE_EXISTS_AND_OVERRIDE",t.name),{})&&(t.override=!0,uploadFile(e,t))})))},renameItem=(e,t)=>{api.canEdit&&(void 0!==t.item.canEdit&&!1===t.item.canEdit||(e.commit(SET_IS_LOADING,!0),api.rename(t.item.path,t.newPath).then((o=>{e.commit(RENAME_SUCCESS,{item:o,oldPath:t.item.path,newName:t.newName}),e.commit(HIDE_RENAME_MODAL),e.commit(SET_IS_LOADING,!1)})).catch((t=>{throw e.commit(SET_IS_LOADING,!1),new Error(t)}))))},deleteSelectedItems=e=>{if(!api.canDelete)return;e.commit(SET_IS_LOADING,!0);const{selectedItems:t,search:o}=e.state;t.length>0&&t.forEach((t=>{void 0!==t.canDelete&&!1===t.canDelete||o&&!t.name.toLowerCase().includes(o.toLowerCase())||api.delete(t.path).then((()=>{e.commit(DELETE_SUCCESS,t),e.commit(UNSELECT_ALL_BROWSER_ITEMS),e.commit(SET_IS_LOADING,!1)})).catch((t=>{throw e.commit(SET_IS_LOADING,!1),new Error(t)}))}))},updateItemProperties=(e,t)=>e.commit(UPDATE_ITEM_PROPERTIES,t);var actions=Object.freeze({__proto__:null,getContents:getContents,getFullContents:getFullContents,download:download,toggleBrowserItemSelect:toggleBrowserItemSelect,createDirectory:createDirectory,uploadFile:uploadFile,renameItem:renameItem,deleteSelectedItems:deleteSelectedItems,updateItemProperties:updateItemProperties});const gridItemSizes=["sm","md","lg","xl"];var mutations={[SELECT_DIRECTORY]:(e,t)=>{e.selectedDirectory=t,e.search=""},[LOAD_CONTENTS_SUCCESS]:(e,t)=>{!function t(o){if(!e.directories.some((e=>e.path===o))){const n=function(e){const t=e.split("/");let o=dirname(e);return-1!==o.indexOf(":",o.length-1)&&(o+="/"),{path:e,name:t[t.length-1],directories:[],files:[],directory:"."!==o?o:null,type:"dir",mime_type:"directory"}}(o);n.directories=e.directories.filter((e=>e.directory===n.path)).map((e=>e.path)),e.directories.push(n),n.directory&&t(n.directory)}}(e.selectedDirectory),t.directories.forEach((t=>function(t,o){const n=e.directories.find((e=>e.path===o.directory)),i=e.directories.indexOf(n);let r=e.directories.findIndex((e=>e.path===o.path));-1===r&&(r=e.directories.length),e.directories.splice(r,1,o),-1!==i&&e.directories.splice(i,1,_extends({},n,{directories:[...n.directories,o.path]}))}(0,t))),t.files.forEach((t=>function(t,o){const n=e.directories.find((e=>e.path===o.directory)),i=e.directories.indexOf(n);let r=e.files.findIndex((e=>e.path===o.path));-1===r&&(r=e.files.length),e.files.splice(r,1,o),-1!==i&&e.directories.splice(i,1,_extends({},n,{files:[...n.files,o.path]}))}(0,t)))},[UPLOAD_SUCCESS]:(e,t)=>{const o=t;if(!e.files.some((e=>e.path===o.path))){const t=e.directories.find((e=>e.path===o.directory)),n=e.directories.indexOf(t);e.files.push(o),e.directories.splice(n,1,_extends({},t,{files:[...t.files,o.path]}))}},[CREATE_DIRECTORY_SUCCESS]:(e,t)=>{const o=t;if(!e.directories.some((e=>e.path===o.path))){const t=e.directories.find((e=>e.path===o.directory)),n=e.directories.indexOf(t);e.directories.push(o),e.directories.splice(n,1,_extends({},t,{directories:[...t.directories,o.path]}))}},[RENAME_SUCCESS]:(e,t)=>{e.selectedItems[e.selectedItems.length-1].name=t.newName;const{item:o}=t,{oldPath:n}=t;if("file"===o.type){const t=e.files.findIndex((e=>e.path===n));e.files.splice(t,1,o)}else{const t=e.directories.findIndex((e=>e.path===n));e.directories.splice(t,1,o)}},[DELETE_SUCCESS]:(e,t)=>{const o=t;"file"===o.type&&e.files.splice(e.files.findIndex((e=>e.path===o.path)),1),"dir"===o.type&&e.directories.splice(e.directories.findIndex((e=>e.path===o.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 o=t;e.selectedItems.splice(e.selectedItems.findIndex((e=>e.path===o.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{const t=gridItemSizes.indexOf(e.gridSize);t>0&&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:o,width:n,height:i}=t,r=e.files.findIndex((e=>e.path===o.path));e.files[r].width=n,e.files[r].height=i},[UPDATE_SORT_BY]:(e,t)=>{e.sortBy=t},[UPDATE_SORT_DIRECTION]:(e,t)=>{e.sortDirection="asc"===t?"asc":"desc"}},store=createStore({state:state,getters:getters,actions:actions,mutations: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");